I am making a solenoid door lock that opens up with a fingerprint sensor. So I control the solenoid with a relay module and I have connected it to the Normally Open pin so the relay stays disconnected and when a fingerprint is found then the relay turns on for 5 seconds and the solenoid unlocks. I power the arduino and the relay with 12V power adapter through the barrel jack. Basically everything works fine, however when I plug the power adapter in, the relay turns on for a second (meaning it unlocks the lock) and then turns off (it should stay turned off the whole until a fingerprint is detected).
How to make so the relay does not turn on for a second after powering it?
Thanks in advance!
P.S: Not sure if this is for Hardware or Software help flair.