Home security Systems Introduction
This is a digital home security system with voice feature which can monitor room temperature, smoke, motion, and windows & doors.
The goal of this project is to utilize the after-market parts and build an integrated home security system. Besides traditional magnetic switch equipped on doors and windows, we have also incorporated temperature sensor, smoke detectors, and motion sensor. Hence the security system will sound an alert when there is an attempt of break-in or if there is possible smoke or fire.
The system is fully digital and also be fully customized. It incorporated a 16×2 LCD display with a 4×4 keypad. Each sensor can be enabled or disabled, and alarm frequency and skim can also be chosen by users. We have also equipped a voice playback chip, and it will speak which sensor has gone wrong.
High Level Design
The idea of our project comes from lab 3 when we did a simple security system. However, that security system is quite basic and only offers simple password lock. Hence we would like to enhance our security system with different kinds of sensors. We have also browse some of the old final project and found the “Phone Dialer” project from spring 2002. Originally, we were going to put Zarlink MT8880C DTMF transceiver chip, so it will dial a desire number that user specify. When the phone connected, we will use Winbond ISD1420 voice record and playback chip to play pre-recorded voice signal. However, due to the lack of the phone jack in the lab, plus the majority of the Cornell campus has digital phone line instead of analog phone line, we decided to put away this idea. Since ISD1420 chip has address bit feature, we decided to make our system playback certain pattern of voice when the system goes into alert status.
Hardware & Software Trade offs
The IR motion sensor is quite inexpensive ($5.99 dollars for the one we got), so we also decided to buy it instead of building one on our own. We also acquire one of the smoke detector from home. This is the very basic version and will sound the alarm when the smoke is detected.
The logical structure of our design is shown in the block diagram on the right. The central system will handle all the sensors and keypad input, output information to LCD screen, indicate system status on LED, and make buzz or voice alarm.
Besides some necessary capacitor and resistor connections to the ISD1420 chip, the majority of our project is based on our software. This is mainly because our system if fully customizable and has quite a lot of features. It need to monitors all the sensor, and time the appropriate seconds in order to play certain voice pattern (ex. “Temperature, smoke error, please…” “Door or window error, please…”) depending on which sensor goes wrong. It also need to handle the user interface via keypad and LCD screen. All of these are programmed in our software.
The 16×2 LCD we use has standard 16 pin connection (pin 15 and 16 for LED backlit power). The keypad is also standard 4×4 which has 8 pin connector. The smoke detector is powered by standard Eblock 9V battery. The motion sensor is powered by 2 AAA 1.5V battery in serial.
Existing Patents, Copyrights and Trademarks
The magnetic contact switch is manufactured by SECO-LARM? The motion detector is manufactured by SPY GEAR. The smoke sensor is a little bit hard to identify because we do not have the original box, but we believe it manufactured by FAMILY GARD?
Program & Hardware Design
The hardest part of the program is timing. When any sensor goes wrong, the program will wait for certain seconds (set by user), and then make ISD1420 chip play back the desired voice pattern we want. Originally, we though we can just output the appropriate address bit and then make the chip play, however, later on we discovered there is a THOLD in the ISD1420 chip that we need to take care of, otherwise it will reference to the previous address bits. The voice playback chip does not have a very fast internal clock, so we have to manually use the delay function in our program after we set the address bits, and then make the chip play. Although using the delay function is somehow undesirable, however, we have implemented our program such that this delay will not cause any error in our software.
Besides, we also need to implement the keypad function so it acts accordingly when the LCD is displaying certain menu. This is not very difficult but we have to take care of all the possible circumstances. We have 12 submenus in our system. Set temp define the lowest temperature allowed before sounding the alarm (70~120F, with step size of 1F). The Sec. Allow is the time in second before the voice alarm goes off (0~30sec, with step size of 2 seconds).
We also have simple de-bounce feature for our keypad, and it will sound a buzz when you press any key (if you HOLD a key but buzz will only sound once). Although the de-bounce function is as easy as
- Enable System
- (*) Temp Sensor
- (*) Mot. Sensor
- (*) Smk. Sensor
- (*) Mag. Switch
- Sep Temp: 100F
- (*) Voice Alarm
- (*) Buzz Alarm
- New Password:
- Buzz Freq: 7
- Buzz Skim: 3
- Sec. Allow: 10
few lines, it takes a while to think about the logic and how to actually implement it. Also we implement the backspace feature so that when use enter a wrong password, this key can be used to delete the previous entered number. Also just a quick note, our password is masked on LCD for a safer purpose.
The first sensor we have is the temperature sensor. Since we implemented a digital thermometer in lab 5, we decided to use the same circuit. So we incorporated National Semiconductor LM34 temperature sensor, with National Semiconductor LMC7111 OpAmp chip to amplifier our output voltage going into ADC. The final connection of our circuit look like the following.
The second sensor we have is the motion sensor. Although we do not have the diagram of the circuit (it has some IC components), we discovered there are few NPN transistors in the circuit. NPN transistors are like switches, so it is obvious these are used enable the original buzzer on the circuit. Hence we took the base pin together with ground to connect to our ADC pin input. If the voltage exceed VTH (threshold voltage), we know the alarm goes off.
The third sensor we have is the smoke detector. The smoke detectors mostly equipped with piezoelectric buzzer, which has F (feed back), C (main electrode), M (metal plate) three pins. Piezoelectric buzzer has an internal crystal and will sound if small current is applied (voltage drop). Hence we took out the piezoelectric buzzer and connect the F pin into our ADC input. When the sensor goes off, the voltage will go high.
The final sensor we have is the magnetic switches. It is normally closed. So when the switch is right next to each other, the resistance is zero. When the switch is separated, the resistance will become infinity as if it’s disconnected. So we drive the switch with an 10K pull-up resistor, and connect the output to the ADC. Since we have two magnetic switches, we decided to build a simple AND/OR gate by using 1 74LS00 chip. There are four NAND gates in 74LS00, and if we connect two of NAND gate in parallel with their input signal to another NAND gate, we will get as if there are 2 AND gate in parallel with their signals to an OR gate. The diagram can be found in our appendix.
The Winbond ISD1420 voice record and playback chip also requires external resistors and capacitors. We build the circuit from the reference circuit on ISD1420 specification sheet. The modification we have is to connect the address bit to our PORTB on our MCP, and PLAYL to our pin 6 in PORTA of our MCP.
The specification of this chip can be downloaded from the appendix. In addition, we also learn some information about piezoelectric buzzer from this website
Result of the Design
Speed of Execution
The speed of the execution is work very well. In the beginning the system will boot up with default password 1234. The user can now navigate through our menu, and enable or disable each type of sensor. If a particular sensor is enabled, the LCD screen will output a * symbol before the sensor name. User can also set the alert temperature, enable/disable voice or buzzer alarm, and even specify the ring tone and frequency of the buzzer alarm and the time before voice alarm goes off. The button de-bounce scheme also works fine so users can navigate through the menu and use the keypad perfectly.
After the user enables the security system, the green status LED will lid to indicate the system status. User can now enter proper password to unlock the system. If any sensor goes wrong, the LCD will output ERROR and with proper initial for the sensor (T for temperature, M for motion, S for smoke, D for door or window magnetic switch). The red led light be will flashing at 4Hz to indicate such event. If the buzz alarm is enable, it will sound the tone that user choose. If the voice alarm is enabled, it will wait for few seconds (user specified), if the system is still not locked, then it will start playing voice to indicate which sensor goes wrong. (For example, “Temperature Error, please check and unlock the security system.”) If another sensor goes wrong after that, the system will also act accordingly and indicate that in the voice alert in addition to the LCD screen. (“Temperature Motion Error, please check and unlock the security system.”)
As soon as user enters the correct password, the system will be unlocked and the buzzer and voice playback will stop. The user can now navigate through our menu and make any changes in the settings.
There are two kinds of smoke detectors, ionization chamber and photoelectric smoke detectors. Ionization chamber one is more popular due to its low cost. Our smoke detector from home also has an ionization chamber. However, this kind of smoke detector has a small amount of radioactive material (americium-241), which has a half-life of 432 years (alpha decay). We have checked the specification of such radioactive element and government web pages regarding to such kind of material. We have found such radiation is relatively small as long as we do not inhale or swallow it. The exposures is relatively weak so as long as we are not in touch of it all the time, it is relatively safe to operate the smoke detector on the Home security Systems
Our home security system is very practical. It can be used not only in the home environment but also in a business environment too. It can monitor the surrounds to not only protect our properties but also our lives. Besides, it can be highly customized to suit each one’s need and preference. So our security system is very useful for us as well as other people. We believe every house in the world should equip a security system like the one we design.
Expectation and Improvement
The result of our design has met our expectation, in which every sensor is working and will sound specific alarm when the system goes into alert status. The keypad and LCD also offer great interface and users can be familiar with our system in less than few seconds.
If we have chance to design this project again, we will add a phone dialer chip like the Zarlink MT8880C we mentioned before. By doing so, we can make sure if no one is at home or if no one is around the area, someone else can be notified to take immediate action. In addition, we feel like our PORTB is a little bit wasted. We only have 4 output patterns but we are using all 8 pins. Next time we will use 74LS series chip together with only 2 output pins from MCP, so together we can save 6 I/O pins. Besides, we will like to have another small microcontroller at a higher frequency, so we can output our buzz alarm at a higher frequency tone.
Besides the reference circuit from ISD1420 chip specification, reference keypad decode scheme from lab 3, and temperature sensor circuit from lab 5, we have designed and coded everything on our own.
There is no code from public domain, and we did not reuse any code from the previous lab (we do reference, but not copy). Because we are using two pre-built sensor circuits (motion and smoke sensor), we feel like we should not pattern our whole design. However, if we take out these two parts and only have these “inputs,” we definitely have opportunity to pattern our design.
Reference to IEEE Code of Ethics, we have try our best effort to meet all requirements. Here are the few examples.
- To accept responsibility in making engineering decisions consistent with the safety, health and welfare of the public, and to disclose promptly factors that might endanger the public or the environment. Our design kept safety as one of the top priorities. For example, we could have built the smoke detector circuit on our own. However after we found out that it’s radioactive and it would be dangerous to expose the radioactive material; we decided to keep the smoking detector intact. We do not want to injury anyone working around us or spread radioactive material in the air.
- To be honest and realistic in stating claims or estimates based on available data. From the beginning we were realistic about the specifications of our projects given time, knowledge, and economic constrains. Our final project closely follows our claims except we give up on the phone dialer part because there is no active phone jack in the lab.
- To reject bribery in all its forms. We were not bribed in anyway and we will not accept any bribery in the future.
- To seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to credit properly the contributions of others We asked TA’s and Prof. Land when we encountered any difficulties. We are grateful for any insights they shed on our project.
- To assist colleagues and co-workers in their professional development and to support them in following this code of ethics.
The lab was a cooperative work environment. When we encountered problems we always welcomed inputs and feed backs from our fellow classmates and many time they can help us pinpoint the problem. We also did the same thing to them while working on this project.