Friday, April 19, 2019

ESP8266 notes and hints

There is a fair amount of information out there and web sites to building/using the ESP8266, the problem is there is a lot of just wrong info on the ESP8266 out there . ESP8266 wasn't designed to be like a Arduino but info was released and programmers hacked it and now it's a lot like a Arduino , it seems to be designed to be used by a Arduino like a processor using a serial connection and a AT modem set (a flash back to the 1990) . You can find a lot of Arduino library's that let you do this but the real power of the ESP8266 is that you can re-flash it with Arduino like code and use it as a stand alone Arduino. The confusion on the ESP8266 starts because there are a lot of hardware version of the ESP8266, google ESP8266 wiki and read, lots of versions and manufacturers so here is the start of miss-information . Lots of datasheets poor translations , incorrect interpretations of the documents . It also doesn't help that these are 3.3v devices where most of the Arduino's were 5v, IE 3.3v devices are a lot easier to damage due to over voltage IE anything over 3.6v and you device is garbage, and let me count the ways that can happen (at least 4-5 times I have done this, by mistake or indirectly). Once you damage a ESP8266 it can still function but not to spec , IE GPIO's show off when on , A/D can work but be wrong , at boot pins will recycle up and down randomly etc .

One of the first things you hit when using the ESP8266 is how you have to set it up to program or just run it , IE 3 pins will need pull up resistors and 1 pin a pull down , RESET,GPIO0,GPIO2 up, GPIO15 down, please read the data sheet for the device you have to verify this, don't trust anyone , again because of the above . GPIO0 is the program pin, low puts it into programming/flashing mode. But one of the things you will run into is that there are a lot of pins that go up and down during a boot, IE power on. This can cause un-wanted functions to trigger on your design, so again find some documentation and experiment. The other major problem is that the ESP8266 has a built in wireless stack that when activated will take time away from any process to keep the connections alive and well. There are many Arduino library writers that have had to fix there code because of this time share of this device, IE your code is not the only thing running of this chip, keeping that in mind you have to be able to give up control to the communication code so that it can maintain connections health etc .

The ESP32 is the next generation of the ESP8266 and it solves some of the ESP8266 problems IE duel processors more pins better documentation and designed to be programmable from the ground up. But the ESP32 is 2x the money at least if not more as of this document creation. So in the low price area ESP8266 still has a place and a market if you can get around the above issues. I had some good success with it so far .

Some wastland posts

Some wastland posts