[TriEmbed] ESP8266 Serial Connection

Nathan Yinger npyinger at ncsu.edu
Wed May 20 12:18:10 CDT 2015


I was just wondering why serial pins are not labeled better...it would be
so easy to put arrows on them. There seems to be a general problem with
poor documentation of serial connections (parity, byte size, etc.).

Once I've had a chance to play around with the ESP8266 I'll be taking a
look at other Wifi SoCs. Right now I'm trying to build a Wifi-controlled
rover for <$10 in parts, so I'll be sticking to the cheaper ones for a
while.

~Nathan

On Tue, May 19, 2015 at 11:52 PM, Christopher Svec <
christophersvec at yahoo.com> wrote:

> Regarding RX/TX mismatches, Particle (formerly Spark) has a great
> datasheet for their older "Core" dev board: they have pictures with arrows
> on them showing the flow of data to/from the RX/TX pins.
>
> Picture here: http://docs.particle.io/assets/images/core-pin-usart.jpg
> Full HW datasheet here: http://docs.particle.io/core/hardware/
>
> Those simple arrows would have saved me at least a few hours of debug on
> similar designs... An even better idea would be to print the arrows on the
> silkscreen.
>
> Scroll down that page and you'll see that the SPI and other signals are
> also marked with direction arrows - such a simple but brilliant idea!
> Clearly they have empathy for us users.
>
> Unfortunately it looks like they ditched the arrows on their newer
> (recently Kickstarted) "Photon" product.
>
> -svec
>
>
>
>   On Tuesday, May 19, 2015 11:37 PM, Jon Wolfe via TriEmbed <
> triembed at triembed.org> wrote:
>
>
>  I've been bit by the janky power supply problem more times than I can
> count. The worst ones are where your setup seems to work 75%-90% of the
> time, and you drive yourself crazy trying to track down the issue.
> I've hit the tx/rx match-up issue before too. Most of the time though,
> I've seen TX->RX and RX->TX as the working connection. I think some
> devices/adapters take the nomenclature approach where everything is labeled
> from the "point of view" of the "master" device, eg, "RX" on a peripheral
> is the line where the main device receives data, even though the peripheral
> is transmitting from it's point of view to the other device. confusing.
> You would think that mis-connecting those would cause dangerous line
> contention, but as often as I have messed it up, I've never fried a chip
> that way. YMMV.
> I have seen a few sources on the Internet stating that the RX and TX on
> the 8266 "seem" 5V tolerant. But the "official" datasheet says it's not.
>
> If you want a little bit nicer chip that has (mostly) 5V tolerant I/O and
> has additional I/O's, and can *probably* handle higher baud rates than the
> esp8266, check out the EMW3162 from MXChip. Seeed Studio has them,
> http://www.seeedstudio.com/depot/EMW3162-WiFi-Module-p-2122.html.  I have
> some, and if I don't need all of them, I may put them up on Anibit. The
> major downside to the EMB3162 is their decision to use 2mm spaced pins. 2mm
> female headers are a royal pain to find domestically. I made some
> breadboard/2.54mm adapters for them here
> https://oshpark.com/shared_projects/opehJKc7
> The built-in stock firmware for the EMW3162 has a (not very similar to
> ESP8266's AT) command set to act as a Wifi peripheral, but the on-board CPU
> that does the heavy lifting is  an STM32F205 Cortex-M3 ARM chip with 1 MiB
> of flash. You can write more elaborate code for the device itself than the
> Arduino's most people connect to them.
> It's more expensive than the ESP8266, but it can do more. Another downside
> is that it's even less documented than the esp8266, but I've exchanged a
> number of emails with the MXChip engineers, and they've been pretty willing
> to answer my questions.
>
> On 2015-05-19 16:38, Nathan Yinger via TriEmbed wrote:
>
>  Success! It did indeed need more power, and the tx pin on the ESP had to
> be wired to the rx pin of the Sparkfun FTDI board, which is opposite of
> other serial adapters I've seen.
>
> For those interested, I got the 'AT OK' response with 9600 baud and NL +
> CR line ending.
>
> Thanks for the help,
> ~Nathan
>
> On Tue, May 19, 2015 at 1:19 PM, Pete Soper via TriEmbed <
> triembed at triembed.org> wrote:
>
> This is nice information.
>
> I looked at it a bit and one thing that jumped out and swatted me on the
> nose is the fact that the radio board 3.3v power supply current draw can
> greatly exceed the current an FTDI chip can put out. The "usual" FTDI chips
> (and it appears Sparkfun is using a vanilla FT232RL) can only source about
> 50ma at 3.3 volts from their internal regulators. The ESP8266 board has
> typical (i.e. possibly far from "worst case") current requirements looking
> like this (from the table on the web site linked to below):
>
> 802.11b, CCK 1Mbps, POUT=+19.5dBm 215mA
> 802.11b, CCK 11Mbps, POUT=+18.5dBm197mA
> 802.11g, OFDM 54Mbps, POUT=+16dBm145mA
> 802.11n, MCS7, POUT =+14dBm135mA
> 802.11b, packet size of 1024 bytes, -80dBm60mA
> 802.11b, packet size of 1024 bytes, -70dBm60mA
> 802.11b, packet size of 1024 bytes, -65dBm62mA
> Standby0.9uA
> Deep sleep10mA
> Saving mode DTIM 1 1.2mA
> Saving mode DTIM 3 0.86mA
> Shutdown0.5uA
>
> So a lot of the time you're basically trying to kill the FTDI chip. I
> personally let the smoke out of one of these by accidentally telling it to
> try to supply a motor controller (off by an inch with the wire in the
> breadboard and hit the wrong power rail). They will die if tortured enough.
>
> So plan on the FTDI's 5v line driving an outboard 3.3v regulator with
> proper capacitors on both sides. An oscilloscope could confirm the radio is
> getting a proper supply and that it's not being yanked down by sudden
> changes in current demand.
>
> -Pete
>
>
>
> On 05/19/2015 11:00 AM, Christian Lilley via TriEmbed wrote:
>
> All of the information on the ESP8266 can be found here.
> <https://nurdspace.nl/ESP8266>
>
> According to the wiki the baud rate should be 57600. Sparkfun does
> mention that a level shifter should be used and that it should not be
> connected directly to 5V sources.
>
>  Here is an example
> <http://allaboutee.com/2014/12/27/esp8266-arduino-code-and-circuit/>using
> the Arduino's software serial to communicate with the ESP and the normal
> serial lines to communicate with the FTDI board. This guy uses a 9600 baud
> rate but I don't know if that is a custom setting he uses.
>
>   Christian Lilley | Electrical Engineer
>    [image: images] <http://www.gomohu.com/>
> 919.794.8627 ext 129
> christian.lilley at gomohu.com
>
>  www.gomohu.com
>
>
> On Tue, May 19, 2015 at 10:44 AM, Nathan Yinger via TriEmbed <
> triembed at triembed.org> wrote:
>
>    So, I have an ESP8266, a new serial adapter (
> https://www.sparkfun.com/products/9873), and I'm trying to get them to
> communicate.
>  When I power up the ESP8266, it creates a wifi network where I can join
> and ping it, but as far as I can tell, reprogramming it requires a serial
> connection.
>  When the ESP8266 is powered on, the 'tx' light on the serial adapter
> flashes continuously, which I assume means the ESP8266 is transmitting
> something. Nothing appears in my serial monitor though, not even gibberish.
>
> I'm using the serial monitor that comes with the Arduino IDE, with various
> baud rates and line endings. I haven't found any documentation about the
> byte length, parity, or character encoding used by ESP8266. I get a TTYUSB
> device in /dev when I plug in the serial adapter, so it appears to be doing
> something.
>  Does anyone know what's required to make the chips do something? Or have
> a working setup they could bring to the next meeting?
>  Thanks,
> ~Nathan
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing listTriEmbed at triembed.orghttp://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing listTriEmbed at triembed.orghttp://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>
>
> --
>
> Jon Wolfe
> Anibit Technology LLC.
> https://anibit.com
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20150520/723125df/attachment.htm>


More information about the TriEmbed mailing list