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
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.
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.
@ 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.
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
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.
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: Pololu Step-Down Voltage Regulator D24V6ALV 2.5 to 7.5V output, up to 42V input Pololu Step-Down Voltage Regulator D24V6AHV 4 to 25V output, up to 42V input
since when does a zener diode need a minimum current?
it needs a minimum voltage... in my picture of the world...
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...
hey guys, thanks again for the advice.
just an update. had time to do some tinkering and voltage devider did the job just fine
I have another question regarding the same project but im not too sure where to post it.
I'll stick it here for now as its the same project but if someone woudl care to point me to the correct place it'd be apreciated
Anyway...
Decided (as the thing will probaby take a beating) not to buy an arduidon WAV shield but go a little more low-tech. As i just need it to play one sound on command I've used a very basic audio rec/play circuit designed for a greetings car. At the moment i have everyhing running off a single 9v battery (runs the PIR just fine) and the little audio component drawing 5v from the arduino but thats as far as i've got so far.
The playback at the moment requires me to close a switch. what's the best way to have the arduino close it?
I was thinking a transistor would do the job but my electronics knowlage is failrly limited(still learning) and I've never used one with the exception of the odd kit build and I have no idea witch one to use
Update
Just took a step back and rearanged things a little to help myself approach it more logically. i now have a single point on my project i need to send to ground on command from the arduino. I know it's p[retty much the same thing but im viewing the problem with a little more clarity now. (still no solution though)