Wednesday, January 19, 2011
PIC Security System Dials Your Cell Phone
This is a Do-it-yourself phone dialer security system calls your cell phone, office etc.whenever a door or window is opened,or panic button is pressed.
Circuit Operation:
In operation, the switch closure is detected on pin 7 of the processor which activates the reed relay and takes the line off-hook for 3 seconds to establish the dial tone. The processor then dials the number by opening and closing the relay a number of times for each digit.When dialing is complete,the processor waits 3 seconds and then transmits a steady tone of about 300Hz for 30 seconds through the modem transformer.The call is then terminated and the processor waits for the switch to open before resetting.Design Considerations:
The PIC16F628 (18 pin) processor was selected because we had a few on hand and my homemade hardware programmer only accepts 18 pin devices.A smaller 8 pin device could have been used since only three I/O lines are needed, but the difference in cost is only about $1.50.One of the I/O lines (RA5) is used for programming and is always an input,but can used as a functional input so the switch closure could be detected on this line thus eliminating the need for one pullup resistor.But we elected to use 3 consecutive I/O pins (7,8,9) of the 8 bit port B and leave RA5 pulled up with a extra 10K resistor. The output pins (8,9) that drive the relay and transformer are limited to 25mA of current each, so an extra transistor (2N2222A) was needed to supply additional current to the relay coil.The transformer resistance is around 100 ohms,so an additional 330 ohm resistor was added in series with pin 9 to limit the transformer current to around 10mA.An LED indicator and 330 ohm resistor were used on pin 8 to observe the dialing activity and indicate the line status.Several of the parts (relay,transformer and blocking capacitor) were obtained from an old 56K modem card.The schematic shows a 47uF/50volt non-polarized capacitor used to block DC current to the transformer, however a regular polarized 50uF cap could be used if correct phone line polarity is observed.The modem was probably designed to work with unknown polarities at different locations,so a non-polarized cap was used.It's possible the cap and 470 ohm resistor can be replaced with a single resistor in series with the line to set the "off hook" line current to around 20mA.This may cause partial saturation of the transformer and reduced audio level,but might work well enough.The power supply voltage is not critical and a 4.5 volt supply from three AA batteries should work.Or a switching type regulated 5 volt wall transformer can be used.The problem is insuring the relay gets enough voltage to operate.The rest of the circuit should run on reduced voltage.we used a 4.2 volt cell phone charger that worked well.Code:
Download From Here: PIC Security System CodeParts List:
PIC 16F628 microcontroller - Allied 383-0398
5 Volt Reed relay - Allied 681-0156
Modem transformer - Mouser 838-TTC-5023
5 Volt wall transformer - Jameco 320303PS
470 Ohm Resistor undefined1) - Allied 296-4682
680 Ohm Resistor undefined1) - Allied 895-3150
330 Ohm Resistor undefined2) - Allied 895-3145
10K Resistors undefined2) - Allied 895-0633
Small Signal Diode undefined1) - Allied 431-0618
Red LED undefined1) - Allied 670-1224
2N2222A transistor undefined1) - Allied 248-1005
5 Volt Reed relay - Allied 681-0156
Modem transformer - Mouser 838-TTC-5023
5 Volt wall transformer - Jameco 320303PS
470 Ohm Resistor undefined1) - Allied 296-4682
680 Ohm Resistor undefined1) - Allied 895-3150
330 Ohm Resistor undefined2) - Allied 895-3145
10K Resistors undefined2) - Allied 895-0633
Small Signal Diode undefined1) - Allied 431-0618
Red LED undefined1) - Allied 670-1224
2N2222A transistor undefined1) - Allied 248-1005
| Share This Post → | Tweet |
Subscribe to:
Post Comments (Atom)

0 comments: