{"id":605,"date":"2015-05-19T14:38:12","date_gmt":"2015-05-19T21:38:12","guid":{"rendered":"http:\/\/internetofhomethings.com\/homethings\/?p=605"},"modified":"2015-05-20T07:34:25","modified_gmt":"2015-05-20T14:34:25","slug":"a-cleaner-esp8266-12-hardware-setup","status":"publish","type":"post","link":"https:\/\/internetofhomethings.com\/homethings\/?p=605","title":{"rendered":"A cleaner ESP8266-12 hardware setup"},"content":{"rendered":"<h4 style=\"text-align: center;\"><strong>ESP8266 packaging issues<\/strong><\/h4>\n<p style=\"text-align: left;\">One of the first challenges to overcome when you get a bare module ESP8266-12 SoC is how to connect this unit to a circuit. It comes without header pins and the pin pitch is less than the standard 2.54 used on solder-less and copper breadboards. Clearly, it is not ready to use out-of-the-box like, for example, any of the Arduino options.<\/p>\n<p>My first circuit used a 16-pin DIP package with short jumper wires soldered between the ESP8266 pin holes and the DIP. This assembly was then plugged directly on a solder-less breadboard. While this gave me a quick start into the ESP8266 world, the setup was messy and even worse\u00a0&#8211;\u00a0unstable.<\/p>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/04\/breadboard.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-397 size-medium\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/04\/breadboard-212x300.jpg\" alt=\"Solder-less Breadboard\" width=\"212\" height=\"300\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/04\/breadboard-212x300.jpg 212w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/04\/breadboard-725x1024.jpg 725w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/a><\/p>\n<p>Disappointed and often frustrated by the poor performance of the setup, my next setup used a copper plated breadboard. The ESP8266 was mounted\u00a0to the board using thin (28 AWG) bare wires. These wires were soldered between the ESP8266 through-holes and the breadboard pads. This was a vast improvement in terms of stability. I currently have a system that has been running for over 2 weeks now with no resets or system crashes. The real-time data collected with <a href=\"https:\/\/thingspeak.com\/channels\/33251#publicview\" target=\"_blank\">this system is displayed publicly on ThingSpeak<\/a> for independent verification.<\/p>\n<p>But with this setup, the tiny interface\u00a0wires require a lot of time to initially assemble.<\/p>\n<p>That&#8217;s where this adapter plate really shines&#8230;<\/p>\n<p>Yes, it really made things easier when I stumbled upon a\u00a0clean and inexpensive adapter for the ESP8266-7\/12 modules. For just 28 cents (<a href=\"http:\/\/www.aliexpress.com\/item\/10pcs-lot-ESP8266-serial-WIFI-module-connecting-plate-applicable-to-ESP-07-the-ESP-08-ESP\/32262406988.html\" target=\"_blank\">AliExpress<\/a>), you get a PWB plate with pre-soldered mounting pads and a 10k pull-up connected to the chip enable (CH_PD).<\/p>\n<p>A 10K resistor is also included that pulls-down GPIO15 to ground. This resistor is way to large to be of any value for that purpose. For proper boot operation, you must add a connection between GPIO15 and ground.<\/p>\n<p>Finally, the fix is in &#8211; the pin labels for GPIO4 and GPIO5 have been corrected\u00a0on this plate. No more confusion for that until now overlooked ESP8266-12\u00a0module design error.<\/p>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-apart.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-606 size-medium\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-apart-300x255.jpg\" alt=\"ESP8266-12 adapter plate\" width=\"300\" height=\"255\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-apart-300x255.jpg 300w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-apart-1024x870.jpg 1024w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-apart.jpg 1569w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The circuit has come together quite nicely. So far, it has proven to be a very dependable configuration. Boots without errors and flashes reliably the first time, every time. We shall see if this remains true as more the flash cycles are performed.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-607 size-medium\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-268x300.jpg\" alt=\"Fully assembled ESP8266 with adapter plate\" width=\"268\" height=\"300\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-268x300.jpg 268w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter-916x1024.jpg 916w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_ESP8266-adapter.jpg 1837w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">This begs the question&#8230; Why not mount all the parts on a plate like this &amp; eliminate the original carrier board?<\/p>\n<h4 style=\"text-align: center;\"><strong>A few design considerations<\/strong><\/h4>\n<ul>\n<li>Notice the 0.1uF decoupling capacitor added close to the ESP8266 assembly. Positioning this essential capacitor there&#8230;directly across\u00a0the ESP8266 VCC and Gnd pins, is absolutely critical for stable operation.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_decouplingcap1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-621 size-medium\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_decouplingcap1-225x300.jpg\" alt=\"20150519_decouplingcap\" width=\"225\" height=\"300\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_decouplingcap1-225x300.jpg 225w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150519_decouplingcap1.jpg 700w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<ul>\n<li>The header pins were mounted backwards so the longer posts are facing upwards. This will\u00a0be useful should it be necessary to\u00a0connect female jumpers directly to any ESP8266 pin.<\/li>\n<li>The USB to serial adapter cable connections are split between two terminal sections. The right two terminals connect USB 5V and Ground. The left two terminals, serial transmit and receive, are only used when flashing the firmware. Once deployed, the left two terminals are disconnected and the 5V and ground connections are attached to a USB cable. This supports power sourced from a USB wall or car adapter as well as a USB battery.<\/li>\n<li>The ESP serial receive pin has a 100 ohm series resistor included from the serial transmit source. In addition, a 3.3V zener diode clamps the input voltage into the ESP8266. Many ESP8266 users omit these parts. This is not advisable. Exceeding the specified input range will likely degrade the system performance and possibly introduce hard to find latent defects! For long-term reliable operation, these common, readily available components should be included in every interface circuit.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-serial1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-616\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-serial1-300x116.jpg\" alt=\"ESP8266-schematic - serial\" width=\"300\" height=\"116\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-serial1-300x116.jpg 300w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-serial1-1024x395.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ul>\n<li>An AMS1117 voltage regulator converts the 5V to 3.3V for the ESP8266 supply. This is mounted on the breadboard copper side of the breadboard so the heat sink built into the regulator can be soldered to the board.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-613 size-medium aligncenter\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150518_copperside-225x300.jpg\" alt=\"Regulator Heat Sink\" width=\"225\" height=\"300\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150518_copperside-225x300.jpg 225w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150518_copperside.jpg 500w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/p>\n<ul>\n<li>To\u00a0minimize instabilities from voltage ripple, two\u00a0470 uF capacitors are used, one across the 5V source and one across the 3.3V ESP8266 supply.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-serial.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-614 aligncenter\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-power-300x137.jpg\" alt=\"ESP8266-schematic - power\" width=\"300\" height=\"137\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-power-300x137.jpg 300w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-power-1024x468.jpg 1024w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/ESP8266-schematic-power.jpg 2019w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2015\/05\/20150518_copperside.jpg\"><br \/>\n<\/a><\/p>\n<h4 style=\"text-align: center;\"><strong>In Conclusion<\/strong><\/h4>\n<p>In my experience, while cheap, feature rich and full of promise,\u00a0<a href=\"http:\/\/wp.me\/p5NRQ8-6o\" target=\"_blank\">unwanted system resets<\/a>, <a href=\"http:\/\/wp.me\/p5NRQ8-8G\" target=\"_blank\">flash failures<\/a> and crashes have been the curse when working with the ESP8266.<\/p>\n<p>But there is hope&#8230;<\/p>\n<p>This recently introduced\u00a0adapter plate, along with the hardware interface features presented here will help mitigate these undesirable outcomes.<\/p>\n<p>Hope you find this information useful&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESP8266 packaging issues One of the first challenges to overcome when you get a bare module ESP8266-12 SoC is how to connect this unit to a circuit. It comes without &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10],"tags":[34,36,35],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-alltheposts","category-esp8266","tag-esp8266-adapter","tag-esp8266-packaging","tag-esp8266-reliability"],"_links":{"self":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=605"}],"version-history":[{"count":11,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions\/623"}],"wp:attachment":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}