Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By eketjall
#57029 Hi,

First post here, tried to search but couldn't find anything concerning my problem (which i thought I wouldn't be the only one to have)

To summarize; I'm using the Arduino IDE to program a ESP-01 module. So far so good.

What I would like to achieve (which I know is possible all parts by them self but maybe not all together at the same time) is Auto Reset when programming using FTDI adapter which exposes DTR and CTS line. Would love to have the Arduino IDE serial monitor working even with auto reset circuit in place. And finally use GPIO 0 and 2 for I2c together with auto reset without any buttons or jumpers etc.

It might be to much to ask from the ESP-01 module, but shouldn't be impossible really.

In theory I got it working, but I got stuck on the auto reset.
I have the hardware circuit working "manually" but not from the DTR line.
Where do I find the information on what reset method "ck" vs "NodeMcu" actually do with the serial lines (DTR/RTS)? When and how do they go High or Low etc in the different modes?
(And also information on all the other settings which isn't self explaining such as speed and flash size. Haven't search for the others yet though because everything is working except auto reset)

During my searches I saw somewhere that it was possible to turn of´f DTR/RTS for the serial monitor to get that part working together with auto reset, but I really didn't find out more than it should be possible in the Arduino IDE.
How is this achieved?

If I can sort those two things out (really the auto reset is the biggest problem) I can start testing and se if I can have i2c without problems from the auto reset circuit.

Thx
/Henrik
User avatar
By eketjall
#57115 Ok. I didn't realy have the reset circuit working after all.
I couldn't get the reset to work on the RST pin so I tried CH_PD, but it turns out to be just intermittent.

But I hooked everything up to my scope meter from work and figured out what was wrong.
When using the auto reset circuit on the CH_PD pin I got lot's of noise and on the RST pin my "low puls" was much shorter than expected.

My reset circuit is DTR -> 100nf -> RST pulled high with 10k and DTR -> diode -> GPIO2 pulled high with 3k3

The low period on RTS should be ~1ms but was only like in the tens of micro seconds.
Ok, RTS seems to be internally (or at least on the ESP-01 borad) pulled up with 12k, but that in parallel with my 10k doesn't explain the short pulse.
I tried to put a 330nf cap instead of 100nf, which should give a 3 times longer pulse, it didn't. Longer but not near 3 times.
680nf didn't cut it either.
My bin of caps is quite empty, but I wacked a 4,7uf electeolyte in instead. That did the trick. Got a long 32ms effective low pulse on RTS.
So there is some internal/on board capacitance really playing a role here.

So now the auto reset works fine with just the DTR line as trigger (ck mode which at least pulls DTR low) .
Don't know why there is noise when the chip enters boot mode though.
Image

So only left to investigate if this also will work together with i2c on GPIO 2 and 0.

And also, the question if it's possible to disable the low DTR in Arduino Idé serial monitor.
User avatar
By mrburnette
#57653 My $4 LoLin NodeMCU works perfectly with Linux Mint... downloads and auto-reboot without ever touching the Reset/Program buttons.... 95% of the time. Sometimes, if the module is 'hung' in some weird never-never-land, I have to press the Reset button, press and hold Program, release Reset ... and download. Yea, a pain sometimes ... but really not a big deal.

The NodeMCU schematic is online.


Ray