Hi im currently working on my project for my IOT course im working on a simple project that uses the esp32 v4, 5v relay, 12v battery, and a solenoid lock. i've tested the solenoid and battery and it works fine, now here are my problems and some troubleshoots that i did
-
if i connect the vcc pin from relay to the 3.3v pin on the esp32 the relay works fine as it turn on and off whenever i put low and high in my code, but after i connect the solenoid lock the relay still turn on and off but it looks like the solenoid doesn't get any power even when the relay is on.
-
if i connect the vcc pin from relay to the 5v pin on the esp32 the relay cant turn off even if i put low in my code, but because of this the solenoid lock does powered up. but still its always powered up because the relay cant seem to turn off.
do any of you guys know whats the problem here, because i already followed steps from youtube building this and everybody else worked fine. before i got the esp32 v4 i had the v1 and i thought that i can solve this problem if i use the v4 because it has a 5v pin and the v1 max voltage is just 3.3.