GPIO pin behaviour at startup
Captainbeaky last edited by
Quick question here - I'm missing something silly...
M5 Stack Core, driving an onto-isolated relay to turn a mains power supply on and off at given times.
Basically, it's a timer that turns off an electric motorcycle battery charger after a set time (several hours).
Program works fine - next steps are to read the state of battery charge from a CANbus, so I can turn it off at a set charge level.
This isn't my first Arduino project, but it is my first M5Stack or ESP32 Project, and I'm struggling with not knowing exactly the circuitry connected t the GPIO pins.
(Yes, I've got the official documentation, but I don't think it is telling the whole story!)
On initialisation (initial power on, or SW driven initialisation), the relay pulses briefly (Either at uP startup, or when the GPIO pins are getting assigned)
The output is running active low, so when the pin pulls down, the relay activates, and this is working fine.
My usual routine for something like this is to set up the relay drive software only to turn the relay on when one pin is high, and another is low (so any re-set "low" transient is ignored).
Any way to avoid this pulse at startup?
I'm missing something silly - what is it?