30 November 2014

ESP8266 finally hears Arduino

As stated 18 days ago, I took a break from trying to make an Arduino board talk to an ESP8266 WiFi module. In the meantime I have both updated the 8266 firmware and received level converters.

Nothing changed: still no data flow from Arduino to ESP8266 over the hardware UART.

After three nights spent debugging software and hardware, trying to understand why both of them could happily speak to a computer, one at a time, but not to each other, I took the last chance: I fed directly the Arduino output at 5V/TTL. Make it or (literally) break it.

Well, it simply did it.

My ESP8266 specimens seem to be a "deaf" at 3.3 V, but they happily accept data at 5 V (datasheet says inputs are 5 V tolerant). ESP8266 power supply remains at 3.3 Volts.

More than ever, YMMV (Your Modules May Vary). I am not suggesting this procedure as standard practice. I report it worked for my specimens.


11 November 2014

Come aprire il tablet Mediacom SmartPad 820c

(This post is in Italian language since Mediacom products seem to be known only here...)

Mi è capitato un tablet Mediacom SmartPad 820c con questo difetto: si inserisce il caricabatterie, lui da solo inizia la procedura di accensione e dopo circa 10 secondi si spegne il display per ricominciare tutto da capo. La batteria non carica.

Avendo vissuto una esperienza simile su uno smartphone Galaxy S2 che ha comportato la sostutizione di un circuito integrato (in garanzia!), ho aperto il tablet.

Contrariamente a quanto si potrebbe pensare, non bisogna forzare sotto il coperchio posteriore in alluminio o la plastica nera, ma tra il display e la striscia blu in plastica. Qualche vecchia carta fedeltà fa al caso nostro:



Si comincia dall'angolo in cui si apre lo sportellino e si fa tutto il giro.

Un po' sospettavo la batteria, come visto sul mio tablet Mediacom. Ma in questo caso non è assolutamente gonfia e mostra una tensione di 3,2 V (è solo scarica). Il problema sembra proprio essere nel circuito di gestione della carica.

Si potrebbe scollegare la batteria, ricaricarla esternamente e ricollegarla, per recuperare i dati. Ma la decisione spetta al proprietario dell'oggetto.

Purtroppo il difetto si è presentato una settimana dopo la scadenza biennale della garanzia. E non pensate male!

10 November 2014

ESP8266, taking a break

After too many hours spent trying to make an Arduino board talk to the ESP8266 module, I decided to take a break and:
  • buy a 5V/3.3V level conversion module
  • upgrade ESP8266 firmware while waiting for the delivery
With the upgrade I should be able to reduce the serial speed to a more bearable 9600 baud and hopefully get more consistent behavior of AT commands.

I even built a converter board based on a circuit I found online. I replaced 2N7000 with BF245 from my FET drawer but all I got was wrong voltages or a form of short circuit. Nevermind, even if I am loosing a chance to learn something new, I do not have enough time for this kind of troubleshooting: I want to have that WiFi board working and uploading data!

07 November 2014

Filtering ESP8266 power supply

If your ESP8266 behaves erratically, the cause could be in the power supply.

Not every experimenter is properly equipped with a reliable 3.3 V source, neither was I. So I built a downconverter to power the ESP8266 WiFi board. The LF33CV LDO regulator should supply 500 mA continuous: plenty of headroom for the 200-250 mA peak requirement.

I configured my modules to join the home WiFi network a startup. A simple test for their presence is to run a network ping (the smartphone and Fing app comes very handy). When powered with the USB-to-serial converter, the round-trip-time smartphone<>ESP8266 was of 10 ms or so. That is: send a small packet of data to the remote device and measure how long it takes to come back the acknowledgment.

When I moved to the stand-alone circuit I started getting lost packets exceptions and much higher RTT.

I looked at the 3.3 V line and noticed anomalous spikes when the LDO was used. Instead the DC line was much smoother with another 3.3 V source.

A simple extra 220 uF across 3.3 V and GND fixed it. Actually I even improved RTT of a couple of milliseconds.

So, decouple that 3.3 V line!

06 November 2014

My ESP8266 initialise sequence

For my personal records, and the worldwide community, here is how I initialised my two identical ESP8266 modules bought in September 2014. As usual with these almost undocumented electronics, YMMV: your module may vary.

All commands are terminated with CR and LF and not echoed locally (this is a setting of your terminal).

The module comes in AP mode: it acts as an access point. I wanted to use it as a normal device on my home network, so I changed it to "sta":

AT+CWMODE=1

This setting requires a cold restart of ESP8266. I am not sure a soft reset AT+RST is enough.

Now it is possible to join the local WiFi network:

AT+CWJAP="yourWiFinetworkid","yourWiFipassword"

To check if it has joined the network issue:

AT+CWJAP?

It will return the string +CWJAP:"yourWiFinetworkid"

Assuming your hotspot has a DHCP server, the assigned IP address is shown with:

AT+CIFSR

That's it, the device is connected. It will reconnect at each power cycle. As is it will not do anything useful, just reply to IP ping.

Again, YMMV.
(in other words: I am not able to offer support of any kind)

05 November 2014

ESP8266 cheap WiFi-to-serial module

After reading positive comments, I jumped on the ESP8266 boat.

The ESP8266 chip/board is a WiFi-to-serial adapter (yeah, the "so 70's and 80's" serial port!), which includes a TCP/IP stack and a WiFi Access Point. It can work as a server on your home network, or as an "Internet of Things" (IoT) client, or accept WiFi connections from other devices. Just use your imagination and do some advance planning. All for 5 USD or less.

These boards run at 3.3V, so there is need for a level converter to use them in pair with Arduino and a separate power supply/adapter. Or buy a 3.3V Arduino board (it will run at 8 MHz instead of 16 MHz clock).

There are a few Arduino libraries around, so life is quite easy as long as you understand all limitations involved (for example you will not stream video over a 115200 bit per second channel with a 64 bytes buffer).

My ESP8266 modules remember the AP setting, user and password, so they connect automatically at powerup. Unfortunately they do not auto-start the TCP server, so a microcontroller is needed. Or a new firmware can be flashed ... or developed if you're brave enough!

03 November 2014

Back on 30 m CW - 2014

In a spike of interest for HF operations, I re-erected my 10 MHz monopole already featured on these pages. I haven't been there for a couple of years, and now we are closer to the solar cycle peak than my last appearence on 30 metres.

May be it is my antenna, or the propagation. I am getting very strong signals from very close stations. Even just 200 km away. Everyone is 599+ for real, sometimes I even have to use IPO or ATT on the FT817. And of course I have no troubles to be heard. I even got a reply during a test CQ at 500 mW.

I should connect my SW-30+ and finally have a QSO with it, even if it is not completely boxed yet.

Oh, by the way, I am sweating my way out of CW QSOs. No digital contacts this round.