<?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>Digital Me</title>
	<atom:link href="https://ba0sh1.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://ba0sh1.com/</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>Arduino Redesigned &#8211; Maker UNO Review</title>
		<link>https://ba0sh1.com/2018/03/18/arduino-redesigned-maker-uno-review/</link>
					<comments>https://ba0sh1.com/2018/03/18/arduino-redesigned-maker-uno-review/#respond</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Sun, 18 Mar 2018 15:42:46 +0000</pubDate>
				<category><![CDATA[Review]]></category>
		<category><![CDATA[Arduino]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1243</guid>

					<description><![CDATA[<p>Friends at Cytron Technologies are going to launch an Arduino compatible Maker UNO board at KickStarter. They send me an early production board for review. So here are my two cents worth....</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2018/03/18/arduino-redesigned-maker-uno-review/">Arduino Redesigned &#8211; Maker UNO Review</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Friends at <a href="https://www.cytron.io/" target="_blank" rel="noopener">Cytron Technologies</a> are going to launch an Arduino compatible Maker UNO board at KickStarter. They send me an early production board for review. So here are my two cents worth. (This is NOT a paid review)</p>
<p><span id="more-1243"></span></p>
<p>This <a href="https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems#Footprint-compatible">article</a> from Wikipedia gives us a very comprehensive list of Arduino UNO compatible boards from &#8220;known&#8221; vendors.  There are 37 of them, excluding all the clones that are cheaply available from aliexpress etc. What makes Maker UNO distinctive is that it is specially redesigned for educational market. Let see what are the features / changes from the official Arduino UNO, follow the typical rules of &#8220;the good&#8221;, &#8220;the bad&#8221;, and &#8220;the ugly&#8221;</p>
<figure id="attachment_1244" aria-describedby="caption-attachment-1244" style="width: 225px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1244 size-medium" src="https://ba0sh1.com/wp-content/uploads/2018/03/27da0-makeruno-225x300.jpg" alt="Maker UNO" width="225" height="300" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/27da0-makeruno-225x300.jpg 225w, https://ba0sh1.com/wp-content/uploads/2018/03/27da0-makeruno-768x1024.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/27da0-makeruno-1152x1536.jpg 1152w, https://ba0sh1.com/wp-content/uploads/2018/03/27da0-makeruno.jpg 1200w" sizes="(max-width: 225px) 100vw, 225px" /><figcaption id="caption-attachment-1244" class="wp-caption-text">Maker UNO</figcaption></figure>
<h4>The Good</h4>
<ul>
<li><strong>More More LEDs.</strong> We all love LEDs. &#8220;Blinky&#8221; is probably the first Arduino project for many of us, then followed by &#8220;Chasing Lights&#8221;. Remember the tedious work to break out digital pins onto breadboard, plug LEDs and current limiting resistors? All these are no longer necessary with Maker UNO. We now have LED indicators built right onto the board for all digital pins. Imaging the amount of classroom time it saves! Even for advanced users, the LEDs can be super handy when debugging code. For example, turn on/off LEDs when &#8220;Serial.print&#8221; is not available, e.g., in an interrupt service routine.</li>
</ul>
<figure id="attachment_1246" aria-describedby="caption-attachment-1246" style="width: 225px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1246 size-medium" src="https://ba0sh1.com/wp-content/uploads/2018/03/f4dc3-makeruno-leds-225x300.jpg" alt="LED Indicators" width="225" height="300" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/f4dc3-makeruno-leds-225x300.jpg 225w, https://ba0sh1.com/wp-content/uploads/2018/03/f4dc3-makeruno-leds-768x1024.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/f4dc3-makeruno-leds-1152x1536.jpg 1152w, https://ba0sh1.com/wp-content/uploads/2018/03/f4dc3-makeruno-leds.jpg 1200w" sizes="(max-width: 225px) 100vw, 225px" /><figcaption id="caption-attachment-1246" class="wp-caption-text">LED Indicators</figcaption></figure>
<ul>
<li><strong>Buzzer and Button</strong>. Nothing is more exciting than making noise in the classroom. With Maker UNO it is now possible without additional hardware. A buzzer is built-in. If continuously making noise is not too welcomed in a classroom, then let the noise triggered by user button forms a more socially responsible project. Yes the button is also included. Of course there is also a switch that can turn off the buzzer permanently.
<p><figure id="attachment_1251" aria-describedby="caption-attachment-1251" style="width: 300px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1251 size-medium" src="https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-300x225.jpg" alt="Buzzer &amp; User Button" width="300" height="225" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-300x225.jpg 300w, https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-1024x768.jpg 1024w, https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-768x576.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-1536x1152.jpg 1536w, https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-2048x1536.jpg 2048w, https://ba0sh1.com/wp-content/uploads/2018/03/d1356-makeruno-buzzer-1-1568x1176.jpg 1568w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-1251" class="wp-caption-text">Buzzer &amp; User Button</figcaption></figure></li>
<li><strong>Power option</strong>. Remember the gigantic 5.5mm DC jack and USB type B receptacle on the original Arduino UNO? Those are replaced by one single USB Micro-B port. Who does not carry a micro-USB cable now a days?</li>
</ul>
<p>Summarize for the Good: More built-in peripherals, easier to power. All these significantly reduced the ownership cost and save precious classroom time.</p>
<h4>The Bad</h4>
<ul>
<li>I cannot really fault the board except for one issue: the CH340G USB-Serial chip it used. Well frankly speaking it is a bit unfair because I had not encountered one single problem with this chip. But historically CH340G had some issues with Mac OSX and it is largely due to the driver. So Mac users need to pay attention to download the correct driver. It is puzzling that the official WCH driver download page lists CH340G OSX driver as CH341.<br />
For Windows (Windows 10) users, driver is downloaded automatically from Windows Update hence no problem what-so-ever.</p>
<p><figure id="attachment_1256" aria-describedby="caption-attachment-1256" style="width: 225px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1256 size-medium" src="https://ba0sh1.com/wp-content/uploads/2018/03/5d043-makeruno-ch340g-225x300.jpg" alt="CH340G" width="225" height="300" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/5d043-makeruno-ch340g-225x300.jpg 225w, https://ba0sh1.com/wp-content/uploads/2018/03/5d043-makeruno-ch340g-768x1024.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/5d043-makeruno-ch340g-1152x1536.jpg 1152w, https://ba0sh1.com/wp-content/uploads/2018/03/5d043-makeruno-ch340g.jpg 1200w" sizes="(max-width: 225px) 100vw, 225px" /><figcaption id="caption-attachment-1256" class="wp-caption-text">CH340G</figcaption></figure></li>
</ul>
<h4>The Ugly</h4>
<ul>
<li>Without reservation, I do have one complain. Look at the &#8220;GND&#8221; silkscreen label below. It seems as though the bottom three pins are all &#8220;GND&#8221;s because the bottom two pins are not labeled. But in fact the bottom most pin is VIN in official Arduino and &#8220;5VOUT&#8221; in Maker UNO. During one test I erroneously clipped the ground clip of my scope probe onto that pin, and BOOM, my USB hub turn itself off. So my board is a per-production version, I hope these pins can be properly labeled.
<p><figure id="attachment_1257" aria-describedby="caption-attachment-1257" style="width: 225px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1257 size-medium" src="https://ba0sh1.com/wp-content/uploads/2018/03/8a16a-makeruno-vin-225x300.jpg" alt="VIN Label" width="225" height="300" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/8a16a-makeruno-vin-225x300.jpg 225w, https://ba0sh1.com/wp-content/uploads/2018/03/8a16a-makeruno-vin-768x1024.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/8a16a-makeruno-vin-1152x1536.jpg 1152w, https://ba0sh1.com/wp-content/uploads/2018/03/8a16a-makeruno-vin.jpg 1200w" sizes="(max-width: 225px) 100vw, 225px" /><figcaption id="caption-attachment-1257" class="wp-caption-text">VIN Label</figcaption></figure></li>
</ul>
<h4>The Clever</h4>
<p>Something went beyond &#8220;The Good&#8221; level. Lets save the best for last. And the best things are not always how good the construction is, how comprehensive the features are. For this time, the award belongs to the designer who made all the effort to include a blank space at back of the board for student to write his/her name! Who the genius designed this must have tons of experience in classroom! And my ultimate respect!</p>
<figure id="attachment_1260" aria-describedby="caption-attachment-1260" style="width: 640px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2018/03/ee37f-makeruno-nametag.jpg"><img decoding="async" loading="lazy" class="wp-image-1260 size-large" src="https://ba0sh1.com/wp-content/uploads/2018/03/ee37f-makeruno-nametag-768x1024.jpg" alt="Silkscreen" width="640" height="853" srcset="https://ba0sh1.com/wp-content/uploads/2018/03/ee37f-makeruno-nametag-768x1024.jpg 768w, https://ba0sh1.com/wp-content/uploads/2018/03/ee37f-makeruno-nametag-225x300.jpg 225w, https://ba0sh1.com/wp-content/uploads/2018/03/ee37f-makeruno-nametag-1152x1536.jpg 1152w, https://ba0sh1.com/wp-content/uploads/2018/03/ee37f-makeruno-nametag.jpg 1200w" sizes="(max-width: 640px) 100vw, 640px" /></a><figcaption id="caption-attachment-1260" class="wp-caption-text">Clever Silkscreen</figcaption></figure>
<p>So here I finished my short review. Don&#8217;t forget to read the excellent article by Ober at <a href="https://hackaday.io/project/79748-arduino-uno-for-education">https://hackaday.io/project/79748-arduino-uno-for-education</a>, detailing the story behind Maker UNO. And see you Mar 23 2018 at KickStarter.</p>
<p><iframe loading="lazy" title="$6 Maker UNO: Simplifying Arduino for {Education}" src="https://www.kickstarter.com/projects/cytrontech/6-maker-uno-simplifying-arduino-for-education/widget/video.html" height="360.0" width="640" frameborder="0" scrolling="no"></iframe></p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2018/03/18/arduino-redesigned-maker-uno-review/">Arduino Redesigned &#8211; Maker UNO Review</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2018/03/18/arduino-redesigned-maker-uno-review/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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" loading="lazy" 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>First sight into ESP32</title>
		<link>https://ba0sh1.com/2015/12/26/first-signt-into-esp32/</link>
					<comments>https://ba0sh1.com/2015/12/26/first-signt-into-esp32/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Fri, 25 Dec 2015 16:32:18 +0000</pubDate>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[ESP31]]></category>
		<category><![CDATA[ESP32]]></category>
		<category><![CDATA[TFT]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1151</guid>

					<description><![CDATA[<p>So I am one of the 200 lucky bastards who receive the Espressif ESP32 beta units. It arrives in a nicely printed packaging which resembles very much like a jewel box. And...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/12/26/first-signt-into-esp32/">First sight into ESP32</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>So I am one of the 200 lucky bastards who receive the Espressif ESP32 beta units. It arrives in a nicely printed packaging which resembles very much like a jewel box. And the item inside is really a piece of jewelry.</p>
<p><span id="more-1151"></span></p>
<p><figure id="attachment_1152" aria-describedby="caption-attachment-1152" style="width: 640px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1152 size-full" src="https://ba0sh1.com/wp-content/uploads/2015/12/3df35-esp31-box.png" alt="ESP31 packaging" width="640" height="480" srcset="https://ba0sh1.com/wp-content/uploads/2015/12/3df35-esp31-box.png 640w, https://ba0sh1.com/wp-content/uploads/2015/12/3df35-esp31-box-300x225.png 300w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-1152" class="wp-caption-text">ESP31 packaging</figcaption></figure></p>
<p>Appearantly the breakout board, &#8220;ESP_Module_Testboard&#8221;, is little bit too wide for breadboard use, (leaving one row on each side), I decided to make a quick development board. The end result looks like this.</p>
<p><figure id="attachment_1154" aria-describedby="caption-attachment-1154" style="width: 800px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="wp-image-1154 size-full" src="https://ba0sh1.com/wp-content/uploads/2015/12/c1fb2-esp31-devboard.png" alt="ESP31 development board" width="800" height="600" srcset="https://ba0sh1.com/wp-content/uploads/2015/12/c1fb2-esp31-devboard.png 800w, https://ba0sh1.com/wp-content/uploads/2015/12/c1fb2-esp31-devboard-300x225.png 300w, https://ba0sh1.com/wp-content/uploads/2015/12/c1fb2-esp31-devboard-768x576.png 768w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption id="caption-attachment-1154" class="wp-caption-text">ESP31 development board</figcaption></figure></p>
<p>Some notes about the board:</p>
<ul>
<li>Pin &#8220;EN&#8221; has a 10k pull-up resistor. The reset button pulls &#8220;EN&#8221; down. ESP31 does not come with a RESET pin, it seems EN does the same.</li>
<li>Pin &#8220;IO0&#8221; has a 10k pull-up resistor. The &#8220;IO0&#8221; pin pulls it down. Low level on IO0 during reset allows the ESP31 to enter programming mode. This is very much the same as ESP8266. I am not sure if the pull-up resistor is needed because it seems there is one built-in. Nevertheless I just put one for safety reason.</li>
<li>The red board is a FTDI USB-Serial converter. The board is set to 3.3V I/O. The orange color jumper wire from FTDI board is to get 5V power from USB, feed through an AMS1117-3.3 to power the ESP31 module. I used a 100uF output tantinium capacitor. It seems this setup is not good enough. I&#8217;ll explain later.</li>
</ul>
<p>With the board on hand, it is now time to setup development environment. There are excellent guides at <a href="http://www.instructables.com/id/Beginners-ESP32-Guide-to-Assembly-Testing/" target="_blank" rel="noopener">http://www.instructables.com/id/Beginners-ESP32-Guide-to-Assembly-Testing/</a>, as well as LadyAda&#8217;s live show <a href="https://www.youtube.com/watch?v=HCGHb0OVz1s" target="_blank" rel="noopener">https://www.youtube.com/watch?v=HCGHb0OVz1s</a></p>
<p>New year is around the corner and I am so eager to continue my new year greeting video &#8220;series&#8221;. It natually envolves into this:</p>
<p><iframe loading="lazy" title="Merry Christmas from ESP31" width="640" height="360" src="https://www.youtube.com/embed/6SR7anr_Xi4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p>And the source code too: <a href="https://github.com/baoshi/ESP32-XMAS" target="_blank" rel="noopener">https://github.com/baoshi/ESP32-XMAS</a></p>
<p>Again some notes about the source code:</p>
<ul>
<li>The TFT screen contains 128&#215;160 pixels, at 16bit/pixel it amounts to 40kB/frame, or 320kbits/frame. The SPI bus is running at 13.3MHz, that works out around 40fps. Due to some coding overhead the fastest I can achieve is about 25fps. But again becaused of the latency at WiFi side, I&#8217;m currently running the screen at 10fps. That is only 400kB/s for WiFi traffic, which is significantly slower than the claimed 140Mb/s rated speed. Of course there is huge room for improvement at software side.</li>
<li>The ESP31 seems to take more power than it&#8217;s predecessor ESP8266. The above mentioned AMS1117-3.3 cannot provide enough juice. The phenomenon is garbaged output from serial port, lost WiFi connection, or failed with exception after reset. It could be a thermal issue. I ended up using a lab power supply then all the problems are gone. My supply registered 170mA when WiFi is active. Of course it includes the LCD comsumption. I will do some further investigation at a later time.</li>
<li>I encouontered some WiFi abnormalities that the connection speed slows down significantly from time to time. Reset the chip will resolve the issue. For the time being I havn&#8217;t fully dig into it.</li>
<li>Other than these, ESP31 (ESP32 Beta) and the current SDK (1.1.0) seems quite stable.</li>
</ul>
<p>To all my readers or viewers I take this oppotunity to wish you a Merry Christmas and Happy New Year. See you next year.</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/12/26/first-signt-into-esp32/">First sight into ESP32</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/12/26/first-signt-into-esp32/feed/</wfw:commentRss>
			<slash:comments>4</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>TrueSTUDIO STM32 project to GCC Makefile converter</title>
		<link>https://ba0sh1.com/2015/04/30/truestudio-stm32-project-to-gcc-makefile-converter/</link>
					<comments>https://ba0sh1.com/2015/04/30/truestudio-stm32-project-to-gcc-makefile-converter/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Thu, 30 Apr 2015 09:25:07 +0000</pubDate>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[Makefile]]></category>
		<category><![CDATA[STM32]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1087</guid>

					<description><![CDATA[<p>Since I wrote the STM32CubeMX to Makefile converter, a lot of people have been helping to improve the project. Thanks! Meanwhile I also heard a lot of complaints about the quality of STM32Cube...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/04/30/truestudio-stm32-project-to-gcc-makefile-converter/">TrueSTUDIO STM32 project to GCC Makefile converter</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Since I wrote the <a title="STM32CubeMX GCC Makefile project" href="https://www.ba0sh1.com/stm32cubemx-gcc-makefile/" target="_blank" rel="noopener">STM32CubeMX to Makefile converter</a>, a lot of people have been helping to improve the project. Thanks! Meanwhile I also heard a lot of complaints about the quality of STM32Cube codes, for example, the thread <a title="ST's (STM32Cube) software ecosystem is terrible - how can we fix it?" href="http://www.eevblog.com/forum/microcontrollers/st's-(stm32cube)-software-ecosystem-is-terrible-how-can-we-fix-it/" target="_blank" rel="noopener">here</a>. Although I believe STM32Cube&#8217;s quality will eventually improve, at the moment there are still applications for the good old &#8220;Standard Peripheral Library&#8221; and other ST middlewares. Therefore I wrote another program, that converts most of ST&#8217;s example project into Makefile project.<span id="more-1087"></span></p>
<p>The new utility, named ST2Makefile, is available on <a title="ST2Makefile" href="https://github.com/baoshi/ST2Makefile" target="_blank" rel="noopener">https://github.com/baoshi/ST2Makefile</a></p>
<p>My limited testing shows it works for most example projects in ST&#8217;s library package, as well as STM32CubeMX exported projects. One thing needs tweaking could be that some ST&#8217;s example project contains duplicated source files. If you receive error message such as &#8220;Symbol already defined in XXX&#8221; during linking, please check the SRCS section for any duplicated source entries.</p>
<p>The usage is changed a little since CubeMX2Makefile.py, now you should run:</p>
<p>[code light=&#8221;true&#8221;]<br />
ST2Makefile.py &lt;TrueSTUDIO project location&gt;<br />
[/code]</p>
<p>where you can identify TrueSTUDIO project location by locating &#8220;.project&#8221; and &#8220;.cproject&#8221; files inside it.</p>
<p>&nbsp;</p>
<p>As usual, some useful resources:</p>
<h3>Useful links</h3>
<p>ST2Makefile: <a title="ST2Makefile" href="https://github.com/baoshi/ST2Makefile" target="_blank" rel="noopener">https://github.com/baoshi/ST2Makefile</a><br />
ARM GCC: <a title="https://launchpad.net/gcc-arm-embedded" href="https://launchpad.net/gcc-arm-embedded" target="_blank" rel="noopener">https://launchpad.net/gcc-arm-embedded</a></p>
<p>My packaged GNU Make for Win32: <a title="GNU Make Win32" href="https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip" target="_blank" rel="noopener">https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip</a></p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/04/30/truestudio-stm32-project-to-gcc-makefile-converter/">TrueSTUDIO STM32 project to GCC Makefile converter</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/04/30/truestudio-stm32-project-to-gcc-makefile-converter/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>STM32CubeMX GCC Makefile project</title>
		<link>https://ba0sh1.com/2015/02/23/stm32cubemx-gcc-makefile/</link>
					<comments>https://ba0sh1.com/2015/02/23/stm32cubemx-gcc-makefile/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Sun, 22 Feb 2015 18:15:48 +0000</pubDate>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[Makefile]]></category>
		<category><![CDATA[STM32]]></category>
		<category><![CDATA[STM32Cube]]></category>
		<category><![CDATA[STM32CubeMX]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1062</guid>

					<description><![CDATA[<p>Writing peripheral initialization code is probably the most tedious work in embedded development. It always successfully stops me from starting a new project. I believe engineers at STMicroelectronics share the same pain. Therefore...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/02/23/stm32cubemx-gcc-makefile/">STM32CubeMX GCC Makefile project</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Writing peripheral initialization code is probably the most tedious work in embedded development. It always successfully stops me from starting a new project. I believe engineers at STMicroelectronics share the same pain. Therefore they created <a title="STM32Cube" href="http://www.st.com/stm32cube" target="_blank" rel="noopener">STM32Cube</a> firmware and STM32CubeMX graphical configuration tool, which turns numerous key strokes and page flips into just a few mouse clicks. STM32CubeMX is free software, but the initialization code it generates require compiler tools carrying hefty price tags, IARARM, Keil ARM-MDK, and Atollic TrueSTUDIO, to name the few. Fair enough these compilers do offer free editions with limited functionality. But I still prefer unrestricted, free tool that is easily scale-able for my current and future projects. Just like the GNU Make and ARM GCC toolchain I described in <a title="Opensource STM32 development" href="https://www.ba0sh1.com/opensource-stm32-development/" target="_blank" rel="noopener">Opensource STM32 development</a>.</p>
<p><span id="more-1062"></span></p>
<h2><span style="color:#ff0000;">UPDATE</span></h2>
<p><span style="color:#ff0000;">Always get update from https://github.com/baoshi/CubeMX2Makefile The code is now based on SW4STM32 project output. Thanks various contributors to make this possible.</span></p>
<p>Deprived off electronics lab back in Singapore, a Chinese new year holiday here in Shanghai home is perfect for some software projects. I have little exposure with Python but after two days of Googling (through VPN) and copy/paste, a crude CubeMX2Makefile utility is ready, available at https://github.com/baoshi/CubeMX2Makefile (OOP aficionados please forgive my spaghetti styled code. It works is it?)</p>
<p>As the name suggests, the program converts STM32CubeMX project into a GNU Makefile. Here is a mini-HOWTO:</p>
<ol>
<ol>
<li>Create a STM32CubeMX project, configure pins, peripherals and MiddleWare, then edit project settings as follows: <span style="color:#ff0000;">(choose SW4STM32 instead of TrueStudio in the picture below)</span>
<p><figure id="attachment_1065" aria-describedby="caption-attachment-1065" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1065" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting.png?w=1024&#038;h=512" alt="STM32CubeMX project settings" width="600" height="300" srcset="https://ba0sh1.com/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting.png 1220w, https://ba0sh1.com/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting-300x150.png 300w, https://ba0sh1.com/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting-1024x512.png 1024w, https://ba0sh1.com/wp-content/uploads/2015/02/897a8-stm32cubemx_project_setting-768x384.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1065" class="wp-caption-text">STM32CubeMX project settings</figcaption></figure></p>
<p>Make sure the Tool/IDE selection is TrueSTUDIO 4.3.1 (as of STM32CubeMX 4.6.0), and note down the &#8220;Toolchain Folder Location&#8221;. I found it necessary to empty the old &#8220;Toolchain Folder&#8221; before each code generation, otherwise the project file just keep growing regardless of settings (this could be a bug in STM32CubeMX). See <a href="#update">update</a> below.</li>
<li>Download the project from the Github repo below, extract files to a folder, say &#8220;C:CubeMX2Makefile&#8221;. Install Python 2.7 Win32 from www.python.org
<p>[code light=&#8221;true&#8221;]<br />
c:CubeMX2Makefile&gt;dir /b<br />
.gitattributes<br />
.gitignore<br />
CubeMX2Makefile.py<br />
CubeMX2Makefile.tpl<br />
readme.md<br />
[/code]</p>
</li>
<li>From command prompt, execute CubeMX2Makefile.py, e.g,
<p>[code light=&#8221;true&#8221;]<br />
c:CubeMX2Makefile&gt;CubeMX2Makefile.py R:411ProjTestF4<br />
File created: R:411ProjTestF4Makefile<br />
[/code]</p>
</li>
<li>Cd into &#8220;Toolchain Folder Locaiton&#8221;, make project, i.e.,
<p>[code light=&#8221;true&#8221;]<br />
R:411ProjTestF4&gt;make<br />
&#8230;<br />
arm-none-eabi-size build/TestF4.elf<br />
 text data bss dec hex filename<br />
 5876 12 1056 6944 1b20 build/TestF4.elf<br />
arm-none-eabi-objcopy -O ihex build/TestF4.elf build/TestF4.hex<br />
[/code]</p>
<p>Refer to <a title="Command line tools" href="https://www.ba0sh1.com/opensource-stm32-development/#commandlinetools" target="_blank" rel="noopener">blog</a> and below links for ARM GCC and make utility installation. It will be much easier to import the Makefile project into Eclipse CDT for code editing and debugging.</li>
</ol>
</ol>
<h3>Useful links</h3>
<p>CubeMX2Makefile: <a title="https://github.com/baoshi/CubeMX2Makefile" href="https://github.com/baoshi/CubeMX2Makefile" target="_blank" rel="noopener">https://github.com/baoshi/CubeMX2Makefile</a></p>
<p>STM32Cube: <a title="http://www.st.com/stm32cube" href="http://www.st.com/stm32cube" target="_blank" rel="noopener">http://www.st.com/stm32cube</a></p>
<p>ARM GCC: <a title="https://launchpad.net/gcc-arm-embedded" href="https://launchpad.net/gcc-arm-embedded" target="_blank" rel="noopener">https://launchpad.net/gcc-arm-embedded</a></p>
<p>My packaged GNU Make for Win32: <a title="GNU Make Win32" href="https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip" target="_blank" rel="noopener">https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip</a></p>
<p><a name="update"></a></p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/02/23/stm32cubemx-gcc-makefile/">STM32CubeMX GCC Makefile project</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/02/23/stm32cubemx-gcc-makefile/feed/</wfw:commentRss>
			<slash:comments>36</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>Macbook Bluetooth upgrade for LightBlue Bean</title>
		<link>https://ba0sh1.com/2015/01/15/bluetooth-upgrade-lightblue-bean/</link>
					<comments>https://ba0sh1.com/2015/01/15/bluetooth-upgrade-lightblue-bean/#comments</comments>
		
		<dc:creator><![CDATA[Baoshi]]></dc:creator>
		<pubDate>Wed, 14 Jan 2015 16:18:45 +0000</pubDate>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[BCM94360CS2]]></category>
		<category><![CDATA[BLE]]></category>
		<category><![CDATA[Bluetooth 4.0]]></category>
		<category><![CDATA[LightBlue Bean]]></category>
		<category><![CDATA[Macbook Air]]></category>
		<guid isPermaLink="false">https://www.ba0sh1.com/?p=1024</guid>

					<description><![CDATA[<p>During last year&#8217;s blackfriday sale I was introduced to the epic Lightblue Bean &#8220;Cheaper than a turkey&#8221; promotion. I grabbed two beans during a group buy spree. A week later&#8217;s The AmpHour interview with...</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/01/15/bluetooth-upgrade-lightblue-bean/">Macbook Bluetooth upgrade for LightBlue Bean</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>During last year&#8217;s blackfriday sale I was introduced to the epic L<a title="Lightblue Bean" href="https://punchthrough.com/bean/" target="_blank" rel="noopener">ightblue Bean</a> &#8220;Cheaper than a turkey&#8221; promotion. I grabbed two beans during a group buy spree. A week later&#8217;s The AmpHour <a title="The AmpHour EP226" href="http://www.theamphour.com/226-an-interview-with-colin-karpfinger-blendling-bean-brio/" target="_blank" rel="noopener">interview with Colin Karpfinger</a> justifies that my purchase is not purely impulsive. However I did make a mistake. I was under the impression that a Mac computer is sufficient to program the bean, but actually only recently Macs are supported, whereas my &#8220;Late 2010&#8221; Macbook Air is on the exclusion list due to the lack of Bluetooth 4.0 / Low Energy profile.</p>
<p><span id="more-1024"></span></p>
<p>Digging into BLE upgrade for Macbook Air Late 2010 results in many solutions. The best resource seems to be the &#8220;<a title="Continuity-Activation-Tool" href="https://github.com/dokterdok/Continuity-Activation-Tool/" target="_blank" rel="noopener">Continuity-Activation-Tool</a>&#8221; project, which is made to enable &#8220;Continuity&#8221; feature on old Mac computers. Since &#8220;Continuity&#8221; depends on BLE, I suppose this will work with Lightblue Bean. For my model of Macbook, the suggestion is either to add a USB dongle or replace the Airport Extreme card. My poor Macbook only has two USB ports, so replace the Airport Extreme card seems to be the way to go.</p>
<p>The suitable replacement Airport Extreme card with BLE is BCM94360CS2. It can be purchased from eBay or Taobao at reasonable price (~US$20). The kind seller also included a Pentalobe screw driver in the package, which proves to be a life saver later.</p>
<p><figure id="attachment_1025" aria-describedby="caption-attachment-1025" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/abf13-bcm94360cs2.jpg" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1025" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/abf13-bcm94360cs2.jpg" alt="BCM94360CS2" width="600" height="450" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/abf13-bcm94360cs2.jpg 800w, https://ba0sh1.com/wp-content/uploads/2015/01/abf13-bcm94360cs2-300x225.jpg 300w, https://ba0sh1.com/wp-content/uploads/2015/01/abf13-bcm94360cs2-768x576.jpg 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1025" class="wp-caption-text">BCM94360CS2</figcaption></figure></p>
<p>For record purpose here are the screenshot of Bluetooth and WiFi page in &#8220;System Information&#8221; before replacement:</p>
<p><figure id="attachment_1026" aria-describedby="caption-attachment-1026" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/3065a-bt-after-replacement.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1026" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/3065a-bt-after-replacement.png" alt="Bluetooth before card replacement" width="600" height="439" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/3065a-bt-after-replacement.png 863w, https://ba0sh1.com/wp-content/uploads/2015/01/3065a-bt-after-replacement-300x220.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/3065a-bt-after-replacement-768x562.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1026" class="wp-caption-text">Bluetooth before card replacement</figcaption></figure></p>
<p><figure id="attachment_1027" aria-describedby="caption-attachment-1027" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/62664-wifi-before-replacement.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1027" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/62664-wifi-before-replacement.png" alt="WiFi before card replacement" width="600" height="439" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/62664-wifi-before-replacement.png 863w, https://ba0sh1.com/wp-content/uploads/2015/01/62664-wifi-before-replacement-300x220.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/62664-wifi-before-replacement-768x562.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1027" class="wp-caption-text">WiFi before card replacement</figcaption></figure></p>
<p>Open the back cover of Macbook Air *REQUIRES* the pentalobe screw driver, and never assume a multi-head screw driver set will contain one.</p>
<p>The original Airport Extreme card has a mouthful BCM943224PCIEBT2 model number. There are two ipx antenna connectors on board, assuming one for Bluetooth and one for WiFi.</p>
<p><figure id="attachment_1028" aria-describedby="caption-attachment-1028" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/99fd6-bcm943224pciebt2.jpg" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1028" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/99fd6-bcm943224pciebt2.jpg" alt="BCM943224PCIEBT2" width="600" height="450" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/99fd6-bcm943224pciebt2.jpg 800w, https://ba0sh1.com/wp-content/uploads/2015/01/99fd6-bcm943224pciebt2-300x225.jpg 300w, https://ba0sh1.com/wp-content/uploads/2015/01/99fd6-bcm943224pciebt2-768x576.jpg 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1028" class="wp-caption-text">BCM943224PCIEBT2</figcaption></figure></p>
<p>My Macbook Air has 11 inch screen. The card placement is different from most online pictures which are for 13inch model. On the 13 inch model the card has longer edge parallel to the casing, but for 11 inch it is perpendicular. It is also reported on many online resources that the antenna cable has to be rerouted to reach the new card. It seems unnecessary for my 11 inch model. I can easily fit the two cables.</p>
<p><figure id="attachment_1030" aria-describedby="caption-attachment-1030" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/5312b-bcm94360cs2-replaced.jpg" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1030" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/5312b-bcm94360cs2-replaced.jpg" alt="BCM94360CS2 replaced" width="600" height="450" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/5312b-bcm94360cs2-replaced.jpg 800w, https://ba0sh1.com/wp-content/uploads/2015/01/5312b-bcm94360cs2-replaced-300x225.jpg 300w, https://ba0sh1.com/wp-content/uploads/2015/01/5312b-bcm94360cs2-replaced-768x576.jpg 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1030" class="wp-caption-text">BCM94360CS2 replaced</figcaption></figure></p>
<p>At the moment I have no idea which antenna is to fit into which socket. But my random connecting seems to be working. Also noted that the new card is longer than the old one, so the mounting hole is no longer fit. However the socket is tight enough to keep the card in place.</p>
<p>I assemble the back cover and turn on power. Not surprisingly everything &#8220;just works&#8221;. No error and no &#8220;install driver&#8221; kinds of message at all. Even the Wireless LAN password and Bluetooth paired devices list are preserved. Here are the system information after replacement:</p>
<p><figure id="attachment_1031" aria-describedby="caption-attachment-1031" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/82561-bt-after-replacement1.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1031" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/82561-bt-after-replacement1.png" alt="Bluetooth after card replacement" width="600" height="439" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/82561-bt-after-replacement1.png 863w, https://ba0sh1.com/wp-content/uploads/2015/01/82561-bt-after-replacement1-300x220.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/82561-bt-after-replacement1-768x562.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1031" class="wp-caption-text">Bluetooth after card replacement</figcaption></figure></p>
<p><figure id="attachment_1032" aria-describedby="caption-attachment-1032" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/9fc22-wifi-after-replacement.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1032" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/9fc22-wifi-after-replacement.png" alt="WiFi after card replacement" width="600" height="439" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/9fc22-wifi-after-replacement.png 863w, https://ba0sh1.com/wp-content/uploads/2015/01/9fc22-wifi-after-replacement-300x220.png 300w, https://ba0sh1.com/wp-content/uploads/2015/01/9fc22-wifi-after-replacement-768x562.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1032" class="wp-caption-text">WiFi after card replacement</figcaption></figure></p>
<p>The Bean Loader seems to be happy with the new card as well.</p>
<p><figure id="attachment_1033" aria-describedby="caption-attachment-1033" style="width: 600px" class="wp-caption aligncenter"><a class="thumbnail" href="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/a2282-bean-loader.png" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="wp-image-1033" src="http://blog.ba0sh1.com/wordpress/wp-content/uploads/2015/01/a2282-bean-loader.png" alt="Bean Loader" width="600" height="369" srcset="https://ba0sh1.com/wp-content/uploads/2015/01/a2282-bean-loader.png 686w, https://ba0sh1.com/wp-content/uploads/2015/01/a2282-bean-loader-300x185.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1033" class="wp-caption-text">Bean Loader</figcaption></figure></p>
<p>As a &#8220;side effect&#8221;, the &#8220;Continuity&#8221; feature works without any tweaking, together with the &#8220;AirDrop&#8221; functionality. The replacement worth every cents of it!</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://ba0sh1.com/2015/01/15/bluetooth-upgrade-lightblue-bean/">Macbook Bluetooth upgrade for LightBlue Bean</a> appeared first on <a rel="nofollow" href="https://ba0sh1.com">Digital Me</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ba0sh1.com/2015/01/15/bluetooth-upgrade-lightblue-bean/feed/</wfw:commentRss>
			<slash:comments>2</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>
