Esp-01 flash/sketch upload with pl2303 yp-01/arduino uno

Hello everyone, it's been two weeks with hard work, searching the net, trying, head scratching, retrying, fraustration...ETC.
Probably you know how it feels whith ESP8266 bare bones (esp-01/esp-06...etc)

The problem: Cannot upload sketch, flash, nor update firmware to ESP-01; not with arduino (uno), nor with usb to ttl (pl2303 YP-01).

note: It worked once, I was able to update AI Thinker firmware, and uploaded a simple LED blink sketch to GPIO2 with Arduino Uno. never been able to upload since.

PS: I aslo changed the ESP-01 baudrate to (9600), because I read somewhere that the UNO cannot handle the Baudrate Speed of ESP, and it may have an overflow, so I did it with (AT+UART_DEF =9600 ,8,1,0,) command throug serial monitor and Arduino Uno, since I didn't have an FTDI at that time.

I tried the same procedures again, but nothing, so i decided to buy an FTDI(PL2303 YP-01)

After installing the driver and wiring everything, the Serial monitor shows only gibberish with every baude rate I try


I aslo noticed that the Baude rate 74880 does show the Flashing mode when, nor the error, but again gibberish, but when I plug the ESP with Arduino Uno, it shows the flash mode if GPIO0 is pulled LOW, and error if not attached, which is the normal.

Soooo, What's the deal here, is something wrong with my ESP? or is it the FTDI? or maybe I broke it when I changed the default baudrate of the ESP?

PS: I used voltage regulator with ESP


I also used voltage regulator with RX pin by using to resistors( 1K and 2,2K)
I pushbuttons with both GPIO0 and RESET, and 10K resisors with CH_PD, Reset,GPIO0.
PS: My LED blink sketch is still working with GPIO2 , and the network WIFI is showing the ESP acces point

HELP PLEASE,,, I don't care about the ESP,,, I just wanna solve the problem,,,you know how it feels when u can't solve a puzzle! So itchy :laughing:

You should consider getting one of these if you work with the ESP-01S in a regular basis

ESP programmer

1 Like

cant find"em in my contry, and ordering the online will take two months due to Covid policy, thanks though

check this tutorial. You seem to be on the right track wiring wise. Is the PL2303 recognized properly ? iow is it a 'true-prolific' ?
I personally use an UNO for uploading since the pl2303's i have are clones and they don't work with the newest driver (which W10 has to install) but use the Uno also to power the ESP-01 with 3.3v
Once you have uploaded 'blink' to the ESP, the original ai-thinker firmware is gone, but the wifi credentials may still be stored. Don't get why it should still create an AP though, if there is nothing in the sketch that tells it to do that.

that is a software command, once you reset the ESP, that is gone, and it reverts back to 115200 (using the built in firmware)

using swSerial , reception is unreliable at 115200.

do you have the TX-pin (GPIO1) pulled 'LOW' ? it should be pulled HIGH or free-floating, same for GPIO2. How do you have the LED attached ?
it should be active LOW so pulled HIGH at boot, or normal bootmode won't work (This is probably the bit of the puzzle that needs fixing)
There is also a BUILTIN LED on GPIO1 which is active LOW

1 Like

Thanks for the reply and the tutorial.
I'm using Windows 7 64x, and Yes, the driver" prolific" is installed properly, and the port is recognized with no issue.
ports


Thanks for the info about the firmware, and the baud rate, I learned a lot.

the TX pin is attached to TX of arduino, or to RX of PL2303, I don't understand what do you mean by (GPIO1) since there are only 0 and 2 according to the data sheet.

The LED is Attached to GPIO2 from the positive side, and through a resistor on negative to ground, and it blinks every (1000ms), since I uploaded that sketch.


I tried to pull GPIO2 both LOW and HIGH, but nothing, as for GPIO0, its attached to a push button to ground, smae thing with the RESET, so whenever I want to activate boot mode, I first press the reset button, then GPIO0 button, than I release the Reset, then the GPIO0.

From my understanding of the tutorial, AT command will not work if the sketch is uploaded, and we will have to flash the firmware again? ( which i'm not able to do).

Will be able to upload another sketch after uploading the first one? (also not able to do)

How do I know if my ESP is bricked? I heard about that term before (bricked) but don't know what it means.

I've never bricked one, i've fried them, but bricking is not something that happens on ESP-01's (more an AVR thing)

Well you should change that. The Anode (the longer leg or + side) should be connected to 3.3v+ the cathode through a resistor to GPIO2. That will make it 'active-LOW' The way you have it connected now, you are pulling GPIO2 'LOW' which will change the boot mode. link

The TX pin is GPIO1, the RX pin is GPIO3, they can be used as general purpose GPIO pins if they are not used for Serial communication.
Once you have successfully uploaded a new sketch, try

void setup() {
  pinmode(1, OUTPUT);
  digitalWrite(1, LOW);
}

void loop () {}
1 Like

Very Happy about that !
Personally i use 1k and 2x1K. The combo you use works out to be 3.43v which is safe (anything up to 3.6v should be ok) but a little less is safer.

1 Like

Thanks,
It's seems that there's a problem with pl2303, so I used USBasp, which can work as serial converter, now I can get the ESP to work on 74880 baud rate, but still nothing with other baud rates, just a bunch of gebberish, still can't upload sketches (error: timed out), and can't update the firmware nor reset it to factory version... :face_with_head_bandage:

Hmmm what is the ESP putting out at 74880 ? This is somehow info it is putting out at boot, it doesn't respond to anything you sent to it at that rate.
Your 'Blink' sketch is still on the ESP right ?
I suggest you go back to basics, and use the UNO to upload and communicate.
Disconnect everything.
Upload 'Blink' to the UNO (maybe make it blink fast so you know it's on there) to make sure there is no interference on the Serial port.
Connect CH_PD & VCC to 3.3V
GND to GND
RX to RX via the voltage divider
TX to TX
RST via 10K to 3.3v and via tack switch to GND
GPIO0 via 10K to 3.3v and via tack switch to GND
I know you had it more or less like this before, but doing the whole wiring thing again may solve a bad connection. (or a wrong one)
select 'generic 8266' as the board.
Change the setting for 'Builtin led' to '1',
The rest of the default settings should be ok for starters, though you actually appear to be having 1MB flash (black unit)
Put it in flash mode (hold down the switch to GPIO0 and press and release the switch connected to RST, but you know that)
Upload 'Blink' (if you don't change the builtin led setting you can change it to GPIO1 manually as well of course)
See how you go.
If that fails, there may be damage to the ESP-01, though there is still a few things we can try.

in regards to the PL2303, the driver version that i know works with 'clones' is v3.3.2.105
the file name for the setup file i have is 'PL2303_Prolific_GPS_1013_20090319' Later versions check for an authentic chip, and will not support 'clones' If you can't find that installer online, i can send it to you, but it is available, and i am not in the habit of posting executables here.

Oh and just to make sure that you have the voltage divider connected properly, it should be :
UNO RX -- 1K -- ESP RX -- 2.2K -- GND

OK, so here is a schematic, with uno... This was the wiring from the begining, exept the LED(GPIO2), and the added resistor to (GPIO0).


note: I added some Capacitors (1000uf) and ( 470uf) on both rails of the breadboard, to act as a filter...
Please not that Im using external power supply, and the GND of arduino is connected to GND of breadboard, and Reset of Arduino is connected to onboard GND. and again,,, I got the usual

On 748800 when i press the RST button

When I hold Reset and GPIO0 button then release the Rst then GPIO0( activating boot mode)

here it is on 115200 with the reset button


here it is on 9600 with the reset button

Here what happends when I try to upload the code on boot mode:

tried differnt combination with board configuration,,,the outcome is always the same,,, so fraustrating,,,, sorry you had to experience this with me.

Well the schematic looks good now, and it is clearly going into the proper 'boot-mode' and your reset-mode is clearly what is happening, being you pressing the reset button. So there it's all good.

That is a relevant change, and it probably should show in the boot-mode, anyway it is the way it should be now.

So to wrap this up, The ESP-01 is sending the data it should, it is still running the sketch last uploaded (right, it is still blinking the led ?) but when in flash-mode it does not respond to data sent. The most likely cause is that the RX-pin is damaged.
There is a possibility of IDE not trying in the right way, but the default settings should work (they did before as well didn't they)
If you select an AVR board (like an UNO) close the IDE and re-open it and then select the ESP8266 it should start out with the default settings again, but just in case let me list them
Upload speed : 115200
CPU Frequency: 80MHz
Crystal Frequency: 26MHz
Flash Size : 512KB (no SPIFFS)
Flash Mode 'QIO'
Flash Frequency: 40 MHz

I actually would suggest to try a different ESP-01 if you have another one, just to exclude it as a cause that it is broken as well. The issue must be on the RX-line, so any other checks on that may be relevant. ESP's are fairly fragile, and i've broken at least a dozen over time. The frustrating part is always when you can not figure out what is wrong, but don't give up.

1 Like

Of course there is the more general advice, that you should update the IDE, and uninstall and re-install the core, but i don't think that will fix anything, still i should give it as well.

1 Like

I think you're right, the ESP TX is working fine, and the problem is the RX, probably it was damaged because of the several tries with different methods and wiring. I'll buy a new one, plus I have an ESP-07 AND ESP32 WROOM, I'll try with those as well.
Thank you so much for your help, really appreciate it.

1 Like