Asked — Edited
Resolved Resolved by amin!

I Have Bought A 12V Relay And I Dont Seem To Get It Working (Its New)

I am trying to connect my arduino uno to a electric lock, using a 12v relay. I have already done it with a 5v relay and it works, but with a 12v relay it is not working.

I have connected a 12v dc supply to the lock and i have cut the wire from the power supply so that it will connect to the relay COM and NO.

And connected the other side to the arduino and uploaded the code. The led light turns on indicating that the relay is working but when the signal is sent from the arduino the lock doesnt turn on.

If i connect the lock to the COM and NC then it works, but it stays on. Are the connections ok?

User-inserted image


Related Hardware Arduino Genuino Uno

ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

PRO
Synthiam
#2  
#3  

I am using the arduino software. This is the code:

User-inserted image

User-inserted image

#4   — Edited

Thanks a lot, i will try it. I really appreciate it that you are trying to help me:) I will try to update it first, and then I will also test the relay from the link you have provided me.

#6  

Ohh, that's great. I'll have a look at it.

Thank you!