Arduino Wireless Intruder Alert

by Boomer48 in Circuits > Arduino

808 Views, 1 Favorites, 0 Comments

Arduino Wireless Intruder Alert

burglar-drawing-30.png

In an earlier Instructable I detailed a project that allows for the capture of RF messages from a variety of RF sensors. In this Instructable I use the information I collected for a cheap 433-MHz motion detector I bought on eBay to build a simple intruder alert. Given that I’ve been using both the Arduino Nano and the ATtiny85 chip lately, I decided to provide designs for both. In addition to the Arduino/ATtiny85, this project also uses the RF receiver module from my RF Instructables and the cheap solid state voice recorder/player from the “Slot Machine” Instructable. All of the parts, including the motion detector, cost less than $15 total so you can have some cheap fun with this project.

Hardware

Motion.jpg
ISD1820 Module.jpg
ATtiny85 Motion Detector.jpg
Motion Detector.jpg

The motion detector module I used looks like the picture above. It uses a 12 volt battery and has an extendable whip antenna. The RF signal it puts out is strong enough that I didn’t even have to add an antenna to my RF receiver board for use in my house. I used my “Arduino RF Sensor Decoder” project to determine the sync and bit times for the sensor as well as the actual data bytes. The sensor outputs 24 bits (3 bytes) of data and each sensor has a different pattern. There is also one stop bit. The sync time turned out to be about 9.6ms and the bit times are about 320us and 960us. I verified this with a second sensor and also by capturing the RF receiver output on my oscilloscope.

The RF receiver module is the RXB6 used in my other RF Instructables. The sound recorder/player module is commonly listed as ISD1820. That’s actually the chip part number but it’s also the module designation. The particular version I bought is shown in the picture but pretty much all of them work the same way. It’s convenient to have the push buttons on the module so you can do the recording and verify the playback before embedding it into your circuit. These modules are typically set up for a maximum of 10 seconds of recording but the manual shows how to modify them for shorter or longer times. The maximum time is 20 seconds but the tradeoff is lower sound quality. It’s probably not a problem for simple voice messages and I was pleasantly surprised at the clarity of the recording. I programmed mine to say “Intruder alert” three times.

The schematic is shown above. The sound modules are often advertised as being able to run on 5 volts but the recommended range for the chip is 2.7-4.5 volts. Just to be safe I’ve added a couple of common 1 amp diodes in series with the 5 volts to run the sound module. That also means that the “Play_E” trigger from the Arduino/ATtiny85 needs to be reduced in voltage so a simple resistor voltage divider is used. The resistor values are not critical as long as you get a ratio of about 2:3.

Software

Door.jpg

Software is provided for both Arduino (I used a Nano) and for the ATtiny85 chip. Like my previous RF sensor receiver projects the code is identical for the two versions except for minor changes specific to each Atmel chip. There are defines in the first part of the software for the sync time, the bit times, and the data bytes. Use my “Arduino RF Sensor Decoder” to determine those values for your motion detector. If you use the ATtiny85 remember to do the “Burn Bootloader” step first to set the chip for 8-MHz operation.

The sound module is triggered by a rising edge on the “Play_E” input and will retrigger any time that a motion detector message is received. I have two motion detectors so I included defines and code checks for both of them. You could add more motion detectors if you want or modify the defines and codes for other things like the door open sensor shown above. An Alarm LED is also turned on and remains on until power is cycled. The reason I added that is to facilitate testing and as an event memory. That way I can position the sensor and receiver at different locations and verify successful operation without having to use a second person to listen for the sound. I can also test sensor locations to make sure that heater/cooler air flow or one of our cats doesn’t cause a false trigger. If you don’t want to cycle power to reset the LED you could add an inline switch.