ESP32 servos uncontrolled movement during upload
Posted: Sun Mar 19, 2023 5:39 pm
I use ESP32 to run servos. Always during upload the servos have uncontrolled movments (connected to GPIOs), so I desided to use an relais, to switch the power supply of the servos on, during setup routine of code, so during upload the servos have no power, so I avoid the uncontroled movements. So I wrote a simple Arduino code, that switches the relais (an Arduino modul on a small pcb) on high during 5sec, then off, only for test.
When I upload the first time the code to the ESP32, relais is off during upload, then 3sec on, then off, exactly as expected.
When I upload again, then the relais is on for 1sec during upload, and then 3sec during execution of setup routine.
Same happens again with 3rd upload.
I also tried with a pulldown 47kohm in the signal line of the relais, same result. I also tried all GPIOs, knowing that some are not recommended for, but didn‘t any, that worked as expected.
My target is, that relais during upload never is on, only when I controll it by my code.
Has somebody a solution for me?
When I upload the first time the code to the ESP32, relais is off during upload, then 3sec on, then off, exactly as expected.
When I upload again, then the relais is on for 1sec during upload, and then 3sec during execution of setup routine.
Same happens again with 3rd upload.
I also tried with a pulldown 47kohm in the signal line of the relais, same result. I also tried all GPIOs, knowing that some are not recommended for, but didn‘t any, that worked as expected.
My target is, that relais during upload never is on, only when I controll it by my code.
Has somebody a solution for me?