Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

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
Synthiam
#2  
Yeh - also make sure you have the latest arduino uno firmware installed. Are you controlling the relay from javascript, ezscript, Blockly or a digital control? You can start with this control to just test turning it on and off: https://synthiam.com/Products/Controls/Digital/Set-Digital-16094

And once you get it working - it'll be neat to control the lock to open when it sees your face on the camera or something: https://synthiam.com/Products/Controls/Camera/Camera-Device-16120
#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!