So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By sudhanshuesp
#73409 I bought an ESP8266 12-E for the first time ( it is not a node mcu)( image attached). i made the hardware as per the diagram specified in the image attached.
After i connect the module with a ftdi driver module, it does not works. the ftdi driver is set at 3.3 volt and the esp module is power by a 5 volt supply and a 3.3 volt regulator. i tried to upload codes from adafruit, generic, node mcu, sparkfun. nothing seems to work. how can i find the correct code to upload?
Am i doing something wrong, or something i am missing ?

model vendor: ESP8266MOD AI- THINKER
You do not have the required permissions to view the files attached to this post.
User avatar
By ratfink
#73448 I don't quite understand your power set-up.
Does the ESP module have its own regulator 5v to 3.3v? Even if it does, it will accept 3.3v. Most FDDI units ca be set to work at 5v or 3.3v and pass through the supply at either. if you are running the FDDI at 3.3v I would take the power and signal from that and feed the ESP module the 3.3v directly (there are usually pins to accept the 3.3v power line), bypassing the onboard regulator.
User avatar
By MartinC
#73449 There are a couple of possibilities - notably (1) you've got a dead board or (2) you're not correctly booting into programming mode. Hopefully it's (2) :)

I guess you probably know that at startup the ESP12 reads the levels on GPIO 0, 2 and 15 in order to decide whether to start in normal or programming mode (see https://github.com/espressif/esptool/wiki/ESP8266-Boot-Mode-Selection. However, in any of these modes you should see some serial messages from the board at 74480 bps. With a fresh-out-of-the-box ESP12 in 'normal' mode (GPIO 0 high, GPIO 2 high, GPIO 15 low) you should see a 'blast' of characters at 74kbps and then it will switch up to 115200bps and give you an AT prompt.

In order to discount that you have a dead board, the first thing I would do is to double check with a multimeter that you have pins 1 and 2 (gnd, gpio15) wired to 0v, and pins 3, 4, 9, 11 and 16 (gpio2, gpio0, rest, ch_pd, Vcc) wired or pulled up to 3v3 [NB: Espressif say you should use a pullup resistor for gpio2 rather than wiring it directly to Vcc]. You should see the Led flash briefly when you apply the power, and if you hook up the Gnd and Rx pins of the FTDI usb serial adapter to Gnd and TXD on the module you should be able to read the boot messages with a serial terminal programme set to 74000 bps (naturally you'll need to make sure you're connecting to the correct serial device on your PC/Mac).

One possibility by the way is that the module partly boots then dies due to noise on the power lines (it can take a fairly high current during startup) so I'd recommend putting a decoupling capacitor across the power lines close to the device. It sounds like you already know about the importance of making sure your usb serial adapter is in 3v3 mode :)

Assuming the board is alive, then the next step I follow is to check that esptool.py can communicate with it. To do this, first rewire to bring GPIO0 (pin 4) to ground and re-power the device. Kill your serial terminal program (if it was running) and then run esptool with the following command:
Code: Select allpython esptool.py flash_id

It should say 'connecting' then output some info about the size of the flash memory on the device. If it can't connect then re-check the levels on gpio0, 2 and 15 (should be 0, 1, 0 respectively).

Good luck and keep trying :)
User avatar
By MartinC
#73450
ratfink wrote:I don't quite understand your power set-up.
Does the ESP module have its own regulator 5v to 3.3v? Even if it does, it will accept 3.3v. Most FDDI units ca be set to work at 5v or 3.3v and pass through the supply at either. if you are running the FDDI at 3.3v I would take the power and signal from that and feed the ESP module the 3.3v directly (there are usually pins to accept the 3.3v power line), bypassing the onboard regulator.


Personally I've found that the 3v3 supply from a FTDI device (which is derived from the 5v USB power) is insufficient to correctly power the ESP12 and it needs an external supply, but YMMV :)

The ESP12 modules do not have an onboard 3v3 regulator by the way and you will fry them if you try to power from 5v direct. Similarly it's necessary to use a level shifter (can be a simple diode/resistor circuit and voltage divider) to make the serial input/output of the USB/serial adaptor work at 3v3 levels - however I think the OP has one of the FTDI ones that has a jumper to set them to 3v3 mode (very useful)