Updated 14th Septbut page still incomplete.
First off some big red text… meaning this stuff is important!!:
The ESP8266 uses 3.3V for power AND in also 3.3V on its RX (i.e. ‘data input’) communication line (it also pumps out 3.3V on its TX communication line). AND for all Input / Output pins.
5V anywhere will probably slowly burn it out..
OK Now I’ll list sub-pages to the ESP8266. Please do read the rest of the into stuff below. (I need to put the menu near to the top of this page for efficiency). Pages are in order of most recent at the top.
5) 24th September 2016. Bidirectional 5V to 3.3V converter module and ESP8266 to replace Arduino?
4) 24th September 2016. WeMos module pinout vs. Arduino
3) 21st September 2016. ESP pages that need reading
2) 14th September 2016. CH340 drivers
1) 11th June 2016. KYchem ESP8266 Wifi module page
The device is also current hungry. You MUST have a good power source or it will not work poorly or not at all. Indeed many problems I’ve seen people say about this are ultimately due to poor power supply. I recommend you use an LM1117 3.3V voltage regulator. Note: The pinout (arrangement and function of the pins) on the LM1117 is different from that of the 5V regulator. This useful video will help you get a good power supply: https://www.youtube.com/watch?v=j21CMZ6Lrfc (thank you “ItKindaWorks“) and don’t worry, you don’t need to solder, just put everything on one part of your breadboard.
Both the capacitors are across the ground and the output. Notice the different pinout for the LM1117 voltage regulator to that of the LM7805CV voltage regulator (always best to check the data sheets!) The diagram above will give the +’ve rail, the 3.3V you need to power the ESP8266, shown in purple. Note this is not to be used for the RX (receive data) pin
The WeMos ESP8266 (version 12E) board already has a 3.3V power regulator on it. So just plug in your 12V via the DC jack and all should be fine for the power. But remember the SIGNALS in and out of the ESP’s are also at 3.3V
End of big red text.
- Starting from scratch (things you will need).
- Flashing the ESP8266 firmware (upgrading the embedded software) using Arduino Uno. NOTE: I cannot be held responsible if you do this and anything goes wrong.
- Other stuff
1) For simple porpoises (controlling a number of objects) you will need:
a) ESP8622 version or or later b) a 3.3V power supply
c) Arduino UNO (or any other arduino) d) Laptop with arduino cable
e) Arduino IDE f) male to female jumper wires. d) Any other sensors/objects/circuitry that you usually use with your arduino.
To get going quickly watch this video. It uses some software called NodeMCU (read below about this). https://www.youtube.com/watch?v=tMRpYmDgkL0&feature=youtu.be
The ESP is really flexible 🙂 It contain its own GPIO too (General Pin for Input Output – where you can enter data into it or get get data in – like most of the pins on the arduino, but the ESP version 1 only has 2 GPIO pins, so there’s not that much you can control with it. But you can link it to an arduino using the RX and TX pins, allowing you access to the arduino’s GPIO’s :)))
2) I wouldn’t bother flashing the ESP8266 unless you find it doesn’t do what you wanted it to do. The boards usually come pre-installed with AT firmware. We became familiar with AT commands when we did our Blue-tooth project, changing the name of them etc… I guess the firmware on boards you purchase will be reasonably up to date. But still…. learning how to flash it can be fun, and really, we get much more functionality by flashing the Firmware, so maybe just flash it regardless 😉
The Greatscott video shows an ESP flashing utility called XTCOM_UTILITY. You can get it here in a zip package called esp_flasher.zip. Search the page for the file name or just manually scroll down the page to find the link/file. This flasher software is very small 🙂 Extract the esp_flasher folder (there are a couple of files in there) somewhere appropriate on your computer. I put mine in C:\Program Files (x86)\ so I have a folder called C:\Program Files (x86)\esp_flasher there. (I’m assuming the program is a 32 bit program). I made a short-cut to the exe file and dragged it in my programs menu in windows. There are other flashers but they seem larger and I’m not too sure about how secure they are. If Great Scott used it, then I feel it is probably ok. I think it likely that smaller files contain less junk etc and the XTCOM flash utility focused on here is is very small indeed :)))
There are other flashers out there. For example this page advocates the use of esptool.py6 for flashing as it is more automated.
You can change the firmware of the ESP8266. Firmware is instructions that will run when the computer starts up.
There are many firmwares to choose from.
If you change the firmware to NodeMCU then it allows you to upload LUA script (LUA is a simple programming language and ‘script’ just means a short program that runs/processed ‘live’ in the ESP* interfacing with you via your browser e.g. you can enter data in a “web” or browser page, and then send that data is sent to the ESP for processing where if desired, some some output can be given based on the input you gave. You can go here to see example of LUA (programming) script. IF you would like a graphical user interface (GUI) then this page will be useful to you.
Note LUA script are interpreted. That means the ESP has to ‘translate’ the script into a language it understands (i.e. pure binary or ‘machine code’) for each and every bit of LUA code it executes. It is no where near as fast as a program that has been compiled first (i.e. a program called a compiler has already fully translated your code into binary, in a ‘once only’ fashion, so the program never has to be constantly translated as it needs to be with interpreted code. This may cause some problems. This page discusses issues caused by using an interpreted language, LUA, on the ESP.
Lets not forget you can use the ESP8266 manufacturers own SDK (Software Development Kit) The link is here: http://bbs.espressif.com/viewtopic.php?f=46&t=2198#p7002
“Espressif” are the company who created these ESP8266 modules.