Chat freely about anything...

User avatar
By ChrisO
#93219 Hi

I have a relayboard, ESP-01/0S1 with a ESP8266 on it. The GPIO0 pin from the ESP8266 drives the relay.
On the boot it raises GPIO0's level high, 5V. Not optimal but I could cope with it.
This, with the "factory" firmware as reported by:
AT+GMR
AT version:1.2.0.0(Jul 1 2016 20:04:45)

However, when I install a firmware/scetch using Arduinon's IDE, even a trivial one which doesn't touch GPIO,
after a power-cycle/reset GPIO0 does a quick toggle: up and down. This is a real problem because it triggers the relay
and makes it useless for driving something like a garage door controller.
As the behaviour changes with the firmware change I think/hope it would be possible to make/modify a firmware
to make it let alone GPIOs and let the user configure it, like Linux does it. For those not familliar with Linux:
before declaring GPIO's pin direction (In/Out) you can specify its level, on boot the pin is floating. Smart.

Currently I have a Raspi Zero with a relay which does the job, wanted a cooler solution but failed :-(

Any help would be greatly appreciated.

Regards,
Chris
User avatar
By JurajA
#93222 io 0 is a boot configuration pin for the esp8266 bootloader and has a pull-up on esp-01s. with io 0 LOW the esp8266 would start in bootloader mode. (the bootloader is in ROM)
the Arduino core sets the pin LOW as soon as it takes control.
User avatar
By ChrisO
#93237 I know about GPIO0 level on boot.. The question is: how could I prevent the toggle, if the esp8266 bootloader
let it be as it was designed (pulled up), how to prevent Arduino's core to bring it down. This is my problem, I have the ESP8266 in a relay board and a transition low-high or high-low triggers the relay. Not really what I need.

Thanks,
Chris
User avatar
By ChrisO
#93256 I was partially wrong. I've just realized that the relay on my relay-board where the ESP8266-01 is sitting is LOW triggered. My bad. That means when the ESP8266-01 boots before GPIO0 goes, as designed, to 5V it is for a very short time LOW. That closes the relay and then GPIO0 goes HIGH and my relay opens.
That means it has nothing to do with Arduinos sketches etc. I received today two brand new ESP8266-01, just with AT firmware and observed what I described above.
Well, I'm not the first one who noticed this toggle end there was no reaction from ESP8266-01 manufacturer,
I guess we are on our own.
Thanks
ChrisO