ESP2866 serial wifi

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

ESP2866 serial wifi

Post by FFMan »

I'm trying to utilise an ESP2866 to get NTP information to set the time on a project.

I have an esp2866 with AT firmware installed and can talk to it as expected using Realterm and a USB to ttl serial convertor i bought with the esp2866. I can issue commands to read the AP lsit, connect to one and send an NTP request. All with AT commands.

The baud rate of the esp2866 is fixed at 115200, so i'm using a h/w uart on a zx24p to talk to it.

The esp2866 is 3.3v device so the tx pin of the zx24 goes via a resistor divider to manage the level conversion. Not the best way I know but has worked ok in the past.

For some reason i can't get the esp2866 to respond to AT using the zx24.

If i reset the esp2866 i get the startup info sent to the zx so i think the rx side is ok. (interestingly i get readable info whether i specify inverted or non-inverted logic on the definecom. I expected the incorrect logic type to display gibberish, so not sure if this indicates an issue)

If i join the tx and rx pins of the zx together, i get the echo of the AT i send back, so i think the com port is working ok.

I'm a bit stumped, whereas in the past i've been able to get lots of serial devices to work. I either have a wiring fault (possible but i been through it several times), or i'm overlooking something or have forgotten something as it's been a while...

any help/thoughts appreciated
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: ESP2866 serial wifi

Post by dkinzer »

FFMan wrote:the tx pin of the zx24 goes via a resistor divider to manage the level conversion. Not the best way I know but has worked ok in the past.
I would recommend using the diode-type converter (see attachment). It is the same number of components as a resistive divider and is less finicky. Almost any small signal diode will work (e.g. 1N914B) but a Schottky diode would be better given its lower forward voltage.

For some reason i can't get the esp2866 to respond to AT using the zx24.
FFMan wrote:i get readable info whether i specify inverted or non-inverted logic on the definecom.
That's because that bit does nothing for a HW port on the ATmega-based devices.
Attachments
level-converter.jpg
level-converter.jpg (11.21 KiB) Viewed 2404 times
- Don Kinzer
Post Reply