<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ESP8266 Archives - Digital Me</title>
	<atom:link href="https://ba0sh1.com/tag/esp8266/feed/" rel="self" type="application/rss+xml" />
	<link>https://ba0sh1.com/tag/esp8266/</link>
	<description>Electronics, Computers at leisure time</description>
	<lastBuildDate>Mon, 11 Jul 2022 13:43:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>Is ESP8266 I/O really 5V tolerant?</title>
		<link>https://ba0sh1.com/2016/08/03/is-esp8266-io-really-5v-tolerant/</link>
					<comments>https://ba0sh1.com/2016/08/03/is-esp8266-io-really-5v-tolerant/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Tue, 02 Aug 2016 16:57:55 +0000</pubDate>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[ESP8266]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1187</guid>

					<description><![CDATA[<p>Recently there are some discussion regarding whether ESP8266 I/Os&#160; are 5V tolerant. The most active one being the article on Hackaday. The same article was shared on ESP8266 Facebook group and Espressif...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2016/08/03/is-esp8266-io-really-5v-tolerant/">Is ESP8266 I/O really 5V tolerant?</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Recently there are some discussion regarding whether ESP8266 I/Os&nbsp; are 5V tolerant. The most active one being the <a href="http://hackaday.com/2016/07/28/ask-hackaday-is-the-esp8266-5v-tolerant/" target="_blank" rel="noopener">article </a>on Hackaday. The same article was shared on <a href="https://www.facebook.com/groups/1499045113679103/" target="_blank" rel="noopener">ESP8266 Facebook group</a> and Espressif CEO Mr Teo Swee Ann commented that &#8220;<span><span class="UFICommentBody">i can reply officially here: it is 5V tolerant at the IO. while the supply voltage is at 3.3V.</span></span>&#8220;</p>



<span id="more-1187"></span>



<p>However the Facebook post did not attract too much attentions. I went ahead and shared the same on Twitter with hashtag #ESP8266.</p>



<blockquote class="wp-block-quote twitter-tweet"><p dir="ltr" style="text-align: center;" lang="en">It&#8217;s official! <a href="https://twitter.com/hashtag/ESP8266?src=hash">#ESP8266</a> I/Os are 5V tolerant. <a href="https://twitter.com/hashtag/goodtoknow?src=hash">#goodtoknow</a> <a href="https://t.co/SBf9a7qOx9">pic.twitter.com/SBf9a7qOx9</a></p><p style="text-align: center;">— Baoshi (@ba0sh1) <a href="https://twitter.com/ba0sh1/status/759239169071837184">July 30, 2016</a></p></blockquote>



<p><a href="//platform.twitter.com/widgets.js">//platform.twitter.com/widgets.js</a></p>



<p>Apparently Twitter has much more bandwidth among ESP8266 fans. Soon I received quite a few counter claims that their ESP8266s were toasted by 5V input voltage. So who is correct? The chip designer or the end users? I think it would be interesting to find out.</p>



<p>On a side note, Twitter user vAir (@vAirMon) pointed to me that on Page 17 of ESP8266 Datasheet it is mentioned&nbsp; &#8220;All digital IO pins are protected from over-voltage&#8221;. I looked into my document archive and found it does appear on &#8220;Version 4.3&#8221; of &#8220;ESP8266EX Datasheet&#8221;, released &#8220;Tuesday, May 12, 2015&#8221;.</p>



<figure class="wp-block-image"><img decoding="async" width="916" height="466" src="https://ba0sh1.com/wp-content/uploads/2016/08/68c14-exp8266-gpio-protection-doc.png" alt="" class="wp-image-1191" srcset="https://ba0sh1.com/wp-content/uploads/2016/08/68c14-exp8266-gpio-protection-doc.png 916w, https://ba0sh1.com/wp-content/uploads/2016/08/68c14-exp8266-gpio-protection-doc-300x153.png 300w, https://ba0sh1.com/wp-content/uploads/2016/08/68c14-exp8266-gpio-protection-doc-768x391.png 768w" sizes="(max-width: 916px) 100vw, 916px" /></figure>



<p>But on a more recent version, Version 1.0 (?) , released &#8220;20160422&#8221;, the whole section is removed.</p>



<p>Though intriguing, the &#8220;old&#8221; datasheet do point out that the over protection is based on &#8220;snap back&#8221; circuit, not the traditional two diodes voltage clamp. I found some&nbsp; background information of these two protection methods <a href="http://www.onsemi.com/pub_link/Collateral/AND9009-D.PDF">here</a>. Basically snap back circuit sits only in between input and GND. There is no conductive path between input and power rail therefore it is not possible for 5V input voltage to raise the 3.3V rail.</p>



<h3>Experiment</h3>



<h4>Assumption</h4>



<p>The fact is that I do not have access to any die-inspection equipment. Even if I had the equipment I would not be able to tell if a silicon die was damaged from over voltage. Therefore the experiment is designed based on the assumption that I/O will only destroy the chip via excessive input or output current, which causes thermal breakdown. As the GPIOs on ESP8266 are specified to be able to source 12mA, and usually I/O pins are able to sink more current than sourcing, I conservatively assume that any input/output current larger than 12mA is able to fry the chip.</p>



<h4>Test of over-voltage input</h4>



<p>The experiment setup is as follows:</p>



<figure class="wp-block-image alignnone wp-image-1208"><img decoding="async" loading="lazy" width="1024" height="687" src="https://ba0sh1.com/wp-content/uploads/2016/08/56bd4-gpio-input-voltage-test-1024x687.png" alt="GPIO Input Test" class="wp-image-1208" srcset="https://ba0sh1.com/wp-content/uploads/2016/08/56bd4-gpio-input-voltage-test-1024x687.png 1024w, https://ba0sh1.com/wp-content/uploads/2016/08/56bd4-gpio-input-voltage-test-300x201.png 300w, https://ba0sh1.com/wp-content/uploads/2016/08/56bd4-gpio-input-voltage-test-768x515.png 768w, https://ba0sh1.com/wp-content/uploads/2016/08/56bd4-gpio-input-voltage-test.png 1317w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>GPIO Input Test</figcaption></figure>



<p>For the experiment I&#8217;m using my <a href="https://www.ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/" target="_blank" rel="noopener">ESP8266 Breakout Board</a> with ESP-12E. It has GPIO pins directly connected to the leads. The AMS1117 regulator on the breakout board is removed to get rid of LDO GND current. Instead, the module is powered with 3.3V from GW Instek GPD-3303S power supply. An Advantest/ADCMT 6240A DC Voltage Current Source/Monitor is used to simulate voltage input into GPIO5. I used the following Arduino sketch as testing firmware:</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-c" data-lang="C"><code>#include &lt;esp8266wifi.h&gt;
void setup()
{    
    WiFi.forceSleepBegin(); // turn off ESP8266 RF     
    delay(1); // give RF section time to shutdown
    Serial.begin(115200);
    Serial.println(F(&quot;ESP8266 in No-RF mode&quot;));
    pinMode(5, INPUT);
    pinMode(4, OUTPUT_OPEN_DRAIN);
    digitalWrite(4, HIGH);
}

void loop()
{
    int pin5 = digitalRead(5);
    if (pin5 == HIGH)
        Serial.println(F(&quot;IN5=HIGH&quot;));
    else
        Serial.println(F(&quot;IN5=LOW&quot;));
    delay(500);
}</code></pre></div>



<p>In the beginning of setup(), I purposely turned off WiFi&nbsp; so that the power consumption of ESP8266 can be monitored from GW Instek supply more precisely without WiFi interference.<br>For this experiment, I vary ADCMT 6240A power output from 0V to 5.5V in 0.1V steps. Below is the result of GPIO5 input voltage vs. input current:</p>



<figure class="wp-block-image alignnone wp-image-1216"><img decoding="async" loading="lazy" width="893" height="454" src="https://ba0sh1.com/wp-content/uploads/2016/08/51c9e-esp8266-gpio-input-vi.png" alt="GPIO Input V vs. I" class="wp-image-1216" srcset="https://ba0sh1.com/wp-content/uploads/2016/08/51c9e-esp8266-gpio-input-vi.png 893w, https://ba0sh1.com/wp-content/uploads/2016/08/51c9e-esp8266-gpio-input-vi-300x153.png 300w, https://ba0sh1.com/wp-content/uploads/2016/08/51c9e-esp8266-gpio-input-vi-768x390.png 768w" sizes="(max-width: 893px) 100vw, 893px" /><figcaption>GPIO Input V vs. I</figcaption></figure>



<p>It is clear that</p>



<ul><li>When the input voltage varies from 0V &#8211; 5.5V, maximum sinking current for ESP8266 is only 3.52uA, maximum sourcing is 0.89uA</li><li>Of all the experiment the supply current for ESP8266 stays at 16mA, GPIO input does not go into 3.3v rail.</li><li>No any type of over current observed</li><li>The GPIO input L-H transition is at 1.6-1.7V (not shown on the graph)</li><li>It seems the chip internally has 1.8V and 3V domains. Some switching happens in between 1.8V to 3V where the input pin actually sources current out.</li></ul>



<h4>Test of over-voltage pull-up at output</h4>



<p>Similar experiment is also done with over-voltage pull up at output pin. The setup is below:</p>



<div class="wp-block-image wp-image-1219"><figure class="aligncenter"><img decoding="async" loading="lazy" width="1317" height="883" src="https://ba0sh1.com/wp-content/uploads/2016/08/45f41-gpio-output-pullup-test.png" alt="GPIO output pullup test" class="wp-image-1219" srcset="https://ba0sh1.com/wp-content/uploads/2016/08/45f41-gpio-output-pullup-test.png 1317w, https://ba0sh1.com/wp-content/uploads/2016/08/45f41-gpio-output-pullup-test-300x201.png 300w, https://ba0sh1.com/wp-content/uploads/2016/08/45f41-gpio-output-pullup-test-1024x687.png 1024w, https://ba0sh1.com/wp-content/uploads/2016/08/45f41-gpio-output-pullup-test-768x515.png 768w" sizes="(max-width: 1317px) 100vw, 1317px" /><figcaption>GPIO Output Pullup Test</figcaption></figure></div>



<p>In this experiment, GPIO4 is set to Open Drain output mode. An external pull-up resistor pulls GPIO4 output above 3.3V. The choice of pull-up resistor is 1K, smaller than usually required. Because of the pull-up resistor, the current feed into GPIO4 will never go beyond 5.5mA. However it is still interesting to find out what is the actual amount.</p>



<p>The result is below:</p>



<figure class="wp-block-image alignnone wp-image-1220"><img decoding="async" loading="lazy" width="894" height="454" src="https://ba0sh1.com/wp-content/uploads/2016/08/a5553-esp8266-gpio-output-vi.png" alt="GPIO output pullup result" class="wp-image-1220" srcset="https://ba0sh1.com/wp-content/uploads/2016/08/a5553-esp8266-gpio-output-vi.png 894w, https://ba0sh1.com/wp-content/uploads/2016/08/a5553-esp8266-gpio-output-vi-300x152.png 300w, https://ba0sh1.com/wp-content/uploads/2016/08/a5553-esp8266-gpio-output-vi-768x390.png 768w" sizes="(max-width: 894px) 100vw, 894px" /><figcaption>GPIO output pullup result</figcaption></figure>



<ul><li>When the pull-up voltage varies from 0V &#8211; 5.5V, maximum GPIO sinking current is only 3.72uA, maximum sourcing 0.83uA</li><li>Of all the experiment the supply current for ESP8266 stays at 16mA</li><li>No over current observed</li><li>The 1.8V phenomenon can be observed too for output.</li></ul>



<h3>Conclusion</h3>



<p>I believe the experiment result is conclusive. The ESP8266 I/O is 5V tolerant unless couple of uA current can destroy the chip. Except for completely wrong wiring, such as feed 5V into 3.3v rail or feed 5V into output pin (in output low state or in output high with push-pull mode), 5V on GPIO pins will not destroy ESP8266.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2016/08/03/is-esp8266-io-really-5v-tolerant/">Is ESP8266 I/O really 5V tolerant?</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2016/08/03/is-esp8266-io-really-5v-tolerant/feed/</wfw:commentRss>
			<slash:comments>25</slash:comments>
		
		
			</item>
		<item>
		<title>ESP8266 MQTT client on RTOS</title>
		<link>https://ba0sh1.com/2015/08/30/esp8266-mqtt-rtos/</link>
					<comments>https://ba0sh1.com/2015/08/30/esp8266-mqtt-rtos/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Sat, 29 Aug 2015 16:04:49 +0000</pubDate>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[MQTT]]></category>
		<category><![CDATA[RTOS]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1133</guid>

					<description><![CDATA[<p>In the recent Maker Faire I demonstrated an ESP8266 MQTT VFD clock. Some readers had wrote to ask for the soure code. Because the project was builtup within only 2 days, the...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/08/30/esp8266-mqtt-rtos/">ESP8266 MQTT client on RTOS</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In the recent <a href="https://www.ba0sh1.com/maker-faire-yearly-review-rant/" target="_blank" rel="noopener">Maker Faire</a> I demonstrated an ESP8266 MQTT VFD clock. Some readers had wrote to ask for the soure code. Because the project was builtup within only 2 days, the actual source code is more or less of spaghette type. However the underlying MQTT client may be useful to someone who likes the RTOS SDK.</p>
<p><span id="more-1133"></span></p>
<p>If you search MQTT and ESP8266 on the intraweb, most likely all hits can be traced back to the great work done by TuanPM. However Tuan&#8217;s code is based on Espressif&#8217;s NON-OS SDK. There has been some <a href="http://thesparkgap.net/post/92275918408/the-spark-gap-podcast-episode-4" target="_blank" rel="noopener">great debates</a> about embedded programming with-or-without an OS. To me programming with OS vs NON-OS is like programming with C vs Assembly. I like programming in C, so I wrote a new MQTT client for Espressif&#8217;s <a href="https://github.com/espressif/ESP8266_RTOS_SDK" target="_blank" rel="noopener">RTOS SDK.</a></p>
<p>The source code is published at https://github.com/baoshi/ESP-RTOS-Paho</p>
<p>Here are some notes:</p>
<ul>
<li>The code is based on the <a href="http://www.eclipse.org/paho/" target="_blank" rel="noopener">Eclipse Paho project</a>, specifically the embedded C client.</li>
<li>Socket-level APIs used, the code is thread-safe.</li>
<li>Many error handlings were added to the original Paho client, including time-out for most of the network functions. These are designed to work with an RTOS to support automatic error correction at various abused conditions.</li>
<li>I&#8217;m compiling using the &#8220;<a href="http://programs74.ru/udkew-en.html" target="_blank" rel="noopener">Unofficial ESP8266 DevKit</a>&#8220;. Other toolchain such as <a href="https://github.com/pfalcon/esp-open-sdk" target="_blank" rel="noopener">esp-open-sdk</a> can be used as well (adjust pathes in Makefile).</li>
<li>Skeleton code for connecting a MQTT broker is as follows:</li>
</ul>
<p>[code]<br />
struct Network network;<br />
MQTTClient client = DefaultClient;<br />
MQTTPacket_connectData data = MQTTPacket_connectData_initializer;<br />
unsigned char mqtt_buf[100];<br />
unsigned char mqtt_readbuf[100];</p>
<p>NewNetwork(&amp;network);<br />
ConnectNetwork(&amp;network, MQTT_HOST, MQTT_PORT);<br />
NewMQTTClient(&amp;client, &amp;network, 5000, mqtt_buf, 100, mqtt_readbuf, 100);<br />
data.willFlag = 0;<br />
data.MQTTVersion = 3;<br />
data.clientID.cstring = mqtt_client_id; // you client&#8217;s unique identifier<br />
data.username.cstring = MQTT_USER;<br />
data.password.cstring = MQTT_PASS;<br />
data.keepAliveInterval = 10; // interval for PING message to be sent (seconds)<br />
data.cleansession = 0;<br />
MQTTConnect(&amp;client, &amp;data);<br />
[/code]</p>
<p>To subscribe to a MQTT topic, use</p>
<p>[code]<br />
MQTTSubscribe(&amp;client, &quot;/mytopic&quot;, QOS1, topic_received);<br />
[/code]</p>
<p>The parameter topic_received is a callback function handling the received message:</p>
<p>[code]<br />
// Callback when receiving subscribed message<br />
LOCAL void ICACHE_FLASH_ATTR topic_received(MessageData* md)<br />
{<br />
    int i;<br />
    MQTTMessage* message = md-&gt;message;<br />
    dmsg_puts(&quot;Received Topic &quot;);<br />
    for (i = 0; i t; md-&gt;topic-&gt;lenstring.len; ++i)<br />
        dmsg_putchar(md-&gt;topic-&gt;lenstring.data[i]);<br />
    dmsg_puts(&quot;, Message &quot;);<br />
    for (i = 0; i &lt; (int)message-&gt;payloadlen; ++i)<br />
        dmsg_putchar(((char*)message-&gt;payload)[i]);<br />
    dmsg_puts(&quot;rn&quot;);<br />
}<br />
[/code]</p>
<p>To publish a MQTT topic, use</p>
<p>[code]<br />
char msg[PUB_MSG_LEN];<br />
MQTTMessage message;<br />
message.payload = msg;<br />
message.payloadlen = PUB_MSG_LEN;<br />
message.dup = 0;<br />
message.qos = QOS1;<br />
message.retained = 0;<br />
MQTTPublish(&amp;client, &quot;topic&quot;, &amp;message);<br />
[/code]</p>
<p>The demo project included in the library shows how the MQTT related functions can be organized inside a FreeRTOS task and interact with other tasks, such as retry connection after server error, WiFi error, etc. The following diagram may be helpful to understand the code. (Imaging how this can be done using NON-OS SDK)</p>
<p><figure id="attachment_1141" aria-describedby="caption-attachment-1141" style="width: 600px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1141" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/11/28705-mqtt_wifi_threads.png?w=1024&#038;h=576" alt="MQTT and WiFi Thread" width="600" height="337" srcset="https://ba0sh1.com/wp-content/uploads/2015/11/28705-mqtt_wifi_threads.png 1425w, https://ba0sh1.com/wp-content/uploads/2015/11/28705-mqtt_wifi_threads-300x169.png 300w, https://ba0sh1.com/wp-content/uploads/2015/11/28705-mqtt_wifi_threads-1024x576.png 1024w, https://ba0sh1.com/wp-content/uploads/2015/11/28705-mqtt_wifi_threads-768x432.png 768w" sizes="(max-width: 600px) 100vw, 600px" /><figcaption id="caption-attachment-1141" class="wp-caption-text">MQTT and WiFi Thread</figcaption></figure></p>
<p>As Espressif had just teased us with the new ESP32 chip and RTOS is rumored to be the default SDK, I hope this piece of code will be useful.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/08/30/esp8266-mqtt-rtos/">ESP8266 MQTT client on RTOS</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/08/30/esp8266-mqtt-rtos/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
		<item>
		<title>Maker Faire, Yearly Review, and Rant</title>
		<link>https://ba0sh1.com/2015/07/18/maker-faire-yearly-review-rant/</link>
					<comments>https://ba0sh1.com/2015/07/18/maker-faire-yearly-review-rant/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Sat, 18 Jul 2015 10:55:35 +0000</pubDate>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Makefile]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1113</guid>

					<description><![CDATA[<p>Well I&#8217;ve been bit lapse. This post is supposed to written in July. Another year, another Maker Faire. Yes! for this year it is nolonger &#8220;Mini Maker Faire&#8221;, we&#8217;ve just upgraded to...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/07/18/maker-faire-yearly-review-rant/">Maker Faire, Yearly Review, and Rant</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><em>Well I&#8217;ve been bit lapse. This post is supposed to written in July.</em></p>
<p>Another year, another Maker Faire. Yes! for this year it is nolonger &#8220;Mini Maker Faire&#8221;, we&#8217;ve just upgraded to the full fledged &#8220;Maker Faire&#8221; event. As Singapore Maker Faire has grown 10 times compare to 3 year ago, I am not able to cover every single booth or exhibit in the event. I only write about those I&#8217;m interested in.<span id="more-1113"></span></p>
<p>An Augmented Reality Sandbox is a perfect application of Kinect. Originate at <a title="Augmented Reality Sandbox" href="http://idav.ucdavis.edu/~okreylos/ResDev/SARndbox/" target="_blank" rel="noopener">UC Davis</a>, this construction is made by the students from <span style="color:#141823;">Temasek Secondary School.</span></p>
<p><figure id="attachment_1115" aria-describedby="caption-attachment-1115" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/31485-augmented-reality-sandbox.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1115" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/31485-augmented-reality-sandbox.png" alt="Augmented Reality Sandbox" width="600" height="398" srcset="https://ba0sh1.com/wp-content/uploads/2015/07/31485-augmented-reality-sandbox.png 800w, https://ba0sh1.com/wp-content/uploads/2015/07/31485-augmented-reality-sandbox-300x199.png 300w, https://ba0sh1.com/wp-content/uploads/2015/07/31485-augmented-reality-sandbox-768x510.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1115" class="wp-caption-text">Augmented Reality Sandbox</figcaption></figure></p>
<p>Benjamin Low and &#8220;<a href="http://artmakesus.com/" target="_blank" rel="noopener">Art makes us</a>&#8221; team, who made the &#8220;Synesthete’s Music Machine&#8221; last year, have came back with “Neobombe”, a simulation of   Turing machine inspired by the movie “The Imitation Game”. This setup contains 11 Arduinos driving 36 step motors. The motors spin according to the enigma decipher algorithm running at backend. Since I&#8217;m too late to write his, Ben has already published his &#8220;making-of&#8221; article <a href="http://lohjianhui.com/2015/07/19/the-making-of-the-neobombe-prototype/" target="_blank" rel="noopener">here</a>.</p>
<p><figure id="attachment_1116" aria-describedby="caption-attachment-1116" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/6b6b3-neobombe.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1116" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/6b6b3-neobombe.png" alt="Neobombe" width="600" height="384" /></a><figcaption id="caption-attachment-1116" class="wp-caption-text">Neobombe</figcaption></figure></p>
<p>Leon Lim, who is the &#8220;go-to&#8221; person for DIY PCB etching in the community, bought us two day&#8217;s worth of live etching and soldering workshop. Participants have experienced PCB etching using household suppliers, drilling and soldering. The end product is a cardboard dome with colorful LED lighting, very nice!</p>
<p><figure id="attachment_1117" aria-describedby="caption-attachment-1117" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/704b9-omg-asm.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1117" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/704b9-omg-asm.png" alt="Live etching-soldering workshop" width="600" height="526" /></a><figcaption id="caption-attachment-1117" class="wp-caption-text">Live etching-soldering workshop</figcaption></figure></p>
<p>This ball shaped robot is developed by IDA Labs. It travels on the ground and also in water. But I really do want to see a BB-8 leh. Maybe next year?</p>
<p><figure id="attachment_1118" aria-describedby="caption-attachment-1118" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/61de7-ball-robot.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1118" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/61de7-ball-robot.png" alt="Ball Robot" width="600" height="450" /></a><figcaption id="caption-attachment-1118" class="wp-caption-text">Ball Robot</figcaption></figure></p>
<p>Here comes some heavy weight electronics project. Design by Adnan of <a href="http://www.2wattelements.com/" target="_blank" rel="noopener">2-Watt Elements,</a>  Chippy is an <del>&#8220;Intel Edison powered USB hub&#8221;</del> Intel Edison breakout board that helps developer to access Edison peripherals much much easier. Interested people please take note, Chippy is coming to market coming September.</p>
<p><figure id="attachment_1119" aria-describedby="caption-attachment-1119" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/07/00d08-chippy.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1119" src="https://www.ba0sh1.com/wp-content/uploads/2015/07/Chippy-767x1024.png" alt="Chippy" width="600" height="800" /></a><figcaption id="caption-attachment-1119" class="wp-caption-text">Chippy</figcaption></figure></p>
<p>More interesting projects from local and overseas guest are better capture using video format:</p>
<p><iframe loading="lazy" title="Singapore Maker Faire 2015" width="640" height="360" src="https://www.youtube.com/embed/3S40kSZ_YzM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<h2>Yearly Review</h2>
<p>As I said Maker Faire is like a new year’s day to me. The past year is an exciting year, that I am able to monetize my project. I designed an <a href="https://www.ba0sh1.com/esp8266-breakout-board-im-tindie/" target="_blank" rel="noopener">ESP8266 breakout board</a> and start selling on <a href="https://www.tindie.com/products/Ba0sh1/esp8266-esp-0712-full-io-breadboard-adapter/" target="_blank" rel="noopener">Tindie</a> since February. As of today, I sold total 332 boards across 29 countries.  And this is mainly why I have not been updating this blog too frequently, because I totally underestimated the effort went into the production and sales of these boards. My initial idea was just to sell some extra pieces from my prototype lot and recover part of the cost. But in the process it becomes so welcomed that my I can hardly fulfill orders. I&#8217;ve not able to write too much code for ESP8266 either, which is a great pity.</p>
<p>A &#8220;good&#8221; news is ever since Adafruit, OLIMEX and Sparkfun start to produce their versions of ESP8266 development board, my sales drops like brick wall. But this gives me more time to work on the software side and do some new projects, stay tuned <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>And since I&#8217;ve done so much on ESP8266, I can&#8217;t help bring a project to Maker Faire. So this is my selfie with ESP8266 clock. The clock synchronize time from NTP, gather temperature/humidity and push to a MQTT broker, and display MQTT messages from my webpage (more on this in the following posts).</p>
<p><figure id="attachment_1127" aria-describedby="caption-attachment-1127" style="width: 450px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1127" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/08/32e98-esp8266-clock.png" alt="Baoshi &amp; ESP8266 MQTT Clock" width="450" height="600" srcset="https://ba0sh1.com/wp-content/uploads/2015/08/32e98-esp8266-clock.png 600w, https://ba0sh1.com/wp-content/uploads/2015/08/32e98-esp8266-clock-225x300.png 225w" sizes="(max-width: 450px) 100vw, 450px" /><figcaption id="caption-attachment-1127" class="wp-caption-text">Baoshi &amp; ESP8266 MQTT Clock</figcaption></figure></p>
<p>A big THANKS to Mr Teo Swee Ann and Espressif Systems to make this possible.</p>
<h2>Rant</h2>
<p>I hesitated a bit before write this part. It will hurt someone, for sure.</p>
<p>ARDUINO IS NOT ELECTRONICS!</p>
<p>I have been talking to some makers, attending some events, and people seems to mistake Arduino as the only electronics platform.</p>
<p>ARDUINO IS NOT ELECTRONICS!</p>
<p>I have to admit Arduino helps to lower the entrance barrier, bring people onboard electronics, which is fantastic. But do not claim you understand electronics because you can follow some online tutorials and create some Arduino projects.</p>
<p>The same applies to Raspberry Pi, Banana Pi, Beagle Bone, etc.</p>
<p>I don&#8217;t know whole lot of electronics either.</p>
<p>I come across the Nah&#8217;s family who present this electronics learning kit in the Maker Faire. I personally give them the best project award.</p>
<p><figure id="attachment_1129" aria-describedby="caption-attachment-1129" style="width: 600px" class="wp-caption aligncenter"><a href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/08/eac72-electronics-learning-kit.jpg" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1129" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/08/eac72-electronics-learning-kit.jpg?w=1024&#038;h=768" alt="Electronics Learning Kit" width="600" height="450" /></a><figcaption id="caption-attachment-1129" class="wp-caption-text">Electronics Learning Kit</figcaption></figure></p>
<p>This basic components block kit immediately reminds me of the Radioshark laboratory kit (clone) I started with. There is no shortcut to learning electronics. You still have to start with basic components and Ohm&#8217;s law.</p>
<p>For more expert advise, I highly recommend this eevBLAB episode.</p>
<p><iframe loading="lazy" title="eevBLAB #10 - Why Learn Basic Electronics?" width="640" height="360" src="https://www.youtube.com/embed/zyuRcsM0gjI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>/Rant over.</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/07/18/maker-faire-yearly-review-rant/">Maker Faire, Yearly Review, and Rant</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/07/18/maker-faire-yearly-review-rant/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>ESP8266 breadboard adapter and I&#8217;m on Tindie</title>
		<link>https://ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/</link>
					<comments>https://ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Sat, 31 Jan 2015 15:45:54 +0000</pubDate>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Tindie]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1039</guid>

					<description><![CDATA[<p>The rise of the ESP8266 WiFi chip was almost overnight with Espressif&#8217;s open approach and pushing from Hackaday. While no ground-breaking product has yet emerged, the development on the chip are phenomenon....</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/">ESP8266 breadboard adapter and I&#8217;m on Tindie</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The rise of the ESP8266 WiFi chip was almost overnight with Espressif&#8217;s open approach and pushing from Hackaday. While no ground-breaking product has yet emerged, the <a title="http://www.esp8266.com" href="http://www.esp8266.com" target="_blank" rel="noopener">development </a>on the chip are phenomenon. However due to an unknown reason the ESP8266 <a title="ESP8266 modules family" href="http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family" target="_blank" rel="noopener">modules </a>manufacture seems to prefer non-standard 2.0mm pitch connector, which gives a lot of headache to breadboarding lovers like me. This forced me to make a breadboard friendly ESP8266 breakout board.</p>
<p><span id="more-1039"></span></p>
<p>The modules I&#8217;m targeting are ESP-07 and ESP-12, both having identical pinout but only differ in antenna type. I choose these two because they have all the I/O available, and using same edge castellation (half vias) connectors which is easy to work with.</p>
<p><figure id="attachment_1042" aria-describedby="caption-attachment-1042" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/4f4fc-esp-07_12.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1042" src="https://www.ba0sh1.com/wp-content/uploads/2015/01/ESP-07_12-1024x350.png" alt="ESP-07 and ESP-12" width="600" height="206" /></a><figcaption id="caption-attachment-1042" class="wp-caption-text">ESP-07 and ESP-12</figcaption></figure></p>
<p>The modules are 16mm tall, easily occupies 4 rows (2 rows on each side) on a breadboard. Therefore my first design requirement is to minimize real estate on the breadboard. To do this I made some custom pin headers by modifying from SMT pin header.</p>
<p><figure id="attachment_1043" aria-describedby="caption-attachment-1043" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/cbd8a-esp-breakout-pinheaders.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1043" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/cbd8a-esp-breakout-pinheaders.png" alt="Custom pin headers" width="600" height="416" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/cbd8a-esp-breakout-pinheaders.png 800w, https://ba0sh1.com/wp-content/uploads/2015/01/cbd8a-esp-breakout-pinheaders-300x208.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/cbd8a-esp-breakout-pinheaders-768x533.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1043" class="wp-caption-text">Custom pin headers</figcaption></figure></p>
<p>I removed pair of pins from both ends and replace with through hole pins. This little touch strengthens the bounding between pin header and the board. If otherwise on my first version I can easily pull up all the pads when lifting the board up from breadboard. With this design, I maintain 4 rows occupation on the breadboard, that leaves another 6 rows for wiring.</p>
<p><figure id="attachment_1044" aria-describedby="caption-attachment-1044" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/299f6-esp-breakout1.jpg" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1044" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/299f6-esp-breakout1.jpg?w=1024&#038;h=683" alt="Breadboard occupation" width="600" height="400" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/299f6-esp-breakout1.jpg 1280w, https://ba0sh1.com/wp-content/uploads/2015/01/299f6-esp-breakout1-300x200.jpg 300w, https://ba0sh1.com/wp-content/uploads/2015/01/299f6-esp-breakout1-1024x683.jpg 1024w, https://ba0sh1.com/wp-content/uploads/2015/01/299f6-esp-breakout1-768x512.jpg 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1044" class="wp-caption-text">Breadboard occupation</figcaption></figure></p>
<p>The boot mode of ESP-8266 is often another source of confusion. The table below summarizes different boot modes during power on or reset:</p>
<table style="height:115px;" width="297">
<tbody>
<tr>
<td>Boot Mode</td>
<td>CH_PD</td>
<td>GPIO15</td>
<td>GPIO0</td>
</tr>
<tr>
<td>Run firmware</td>
<td>High</td>
<td>Low</td>
<td>HiZ (Internal P-UP)</td>
</tr>
<tr>
<td>Flash firmware</td>
<td>High</td>
<td>Low</td>
<td>Low</td>
</tr>
</tbody>
</table>
<p>In firmware flashing mode, user is able to update new firmware from UART0 using FLASH_DOWNLOAD_TOOLS or esptool.py.</p>
<p>The board is designed for ESP8266 developers so reset and flash must be made easily accessible. I designed a simple circuit that only uses one button to perform these two tasks:</p>
<p><figure id="attachment_1047" aria-describedby="caption-attachment-1047" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/d3fd0-esp8266-boot-select-sch.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1047" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/d3fd0-esp8266-boot-select-sch.png" alt="Boot mode selection schematic" width="600" height="442" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/d3fd0-esp8266-boot-select-sch.png 800w, https://ba0sh1.com/wp-content/uploads/2015/01/d3fd0-esp8266-boot-select-sch-300x221.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/d3fd0-esp8266-boot-select-sch-768x565.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1047" class="wp-caption-text">Boot mode selection schematic</figcaption></figure></p>
<p>During idle state, internal pull-up in the ESP8266 RESET pin turns on Q1. Q2 cut off so GPIO0 remains high due to GPIO0 internal pull-up. At the same time, C1 discharges from R2 and Q1. When user presses SW1, RESET goes low immediately. Meanwhile, Q1 turns off and 3.3V power charges C1 through R1 and R2. If user releases SW1 quickly and the voltage across C1 has not reached Q2&#8217;s threshold voltage, Q2 remains off and ESP8266 enters normal running mode. However if user holds SW1 long enough before releasing, Q2 will turn on, pull GPIO0 low. At the moment user releases SW1, RESET goes high but GPIO0 will be held low for a while due to C1 have to discharge through R2 and Q1. The choice of C1 and R2 are such that it keeps GPIO0 low long enough for ESP8266 to enter program mode.</p>
<p>The board also includes a 3.3V LDO (AMS-1117 3.3) and a UART header using FTDI Basic pin out. Below is my programming hardware. (Yes I&#8217;m writing OLED driver, which will be release right after).</p>
<p><figure id="attachment_1048" aria-describedby="caption-attachment-1048" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/a63bf-esp8266-breakout-in-action.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1048" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/a63bf-esp8266-breakout-in-action.png" alt="ESP8266 breakout board in action" width="600" height="243" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/a63bf-esp8266-breakout-in-action.png 800w, https://ba0sh1.com/wp-content/uploads/2015/01/a63bf-esp8266-breakout-in-action-300x122.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/a63bf-esp8266-breakout-in-action-768x311.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1048" class="wp-caption-text">ESP8266 breakout board in action</figcaption></figure></p>
<p>The schematic and board are designed using KiCad BZR 5312. Windows binary is available at <a title="http://kicad.nosoftware.cz/" href="http://kicad.nosoftware.cz/" target="_blank" rel="noopener">http://kicad.nosoftware.cz/</a>. I have uploaded the schematic and PCB onto my GitHub page at</p>
<p><a title="https://github.com/baoshi/ESP-Breakout" href="https://github.com/baoshi/ESP-Breakout" target="_blank" rel="noopener">https://github.com/baoshi/ESP-Breakout</a></p>
<p>At the moment I&#8217;m trying to sell extra boards on Tindie. Please visit my store</p>
<p><a href="https://www.tindie.com/stores/Ba0sh1/?ref=offsite_badges&amp;utm_source=sellers_Ba0sh1&amp;utm_medium=badges&amp;utm_campaign=badge_medium"><img decoding="async" loading="lazy" src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-mediums.png" alt="I sell on Tindie" width="150" height="78" /></a></p>
<p>&nbsp;</p>
<p>Product link -&gt; <a title="https://www.tindie.com/products/Ba0sh1/esp8266-esp-0712-full-io-breadboard-adapter/" href="https://www.tindie.com/products/Ba0sh1/esp8266-esp-0712-full-io-breadboard-adapter/" target="_blank" rel="noopener">https://www.tindie.com/products/Ba0sh1/esp8266-esp-0712-full-io-breadboard-adapter/</a></p>
<p>This is my first attempt to generate some income via hobbyist project. Please support if you also want to join the ESP8266 fun!</p>
<p>Thanks</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/">ESP8266 breadboard adapter and I&#8217;m on Tindie</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/01/31/esp8266-breakout-board-im-tindie/feed/</wfw:commentRss>
			<slash:comments>27</slash:comments>
		
		
			</item>
		<item>
		<title>Happy New Year from ESP8266</title>
		<link>https://ba0sh1.com/2014/12/31/happy-new-year/</link>
					<comments>https://ba0sh1.com/2014/12/31/happy-new-year/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Wed, 31 Dec 2014 13:33:39 +0000</pubDate>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[OLED]]></category>
		<category><![CDATA[SSD1306]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1016</guid>

					<description><![CDATA[<p>Happy New Year! The application is made with ESP8266 RTOS SDK. SSD1306 based OLED panel is connected on GPIO4/5 using software emulated I2C. I rushed this out last night and the code...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2014/12/31/happy-new-year/">Happy New Year from ESP8266</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Happy New Year!</p>
<p><span id="more-1016"></span></p>
<p><iframe loading="lazy" title="Happy New Year" width="640" height="360" src="https://www.youtube.com/embed/h-lI6ucDg8M?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>The application is made with ESP8266<a title="esp_iot_rtos_sdk" href="https://github.com/espressif/esp_iot_rtos_sdk"> RTOS SDK</a>. SSD1306 based OLED panel is connected on GPIO4/5 using software emulated I2C. I rushed this out last night and the code is in a mess now.To prevent bad influence I&#8217;ll release the code after I reorganize them.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2014/12/31/happy-new-year/">Happy New Year from ESP8266</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2014/12/31/happy-new-year/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
