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

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

PRO
Canada
#1  

What version of ARC are you running? Try getting the latest version from here:  https://synthiam.com/Products/ARC

PRO
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.

PRO
Synthiam
#5  

That code won’t work for arc. You’ll need to install the ARC firmware on the Arduino. You can get it from here for the uno: https://synthiam.com/GettingStarted/Build-Robots/Arduino-Genuino-Uno-17527

theres a good tutorial on that firmware page as well. Once you get it setup, it’ll be a lot easier than writing all that Arduino code

#6  

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

Thank you!