Go Down

Topic: 12v PIR with arduino? (Read 2006 times) previous topic - next topic

Hey everyone, new to the forums and arduino and have a rather noob question but I thought I should just ask rather than kill my UNO on my first project  :)

Cash is tight at the moment so I mostly canabalise parts from whatever is at at my disposal. Luckily decommissioning an old alarm system is giving my access to a few bits and pieces this week.

I have got my hands on a few PIRs from the system to use in projects, the only down side bieng they are 12v so powering them directly from my arduino isn't really an option.

What is the best way to send a signal from the 12v PIR to my arduino?

This is only really for prototyping so it doesn't need to be too neat. For the finished project I'll buy some 5v PIRs designed for such projects.

For anyone interested in the idea or has any suggestions it's outlined bellow.

Thanks in advance for all and any help :)



-----------------------------------------------------------------------------------------

Project

My plan is to make a little gadget for playing airsoft games for those moments I have no one to cover my rear. Using an arduino based system with the above mentioned PIR combined with an audio module of some kind and radio transmitter I plan to create a motion detector that will alert myself and team to movement over our radios

So PIR=>arduino=>audio module=>radio transmitter

RIDDICK

#1
Jul 24, 2012, 02:25 pm Last Edit: Jul 24, 2012, 02:30 pm by RIDDICK Reason: 1
Hi MacGyver! *w00t*

i would
1. share the ground
2. use +5V (or USB respectively) for the arduino and +12V for the PIR and a fat extra zener diode across arduino's +5V and a fuse on the +12V rail...
3. use a voltage divider on the PIR output...

what kind of output does the PIR have?
open drain? high(12V)/low(0V)? or analog (0V..12V)?

dont forget some duct tape... :)

Bye
-Arne

CrossRoads

PIRs typically have an open collector output.
You connect that output to an arduino input and use a 10K pullup resistor to 5V.
Look for a low at the input to signal activity.
If you have a meter you can easily confirm - before connecting to the arduino pin, put your meter on the PIR output. Does it just kind of meander around?
Add the 10K to 5V. Does it now sit at 5V and go to 0V when motion is detected? If so, you're ok to connect to the arduino pin.
Make sure the grounds are connected.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Hey guys, thanks for the help. Just got home from work and managed to get the PIR powered up and tested.

(cant seem to get the image to embed properly)

The pin beside the LED jumper puts out a solid 6v and 0v on detection. Can i just use a voltage divider to drop it to 5v and send that to the arduino?

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

RIDDICK

a zener diode in parallel to the lower resistor in the voltage divider would b nice to have...  8)
-Arne

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TeslaIaint

@crossroads
Wouldn't a zener diode consume extra power?

CrossRoads

If the output has been demonstrated to nicely switch  between 0 & 6, and 2 resistors can be used to make it switch between 0 & 5, than what else is needed? Nothing.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TeslaIaint

@ crossroads
That's fine. I'll take your word for it, but my question about the zener diodes was for general knowledge. Enlighten me please. I know you know haha. 

CrossRoads

#10
Jul 25, 2012, 05:22 am Last Edit: Jul 25, 2012, 05:24 am by CrossRoads Reason: 1
Go look at this
http://www.wisc-online.com/Objects/ViewObject.aspx?ID=SSE7005

The load is almost nothing as it goes into the Arduino, with the high input resistance of the analog channels.
So the current thru the voltage divider is determined by the resistor values.
The zener needs some amount of current before it kicks in
http://www.digikey.com/product-detail/en/PLVA650A,215/568-6471-1-ND/2531758
This one needs 10mA.

So  I guess you could say that  zener may need more current to create the 5V output than a resistor divider would.
For instance, a 2.7K & 12K in series would yield 4.9V from a 6V source and draw 0.4mA.

I don't see any at Digikey that need less than 10mA.


Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TeslaIaint

The reason I ask is because it would be nice to use a zener as an odd (even) voltage regulator as opposed to 7v...5v...etc.

CrossRoads

#12
Jul 25, 2012, 05:46 am Last Edit: Jul 25, 2012, 05:54 am by CrossRoads Reason: 1
Ok, and nothing to do with knocking down the PIR output some.
Probably worthwhile of its own thread then.
Zener probably okay for low current use like that.
Better I think to use LM317 for higher current needs, or a switching regulator if the source voltage is higher.
Examples:
http://www.pololu.com/catalog/product/2103  2.5 to 7.5V output, up to 42V input
http://www.pololu.com/catalog/product/2104  4 to 25V output, up to 42V input
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TeslaIaint

wow, that is significant for low current though. thanks crossroads

RIDDICK

since when does a zener diode need a minimum current?
it needs a minimum voltage... in my picture of the world...

1.
i like zener diodes... because i m so clumsy...
2.
we dont really know what the PIR does...
maybe it shows 12V when it is really upset about something...?
or when its SMPS goes mad?
3.
the internal protection diodes of the arduino (especially the one that points from the pin to +5V) can dispose any excess voltage if the voltage divider's resistors r big enough...
-Arne

Go Up