I've got an old 12V house alarm PIR with 2 NC terminals used to trigger the alarm when detecting motion. I want to use this with my arduino Uno R3, to act as a "doorbell" when someone walks up the first step to the apartment I want it to trigger a short buzz in the apartment as early warning. Ive been doing a fair bit of reading online on how the PIR works and want to make sure what I'm attempting to do won't fry my Arduino IO pins. I have a separate power supply for my PIR, so my questions are:
Can I wire the 2 NC terminals, 1 to a IO pin and 1 to ground? (from what I've read about the sensor (an IDS lifeguard II sensor) the NC terminals are fully isolated from the rest of the sensor so it shouldn't be putting out any power, it is basically just an NC switch)
What code can I use to have the arduino know whether the NC is open or closed? (the coding is my weakness, have little to no experience with code and still very new to arduino and electronics as a whole.)
Look forward to input thanks.
PS i have read through an old post on the forum about similar topic and has helped a lot but these 2 questions weren't clearly answered or if they were I didn't get what was meant. Thanks.
I mean, Arduino PIR sensors are very inexpensive and very very easy to use. How were you planning on powering the Arduino? A manual for your Lifeguard II sensor states the operating voltage as 8-18VDC, so you would be feeding a signal over 5V into the Arduino, which it's not designed to do.
Or, use a PIR sensor module which is a couple of dollars plus the price of three Dupont wires (if Arduino and sensor will be very close together).
How married are you to the existing sensor? It's likely no better than the option I mentioned.
If you have little experience in electronics, make your life easy. That's the whole point of Arduino - make electronics accessible to the classically untrained.
Here's a common PIR module type for Arduino, 5 for $16 Canadian Pesos.
Small photos sorry but shows adjustable pulse count with a jumper (single or multi trigger mode), sensitivity adjust 3-7m max range, adjustable time delay 3 seconds to 5 minutes
Ok, so you're saying apply Arduino 5V through this NC terminal with builtin pullup resistor and the sensor trip will register even though the min operating voltage is 8 volts on the device?
What am I missing?
Maybe I read between the lines and incorrectly assumed the sensor is powered through 2 other terminals. But the sensor must be powered somehow, and the NC terminals are
Is the arduino needed because when triggered, the sensor terminals are opened for several minutes and that can't be adjusted? You need the Arduino to time a shorter, less annoying buzz?
Ah I actually hadn't thought about that just connecting a powered buzzer to circuit to the NC terminal, then I'd just need a relay with a NO switch to be triggered when the NC opens which in turn activates buzzer is that what you mean @PaulRB?
I may have gotten too fixed on using the arduino.
The sensor is powered through 2 different terminals that's correct it has a separate 12V supply. And the arduino power source for now is just the laptop but will set it up with a small power supply if I need to.
All buzzers need to be powered. Maybe what you meant was a buzzer (which makes a noise when connected to power) as opposed to a simple speaker (piezo or electromagnetic), which needs an audio signal input in order to make any noise.
Yes, or use a transistor instead of the relay, maybe.
If you're looking for an Arduino project, you could have the Arduino play a tune on the speaker. Or it could have a display and an RTC so you can check if/when the sensor was triggered when you were out, for example.
You can power the Uno from 12V so long as you don't draw too much current from it's 5V pin. Should be ok with maybe drawing 100mA. That's enough to run an RTC, small display, but not motors or huge numbers of LEDs.
Thanks, Im having to go read up again on my transistor knowledge because I can get the transistor to work as a switch to switch off the buzzer when motion is detected but to get the transistor to act as a normally open switch is not clicking in my brain right now. But I really like your idea about how to use the arduino still, but would be cool to be able to save my arduino for more complex tasks down the line then. Thanks a lot for all your help!
Got me back on track and saving me my arduino!
Pull-up resistor from 12V to transistor base/gate. NC switch contacts from the sensor connected to ground & base/gate. Resistor value depends on the type of transistor and the current drawn by the buzzer.