ESP-01 temp + hum on GPIO 0 - startup issue

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

ESP-01 temp + hum on GPIO 0 - startup issue

#1 Post by mkotek » 21 Dec 2015, 22:20

I have created a module for driving a single relay, converting it from my previous DHT11 temperature module only. In order to avoid (or so I thought) an issue with GPIO 0 leading to programming mode, I have moved DHT11 to GPIO 0 and relay attached to GPIO 2.

Driving a relay has proven to be problematic - for some reason I have a 2-channel relay that I am able to drive directly from ESP (both ESP-12E and ESP-01), while a single channel relay, I had to use 2N2222 transistor to have it working, but that is another story.

Anyway, coming back to GPIO 0 issue. I know, GPIO 0 should not be used if possible, but I do not want to waste ESP-12 for driving just a temp+relay. However, when starting up, even with relay totally physically disconnected, ESP lights a blue LED really bright and does not start. I have no idea, what is causing it, but the only solution is to pull the chip off and plug it back. After that (after repeating it quickly 3 times at most), the module starts correctly (with blue LED just blinking), connects to WiFi and works reliably. I think, this is quite dangerous to do it like I have to do it, no mention about possible lack of power, that will cause the module not to restart automatically. But I have no idea, what is causing the instability. If I would pulll GPIO 0 to the ground, I know, it would trigger programming mode, but I do not remember it causing the blue LED to light and light bright. So it must be something else, but what?
Last edited by mkotek on 10 Jan 2016, 12:40, edited 2 times in total.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

chrille
Normal user
Posts: 88
Joined: 26 Aug 2015, 15:11
Location: Horsens, Denmark

Re: ESP-01 temp + hum on GPIO 0 - startup issue

#2 Post by chrille » 22 Dec 2015, 22:43

mkotek wrote:I have created a module for driving a single relay, converting it from my previous DHT11 temperature module only. In order to avoid (or so I thought) an issue with GPIO 0 leading to programming mode, I have moved DHT11 to GPIO 0 and relay attached to GPIO 2.
My limited experience with relays on GPIO 0 and 2, is that it needs a pullup resistor, so the ports kept high during reboot. I ended up adding a 10k pullup resistor and connected the GPIO ports to a 4049 inverter, that was driving an ULN2803 darlington transistor array. It did work, albeit inverted (eg setting port high would open the relay).

However, I think the popular relay modules from Aliexpress that's triggered by setting the input low, would work equally well (again with a pullup resistor) - these modules are less than a dollar

- Jan
Jan Chrillesen, Denmark

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: ESP-01 temp + hum on GPIO 0 - startup issue

#3 Post by mkotek » 22 Dec 2015, 22:57

So a pull-up resistor connected between GPIO 0 and 2 respectively and VCC of 1K, right?
Would it allow DHT11 and relay steered by 2N2222 transistor to still work as expected?
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests