-->
Page 1 of 2

CH_PD always connected to GND?

PostPosted: Mon Jun 08, 2015 4:46 pm
by Samuel Gh
So I really like this Arduino IDE setup. However, I can't get the sketches to run properly unless I tie CH_PD to GND so the ESP8266 goes into bootloader mode.

I understand that I have to do that when I want to upload a new sketch but I don't understand why I need to have this connected even though I just want the existing sketch to execute in the ESP.

Am I missing something or is this the expected behaviour?

Re: CH_PD always connected to GND?

PostPosted: Tue Jun 09, 2015 2:05 am
by tytower
From the wiki above -ESP8266 101... Means year 1 at uni

So, now we assume that you got:

an ESP-01
a USB/TTL converter
a 3.3V power supply
a breadboard and Dupont wires
1k and 2.2K resistors

Note that the FTDI USB UART adapters internal 3.3v supply might not provide enough current to power the ESP8266 under all circumstances, so some external 3.3v power supply is recommended. It it seems to disconnect or reset, try a separate power supply. http://amodaa.ru/

Looking at the (8 pin) board from the top (chips and antenna side), with the antenna to the right, the pins from the top down in the edge row are:

TXD (goes to the RxI of the UART USB adapter to the PC)
CH_PD (enable/power down, must be pulled to 3.3v directly or via resistor)
REST (reset, must be pulled to 3.3v)
VCC (3.3v power supply)

The inner row (top and bottom have square pads)

GND (connect to power ground)
GPIO 2
GPIO 0 (leave open or pull up for normal, pull down to upload new firmware)
RXD (goes to TxO of the UART USB adapter to the PC)

Other modules have more pins, but these will be included. If GPIO 15 is broken out, it must be pulled low to get out of the bootloader.

If there is power, a red LED will come on, and a blue LED will flash briefly as it comes out of reset - it flashes when the UART is transmitting.


So what is CH_PD doing to ground? Just a typo?

Re: CH_PD always connected to GND?

PostPosted: Tue Jun 09, 2015 2:26 am
by Samuel Gh
Sry, I guess I was talking about GPIO-0 to enter bootloader mode.

I've noticed that the sketch DO execute but it's the serial communication that's not working in running mode which led me to think that it was this bootloader issue.

Re: CH_PD always connected to GND?

PostPosted: Tue Jun 09, 2015 9:41 am
by Will Vincent
If you don't have an arduinon with multiple hardware serial ports, you need to use softwareserial, and should keep your baud rate at 19200 or less in that case.

In either case, whether using hardware or software serial, you need to connect ESP's RX to Arduino's TX, and ESP's TX to Arduino's RX pins.

If it's hooked up correctly, and you're fairly certain the code is correct, it's probably a baud rate issue you're running into. The easiest way to determine what baud rate the ESP is set to, that I've found, is to hook it up directly to the serial connection, without trying to run a sketch, and open up the serial monitor, change the baud rate until it either responds to AT commands, or hitting the reset pin with a jumper to ground doesn't produce only garbage chars.

It's a pretty cool little module, but it can be very frustrating to work with.. keep at it, you'll get it :)