{"id":4948,"date":"2016-02-25T22:34:41","date_gmt":"2016-02-26T05:34:41","guid":{"rendered":"http:\/\/www.graphics-muse.org\/wp\/?p=4948"},"modified":"2016-02-25T22:34:41","modified_gmt":"2016-02-26T05:34:41","slug":"esp8266-its-all-about-power","status":"publish","type":"post","link":"https:\/\/www.graphics-muse.org\/wp\/?p=4948","title":{"rendered":"ESP8266: its&#8217; all about power"},"content":{"rendered":"<div id=\"attachment_4949\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.graphics-muse.org\/wp\/?attachment_id=4949\" rel=\"attachment wp-att-4949\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4949\" data-attachment-id=\"4949\" data-permalink=\"https:\/\/www.graphics-muse.org\/wp\/?attachment_id=4949\" data-orig-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?fit=2371%2C1700&amp;ssl=1\" data-orig-size=\"2371,1700\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.4&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;LGLS740&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1456067532&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;3.2&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.05&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"BreadboardPowerSupply\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Strangely, Amazon delivered the board on Sunday.  But I&#8217;m not complaining.&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?fit=300%2C215&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?fit=1024%2C734&amp;ssl=1\" class=\"size-medium wp-image-4949\" src=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?resize=300%2C215&#038;ssl=1\" alt=\"Strangely, Amazon delivered the board on Sunday. But I'm not complaining.\" width=\"300\" height=\"215\" srcset=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?resize=300%2C215&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?resize=768%2C551&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?resize=1024%2C734&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/BreadboardPowerSupply.jpg?w=2340&amp;ssl=1 2340w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-4949\" class=\"wp-caption-text\">Strangely, Amazon delivered the board on Sunday. But I&#8217;m not complaining.<\/p><\/div>\n<p>Programming the ESP8266 is rather easy.\u00a0 I&#8217;m using the A<a href=\"https:\/\/github.com\/esp8266\/Arduino\">rduino libraries<\/a> and the <a href=\"https:\/\/github.com\/plerup\/makeEspArduino\">makeEspArduino<\/a> build system because I like to use the command line, not IDEs.\u00a0 Stock libraries provide everything you&#8217;d expect: Wifi setup, web servers, DNS support, etc.\u00a0 There&#8217;s even a library that allows you to boot into the board as a <a href=\"https:\/\/github.com\/tzapu\/WiFiManager\">WiFi access point with a web server<\/a> to configure it to connect to your local network.\u00a0 It&#8217;s a bit surprising what you can fit into 512k memory.<\/p>\n<p>There are a lot of possibilities with this little board, especially the versions with more GPIO pins but even with just 1 available pin on the ESP-01 you could do some interesting things.\u00a0 The key point is that is requires very little power to control some other device via wireless communications.<\/p>\n<p>But power is exactly where I ran into a little problem.\u00a0 Seems that the <a href=\"https:\/\/www.sparkfun.com\/products\/9873\">FTDI Basic board<\/a> I&#8217;m using to program and power the ESP-01 has a weak voltage regulator.\u00a0 It works fine for uploading new firmware.\u00a0 You can see it working because both the ESP board and the FTDI board flash their LEDs while data is being trasferred.\u00a0 The ESP has a bright blue LED that flashes during programming.\u00a0 It also has a RED LED that shows power to the board. Both are brightly lit when I&#8217;m flashing new firmware to the ESP.<\/p>\n<p>But after the program has been flashed to the board the board needs to be rebooted to run the new program.\u00a0 On reboot the ESP power LED would go dim and the firmware wouldn&#8217;t work.\u00a0 Subsequent boots behaved erratically.\u00a0 The dim power LED was curious and my only clue.\u00a0 A few queries on SparkFun&#8217;s IRC channel led me to an issue with the FTDI&#8217;s regulator.\u00a0 Apparently the ESP is very picky about the 3.3V it needs to run.\u00a0 So I needed to find a separate power supply.<\/p>\n<div id=\"attachment_4950\" style=\"width: 291px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.graphics-muse.org\/wp\/?attachment_id=4950\" rel=\"attachment wp-att-4950\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4950\" data-attachment-id=\"4950\" data-permalink=\"https:\/\/www.graphics-muse.org\/wp\/?attachment_id=4950\" data-orig-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?fit=1634%2C1744&amp;ssl=1\" data-orig-size=\"1634,1744\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.4&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;LGLS740&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1456067494&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;3.2&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.041666666666667&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"esp8266-closeup\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;ESP&#8217;s power light goes dim if the power supply is too weak.&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?fit=281%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?fit=959%2C1024&amp;ssl=1\" class=\"size-medium wp-image-4950\" src=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?resize=281%2C300&#038;ssl=1\" alt=\"ESP's power light goes dim if the power supply is too weak.\" width=\"281\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?resize=281%2C300&amp;ssl=1 281w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?resize=768%2C820&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?resize=959%2C1024&amp;ssl=1 959w, https:\/\/i0.wp.com\/www.graphics-muse.org\/wp\/wp-content\/uploads\/2016\/02\/esp8266-closeup.jpg?w=1634&amp;ssl=1 1634w\" sizes=\"auto, (max-width: 281px) 100vw, 281px\" \/><\/a><p id=\"caption-attachment-4950\" class=\"wp-caption-text\">ESP&#8217;s power light goes dim if the power supply is too weak.<\/p><\/div>\n<p>There a lot of ways to handle this problem.\u00a0 One is to throw together a few discreet components.\u00a0\u00a0 A simpler solution is to find a ready made board.\u00a0 It needs to accept 9v-12v, so that it can be used with the tons of wall wart plugs I have laying around.\u00a0 Ideally it should plug right into the breadboard I&#8217;m using for this project.<\/p>\n<p>I dug around and found <a href=\"http:\/\/smile.amazon.com\/gp\/product\/B010UJFVTU?psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o02_s00\">the one shown here on Amazon<\/a>.\u00a0 It&#8217;s perfect for this project because it spans the bread board providing power and ground to both sides.\u00a0 And it supports either 3.3.V (which the ESP board requires) or 5V based on a switch.\u00a0 It has a power button so I can turn power on and off easily without pulling wires.\u00a0 More importantly, I only had to move 1 wire from my previous setup in order to use it.\u00a0 And it&#8217;s cheap.\u00a0 Well, I mean inexpensive.\u00a0 It&#8217;s actually a nice board.\u00a0 I ordered two.<\/p>\n<p>Amazon managed to ship this to me on a Sunday so I had it just a few days after placing the order.\u00a0 Once I plugged the power board into the breadboard I was able to test new firmware uploads without issue.<\/p>\n<p>In the future I plan to power the board with a battery.\u00a0 But for development, this little power board will do just fine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Programming the ESP8266 is rather easy.\u00a0 I&#8217;m using the Arduino libraries and the makeEspArduino build system because I like to use the command line, not IDEs.\u00a0 Stock libraries provide everything you&#8217;d expect: Wifi setup, web servers, DNS support, etc.\u00a0 There&#8217;s even a library that allows you to boot into the board as a WiFi access [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[605,1,6],"tags":[560,606,517,646,610,649,648,592,40],"class_list":{"0":"post-4948","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-arduino","7":"category-general","8":"category-software-development","9":"tag-amazon","10":"tag-arduino","11":"tag-development","12":"tag-ftdi","13":"tag-ftdi-basic","14":"tag-power-board","15":"tag-power-supply","16":"tag-web-server","17":"tag-wifi","18":"czr-hentry"},"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pe9t8-1hO","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4948"}],"version-history":[{"count":5,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4948\/revisions"}],"predecessor-version":[{"id":4957,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4948\/revisions\/4957"}],"wp:attachment":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}