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?
ESP-01 temp + hum on GPIO 0 - startup issue
Moderators: grovkillen, Stuntteam, TD-er
ESP-01 temp + hum on GPIO 0 - startup issue
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.
Re: ESP-01 temp + hum on GPIO 0 - startup issue
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).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.
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
Re: ESP-01 temp + hum on GPIO 0 - startup issue
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?
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.
Who is online
Users browsing this forum: No registered users and 15 guests