Chat freely about anything...

User avatar
By Sahbi
#88299 So I recently received multiple ESP-01 and ESP-01s boards from the same vendor. I tried uploading a basic sketch to all of them to check basic functionality etc, which worked fine for all the 01s boards but none of the ESP-01 ones.

I'm using the USB programmer where you can directly plug the ESP into. According to the various datasheets the pinouts of both board models are exactly the same, so they should work just fine (I even requested both sheets from the vendor). Except I have to permanently short CH_PD/EN and RST to even get the ESP to boot up and remain turned on. This happens for all ESP-01 boards, so I don't quite think it's a mass production glitch. As mentioned the 01s boards work just fine; I can just plug any one of them in there and it'll accept my flashes and properly boot without having to touch it.

Here's a video of me shorting the board and showing a little console output. It's not really visible here but I'm using one very short male-male jumper cable looped around to touch both pins with.

Some things I've already tried:
  • I have multiple of those USB programmers, using a different one doesn't make a difference.
  • Reseating the ESP a little differently (e.g. slightly angled forwards/backwards), but no change whatsoever.
  • Since I also have some other boards, I also have a bare USB-TTL module which you can stick in a breadboard. But yet again nothing changes when I connect the ESP-01 this way.
  • I have an externally powered USB hub, but connecting either USB adapter to that instead of directly plugging it into my laptop doesn't do anything either.

Anyone have any ideas why this problem occurs and how to fix it? Or is it somehow a design problem (since it happens for all boards) and I'll have to exchange them?
User avatar
By schufti
#88315 the esp-01s are an advanced version. As most people don't read the datasheets, they do not follow the guidelines that rst, en, gpio0 and gpio2 should have pull-ups (resistors of ~10k to vcc) for (stable) operation, so they are fited on esp-01s.
your solution works because esp.01 has pullup on rst that works also for en when shorted.
better use recommended pull-ups to be on the save side with all makes of modules.
User avatar
By Sahbi
#88323 This is the first time I've heard of needing pull-ups for basic operation of the ESP-01, many of the online writeups and even the datasheet they sent me don't mention it. I thought the only difference between the vanilla ESP-01 and 01s was that the latter has 1 MB of flash memory, even though the newer vanilla models (including mine) also have 1 MB.

Anyways, I tried connecting everything through a breadboard and a bare USB-TTL module (just as I did before). Except this time I also added 10k resistors to the 4 pins you mentioned. And indeed, I can now plug in the USB cable and properly flash a sketch. Then I started pulling some cables (GPIO2, GPIO0 and RST) and see which of those I also need pulled up for proper operation. Turns out: none, only the CH_PD pin. I looked into this some more and apparently the only reason why you would not want this pulled up permanently, is if you want to power it down by hardware instead of software (which is not something I plan on needing as of now). The 3 other pins usually work fine if left floating, but due to external interference it may take the wrong value. For now I'm okay with that, I just needed to be able to get a basic sketch going.

So I soldered a 10k resistor between VCC and CH_PD on the back of each board and tried the USB programmer again. And lo and behold, it (still) all works as expected.

Odd that almost nobody seems to mention this requirement. I did some more (Google) searching just now, specifically about needing pull-ups and that does give me some relevant results. But if your query is about something more general this piece of information doesn't seem to pop up.

Anyways, thanks. =]
User avatar
By schufti
#88326 Hi,

as I wrote: for _stable_ operation ... meaning that e.g. gpio0 and gpio2 have _ weak _ internal pullups, so as you correctly concluded: may pick up static and lead to eratic behaviour. For rst: this pin allready has a pullup on the esp-01 module.
The requirement for pull ups/downs (e.g. gpio15) is intrinsic to the requirements of the required logic levels for a certain operational state (flash, rund code fron flash, sdcard, etc) detailed in the ds. Open (floating) pins don't meet the requirement for a _stable_ logic level unless mentioned in the ds (what is not the case).