Pages: [1]   Go Down
Author Topic: 12v sensor output to arduino pin  (Read 85 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, I'm just playing around with some old security items and the mega2560. I have a motion detector which has 4 wires. I can't even find this model in Google, scary smiley Anyway, it needs 12v dc input to operate, so I hooked up an old wall ward to power it. The positive to positive and negative to negative. The two outputs I'm using on the sensor are "com" and "alarm", fairly standard. It's a normally closed circuit that outputs 12v dc at 10ma.

This is where I confused. I feel like I should wire the "com" to the ground and the "alarm" to the pin. But then again, that doesn't seem right to me. Also, given that the pins can only handle 5v, do I need to use a voltage divider to get that down to an acceptable range? I guess what I really don't understand is what the input voltage matters at all if you can get the amperes at an acceptable level with a resistor.

Obviously I'm a novice but any directional links or advice would be greatly welcomed. I've done quite a bit of reading with similar projects but nothing was clicking.


Offline Offline
Sr. Member
Karma: 7
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

picture would be nice.

the comm and NC pins are most likely for a SPST relay.

so, you sould be able to put the sensor, facing away from you and then move your hand and hear a click of the relay.

connect your meter for continuity on the outputs.

if it goes between infinity and dead short you know you are seeing it work.

if it is a relay, then just run 5v to the comm and the other pin through a 330 ohm resistor back to a pin on your duino.

if it has power, then use it to power an opto.

Lincoln, England
Offline Offline
Full Member
Karma: 1
Posts: 107
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you need a potential divider to reduce the 12V down to 5V.
Voltages above 3V are seen as a high logic level, so you could just divide by 3 to get 4V nominal.

Pages: [1]   Go Up
Jump to: