ESP8266 Lessons Learned

ESP-01The Trip: As regular readers may know, early in 2016 I worked in Spain on a contract with some great guys to analyse information from ESP8266 chips. Without going into any commercial detail, this is what I brought back from that trip as well as other lessons learned since then.

The scenario: The tests were done on a series of ESP-01 WIFI micro-controllers  in a rural environment, initially with a bank of 40 ESP-01 boards. These were powered by a single 20 amps 3v3 power supply. Yes, a switched supply. The boards were mounted on Vero-board and power applied. No linear regulator to smooth out the crap ( I would normally run 5v switched and a linear 3v3 regulator on-board for each device), lossy tracks on Veroboard, signals interfering with each other..  except it DOES get worse – read on.

The Place: The location we conducted our tests was off-grid, relying on solar power and a generator – and the weather most of the time was cloudy – that meant at regular intervals the remote generator kicked in and when it did a couple or so mains cycles were lost as the set-up there uses a combined inverter/charger. The result of that was that at regular intervals, the router reset.

boardsAside from actual power cuts you don’t get much worse than this.  At first when we switched on the boards – which are running a modified version of my home control software which is in turn based on TUANPMs MQTT code with a boatload of stuff added and a lot of tweaking over time, only some of the boards would report back. A quick check of the router revealed that by default it only allocated enough room for 32 connections on DHCP. That was quickly doubled and lo and behold, all the boards logged in by MQTT to the PC (running Node-Red and MQTT and firing off data to a database).

Useful outcomes: Well, any thoughts I may have had concerning reliability completely vaporised this last 2 weeks as day after day our little bunch of 40 boards (not even all from the same supplier as some were blue, some were not) just sat there constantly delivering information. This was soon increased to  a wopping 120 boards without issues.

So if you’re just starting up with ESP chips – bear the above in mind before jumping to conclusions about board reliability. The boards used in the test, running as I speak, were the early 512K versions, today I always use ESP-12 boards in my own projects as they have eight times the amount of FLASH which means OTA, big programs (up to 1MB of C code (that’s a lot)) and in the case of the “F” version arguably better antennae.

I sometimes hear of people complaining that once programmed, some ESP boards go into a loop at power up – and I’ve recently had this happen to me TWICE. In each case I had extra bits and pieces attached and was running the board off the FTDI – again in each case, putting proper 5v onto the boards immediately resolved the “problem”. FTDIs vary a lot in their output and voltage.  While it is tempting to use them to power the ESP (or indeed the micro-usb connector in some cases, straight off your PCs USB – the time will come when this causes trouble and now you know the answer.

12 thoughts on “ESP8266 Lessons Learned

  1. Im currently facing a scenario like this. I have 500 ESP modules that needs to be connected to a PC running Apache server. I’m going to use 20 WiFi routers with 20 ESP clients on each, The 20 routers will be connected to the PC via a Switch. All the modules will operate in a 500 square meter space. Currently i’m using the ESP_RTOS_SDK. Im testing on controlling the RF Tx power to reduce interference, but with no success on it. The API(“system_phy_set_max_tpw’) in the SDK is not working for me. Any idea on this ?.

  2. I’m still struggling with reliability at deep-sleep mode. I have a test circuit, powered from normal PSU (not battery), properly wired (all the necessary pull-ups). Circuit is reading humidity/temperature from AM2301 sensor, then sending data to a web server, located in same network segment. It constantly fails after several hours. After a hardware restart it works fine again for several hours.

  3. It’s good to hear they are reliable. My own limited experience with the esp 01 is not good, the esp 12 is fairing much better but my sample size is very small.

  4. Thank you for this. A week or so ago, an engineer from Adafruit posted that the ESP8266 products were very unrelialable, with no other information to back up that claim. I think you experience proves otherwise.

  5. Hi there,
    As I can see from pic of 40 esp01 placed very close to each other it may create problem …I am not having much knoweledge about wifi and esp8266 but while i was doing some work around cc1101 and rfm69 sub GHz rf chips…very close proximity of rf chip was causing problem ….sorry for my bad english m not gud at it….thanx for your post about esp8266 …

    1. Yes I expected problems too! But up to now there have not been any -it will be interesting to see 120 !

      1. Thats great …all the best for 120 🙂
        Can u help me setup programming environment ..i have been using IDE for diff microcontrollers for programming in C…i was trying to setup xtensa tool chain and esp sdk on given lubuntu on virtual machine …As i never used linux and terminal cmds I am failing to setup work environ ment where i can build files and flash to esp01…will u guide me to setup particular programming environment.there are many notes and commands listed but every documents and internet articals uses little bit different aprroches…confused 🙁
        Thank you

        1. I have successfully build glass capsense touch switches and dimmers with rf capabilities and capacitive touch remote.want to try out esp01 if it works for my project that would be great.

        2. Hi Hardik – afraid Linux and Ubuntu isn’t my thing. There are lots of guides out there for that.

          1. Hi Peter ,Thanks for your quick reply 🙂 .Hope I will find something in upcoming week.So I guess you are working with eclipse or esplorer for your project.

          1. Thanks Luis Carlos Becerra,But last weekend I successfully setup latest espressif SDK and xtensa toolchain in lubuntu on VM.Also successfully built IOT demo example and flash it to ESP01.Hope this weekend I will able to try to run some basic examples.

Comments are closed.