Pages: [1] 2   Go Down
Author Topic: 12v PIR with arduino?  (Read 1822 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley

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 smiley



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

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
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Bye
« Last Edit: July 24, 2012, 07:30:22 am by RIDDICK » Logged

-Arne

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* pir.jpg (100.42 KB, 895x668 - viewed 53 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you can.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

a zener diode in parallel to the lower resistor in the voltage divider would b nice to have...  smiley-cool
Logged

-Arne

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But unnecessary.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ 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. 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


« Last Edit: July 24, 2012, 10:24:05 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 24, 2012, 10:54:53 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

-Arne

Pages: [1] 2   Go Up
Jump to: