Using a software look-up table, this four-bit nibble
is translated into the key pressed.
Sensors
The door and window sensors are everyday run-of-the-mill magnetic reed switches. Four sensors are shown in
the schematic, but as many (or as few) pairs as needed
can be used as long as they are normally-open contacts
and are wired in series. It goes without saying — so I'll go
ahead and say it — make sure that the magnet and reed
sensor are mounted securely on the door (or window).
The reed sensor needs to be in as close proximity to the
magnet as possible.
The Relay
I know that holding the relay open in stand-by mode
is an inefficient design as far as power consumption is
concerned, but there is a very good reason for this. This is
an essential safety feature. If the lines going to the remote-mounted alarm siren or the keypad/interface power
supply lines are cut, then the alarm will sound
immediately. The relay contact requirements are
determined by the specific siren you'll be using.
The Siren
My alarm is designed to sound an old 110 VAC
mechanical siren that came out of an even older ultrasonic
intrusion detection alarm. The relay then, of course,
necessitates 110 VAC contacts at about three amps.
These sirens — while loud enough to be confused for
air raid sirens — are hard to come by and are relatively
expensive. You may want to substitute a 6-12 VDC siren.
While no where near as loud as their 110V counterparts,
these are far easier to come by and can be had for under
$20. (See Figure 3 for the schematic modifications
required when using a low voltage siren.)
The Heart of the Project
The MSP430 is the heart of the project. Once
programmed (either physically inserted in the
development board or in-circuit using the development
board as an ICSP programmer), the MSP430 processor
requires no external components for operation.
This particular version (the 2452) features a 16-bit
timer with three capture registers, up to 16 I/O pins, three
distinct clock signals, an analog comparator, a 10-bit A/D
converter, and a universal serial communication interface.
Only one timer, one clock source, and 10 of the I/O lines
are needed for this project.
September 2013 43
;;;;;;;
;;; ;;;
;
;
;;
;;;
;;;
;;;;;;
;;;
;;
;;;
;;;
;;
;;;;
;;;
;;;
;;;
;;;;
;;
;
;;;;;;;;;;;
;;
;;;;;;;; ;;;;;;;;
;;;
;
;;
;;;
;; ;;;;
;;; ;;;
;;;;
;; ; ;
!
!; ;
!; ;
!; ;
";;
#$; ;
;
;; ;; ;; ;
;%;&;; ;
"' ;
"(%; ;
"(%$ ;
"(%;
"(% ;
);
;
);;;
;;
;;
;
;
; ;
;;;
*+
;",'-
;-;'
-
-;
. -;
;;
/
;
;#
;
;
#
;
;;
;
;
;
;
;;;
;
;
;
;
(0;
;
;
;
;;
);;
;;
); "(%
;;
;
;
;
;
;
#;
-
;
;
;
;;
;; ;;
;; ;;
;
;
;
;
;
■ SCHEMATIC.
■ FIGURE 3.
Schematic modification
for 6-12 VDC siren.