{"id":1460,"date":"2019-10-29T17:38:21","date_gmt":"2019-10-29T17:38:21","guid":{"rendered":"http:\/\/tomblog.firstsolo.net\/?page_id=1460"},"modified":"2021-09-01T14:57:06","modified_gmt":"2021-09-01T14:57:06","slug":"pid-controller-rev-2","status":"publish","type":"page","link":"http:\/\/tomblog.firstsolo.net\/index.php\/hobbies\/pimping-my-coffee-machine\/pid-controller-rev-2\/","title":{"rendered":"Hot Metal Brewbot rev 2"},"content":{"rendered":"\n<p>My new controller board is complete and has been delivering good coffee for several months now.<\/p>\n\n\n\n<p>Here are some of the improvements:<\/p>\n\n\n\n<ul><li>Much better provision for heatsinking the TRIACs. With an option to use water cooling (as it turns out I haven&#8217;t needed it, but it would definitely mean no more TRIAC overheating ever if I implemented it).<\/li><li>Potential to use <a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/temperature-probe-design\/#typesofdevices\">thermocouple or NTC temperature probes<\/a>.<\/li><li>Up to 3 temperature probes. This would allow for an algorithm to <a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/where-to-mount-a-temperature-probe\/#steammodeflowrate\">correctly control water flow rate when steaming<\/a> and still give a spare probe (maybe to check the TRIACs don&#8217;t overheat or for a Gaggia Baby Twin steam boiler).<\/li><li>Water level probe.<\/li><li>Support for Gaggia Baby Twin steam boiler. (Extra temperature input and drive TRIAC).<\/li><li>Louder piezo buzzer.<\/li><li>5V and GND exposed via pins for add-ons.<\/li><li>TWI interface available. (Rather than using the pins for something else as I did previously!). This allows communication with add-ons and (yay!) also with the Baby Twin front panel.<\/li><li><a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/doubling-gaggia-heating-power\/\">Power doubling<\/a> is now done on-board so no external diodes needed. (This is why there are now five TRIACs, one for the steam boiler, one for each element of the main boiler and one for each of the pump and solenoid.)<\/li><li>Better solution for mounting the board in the coffee machine (assuming you have a Gaggia Baby &#8211; any volunteers to do a Gaggia Classic PCB layout?).<\/li><li>The transformer&#8217;s pinouts are arranged so that 120VAC transformers can be used for my coffee modding friends in the USA. (Whilst also still being able to use a 240VAC transformer as well of course.)<\/li><\/ul>\n\n\n\n<p>The rev2 schematic is <a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2020\/12\/coffeepidshield.pdf\">coffeepidshield.pdf<\/a>. Gerber files are <a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2020\/12\/coffeepidshield.gerber.zip\">here<\/a>. Eagle files are <a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2020\/12\/coffeepidshield.eagle_.zip\">here<\/a>. Have a look particularly at DesignNotes.txt in the Eagle files zip for a mine of information. Or get the most up to date info at <a rel=\"noopener\" href=\"https:\/\/github.com\/tombrazier\/hotmetal\" target=\"_blank\">GitHub<\/a>.<\/p>\n\n\n\n<p>If you are in the USA or on another 120VAC mains supply, you might find it <a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/hot-metal-brewbot-usa-bom\/\" data-type=\"post\" data-id=\"1782\">this<\/a> bill of materials helpful.<\/p>\n\n\n\n<p>Here&#8217;s a picture of the PCB:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/HotMetalRev2PCB.jpg\"><img loading=\"lazy\" width=\"1200\" height=\"904\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/HotMetalRev2PCB.jpg\" alt=\"\" class=\"wp-image-1762\"\/><\/a><\/figure>\n\n\n\n<p>The board is sized to fit where the Gaggia Baby Twin&#8217;s PCB mounting bracket lives along the left hand side of the top boiler housing. Here&#8217;s a picture of it in place:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/HotMetalRev2PCBInstalled.jpg\"><img loading=\"lazy\" width=\"1200\" height=\"900\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/HotMetalRev2PCBInstalled.jpg\" alt=\"\" class=\"wp-image-1764\"\/><\/a><\/figure>\n\n\n\n<p>That&#8217;s a bit busy so here&#8217;s an old bit of PCB giving an idea of the location:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2019\/10\/mounting_location.jpg\"><img loading=\"lazy\" width=\"400\" height=\"507\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2019\/10\/mounting_location.jpg\" alt=\"\" class=\"wp-image-1500\"\/><\/a><\/figure><\/div>\n\n\n\n<p>The mounting posts for the Twin PCB bracket help to locate it and I have also bolted the PCB to that nice bit of clear base plate with the heatsink. (Note: those mounting posts break off really easily and are best not to be trusted!) I still need to implement some kind of plastic backing plate to this board to insulate the exposed mains voltage solder pads.<\/p>\n\n\n\n<p>The heatsink is a copper plate I bolted over the TRIACs and bent 90\u00b0 so it stands flat and doubles as a mounting bracket for the whole board. There is space on the face of the heatsink for a 40mm x 40mm water-cooled CPU heatsink. This could be cooled by water as it flows from the reservoir to the pump. I have found that the ceramic heatsink pictured above seems to be enough though.<\/p>\n\n\n\n<p>Here&#8217;s a picture of the water-cooled heatsink and the pristine copper sheet (still in plastic film):<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2019\/10\/heatsink.jpg\"><img loading=\"lazy\" width=\"400\" height=\"338\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2019\/10\/heatsink.jpg\" alt=\"\" class=\"wp-image-1499\"\/><\/a><\/figure><\/div>\n\n\n\n<p>And here&#8217;s the finished product before mounting (I loved the colour of the copper so I sprayed it with lacquer to keep it from oxidising):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/08\/IMG_20210116_172450.jpg\"><img loading=\"lazy\" width=\"2336\" height=\"2376\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/08\/IMG_20210116_172450.jpg\" alt=\"\" class=\"wp-image-1778\"\/><\/a><\/figure>\n\n\n\n<p>In commissioning, I found the following errors (despite very carefully checking everything over, there are somehow always errors when the board has actually been printed!).<\/p>\n\n\n\n<ol><li>R43 is specced as being able to drop 400V but is an 0803 component &#8211; no such resistor exists! I have a workaround mod to the board to handle this.<\/li><li id=\"note2\"> R43 and C26 form an RLC circuit with the inductance in the mains wiring and PCB tracks. If the inductance is high enough (and it can be in a normal scenario), this circuit can have oscillations with a peak voltage way above than the 340V mains peak<span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_1460_1('footnote_plugin_reference_1460_1_1');\" onkeypress=\"footnote_moveToReference_1460_1('footnote_plugin_reference_1460_1_1');\" ><sup id=\"footnote_plugin_tooltip_1460_1_1\" class=\"footnote_plugin_tooltip_text\">1<\/sup><\/a><span id=\"footnote_plugin_tooltip_text_1460_1_1\" class=\"footnote_tooltip\">Caused by the inrush current if you switch on in the middle of a mains cycle.<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_1460_1_1').tooltip({ tip: '#footnote_plugin_tooltip_text_1460_1_1', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script>. This caused a catastrophic failure for me<span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_1460_1('footnote_plugin_reference_1460_1_2');\" onkeypress=\"footnote_moveToReference_1460_1('footnote_plugin_reference_1460_1_2');\" ><sup id=\"footnote_plugin_tooltip_1460_1_2\" class=\"footnote_plugin_tooltip_text\">2<\/sup><\/a><span id=\"footnote_plugin_tooltip_text_1460_1_2\" class=\"footnote_tooltip\">A lot of arcing and multiple vaporised tracks. This was a sub-optimal outcome.<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_1460_1_2').tooltip({ tip: '#footnote_plugin_tooltip_text_1460_1_2', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script>. Replacing R43 with a 100R resistor overdamps the RLC circuit and prevents these peaks. Also, putting a metal oxide varistor across Live and Neutral absorbs spikes and prevents arcing.<\/li><li>IC2 is connected to PMPSW instead of STMSW. IC2 changes the temperature range measured by the temperature probe so you can have one range for steam mode and another range for brewing mode. I meant it to be connected to STMSW! I have also decided that it was dumb to do this anyway and I am now driving PMPSW from firmware to control IC2 and have connected the pump switch to one of the DIGITALIO pins instead (the Arduino&#8217;s D10 pin).<\/li><\/ol>\n\n\n\n<p>This picture shows the R43 workaround and also the consequences of the over-voltage event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/IMG_20210103_205142.jpg\"><img loading=\"lazy\" width=\"1500\" height=\"1181\" src=\"http:\/\/tomblog.firstsolo.net\/wp-content\/uploads\/2021\/07\/IMG_20210103_205142.jpg\" alt=\"\" class=\"wp-image-1766\"\/><\/a><figcaption>Rapid unscheduled disassembly<\/figcaption><\/figure>\n\n\n\n<p>Anyway, look out for a rev2.1 design at some point.<\/p>\n<div class=\"speaker-mute footnotes_reference_container\"> <div class=\"footnote_container_prepare\"><p><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_label pointer\" onclick=\"footnote_expand_collapse_reference_container_1460_1();\">&#x202F;<\/span><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_collapse_button\" style=\"display: none;\" onclick=\"footnote_expand_collapse_reference_container_1460_1();\">[<a id=\"footnote_reference_container_collapse_button_1460_1\">+<\/a>]<\/span><\/p><\/div> <div id=\"footnote_references_container_1460_1\" style=\"\"><table class=\"footnotes_table footnote-reference-container\"><caption class=\"accessibility\">References<\/caption> <tbody> \r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_1460_1('footnote_plugin_tooltip_1460_1_1');\"><a id=\"footnote_plugin_reference_1460_1_1\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8593;<\/span>1<\/a><\/th> <td class=\"footnote_plugin_text\">Caused by the inrush current if you switch on in the middle of a mains cycle.<\/td><\/tr>\r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_1460_1('footnote_plugin_tooltip_1460_1_2');\"><a id=\"footnote_plugin_reference_1460_1_2\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8593;<\/span>2<\/a><\/th> <td class=\"footnote_plugin_text\">A lot of arcing and multiple vaporised tracks. This was a sub-optimal outcome.<\/td><\/tr>\r\n\r\n <\/tbody> <\/table> <\/div><\/div><script type=\"text\/javascript\"> function footnote_expand_reference_container_1460_1() { jQuery('#footnote_references_container_1460_1').show(); jQuery('#footnote_reference_container_collapse_button_1460_1').text('\u2212'); } function footnote_collapse_reference_container_1460_1() { jQuery('#footnote_references_container_1460_1').hide(); jQuery('#footnote_reference_container_collapse_button_1460_1').text('+'); } function footnote_expand_collapse_reference_container_1460_1() { if (jQuery('#footnote_references_container_1460_1').is(':hidden')) { footnote_expand_reference_container_1460_1(); } else { footnote_collapse_reference_container_1460_1(); } } function footnote_moveToReference_1460_1(p_str_TargetID) { footnote_expand_reference_container_1460_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } } function footnote_moveToAnchor_1460_1(p_str_TargetID) { footnote_expand_reference_container_1460_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } }<\/script>","protected":false},"excerpt":{"rendered":"<p>My new controller board is complete and has been delivering good coffee for several months now. Here are some of the improvements: Much better provision for heatsinking the TRIACs. With an option to use water cooling (as it turns out &hellip; <a href=\"http:\/\/tomblog.firstsolo.net\/index.php\/hobbies\/pimping-my-coffee-machine\/pid-controller-rev-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":854,"menu_order":3,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/pages\/1460"}],"collection":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/comments?post=1460"}],"version-history":[{"count":14,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/pages\/1460\/revisions"}],"predecessor-version":[{"id":1788,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/pages\/1460\/revisions\/1788"}],"up":[{"embeddable":true,"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/pages\/854"}],"wp:attachment":[{"href":"http:\/\/tomblog.firstsolo.net\/index.php\/wp-json\/wp\/v2\/media?parent=1460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}