Brief introduction of this hardware:
ESP-XX devices are a whole family of radio frecuency tranmissor shields with 2.4ghz band, that implements all the usefull internet protocols like 802.11b/g/n, wifi with WPA and WPA2 security mode and Integrated TCP/IP protocol stack, that allows conectivity to our pojects easer than ever. In addition, They count with some GPIOs, I2C, SPI, UART ports and one analog pin, which turn them in a perfect discovery IOT shield.
The core of this devices is a integrated circuit called ESP8266 from Espressif Systems, a litle 32-pin CPU, with RISC and 32 bits word length, we can use for our processes with a very low power consumiption, flowing from 10 to 70 mAh in regular load. However, it could show peaks current at 240mA, so it is necessary to use 3.3v and 300mAh power suply. Don’t power it whith your usb serial port!! it might break the little integrated conversor.
The greatest format for begginers is the esp-01, that counts whith an eight pin DIP socket, that alows to connect the device to a protoboard using the usual duppont wires, but this one only has two available GPIO.
If you have stain solder, there are a lot of options depending on requirements, like ESP-03, 07, 12, 12E that need an additional board to adjust their pins to standard metric, there are also some board that have an integrated program interface or a socket to use an usb to UART programmer.
To program an ESP, the wire up will always be the same:
-remember to apply a 3.3V converter (like an AMS1117) if you dont have an adapter.
-gpio2 to ground (10k resistor is recomend)
-gpio15(ch-pd) at 3.3 (10k resistor is recomend)
-gpio0 to ground, only by get into programming mode.
-We will conect rx, tx to our UART programmer, and reset before flash.
After flashing we will remove the gpio0 - ground wire, to boot up in normal mode. So if you are going to reprogram it a few times, it’s recomended to use a pair of buttons to give ground to gpio0 and reset, booting on flash-mode . it will seems like this:
foto de protoboard
DIY programmer board
if you want to make a inexpensive programmer, you can do it like this:
you only need:
1ud usb to TTL usb programmer.
2ud push buttons,
1ud 4x6cm or 5x7cm proto board,
2ud 1x8 female 2.54mm socket,
1ud 1x4 dip pin for the UART port.
some wrapping wires.
- First, you have to look up for a good position to situate the ESP and UART sockets, making it easier to push buttons. Then conect tx and rx from board to UART pins.
- Situate the buttons and weld ground at input side. Output from button1 will go for reset (1st right pin), and button2 for gpio0 (5th left pin) from ESP board.
- Last step is weld 5V (yellow wire) and master ground wire.
And thats all folks!! now you only have to go to the programming tutorial, and have fun with ESP8266 Arduino and Thinger.io!!