Gadget Freak Case #116: Security System Calls Your Cell
By Design News Staff -- Design News, February 24, 2008
Gadget Freak Bill Bowden has created a security system that calls you when an alarm is triggered. You can set it up to indicate intrusion into a door, window, office or pool. It can also connect to a panic button. The circuit includes a small PIC microcontroller, an assembly program and a handful of other parts that can be designed to detect the interruption of a switch closure or the connection of a panic button. When the circuit is tripped, the gadget dials your number and indicates what device has been triggered.
The construction cost for the security circuit is less than $30. As well as circuit parts, you will also need a PIC programmer to load the program into the microcontroller.
Get the Build Instructions | View Parts List | Post a Comment
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
| Amt | Part Description | |
| 1 | PIC 16F628 Microcontroller | 383-0398 |
| 1 | 5V Reed Relay | 681-0156 |
| 1 | 470Ω Resistor | 296-4682 |
| 1 | 680Ω Resistor | 895-3150 |
| 2 | 330Ω Resistor | 895-3145 |
| 2 | 10K Resistors | 895-0633 |
| 1 | Small Signal Diode | 431-0618 |
| 1 | Red LED | 670-1224 |
| Additional parts required: | ||
| 1 Modem Transformer | ||
| 1 5V Wall Transformer | ||
| Get Build Instructions | ||
-
The link to Bill's web site and complete
listing of his alarm code is here:
ourworld.compuserve.com/homepages/Bill_Bowden/
click the PIC Security System Dials Your Cell Phone link
Here is the link to Microchip's Website. You can download a free Integrated Development Environment. Its a free assember for PIC micros:
www.microchip.com/
Enjoy
- 2008-3-6 05:21:37 EDT -
Hey all -- if you want to see Bill's code re-formatted normally,
just use 'View Source' from your browser menu. Its original
formatting is preserved in the HTML.
- 2008-18-3 12:43:30 EDT -
I don't understand why some people are so uncontent about the code, just visit Bill's web and you will find all. If you type Bill Bowden on Google you just have to follow the first link, I mean Bill Bowden is something like Windows, every hobbist knows him. Congratulation Bill, again a very nice project with minimal budget! Nice to see your picture, after building soome of your projects i am happy now to see how the author is looking.
- 2008-29-2 16:21:18 EST -
Sorry about the missing code. The code is listed below. Email if you have problems.
Bill Bowden
76606.611@compuserve.com
;********************* AutoCall.asm 12/25/07 **********************
;********************************************************************
LIST P=16F628 ; Device number (PIC16F628)
ERRORLEVEL -224 ; suppress annoying message because of tris
ERRORLEVEL -302 ; suppress message because of page change
;--------------------- Configuration ---------------------------------
_BODEN_OFF equ H'3FBF' ; Brown out detection off
_CP_OFF equ H'3FFF' ; Code protection off
_PWRTE_ON equ H'3FF7' ; Power-on reset enabled
_WDT_OFF equ H'3FFB' ; Watch dog timer off
_LVP_OFF equ H'3F7F' ; Low Voltage programming off
_INTRC_OSC_NOCLKOUT equ H'3FFC' ; Use Internal RC Oscillator
_MCLRE_OFF equ H'3FDF' ; Use RA5 as functional input
__CONFIG _CP_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _PWRTE_ON & _LVP_OFF & _BODEN_OFF & _MCLRE_OFF
;--------------------- Define Variables -----------------------------
INDF equ 00h ; Indirect file
FSR equ 04h ; File select register
CMCON equ 1Fh ; Comparator Control Address
INTCON equ 0Bh ; Interrupt control register
OPTION_REG equ 81h ; Option register
STATUS equ 03h ; Status register
TRISA equ 85h ; I/O control for port A
TRISB equ 86h ; I/O control for port B
PORTB equ 06h ; Address of port B
PORTA equ 05h ; Address of port A
PC equ 02h ; Program counter
COUNTER equ 20h ; General purpose Counters
COUNTER1 equ 21h
COUNTER2 equ 22h
COUNTER3 equ 23h
COUNTER4 equ 24h
TEMP equ 25h ; Temporary register
bsf STATUS,5 ; Select memory bank 1 (01)
bcf STATUS,6 ; Select memory bank 1 (01)
movlw b'00000010'
movwf TRISB ; Set port B as output, RB1 = Input
movlw b'00100000' ;
movwf TRISA ; Set port A as output, RA5 = Input
bcf STATUS,5 ; Reset to bank 0
bcf STATUS,0 ; Clear carry bit
bcf STATUS,2 ; Clear zero flag
bcf STATUS,1 ;
movlw 07h
movwf CMCON ; Comparators off
clrf PORTB
goto Loop ; Main loop
Phone ; Phone Number Table, in reverse order (656-7459)
addwf PC,1
nop ; No operation
retlw d'9' ; Last digit
retlw d'5'
retlw d'4'
retlw d'7'
retlw d'6'
retlw d'5'
retlw d'6' ; First digit
Loop ;------------------- Main Loop -----------------
movfw PORTB
btfsc PORTB,1 ; Read pin 7, skip if clear
goto Loop
bsf PORTB,2 ; Close relay
movlw d'3' ; 3 sec Delay
movwf COUNTER4
Off_Hook_Delay ; 3 sec delay
call Digit_Delay
decfsz COUNTER4,f
goto Off_Hook_Delay
Dial ;------- Change this value to indicate total digits -----
movlw d'7' ; Use 7 digit phone number
movwf COUNTER
Next
movfw COUNTER
call Phone ; Get Digit from table
call Output ; Dial the digit
call Digit_Delay ; Wait 1 second
decfsz COUNTER,f
goto Next ; Do next (1 of 7 digits)
call Digit_Delay ; Wait 1 second
movlw d'100' ; 30 second tone timer
movwf COUNTER
movwf COUNTER1
movwf COUNTER2
Timeout ; Generate tone for 30 seconds
movfw COUNTER
movwf COUNTER1
Tone
bsf PORTB,3 ; Set pin 9 high
call Tone_Delay ; Wait 1.5mS
bcf PORTB,3 ; Set pin 9 low
call Tone_Delay ; Wait 1.5mS
decfsz COUNTER1,f
goto Tone
decfsz COUNTER2,f
goto Timeout ; Repeat until COUNTER2=0
bcf PORTB,2 ; End call, On Hook, Done
Switch_Open ;------------------ Wait for switch open
movfw PORTB
btfss PORTB,1 ; Look at pin 7
goto Switch_Open ; Loop until pin 7 is high
call Digit_Delay ; Wait 1 second
goto Loop ; Restart
;------------------ End sequence, restart from top ------
Tone_Delay ; 300 Hz Tone
movlw d'255'
movwf TEMP
Loop_4
nop
nop
nop
decfsz TEMP,f
goto Loop_4
return
;-------------------------------------------------------------
Output ; Open relay for each pulse
movwf COUNTER1 ; Number of pulses
Next_Pulse
bcf PORTB,2 ; Set Pin 8 low
call Pulse_Delay
bsf PORTB,2 ; Set pin 8 high
call Pulse_Delay
decfsz COUNTER1,f
goto Next_Pulse ; Repeat until COUNTER1=0
return
Pulse_Delay
movlw d'150' ; 60 mS Delay
movwf TEMP
Loop_1
movwf COUNTER2
Loop_2
decfsz COUNTER2,f
goto Loop_2
decfsz TEMP,f
goto Loop_1
return
Digit_Delay
movlw d'16' ; 1 sec Delay
movwf COUNTER3
Loop_3
call Pulse_Delay
decfsz COUNTER3,f
goto Loop_3
return
end
- 2008-29-2 10:35:08 EST -
Typical for Gadget Freak... there's a piece of the project ALWAYS MISSING. This time its the code. It's why I ignore these damn articles, but this one sucked me in. Someday I'll learn.
- 2008-29-2 06:51:45 EST


























