Free Essay

Burglar Alarm

In:

Submitted By SayedA7med
Words 10290
Pages 42
Burglar Alarm

Final Report

Author: Sayed Ahmed Abdulla Jawad Student ID: 20900032 Academic Supervisor: David Krause

For Bahrain Polytechnic

Acknowledgment

I would like to express my best appreciation and gratitude to all tutors who helped me to be who I am and what I’m doing at the moment. Where I am today is a result of the hard work done in the past four years, As well as Mr. David Kruse my academic supervisor and mentor, who guided me through out the project and his encouragement to maintain my progress in track during the period of the project.

I would also like to acknowledge with much appreciation to my tutors that shared their knowledge with my self and us as a group of students, leading us to where we are. As well as Mr. Sayed Yousif who was supportive and helpful when facing a problem that needed to be solved.

Deepest thanks and appreciation to my parents, for their encouragement and support, from the beginning of joining the Polytechnic to the end doing my industry project. Also thanks to my family and friends and everyone supported and helped me during the period of doing my project.

1 | P a g e

Abstract

This project was carried out to demonstrate the building and the design of a burglar alarm system that would be installed in a building. A prototype was built of four rooms. Each room in the prototype is marked as a zone. The first Zone of the prototype has a door sensor that will be detected as soon as the door is open. When entering zones two, there will be a PIR sensor and a glass break sensor. The third zone of the building has a PIR sensor as well, however in zone 4 there is a glass break sensor and a safe box sensor, which is a sensor to protect the safe in zone 4. This system is to be powered by a 12V rechargeable lead acid battery. The system has an LCD, buzzers and siren to output data from the system. The system has a panel where the LCD and keypad is installed. The LCD will give useful information of the system, such as when the system is armed or disarmed as well as asking the user of the system for the code to arm or disarm the system.

In this report it is included load tests for components used as well as some calculations for selecting the components. More calculations about choosing the heat sink for the LM350. All of the results of the load tests will be shown and a comparison between some components and why choosing LM350 over LM317, as well as why using LM2576 as a 5V regulator rather than LM7805 and finally why choosing the MBED as the systems microcontroller.

2 | P a g e

Table of Contents

Acknowledgment ............................................................................................................................... 1 Abstract ............................................................................................................................................. 2 Table of Contents ............................................................................................................................... 3 Technical Description ......................................................................................................................... 5 Objectives and Tasks .................................................................................................................................... 5 Tasks .................................................................................................................................................................. 5 Devices ......................................................................................................................................................... 9 MBED LPC1768 .................................................................................................................................................. 9 LCD – 4 x 20 ..................................................................................................................................................... 10 Keypad ............................................................................................................................................................. 11 Piezo element .................................................................................................................................................. 11 Hardware ......................................................................................................................................... 12 Prototype Building ..................................................................................................................................... 12 Design calculations ..................................................................................................................................... 17 Smoothing capacitor ....................................................................................................................................... 17 Piezo amplifier ................................................................................................................................................. 18 Load test for LM317 ........................................................................................................................................ 19 Load test for LM350 ........................................................................................................................................ 19 Charging circuit output current ....................................................................................................................... 20 LM2576 ........................................................................................................................................................... 21 Heat Sink calculations ..................................................................................................................................... 24 Tests Results .................................................................................................................................... 25 Circuits ............................................................................................................................................. 26 Piezo sensor ............................................................................................................................................... 26 Chagrining circuit ....................................................................................................................................... 27 Battery Indication circuit ............................................................................................................................ 28 Programming ................................................................................................................................... 29 State Machine ............................................................................................................................................ 29 Discussion ........................................................................................................................................ 45

3 | P a g e

Table of Figures Figure 1: Panel design made by Solidworks .............................................................................................................. 7 Figure 3: Dimensions of the LCD display used ........................................................................................................ 10 Figure 5: Piezo Element used as glass break sensor that detects vibration ............................................................ 11 Figure 6: House prototype built and sticked together ............................................................................................ 12 Figure 7: The control panel of the system ............................................................................................................... 13 Figure 8: A picture from above shows the prototype with the circuit, battery and transformer ........................... 14 Figure 9: Passive infrared Sensor ............................................................................................................................ 15 Figure 10: The switch used for the main door of the prototype ............................................................................. 15 Figure 11: Push button in Zone 4 that is used as a sensor for the safe box ............................................................ 16 Figure 12: Piezo sensor that is installed in the porototype ..................................................................................... 16 Figure 13: Circuit of the LM2576-­‐ADJ ..................................................................................................................... 21 Figure 14: LM2576-­‐ADJ inductor selection graph ................................................................................................... 22 Figure 15: The circuit used for the Piezo sensor ..................................................................................................... 26 Figure 16: The charging circuit connected to a header where it has the input of the circuit and the output of it . 27 Figure 17: The Battery indication circuit for the project using LM3914 ................................................................. 28 Figure 18: EKMA1302120 PIR block diagram .......................................................................................................... 46 Figure 19: Initial circuit for the glass break sensor .................................................................................................. 46 Figure 20: Output current for the charging circuit .................................................................................................. 48

Table of Tables

Table 1: Output arrangement of the pins of the Keypad ........................................................................................ 11 Table 3: Table of temperature results for LM350 load test .................................................................................... 25 Table 4: Table shows the results of the load test for the LM2576-­‐ADJ with temperature range ........................... 25

4 | P a g e

Technical Description

This part of the paper will give a brief description about the objective of the project, where the objectives are broken into small pieces of tasks to complete the project. As well as it will show all necessary calculations made throughout the project. The calculations that were made are for, the smoothing capacitor for the charging circuit, charging circuit current output, amplifying the piezo signal, Load test for lm317 and LM350, which includes calculations for the loads used, calculations made for the components of the LM2576 circuit and finally the calculation of the heat sink used.

Objectives and Tasks

The objectives of this project are to construct and design a burglar alarm system that could be used in houses or companies. It is required to have sensors around the place; it was chosen to have a door sensor to detect if anyone enters the house, PIR motion sensors to detect any motion, glass break sensors that would be installed on the windows and finally a safe box sensor. A battery indicator is also required to show the percentage of the available amount of battery charge remaining. When the battery is about to discharge, it could be connected to the charger that is designed to charge the battery that is used in the project.

Tasks The breakout of the project has been as the following phases/tasks Research Phase

In this part of the project, the student is required to research about the project, and having a general idea about the project. Knowing how burglar alarm works and what is required to have a burglar alarm system that would work. It started from reviewing some systems that were designed and from companies, as well as personal experience with burglar alarm systems that is installed in a place visited. Not to forget the research about the microcontroller that would be used, and having a comparison between two or more types of microcontrollers. A research about the parts and sensors that would be relevant to be used in the system and prototype.

The following part will show each tasks and a description about what happened during each task in the research phase



Building house model Building the house model was a research that had been made to design a house model. It was not only about searching on the internet finding models or how to build a house and how could it be designed. The research was made after having the list of components and how could they be installed in the design. So it was chosen to have a room that leads to another one, which leads to another one and finally reaches to the room that has the safe box in.

5 | P a g e



Component research Since the components were already decided what to be used. This research was to choose the right components that could be using in the project. The components that could fit in the prototype, if a sensor wasn’t found or hard to find, an alternative sensor should be available. For example a glass break sensor was hard to find, so the alternative was a piezo element that detects vibration





Circuit diagrams The circuit diagrams were some researched, and some were designed. As well as some circuits were done before during the time studied in Bahrain Polytechnic and integrate what has been learnt during the last years studied here, some components were as well added to improve some circuits and how to protect some components.

Building circuit on breadboard and testing circuits When the circuit diagrams got ready, the circuits were built on breadboard and tested. Some changes had been made to some of the circuits that weren’t working, and some components got burned. In the same time when a component wasn’t working or wasn’t suitable, a research is made to find a replacement.

Until this part the project was going well, and each task was done on time. However the charging circuit of the battery had inadvertently omitted. A research for the charger has been made, that took a lot of time to find a suitable circuit. This part of the circuit made the progress very slow on the project.



PCB design and manufacture After finding a circuit for the battery charger, and after having it redesigned and added few things on it. The PCB design started. All components should have footprint, and correct ones. Some components had their own footprint, and others were not found. The footprints that were not found had been designed after taking the dimensions and measurements from each component datasheet. This task was done late according to the planning of the project. It wasn’t expected that it would take some time to get all components and circuits ready, and manufactured by the first month of the project.

6 | P a g e

Hardware Phase

The Hardware phase of the project is to start the actual thing in the project. It could start to design the prototype that would be built and having a general idea how will it be built. As well starting to make more research about the components that were already chosen in the research phase and how to connect them and start designing the schematic of the system. Since it is required to have a charging circuit to charge the battery that would be used, the parts and sensors should be tested and to calculate the current of the total circuit to know if the Microprocessor will handle the total current or not, as well as to choose a battery that will be able to power up the system while taking enough current from the battery rather than needing more current than the battery could give.

The hardware phase tasks were somehow joint with the research phase. The building of the prototype was done during the research phase. However the only thing is the Panel of the system got designed and manufactured. It was planned that the Panel of the system will be 3D printed by the 3D printer, however after 3 tries the 3D printer wasn’t able to get the deisgn printer properly. Finally the design has been sent to Awal plastic to get the design ready where an acrylic sheet was provided to the company.

Figure 1: Panel design made by Solidworks

7 | P a g e

Software Phase

The software phase of the project is to design the software of the system. The sensors and devices will be all connected to the microprocessor used in the project, it is required to design and implement a software that will make the system work, as well as to design software for the LCD and keypad rather than getting their libraries ready. As each part of software is written it would be good to test it and make sure its working, some software could be written during the hardware part to make sure that the sensor is working or not.

The tasks in the software phase were all completed. Extra work had been done in able to catch up with the plan. Testing Phase

The testing phase of the project is testing the software, the code written might be right but some errors are shown in the compiler, some could be spelling mistakes in the function names, or forgetting to put a semicolon at the end of a line. As well as in this part some functions could be edited, for example the wait function could be reduced or increased, or a function should do a piece of software but it doesn’t. This part could be called testing or troubleshooting.



PCB testing The PCB testing was made directly after printing the PCB bored. The first thing done in testing the PCB is installing the power circuit, and voltage regulator. The charging circuit was first installed and soldered, that had to be tested that the battery could charge. Next the LM2576 circuit had been installed and tested, that could output 5V. The headers were then installed. Each circuit was then placed and tested individually until the circuit was all working.

8 | P a g e

Devices

This section of the report will include all devices used and a brief description about each device used. MBED LPC1768 The MBED LPC1768 is a rapid prototyping controller designed for microcontroller applications that are based on the MBED HDK. The MBED is packaged in a 40 pin DIP form factor that is convenient for prototyping with solder less breadboards, strip boards and through whole PCBs. It as well includes a built in USB programming interface that is simple like using an USB flash drive. All programming is coded using the MBED online compiler or any standard offline tool chain such as Code res or GCC and some others.

A support is available for virtual serial ports using the same USB interface enabling a communication with a PC terminal, labview and another programming language that can communicate with a COM port. Connecting with the PC terminal helps seeing how a program is run and used for troubleshooting using software called putty. Features

-­‐
-­‐
-­‐
-­‐

Operates in 100MHz Memory protection unit High performance AM Cortex m3 core Ethernet, USB hot/Device, 2xSPI, 3xUART, CAN, 6xPMW, 6xADC, GPIO

Memories

-­‐
-­‐

512 KB flash memory 64KB of SRAM (Static random access memory)

-­‐
-­‐
-­‐
-­‐

40 pin 0.1” pitch package, 54x26mm 5V USB / 4.5-­‐9V supply 3.3V output

Built in USB drag and drop Flash programmer

Prototyping form factor

MBED.org Developer website

-­‐
-­‐
-­‐

Figure 2: NXP LPC1768 MCU (MBED)

Lightweight online compiler High level C/C++ SDK Cookbook of published libraries and projects

(MBED, MBED LPC1768)

9 | P a g e

LCD – 4 x 20 A liquid crystal display (LCD) is a flat panel display that uses the light modulating properties. LCD displays utilize two sheets of polarizing material with a liquid crystal solution between them. An electric current passed through the liquid causes the crystals to align so that light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass through or blocking the light. (Webopeida)

LCD specification and features

-­‐
-­‐
-­‐

Display format 20 Characters by 4 lines Temperature range -­‐20C -­‐ 70C Input Voltage 5V 1.5A

Figure 3: Dimensions of the LCD display used

The figure above shows the dimensions of the LCD display used that is produced by Midas. The part number of the LCD is MC4200416W-­‐BNMLW. The figure above is taken from the datasheet.

10 | P a g e

Keypad The keypad is an array of switches; there will be two wires connected each time a button in keypad is pressed. For example when pressing the number 1 in the keyboard pin 5 and pin 1 will be connected. There are no connections between the rows and columns, however when a button is pressed it will connect a row and columns and it will determine the number pressed.

Keypad specifications

-­‐
-­‐
-­‐
-­‐
-­‐
-­‐

Keypad array 3x4 Matrix keypad output 12 keys

20mA of contact current 200ohm contact resistance

Operating temperature -­‐20C to 60C

Output arrangement Output pin Symbol number 1 COL2 2 ROW1 3 COL1 4 ROW4 5 COL3 6 ROW3 7 ROW2

Table 1: Output arrangement of the pins of the Keypad

Figure 4: Standard matrix circuit diagram of the keypad

Piezo element The piezo element is common and cheep. It could be used as sensors as sound, knock, shock whenever it moves

or make noise. It is used as a vibration sensor in the project and stick-­‐ed to the windows of the prototype. The output signal of the piezo is very small that couldn’t be detected by the MBED. An amplifying circuit is used to amplify the signal from the peizo that could be detected by the MBED.

Figure 5: Piezo Element used as glass break sensor that detects vibration

11 | P a g e

Hardware

The hardware of the project was designed to fit the inputs and outputs of the MBED. It was decided to have two PIR sensors, 2 glass break sensors, a door switch, and a safe box sensor. These will all fit with the inputs of the MBED and having other pins for the outputs of the system. As well as not forgetting the keypad, LCD, Buzzers, siren and LEDs. So the design of the prototype was to have 4 zones or rooms, The first room as the door switch, the second zone has a glass break sensor and PIR, the third zone has a PIR sensor and finally the forth zone has the glass break sensor and safe box sensor.

Prototype Building

The whole prototype is built using 4mm acrylic sheets, and a wooden base to stick the sheets on. The wooden base sized is 700mm * 700mm. Another Acrylic base was used to be set on top of the wooden base, was sized 600mm by 600 mm. The next step is to cut sheets as walls for the prototype. 6 Sheets had a size of 550mm by 300mm were cut. One of those sheets was cut in half to have two sheets sized 275mm by 300mm. All sheets were fixed on the base making sure that when fixing all of the sheets, they would fit together. Some of my colleges helped me out holding the sheets and making marks on the base, where will each sheet needed to be stuck. After marking the base, some sheets needed to have a door on them. Using an electric hacksaw the doors were made.

Figure 6: House prototype built and sticked together

12 | P a g e

After the doors were made, an idea was to use a sliding door as the main door. By using the milling tool, a track was made on two small pieces of acrylic where the door could slide between the two tracks.

Sticking the sheets together took some time. First sheet was stuck is the sheet that had the main door. Plywood was placed near the mark done and the sheet was placed. The plywood and sheet are inline making a 90degrees angle, that makes the sheet standing straight on the base sheet, the plywood and the sheet were attached together using small G-­‐clamps where nothing could move, then chloroform was used to stick the two sheets together. This process was made to all sheets, which then all sticking sheets on the base were stuck together.

The control panel is designed to have the LCD, keypad the two buzzers and battery indication LEDs. It was unfortunate not having more 10 pins in the MBED so the LEDs of the battery indication are connected to the MBED and could display the battery level.

Figure 7: The control panel of the system

13 | P a g e

The picture above shows the control Panel of the system after being fixed in front of the main door of the prototype. It includes two buzzers, keypad, LCD, battery indication LEDs, and 4-­‐system status LEDs. The LCD will give information of the system, when its disarmed and how to arm the system, as well as the setup menu when entering the master code, that will make the user set more codes and entry/exit delay. The keypad is to enter the codes to the system. One buzzer is used as an internal alarm and the other buzzer is used as a beeper for each key pressed on the keypad.

The 4 system lights are to determine the status if the system, when the system is armed or disarmed, when the system is disarmed after entering the code to disarm and when the system has the alarm on.

Figure 8: A picture from above shows the prototype with the circuit, battery and transformer

The picture above is taken from the top of the prototype showing the arrangement of the circuit, connected to the transformer and the Battery. It was chosen to have the battery and transformer in one of the rooms and the circuit in another room having the connectors connected to the PCB.

14 | P a g e

Figure 9: Passive infrared Sensor

The picture above shows the PIR sensor used in the system. The above sensor is used to replace the previous sensor provided. The sensor has 3 pins to be connected to. Supply voltage, Signal Out and GND. The operating voltage of this sensor is 5VDC, the output voltage is 3.3V when detecting motion. The sensitivity of the sensor could be adjusted as well as the latching time when detecting motion.

Figure 10: The switch used for the main door of the prototype

The figure above shows the door switch used on the slider door. When the door is closed, the circuit will be closed however the connection made to the switch is normally open. So when the door is open a 3.3 signal will output to the MBED, that will activate the entry delay and waiting for the code to be entered or the alarm of the system will turn on.

15 | P a g e

Figure 11: Push button in Zone 4 that is used as a sensor for the safe box

The figure above shows a pushbutton that protects the safe box. It is located in zone 4 of the prototype and should be covered. If the pushbutton is pressed, a 3.3V signal will output to the MBED and the alarm will go on.

Figure 12: Piezo sensor that is installed in the porototype

The figure above shows the peizo sensor that is installed on the prototype. There are two piezo sensors that are installed. The piezo sensor is used to detect any vibration on the window. The voltage that outputs from the peizo itself is a very small voltage that couldn’t be detected. An amplifying circuit is used to amplify the signal so it could be detected by the MBED. A resistor was added to the output of the circuit to make the sensor less sensitive.

16 | P a g e

Design calculations

This part of the report will show the calculations made for the design of the system.

Smoothing capacitor

This part is calculating the smoothing capacitor that comes after the diode bridge. =
=



0.6

100 ∗ 2

= 0.003 = 3000 The Nearest value of for the 3000uF is the 3300uF capacitor that could be used. A 1000uF capacitor is used, the reason of using this value is the Vpp is less, the less the Vpp the smoother the DC output before going to the voltage regulator. Minimum voltage rating calculation

= 14 ∗ 2 + 20% = 19 + 3.8 = 22.8 The rating of the capacitor should be at least rated at 22.8 Volts.

17 | P a g e

Piezo amplifier

The piezo sensor used in the project as a vibration detector. When the piezo was tested, the signal from the sensor was very low. It is the reason why an amplifier is used to amplify the signal and make it 11 times bigger than the original signal. The operational amplifier used in the circuit is the LM358 which is the most common amplifier used. The gain or the times the signal is amplified by is calculated as the following. = 1 +

2

1

While r1 = 10k and r2 = 100K = 1 +

100

10

= 11 The output signal now should be bigger and it runs through a signal filter that is used to remove the negative part of the signal then the signal will run through a buffer to prevent the signal loss.

18 | P a g e

Load test for LM317

The LM317 is first chosen to be the voltage regulator in the charging circuit. The input voltage from the bridge rectifier reaches 17.8 Volts, which would be regulated to almost 14 volts that would be set using the potentiometer in the circuit. The current output needed is almost 700mA. However the maximum output current rate in this chip is 1,5Amps, which should be fine to be used as the output, is half of the maximum rate. When the circuit was tested, the LM317 got hot quickly, and using a heat sink didn’t really make the chip a bit warm, it stayed hot.

Test 1

= 14 = 1 = 14 ℎ The current is set to be at 1 amps, since the LM317 maximum output current is 1.5 amps, the load test should include using more than one load. The output current needed is 700mA so a load test should be made double the size of the output current, however the current chosen to the load test is 1Amps only.

(Semiconductors, 2014) Load test for LM350

Since the LM317 was getting hot from the output current, the LM350 has a maximum current output range of 3Amps. It solved the problem of the chip getting hot.

Test 1

= 14 = 2 = 7ℎ Power of the resistor rating is

= = 14 ∗ 2

19 | P a g e

= 28

Test 2

= 14 = 0.8 = 17.5ℎ

(Instruments, LM350) Charging circuit output current

The battery used for the project is 5A/hr., it’s the smallest size found in the market that could be used. And to charge the battery, it needs one tenth of its total current. That means that the battery needs a current from 400 to 700mA to be charged. To get the output current wanted, a resistor is used to limit the current in the common leg of the charger connected from the transistor. The calculation for the resistor is made as the following

=

0.6

max
=

0.6

0.7

= 1

The Battery is a 12V battery, which means it has 6 cells of 2.3 Volts, that means when needing to charge the battery the voltage should be

= 6 ∗ 2.3 = 13.8 So the charging voltage could be from 13.6 to 14.2 Volts to charge the battery with the specified current. To set the charging voltage, a potentiometer is connected to the circuit and could be set using it to get 13.8 V. To set the voltage output to 13.8V and to make sure it is the right voltage, connecting a voltmeter to the output of the circuit would give the reading of the voltage out put and could be adjusted. Please note that this circuit is only suitable for charging a 12V/5Amhr Lead Acid battery.

20 | P a g e

LM2576

Calculations made for the LM2576

Figure 13: Circuit of the LM2576-­‐ADJ

Output voltage The formula from the datasheet is given as the following

2
)

1

= (1 +
Where
Vref is equal to 1.23V

It could be set as the following where R2 is the subject of the equation knowing that r1 is 1K 2 = 1
2 = 1

− 1

5
− 1 1.23

2 = 3.065 Where by adding 1% to the resistor value is become 3.095 that aren’t available and a resistor of 3.3K could be used. In this order to check the Output Voltage of the two resistors in the first equation to check the output voltage. = (1 +

3.3
)

1

21 | P a g e

= 5.289 The output using the two resistors is 5.289V that will not affect the MBED or LCD screen. As the input voltage of the Mbed is a range between 4.5 to 9V and max input of the screen is 7V. Inductor Selection From the datasheet the method of selecting the inductor comes from the following formula

∗ =



1000


∗ = 7 2.4 ∗ 19.23 ∗ = 323.064

LM2576, LM2576HV

Which then we compare it to the graph from the datasheet we find out that

SNVS107C – JUNE 1999 – REVISED APRIL 2013

www.ti.com

(For Continuous Mode Operation)

Figure 27. LM2576(HV)-ADJ
PROCEDURE (Adjustable Output Voltage Versions)

EXAMPLE (Adjustable Output Voltage Versions)

Figure 14: LM2576-­‐ADJ inductor selection graph

Given:
Given:
VOUT = Regulated Output Voltageit to the graph from the datasheet we find out that the required inductor is in the range VOUT = 10V
Which
then we compare VIN(Max) = Maximum Input Voltage
VIN(Max) = 25V of H330 that is 330μH ILOAD(Max) = Maximum Load Current
ILOAD(Max) = 3A
F = Switching Frequency (Fixed at 52 kHz)
F = 52 kHz
1. Programming Output Voltage (Selecting R1 and R2, as shown 1. Programming Output Voltage(Selecting R1 and R2) in Figure 21 and Figure 22)
Use the following formula to select the appropriate resistor values.

22 | P a g e

Output Capacitor Selection For the output capacitor in the circuit it is given by the following formula

≥ 13300

() ∗

≥ 13300

12 () 5 ∗ 330

≥ 96.7() it is mentioned in the datasheet that the formula above yields a capacitance values between 10uF and 2200uF, but to achieve an acceptable output ripple voltage, the output capacitor may need to be several times larger than the given formula. As well as the capacitor voltage rating should be at least 1.5 larger the output voltage. It is as well recommending for having 10V regulator, at least a rating of 15V or more to be used. Higher voltage electrolytic capacitors generally have lower ESR numbers, and for this reason it may be necessary to select a capacitor rate for a higher voltage than would normally be needed.

From the Datasheet it is recommended to use 1000uF capacitor for the output capacitor.

(Instruments, 2014)

23 | P a g e

Heat Sink calculations

LM350

First we have to calculate the Voltage loss in the voltage regulator

= − = 18 − 14 = 4 The maximum power through the LM350 will be calculated as the following, by assuming that the maximum current is 1Amps, which is higher than the current needed which is from 500 to 700mA = 4 ∗ 1 = 4 Ambient temperature = 25 Thermal junction of the LM350 = 125 Rth (jc) = 4 C/W RTH(heat sink) = to be calculated Before the calculation, we don’t want the regulator chip to be more than 60C so we could change the maximum thermal junction to 60C instead of 125, which is the maximum operating temperature before the chip could shut down. −
= ℎ + ℎ

60 − 25
= ℎ + ℎ = 8.75 4
Knowing
that the RTH is equal to 4

8.75 = 4 + ℎ = 4.75 / The heat sink that could be used should dissipate 4.74 Celsius for each watt.

24 | P a g e

Tests Results

Load test lm350 Time 0 seconds 10 seconds 20 seconds 30 seconds 40 seconds 50 seconds 60 seconds

Temperature 32 38 38 42 45 50 50

Table 2: Table of temperature results for LM350 load test

The table above shows the load test made on the LM350 to determine the temperature of the chip. The voltage regulator has a guaranteed output of 3Amps, the output current required is 500mA, however when using the LM317 the chip get very hot quickly, using this chip will be better as it will get a bit warm and using a heat sink will lower the warmness of the chip

Load test lm2576

load

current

Test1

5.6 ohm

0.92A

Test2

6.8 ohm

0.76A

10 seconds temperature 39C 30C 37C 31C

20 seconds temperature 60C 40C 45C 32C

30 seconds temperature 77C 45C 63C 42C

Load LM2576 Load LM2576

Table 3: Table shows the results of the load test for the LM2576-­‐ADJ with temperature range

The table above shows the results of the load test of the LM2576 adjustable voltage regulator. A load of 5 watts is used and the temperature was measured for both the load and the chip. As seeing from the results the chip doesn’t get hot quickly, however the resistor load only that gets hot.

25 | P a g e

Circuits Piezo sensor

Figure 15: The circuit used for the Piezo sensor

The circuit above is the circuit used for the piezo sensor that will detect vibration. The sensor itself will produce a very weak voltage that will be hard to be detected. The signal or voltage that is produced from the piezo will be amplified by 11 times. It would then go into a signal filer and impedance buffer before getting the output of the signal.

The pezio sensor was tested to test the output of the circuit. The output of the circuit reaches almost 3.3V, any vibration is detected will make the signal high, so a 1k resistor is added to make the circuit less sensitive, where now the vibration needs to be stronger so it could be detected and send a signal to the MBED.

26 | P a g e

Chagrining circuit

Figure 16: The charging circuit connected to a header where it has the input of the circuit and the output of it

The circuit above is used as a charger for the battery. The battery used in this project is a 12V 5Ah. The transformer will be connected from the mains 230 Volts and then will be connected to the bridge rectifier that will remove the negative cycles in the AC voltage wave. The full wave rippled output will go to the capacitor which will smooth he ripples to a smooth DC voltage, the LM350 will receive the voltage signal to regulate the voltage, the voltage will be regulated and the user could choose the regulated voltage wanted. The potentiometer is to choose the voltage output, and this could be by measuring the output voltage on the output pins using a Digital multimeter, and setting it up using the potentiometer to the voltage wanted. The resistor could set the current in the common leg of the charger.

The calculation of the smoothing capacitor C7 is showed above in design calculation section. As well as the calculation of the resistor that limits the output current of the circuit. Since the battery used is a 12V 5Ah, the voltage needed is 13.8 V with 500mA, as the charger will need to be charged by 1/10th of the battery amps rating.

27 | P a g e

Battery Indication circuit

Figure 17: The Battery indication circuit for the project using LM3914

The circuit above is a circuit which is used to determine the remaining charge in the battery used. The LM3914 is a Dot/Bar display driver that senses analog voltage levels and drives 10 LEDs. The circuit will be connected directly to the Battery to determine the voltage of the battery. Each LED will show 10% of the battery. The potentiometer used in the circuit is to calibrate the LEDS when the battery is fully charged. For example when the battery is fully charged, all 10 LEDs should be on. The 3.9Kohm resistor is to set the LED brightness. If the user wants the LED displays as dots rather than bar, pin 9 could be disconnected to do so.

(instruments)

28 | P a g e

Programming

Before doing the whole program, small pieces of software had been made, these small pieces of software had to test the switches, LCD, Keypad, buzzers and the siren, the purpose of doing these small programming tests is to make sure that the devices are working. After completing these small tests, it is needed to choose the best methodology to start programing the whole program.

State Machine

State machine is the operation that begins from a start state. On a successful transition it will end up in another state. The transition takes place based on the input of the previous state.

To design a state machine, the programmer should figure out all states of the software. In the case of the burgular alarm design, the states are as the following.

-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐

Disarmed Armed

Alarm_siren Alarm buzzer Alarm LED Setup

Invalid

Valid

Alarm

Valid Code Entry delay Siren off New code Display

When the system is disarmed When the system is armed When the alarm is on and the siren is working When the alarm is on and the buzzer alarm is on LED indicator when the system is on ALARM Setup of the system When invalid code or input Valid input

When the system need to get the alarm on

Valid input of the code Entry delay of the system Turning off the alarm/Siren Setting new code

After determining all of the states to be used in the software, the events should be determined. The events of the software. The events in the software are the inputs; the inputs could be explained as the events that could cause the state machine to change an action of to change a state of the system. The events are listed as the

-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐

Cancel

Got code PIR1

PIR2

Glass break1 Glass break2 Door switch Safe switch Timeout

When canceling an event When getting the code When a trigger is received from the PIR When a trigger is received from the PIR When a trigger is received from the glass break sensor When a trigger is received from the glass break sensor When a trigger is received from the Door switch When a trigger is received from the Safe switch When the time is finished for count down

29 | P a g e

Since the program has inputs, it should have outputs as well, the outputs of the software using state machines are called actions. The actions of the system will be as the following:

-­‐
-­‐
-­‐
-­‐
-­‐
-­‐
-­‐

Disarm Code check Setup Setup exit New code input Entry delay Arming

The next stage of the programming should be identifying the functions that would be used in the system, for example if the function is disarming, a code should be executed inside the function, how will program function when the function is called. The code inside this function will appear and shows what to do to disarm. For example entering the code, then the LCD will show that the system is disarmed and the disarmed led will be turned on etc.

(MBED, Digital Input) Keypad library

#ifndef KEYPAD_H
#define KEYPAD_H
#include "mbed.h"
#include "FPointer.h" class Keypad { public: Keypad(PinName row3, PinName row2, PinName row1, PinName row0,
PinName col3, PinName col2, PinName col1, PinName col0, int debounce_ms = 20);
// starting keypad void Start(void);
// keypad interupt void Stop(void); void CallAfterInput(uint32_t (*fptr)(uint32_t)); protected: InterruptIn
InterruptIn
InterruptIn
InterruptIn
BusOut int FPointer void void void void void _row0;
_row1;
_row2;
_row3;
_cols;
_debounce;
_input; // Called after each input

_callback(int row, InterruptIn &therow);
_cbRow0Rise(void);
_cbRow1Rise(void);
_cbRow2Rise(void);
_cbRow3Rise(void);

30 | P a g e

void _setupRiseTrigger(void); void _dummy(void) { };
};
#endif // KEYPAD_H

#include "keypad.h"
Keypad::Keypad(PinName row3, PinName row2, PinName row1, PinName row0,
PinName col3, PinName col2, PinName col1, PinName col0, int debounce_ms):
_row0(row0), _row1(row1), _row2(row2), _row3(row3),
_cols(col0, col1, col2, col3) {
_debounce = debounce_ms;
_setupRiseTrigger();
} void Keypad::Start(void) {
_cols = 0x0F;
}
void Keypad::Stop(void) {
_cols = 0x00;
}
void Keypad::CallAfterInput(uint32_t (*fptr)(uint32_t index)) {
_input.attach(fptr);
} void Keypad::_callback(int row, InterruptIn &therow) { wait_ms(_debounce); if (therow != 1) return; int c = -1;
_cols = _cols & 0x0E; if (therow == 0) c = 0; else {
_cols = _cols & 0x0D; if (therow == 0) c = 1; else {
_cols = _cols & 0x0B; if (therow == 0) c = 2; else c = 3;
}
}
_input.call(row * 4 + c);
Start(); // Re-energize all columns
}
void Keypad::_cbRow0Rise(void)
_callback(0, _row0);
}
void Keypad::_cbRow1Rise(void)
_callback(1, _row1);
}
void Keypad::_cbRow2Rise(void)
_callback(2, _row2);
}
void Keypad::_cbRow3Rise(void)

{
{
{
{

31 | P a g e

_callback(3, _row3);
}
void Keypad::_setupRiseTrigger(void) {
_row0.rise(this, &Keypad::_cbRow0Rise);
_row1.rise(this, &Keypad::_cbRow1Rise);
_row2.rise(this, &Keypad::_cbRow2Rise);
_row3.rise(this, &Keypad::_cbRow3Rise);
}

LCD Library #ifndef MBED_TEXTLCD_H
#define MBED_TEXTLCD_H
#include "mbed.h" class TextLCD : public Stream { public: /// panel format enum LCDType {
LCD16x2
/**<
, LCD16x2B /**<
, LCD20x2
/**<
, LCD20x4
/**<
};

16x2
16x2
20x2
20x4

LCD
LCD
LCD
LCD

panel panel panel panel (default) */ alternate addressing */
*/
*/

/// interface
TextLCD(PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, LCDType type =
LCD16x2);
#if DOXYGEN_ONLY
/// charictar write in the LCD int putc(int c);
// writing a formated string int printf(const char* format, ...);
#endif
// locating void locate(int column, int row);
// clear screen and locate to (0,0) void cls(); int rows(); int columns(); protected: // implement function virtual int _putc(int value); virtual int _getc(); int address(int column, int row); void character(int column, int row, int c); void writeByte(int value); void writeCommand(int command); void writeData(int data);
DigitalOut _rs, _e;
BusOut _d;
LCDType _type;

32 | P a g e

int _column; int _row;
};
#endif
#include "mylcd.h"
#include "mbed.h"
TextLCD::TextLCD(PinName rs, PinName e, PinName d4, PinName d5,
PinName d6, PinName d7, LCDType type) : _rs(rs),
_e(e), _d(d4, d5, d6, d7),
_type(type) {
_e = 1;
_rs = 0;

// command mode

wait(0.015);

// powering up in 15ms

for (int i=0; i= rows()) {
_row = 0;
}
} else { character(_column, _row, value);
_column++;
if (_column >= columns()) {
_column = 0;
_row++;
if (_row >= rows()) {
_row = 0;
}

33 | P a g e

}
}
return value;
}
int TextLCD::_getc() { return -1;
}
void TextLCD::writeByte(int value) {
_d = value >> 4; wait(0.000040f); // takes 40us
_e = 0; wait(0.000040f); _e = 1;
_d = value >> 0; wait(0.000040f); _e = 0; wait(0.000040f); // takes 40us
_e = 1;
}
void TextLCD::writeCommand(int command) {
_rs = 0; writeByte(command); } void TextLCD::writeData(int data) {
_rs = 1; writeByte(data); } int TextLCD::address(int column, int row) { switch (_type) { case LCD20x4: switch (row) { case 0: return 0x80 + column; case 1: return 0xc0 + column; case 2: return 0x94 + column; case 3: return 0xd4 + column;
}
case LCD16x2B: return 0x80 + (row * 40) + column; case LCD16x2: case LCD20x2: default: return 0x80 + (row * 0x40) + column;
}
} int TextLCD::columns() { switch (_type) { case LCD20x4: case LCD20x2: return 20; case LCD16x2: case LCD16x2B: default: return 16;
}
} int TextLCD::rows() { switch (_type) { case LCD20x4: return 4; case LCD16x2: case LCD16x2B:

34 | P a g e

case LCD20x2: default: return 2;
}
}

MBED software

#include "mbed.h"
#include "mylcd.h"
#include "mykeepad.h"
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define

keylen endkey Enterkey buzzerdelay sirendelay armed disarmed on off flash QSIZE

5
12
14
30000
60000
2
1
1
0
2
8

//
//
//
//
//

the lengh of the entered keys in the keypad setting the cancel key * setting the enter key # setting the buzzer alarm delay as 30000ms setting the siren delay as 60000ms

/// identifying the events void a_null(void); int checkcode (void); uint32_t cbAfterInput(uint32_t key); void led (int pattern, int mode); void timerupdate (void); void led_update (void); void a_disarming (void); void a_checkcode2 (void); void a_exitsetup (void); void a_newcode(void); void a_newentry(void); void a_newexit(void); void a_setupoption(void); void a_arming(void); void a_arming1(void); void a_lowdoorsw(void); void a_entrydelay(void); int a_pir1(void); int a_pir2(void); int a_piezo1(); int a_piezo2(); void a_setup(void); void a_invalid(void); void a_alarm(void); int exitdelay; int entrydelay;

/// do nothing function
/// checking code
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///

led function the timer update for counting down
LED update
Disarming function checking code function exiting stup function setting new code function seting new entry delay function setting new exit delay function chossing the setup option function arming function arming function door switch function entry delay function
PIR function
PIR function glass break sensor function glass break sensor function
Setup function invalid function alarm function defining exit delay fefining entry delay

Ticker led_timer;
Ticker timer; const int mastercode = 4175; // master code int code_index[5] = {1111,0,0,0,0}; // 5 codes to set char Buffer[10]; int timeout;

35 | P a g e

int int int int int int beeptimeout; index; armled; value; codes; alarmtime; /// Identifiying pins and variables
Keypad keypad( p10, p28, p13, NC, p29, p11, p27, p30);
TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4);
DigitalOut buz1(p5);
DigitalOut buz2(p6);
DigitalOut siren(p7);
DigitalIn PIR1(p8);
DigitalIn PIR2(p9);
DigitalIn peizo1(p12);
DigitalIn peizo2(p14);
DigitalIn door_sw(p21);
DigitalIn safe_sw(p22);
DigitalOut armedled (p23);// red
DigitalOut disarmled (p24);// green
DigitalOut alarmled (p25);// green
DigitalOut disarmedled (p26); // red
/// defining the states and events of the program enum states { s_disarmed, s_arming, s_armed, s_disarming, s_siren, s_alarmled, s_alarmbuz, s_setup
, s_codeinvalid, s_codevalid, s_alarm, s_exitdelay, s_entrydelay, s_sirenoff, s_newcode, s_setentr y, s_setexit, s_display, MAX_STATES } current_state; enum events { e_cancel, e_gotinput, e_pir1, e_pir2, e_glassbreak1, e_glassbreak2, e_doorsw, e_safe sw, e_timeout, MAX_EVENTS } current_event; const char event_lookup[MAX_EVENTS][20] = {"e_cancel", "e_gotinput", "e_pir1", "e_pir2" , "e_glass break1", "e_glassbreak2", "e_doorsw", "e_safesw", "e_timeout"}; const char state_lookup[MAX_STATES][20] = {"s_disarmed", "s_arming", "s_armed", "s_disarming", "s_ siren", "s_alarmled", "s_alarmbuz", "s_setup", "s_codeinvalid", "s_codevalid", "s_alarm", "s_exitd elay", "s_entrydelay", "s_sirenoff", "s_newcode", "s_setentry", "s_setexit", "s_display"}; void new_event(events e); events get_new_event(); events event_q[QSIZE]; int in; int out; void (*const state_table[MAX_STATES][MAX_EVENTS])(void) = {
//e_cancel,
e_glassbreak2,
{a_null,
a_null,
{a_null,
a_null,
{a_null,
a_null,
{a_null,
a_null,
{a_null,
a_null,
{a_null,
a_null,
{a_exitsetup,
a_null,
{a_null,
a_null,

e_gotinput, e_doorsw, a_checkcode2, a_null, a_arming1, a_null, a_disarming, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_setupoption, a_null, a_null, a_null, e_pir1, e_safesw, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, e_pir2, e_timeout a_null, a_null a_null, a_arming a_null, a_null a_null, a_entrydelay a_null, a_null a_null, a_invalid a_null, a_null a_null, a_invalid e_glassbreak1, a_null, }, // s_disarmed a_null, }, // s_arming a_null, }, // s_armed a_null, }, // s_disarming a_null, }, // s_siren a_null, }, // s_alarmbuz a_null, }, // s_setup a_null, }, // s_codeinvalid

36 | P a g e

{a_null, a_null, {a_null, a_null, {a_null, a_null, {a_null, a_null, {a_null, a_null, {a_exitsetup, a_null, {a_exitsetup, a_null, {a_exitsetup, a_null, {a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_entrydelay, a_null, a_disarming, a_null, a_newcode, a_null, a_newentry, a_null, a_newexit, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null, a_null a_null, a_alarm a_null, a_null a_null, a_entrydelay a_null, a_null a_null, a_null a_null, a_null a_null, a_null a_null, a_setup }, //
}, //
}, //
}, //
}, //
}, //
}, //
}, //
}

//

a_null, s_codevalid a_null, s_alarm a_null, s_exitdelay a_null, s_entrydelay a_null, s_sirenoff a_null, s_newcode, a_null, s_setentry a_null, s_setexit, a_null, s_display };
// Define your own keypad values char keytable[16] = { '1', '2', '3', 'A',
'4', '5', '6', 'B',
'7', '8', '9', 'C',
'*', '0', '#', 'D',
};
char buffer[keylen]; // holds the input from the keypad
//// functions
//// code check function int checkcode(void)
{
int r = 0; int found; int tempcode; tempcode = atoi(Buffer); if (tempcode == mastercode) r=1; else { found = 0; for (int i=0; i1) && (value1) && (value 1) { armled = 1; alarmled = 1; buz1 = 1; timeout = 30; buz1 = 0; siren = 1; current_state = s_alarm; lcd.cls(); lcd.printf(" ALARM IN ZONE 2/n "); lcd.printf(" MOTION DETECTED /n ");
} else { a_null(); }
}
} int a_pir2 ()
{
if (current_state == s_armed) { if (a_pir2 > 1) { armled = 1; alarmled = 1; buz1 = 1; timeout = 30; buz1 = 0; siren = 1; current_state = s_alarm; lcd.cls(); lcd.printf(" ALARM IN ZONE 3 /n "); lcd.printf(" MOTION DETECTED /n ");
} else { a_null(); }
}
} int a_piezo1 ()
{
if (current_state == s_armed || s_disarmed) { if (a_piezo1 > 1) { armled = 1; alarmled = 1; buz1 = 1; timeout = 30; buz1 = 0; siren = 1; current_state = s_alarm; lcd.cls(); lcd.printf(" ALARM IN ZONE 2 /n "); lcd.printf(" GLASSBREAK SENSOR/n "); lcd.printf(" ACTIVATED /n ");
} else { a_null(); }

42 | P a g e

}
}
int a_piezo2 ()
{
if (current_state == s_armed || s_disarmed) { if (a_piezo2 > 1) { armled = 1; alarmled = 1; buz1 = 1; timeout = 30; buz1 = 0; siren = 1; current_state = s_alarm; lcd.cls(); lcd.printf(" ALARM IN ZONE 4 /n "); lcd.printf(" GLASSBREAK SENSOR/n "); lcd.printf(" ACTIVATED /n ");
} else { a_null(); }
}
} void a_setup(void)
{
current_state = s_setup; lcd.cls(); lcd.printf(" SYSTEM SETUP\n ");
}
void a_null(void)
{
} void a_alarm (void)
{
buz1 =1; wait(30); siren=1; current_state = s_sirenoff;
}
int main()
{
alarmtime = 10; exitdelay = 5; entrydelay = 5; index = 0; siren = 0; beeptimeout = 0; buz1 = 1; timeout = 0; current_state = s_disarmed; lcd.cls(); lcd.printf("System Disarmed\n to arm"); led(disarmedled,on); led(armedled,off); led(alarmled,off); keypad.CallAfterInput(&cbAfterInput); keypad.Start(); led_timer.attach(&led_update, 0.001); timer.attach(&timerupdate, 0.001); printf("Starting at State: %s\n",state_lookup[s_disarmed]);

43 | P a g e

while (1) { current_event = get_new_event(); // get the next event to process printf("Event: %s
",event_lookup[current_event]);
state_table [current_state][current_event] (); // call the action function printf("State: %s\n",state_lookup[current_state]);
}
}

44 | P a g e

Discussion

From the starting of the course, the project given was a challenging project. It starting with doing a research of an overview of the project and how could it be designed. From security and alarm systems, it is seen that the systems has motion sensors, door switches, windows switches, flame sensor, gas sensor and other sensors. The systems are combined between burglar alarm systems and fire alarm systems. Since the project is a burglar alarm system project, the sensors that could be useful has been selected to be used.

Another research for choosing motion sensors, a way to use glass break sensor, had made the components. A suggestion from my mentor is to add a safe box sensor, where it could be used to protect a safe box that could be in the prototype. According to the sensors used and the quantity of them, the prototype is designed having 4 rooms, where each room represents a zone in the system.

As the main door opens in the prototype, there will be a door switch that will detect a signal when the door is open. The signal will start a timer in order to sound the alarm after the timer ends, to avoid the alarm, the user must input the code of the system to disable the alarm. A door from zone one makes you enter to zone two, which will have a motion sensor and a glass break sensor. Any detection from both sensors when the system is armed will make the alarm goes on, and when its on it will need to be disabled by entering the code to the keypad. A door from zone two will lead to zone three that has another motion sensor that will detect any movement as well. Finally a door from zone 3 will lead to zone 4, which have a glass break sensor and a safe box sensor. The safe box sensor is a switch that is located on the floor and covered in front of the safe box. As soon as someone stands on the designated switch area, the alarm will goes on.

The next part was to start getting the components of the project that would be used, the PIR sensors, were found with my mentor as he had some and gave me the two sensors that I needed, the door switch as well, tests were made as the PIR data sheet didn’t mention having a circuit for designing, as there was a typical application in the datasheet and it was connected directly, the initial test was working fine, the door switch was tested as well and it was straight forward to be connected. The LCD used was a 20X4 LCD instead of 16x2. A sample program from the MBED website was tested to make sure tht the LCD is working. The keypad was also tested. What was missing is safe switch sensor and the glass break sensor. A research was made to find a way to have a glass break sensor and a safe box sensor. By having a magnetic field near the safe or using a touch sensor as soon as touching the safe box or having a light sensor inside the safe. For the glass break sensors it was found a piezo electric sensor could be used to detect any vibrations in the window. Any vibration could lead to an output signal, however the signal is small and an amplifier was used to amplify the signal that could be detected by the MBED. PIR sensor The PIR that was provided was manufactured by Panasonic, which has EKMA1302120, as it’s part number. Passive infrared is a sensor that detects changes in infrared radiation that occur when there is a movement by a person or object which has a different temperature of the surrounding of the place the sensor is installed in. The operating of the sensor is ranged from -­‐0.3 to 7 VDC as an input voltage, and the ambient tempretuer from -­‐20 to 60C.

45 | P a g e

Since the sensors have a high S/N ratio, they are less sensitive to false starts when operated under different environmental surroundings.

Has a built-in amplifier and comparator connected directly to a microcomputer.

ctive

Figure 18: EKMA1302120 PIR block diagram

ATION

2 A

m

3: 6

The figure above shows the block diagram of the PIR sensor that is provided in the datasheet, the connections made to test the sensor was direct without adding any components. Supplying 3.3V and getting an output as soon as there is motion detected. The output voltage from the test reached is 2.5 volts. It is mentioned in the datasheet that the output voltage will be the supplied voltage – 0.5V. SO if we assumed that the input voltage is Lens Color:
0: No After everal tests t Black
3.3V
the output of the sensor will be 3.3 – 0.3 = 2.8V if a motion is detected. Lens s1: White 2:o the sensor the stopped working and there was no output voltage at all, which looks like that the sensor is burned because of no A
Lens Material: 1: Polyethylene 2: Silicon protection circuit is added to the sensor.

Mounting:

1: TO-5

Glass break sensor A search has been made to find more information about the piezo transducer that could be used. As we know the transducer is converting energy to another, in this case that will be used, it will convert vibration into voltage. The output of the piezo transducer will be very low and it won’t be detected by the MBED. So a circuit was found and applied.

Figure 19: Initial circuit for the glass break sensor

46 | P a g e

The circuit above is the circuit found and applied, as it is seen that the signal from the piezo sensor goes to an operational amplifier to amplify the signal obtained, which will show the output of the circuit after amplification.

The circuit has a potentiometer to adjust the sensitivity of the piezo element. As well as the output is connected to a buzzer, however it could be connected to the MBED. When testing this circuit in the project, it was found out that the circuit wouldn’t work when detecting any vibration. The only case that the output is found is when the peizo transducer is touched by hand, as this won’t be a suitable option to use.

(Today)

Battery Indication A battery that could also be charged using the charging circuit that had been designed will power the system up. It is required to get an indication of the battery if it’s fully charged or if it’s running on low battery voltage. The LM3914, which is a Dot/Bar display driver, when connecting the circuit with LEDS it could display a bar of the percentage of voltage in the battery. However the circuit will need to be adjusted when the battery is fully charged using the potentiometer and making all LEDs light up. When the voltage in the battery decreases it will show that the LEDs are turning off each at a time. The circuit could have 2 configurations, one is having a DOT mode where each LED work at a time, and the other mode which is used is BAR mode when connecting pin 9 of the IC to the positive supply rail. The brightness of the LEDs could be adjusted up or down by choosing a different resister value for the 3.9Kohm resistor that is connected at pin 6 and pin7.

For the buzzers and siren, a mosfet was used. A switch will be performed while using a mosfet, which will allow controlling high power devices with low power control.

Voltage regulation The whole circuit should work by using the battery. The battery supplies 12V. However some devices needs less than 12V, for example the MBED operating voltage is from 4.5 to 9V. The MBED will output 3.3V in the same time which could be used for switches and buzzers. The LCD and LM358 need to be connected to 5V. It was suggested that the LM7805 could be used, however the output current is 1Amps, which is very low to supply the LCD and LM358 as well as the MBED. After careful consideration and research, the LM2756 was chosen; the LM2576 is a 3A step down voltage regulator. It could be used to regulate the voltage from 12V to 5V.

Voltage regulation for charging circuit In simple electronic courses it is given a half wave bridge rectifier and a full wave bridge rectifier. After having the transformer and diode bridge, the voltage regulator is needed to regulate the output voltage. It was used as LM317. At that time there was no load connected to the output of the circuit. In the case having now, the load is almost 600mA. The output current of the LM317 is 1.5Amps only. That’s the reason of the chip getting hot, even when adding a heat sink on it. The alternative was using LM350 which outputs current 3Amps. When the circuit

47 | P a g e

was tested the chip got warm, a calculation was made for the heat sink, and when the heat sink added there was no heat/warmness found on the chip.

Figure 20: Output current for the charging circuit

Battery testing A battery was bought rated 12V/5Amhr, it wasn’t known that each battery had a production date. The battery bought was manufactured in 2011, which is quite old and wasn’t working. The battery was replaced by another one. The battery was almost fully charged, to test the charging circuit. The battery was discharged using a big load. Two lights were connected to the battery until the battery is fully discharged. It was then connected to the charging circuit until it was fully charged, which approves that the charging circuit is working properly.

48 | P a g e

Recommendations

After completing the project, the difficulties found doing this project could be used as recommendations for this type of projects used.

-­‐
-­‐
-­‐

A budget should be available for projects, where if any parts needed and wasn’t available could be bought from the budget. Ordering components became harder than before and takes time if the Polytechnic will order them.

A range of components could be ordered before the start of each semester for the industry projects, where the students could make their research and request components. When the components aren’t available there might be an alternative component that could be used instead

It is found out that the project is very interesting and challenging to do. It is as well recommended to use this project in C++ programming courses where students could apply different methods of programming on the project. Some students could use real time operating system, and some could use case functions.

The modifications that could be made in the project is to probably add more sensors, and integrating two MBEDs together where more sensors could be added and the battery indication circuit could be connected to the MBED to show the battery percentage on the LCD screen.

49 | P a g e

Conclusion

In this report a design and prototype for a burglar alarm system had been built, each zone in the prototype has a sensor to detect any motion, glass break sensor or entering the main door without inputting the code.

A main code has already been set during the programming of the software, where the user than enter the main code and set new codes for the system.

The progress of the project has been very slow during the course, as in times things were not going right and unexpected things happened. The programming part gave a lot of time to catch up to the plan proposed, and by the end the software and hardware are ready to be presented on the demonstration day, however the hardware needs a little of work to do and more testing before demonstrating the project.

50 | P a g e

Bibliography Instruments, T. (2014, 04 26). LM2576. Retrieved from http://www.ti.com/lit/ds/symlink/lm2576.pdf Instruments, T. (n.d.). LM350. Retrieved from http://www.ti.com/lit/ds/symlink/lm350-­‐n.pdf instruments, T. (n.d.). LM3914 Dot/Bar LED driver. Retrieved from http://www.ti.com/lit/ds/symlink/lm3914.pdf MBED. (n.d.). Digital Input. Retrieved 4 4, 2014, from https://mbed.org/users/yoonghm/notebook/digital-­‐input/

MBED. (n.d.). MBED LPC1768. Retrieved 03 20, 2014, from MBED: https://mbed.org/platforms/mbed-­‐LPC1768/ Mindstorm Nxt Blog. (2006, 8 2). Retrieved 1 3, 2013, from Mindstorm NXT blog: http://mindstormsnxt.blogspot.com/2006/08/whats-­‐inside-­‐nxt-­‐brick.html Semiconductors, F. (2014, 03 22). lm317. Retrieved from http://www.fairchildsemi.com/ds/LM/LM317.pdf Today, C. (n.d.). Shock alarm circuit. Retrieved 3 21, 2014, from Circuits Today: http://www.circuitstoday.com/shock-­‐alarm-­‐circuit Tony. (2006, 7 30). The NXT Step . Retrieved 1 2, 2013, from Inside the NXT brick: http://thenxtstep.blogspot.com/2006/07/inside-­‐nxt-­‐brick-­‐lots-­‐of.html Webopeida, W. (n.d.). What is Liquid crystal display (LCD). Retrieved May 31, 2014, from Webopeida: http://www.webopedia.com/TERM/L/LCD.html

51 | P a g e

Appendix

52 | P a g e

Similar Documents

Free Essay

Ict and Its Impact on Curbing Insurgency

...FAHOC TECHNOLOGIES SERVICES LTD A SUBSIDIARY OF A.J.C VENTURES LTD RC896874 OFFICE: 18 UKWA STREET INDEPENDENCE LAYOUT ENUGU TEL: 08034775856, E-MAIL: info.fahoctech@yahoo.com, adminfahoctechltd@gmail.com COMPANY PROFILE Fahoc technology services is an IT based company that is specialised in ICT services with special priority in security Engineering. Our services include ICT consultancy and training, supply of office equipment, * CCTV/SECURITY CAMERA INSTALLATION: This acts as a surveillance system too. IP BASE OR ANALOGUE CAMERAA are used together with an alarm (which is optional) the IP base cameras are fixed and connected to internet system which enables a manager, director or whoever is monitoring see all that is happening within and around the office even if he is not around all he has to do is just log on to the internet and he sees everything that is going on. It is connected to a Digital Video Recorder (DVR) which ha the ability to record such that you can see what had happened in your absence. * SOLAR AND INVERTER INSTALLATION: * COMPUTER NETWORKING: In today’s world, we are all connected.people with ideas can communicate instantlywith others to make the ideas a reality. News, events, and discoveries are known worldwide in seconds. Everyone has a chance to connect, to share and to make a difference. As participats in this human network, we are more powerful together than any of us could be apart. The human network has...

Words: 700 - Pages: 3

Premium Essay

123 Textiles Disaster Plan

...Running Head: 123 Textiles 123 Textiles Disaster Plan Corey Lyman University of Phoenix – Axia College Disaster Plan There are many elements associated with the importance of network security. It is the responsibility of the network manager to supply proper security level access appropriately to employees. In assigning this security, they must consider the job duties of the employee and ensure that the employee as adequate access to do their job. In addition, the network manager must evaluate external threats and prevent unauthorized access from external sources. There are also many external issues that must be considered in network security, such as ecological aspects, and the difficulties associated with network systems. These issues cause worry for network manager in regard to data safety. Organizations depend on data in the network to maintain daily operations and privacy of data; therefore it is of a huge significance to maintain this kind of data safely. In addition, the data must be easily recoverable in the event of a disaster When creating a disaster plan for an organization, many considerations must be made. As we review 123 Textiles Corporation, one significant factor is that the organization operates in a high-crime area. In addition, the server for the organization is adjacent to a window; which presents a security risk as the server is visible from the outside. The organization had a recent burglary, and the server was stolen. A good solution to...

Words: 1545 - Pages: 7

Premium Essay

Security Vulnerability

...Matrix Of Vulnerability Attributes And System Object Types Student name Professor Date of submission Matrix of Vulnerability Attributes and System Object Types   | Object of Vulnerability | | Physical | Cyber | Human/Social | Enabling Infrastructure |   |    Attributes | Hardware (datastorage,input/output,clients,servers),networkandcommunications,locality |  Software,data,information,knowledge | Staff,command,management,policies,procedures,training,authentication |  Ship,building,power,water,air,environment | Design/Architecture | Singularity |  Network and communications affected | Software as well as data has been compromised |  Centralized management system as well as procedures and authentication needed to access | Hardware and software | | Uniqueness |  Was not thoroughly taken care of leading to the vulnerability of the system |  Result of a vulnerability |   |   | | Centrality |  Centralized control system |  Fed from a centralized system of control |  Centralized management of the organization |   | | Homogeneity |  Vulnerabilities requiring patches happen from time to time |  Occurences such as this have never been witnessed before |   |   | | Separability |  Can be easily separated from the system |  Cannot be easily isolated from the system |  One with the system as they need each other to perform |   | | Logic/ implementation errors;fallibility...

Words: 1132 - Pages: 5

Free Essay

Access Control Systems

...Abstract Access control systems were examined to determine if a network based system would be more reliable and beneficial. Two major systems were determined to be very beneficial to the company. In contrast, the systems would consume a great deal of resources in order to be put into full working order at all sites worldwide. Together these findings suggest that using a network based system can ultimately serve the company better and create a more secure environment for the research and the employees. Keywords: Access control, CCURE, Locknetics, security, networking   Network Based Access Control Systems: What Are They? Personal and confidential information can easily be accessed at sites if the access to the specific areas is not updated quickly enough. To secure and protect this data, technology must adapt to mitigate the threats and risks. Applications and services are becoming mobile across multiple resources, sometimes in a dynamically allocated way, necessitating the migration of sensitive and private data. I propose a network based access control system to address the inadequacies of current technological solutions in preserving the confidentiality and privacy of data, along with the safety and security of the site. More specifically, I describe a solution for securing all Bristol-Myers Squibb sites throughout the world. Access control systems have become a basic way of life for many businesses, especially large businesses. There are many different variations...

Words: 2919 - Pages: 12

Free Essay

Sas Based on Fingerprint

...is still developing in terms of technology. There is a shortage in technological implementations across the continent. Kuwait being among the middle class countries in Middle East has one of the least technological implementations more especially in public operations. The fundamental point of the research however is on the home security system based in microcontroller which is utilized across the nation. In addition, the commercial available security system is too expensive. Thus, this project aims to develop the same functionality with affordability, accuracy and more encryption in terms of security monitoring. 2. Project Aims and Objectives 1- Research Aims The research aims to design a system for guarding and alarm the remote monitoring...

Words: 456 - Pages: 2

Premium Essay

Sadsign Thesis

...technology programmers create a system to minimize their work. They tried to make their jobs easier and more comfortable. Created a new system helped them to improve the log book system of Birmingham Village. The programmer created and applied a new system to fulfill those needs. Security system is a computerized system that solve those problems. 1.1Background of Study The most basic definition of any security system is found in its name. It is literally a means or method by which something is secured through a system of interworking components and devices. In this instance, we're talking about home security systems, which are networks of integrated electronic devices working together with a central control panel to protect against burglars and other potential home intruders. Security and protection system,  any of various means or devices designed to guard persons and property against a broad range of hazards, including crime, fire, accidents,...

Words: 854 - Pages: 4

Free Essay

Home Security Vulnerabilities

...Home Security Vulnerabilities Principles & Theory of Security Management Professor James Leiman DeVry University On-Line Antoinette Bowen 19 January 2014 Home Security Vulnerability With criminals being smart enough wait and watch even pay real close attention to their victims daily habits; “at every 15 seconds, a home in the United States is broken into, said Angela Mickalide, director of education and outreach for the National Home Safety Council.” (Herbet, 2014) It would seem that it’s hopeless for people to stay safe. That in order for people to feel safe they need to purchase state of the art equipment to secure their property. For those who maybe considering the option to purchase a security system but really don’t have the funds for the monthly services should realize that there are several other methods of prevention. When observing our own environment it will appear to be safe, but how safe are we? Since people consider a very familiar area their comfort zone is when we tend to overlook the possibilities of being watched-to become a delinquent’s next victim. Let us look into our own backyards to assess the safety of our own homes. Being in a home that had been constructed in the 1920’s would seem fairly unsafe and susceptible to break-ins even becoming an easy target for offenders. Easy to kick doors in, break through windows, and bust locks due to a decaying foundation. Even as the dynamic of the changing neighborhood goes from home owners to being...

Words: 1106 - Pages: 5

Free Essay

Ffeee

...djkf sdkfjklfj fj jfkljfkljf dkj fjdkjf kdjkd dj dkjdskfjei ok.’ An alarm system removes the element of surprise and danger associated with a burglar breaking into your home at night UNANNNOUNCED while you are inside sleeping. TheMOST IMPORTANT usage of a residential alarm system is when you are the most vulnerable, which is when you are asleep. No physical harm can occur to you if you are away from your residence while it is being burglarized.</li> <li> Upon returning home and disarming your security system, even from a very brief absence while you were at the corner convenience store, the alarm keypad will immediately indicate to you that: "While you were gone nothing happened" or "BE CAREFUL - - Here's what occurred in your absence". The alarm keypad's warning message will prevent homeowners from walking into the home and confronting burglars who may still be inside the residence.</li> </ol> My reason Number 2 is especially important for homeowners who don't have interactive notifications from their alarm panels being sent to their cell phones advising them that an alarm has occurred at their home. Additionally, some homeowners have "local alarm systems" that are not subscribed to monitoring services while others have monitoring by a telephone line that the burglars have cut before entering the home. I don't like the over-usage of the word "protection" within the alarm industry, especially when it is applied to security systems. "Protection"...

Words: 662 - Pages: 3

Free Essay

Access Control Systems & Technology Paper

...Paper SEC/420 Alarm Systems Bells and whistles usually signify celebration and late night partying for the everyday hardworking, fun loving person. However, for the security professional those bells and whistles denote trouble, threats, and breaches. Alarms serve as a tool to alert security professionals and others who aim to protected assets, property and people. Alarms are devises installed in places such as schools, banks, homes, businesses, cars, and even on machines such as boilers and machines. Alarms come in many forms and designs all with the objective to identify an intrusion or malfunction and alert someone of the issue. The alarm system uses are determined by the assets, people, or property they are meant to protect. Other factors include budget, level of threat, and risk levels. Types of Alarms There are several types of electronic alarm systems. There are the movement detectors, magnetic reed switches, and distress or panic alarm systems. These systems are effective measures to detect intruders and alert security professionals of danger, intrusions, and emergency situations silently and audibly. Movement Detectors Movement detector alarm systems are devices that are connecting the detector to the alarm and activate the alarm when a breach occurs. The movement detector is installed on walls, at strategic locations throughout a building or facility. A movement detector system recognizes movement or heat and sounds an alarm when the detector is...

Words: 936 - Pages: 4

Free Essay

Monitoring Station

...Monitoring central stations in Canada are the watchful eye on properties and Personal Safety. They dispatch the premises if there is any burglar alarm and contact the people on the calling list. Police response to "burglar" alarms dates back decades in many major communities, to the days when such alarms rang directly into the local station or precinct. Today the monitored alarm industry in North America is a huge multi-million dollar sector employing thousands of people across the continent. The growth of alarmed locations across the country spurred on by elevated "crime fear" indexes, and by the perception of elevated property crime levels. The growth in this industry has had a direct impact upon the demand for police services in our communities. The monitored alarm industry is a private sector anomaly. The alarm customer is afforded the right, in most communities, to free access to police services. However, they chose to employ a third party, the alarm monitoring company, to monitor their electronic alarm, and then to activate the services of the police, when required. It is an unfortunate historic fact that this activation is almost always improper, with 95% of the alarms responded to being false. For providing this service, the alarm company obtains a fee, and notifies the public policing agency who then attends the site of the alarm. ADT for example encourages retailers and businesses to participate in Code Adam, one of the largest child-safety programs in North America...

Words: 315 - Pages: 2

Free Essay

This Is Wonderful

...Consumer Information FCC Notice This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If interference generated by this unit is suspected, call Brink’s Customer Care at 1-800-445-0872. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: ♦ Re-orient the radio/television antenna; ♦ Move the television or receiver away from the unit. ♦ Plug the unit and the TV/radio receiver into different outlets, i.e. not on the same circuit breaker. ♦ Contact Brinks Home Security or an experienced TV/Radio technician for additional suggestions. ♦ Review additional instructions on www.mybrinks.com. This equipment complies with FCC Rules, Part 68. On the outside of this equipment is a label that contains, among other information, the FCC Registration Number and Ringer Equivalence Number (REN) for this equipment. If requested...

Words: 10912 - Pages: 44

Premium Essay

Chronic Fatigue Research Paper

...Senior Services and Chronic Fatigue According to the National Institute of Health, fatigue is a "common clinical complaint among older adults for which multiple definitions and measurement instruments exist. Fatigue is often a symptom of underlying medical or psychiatric illness." One of the greatest problems with chronic fatigue is that, while it is common, it is almost impossible to diagnose consistently. While the symptoms of fatigue typically include chronic tiredness and exhaustion, many seniors also complain of physical or cognitive decline or an inability to complete tasks. Measuring "tiredness", "decline", or slower performance is very difficult and relative, thus the complexity in diagnosing chronic fatigue. Many researchers have added "qualifiers" to help understand a senior's troubles. Examples are defining the condition as cognitive fatigue, muscular fatigue, or emotional fatigue. Further complicating matters, chronic fatigue syndrome is an ailment in which the symptoms of fatigue have no medical conditions to explain the problems. Yet, the fatigue could be caused by any number of medical problems including hypothyroidism, multiple sclerosis, heart disease, lung disease, or even rheumatoid arthritis or depression. Misdiagnosing the problem could lead to severe complications by missing an underlying condition. Many times seniors will have a hard time explaining the changes the are occurring. Senior services providers are often able to relate what they have seen...

Words: 439 - Pages: 2

Premium Essay

Alarm Fatigue In Nursing

...When working in the hospital setting, every health care worker has been exposed to many different types of sounds. Whether it is cardiac monitors, phone calls, patient call-lights, bed alarms, feeding pumps, or IV medication machines, nurses are exposed to an extraordinary amount of noises while at work. Being exposed to constant sounds can become exhausting over a 12 hour shift, and many nurses can develop alarm fatigue. Alarm fatigue is when clinicians can become overwhelmed due to the sheer number of alarms and therefore become desensitized (Joint Commission, 2013). Regardless if every alarm that sounds needs a clinical intervention, if nurses develop alarm fatigue, it can be hazardous to their patient’s safety. With alarm fatigue,...

Words: 317 - Pages: 2

Free Essay

Benefits of Home Security App

...motion sensor lights that can automatically turn on/off based on your presence in a room. • It can read changes in energy, detect heat and movement using infrared, microwave radiations and sound waves. • It has a capability to detect false alarms using dual technology motion sensor. • If any of the sensors are tampered automatic notification will be triggered. • It can also be useful in opening garage doors when it is approached by a car. • You can customize all notifications and setup threat levels based on your needs. Smoke detector • Smoke alarm provides a life saving warning to allow you to get out of the house in case of fire or smoke. • It can detect the purity of air and can give you the levels of different gaseous elements. • It can trigger the sprinkling system incase of a fire. • It triggers an alarm when you have lot of smoke coming from cooking in a kitchen. • It can monitor the temperature of the room and set the AC levels accordingly. • It can automatically open the doors and windows when a fire incident occur. • It can trigger notifications directly to the fire department in case of fire emergency. Gas leakage detector • It detects deviations from normal or base line conditions to produce an alarm. • It detects for any leaks or holes in the gas pipeline. • It can...

Words: 446 - Pages: 2

Free Essay

Yo, Kids B

...information: 1. Information related to the quality or health of the transmission signal, and 2. Information related to its own internal hardware/software integrity. The functional components of surveillance are performance monitoring and alarm/status monitoring, also known as alarm surveillance. In the national and international standards area for telecommunications operations, performance monitoring and alarm surveillance are classified as subcategories of the more general system management functional categories of performance management and fault management, respectively. Maintenance consists of both preventive and corrective procedures that are designed to (a) prevent troubles and identify potential troubles before they affect service, and (b) detect a network failure that impacts performance and make the appropriate repair(s). A typical seven-step maintenance process consists of: 1. Trouble Detection — Detect trouble by continuous monitoring, periodic tests, per-call or other pre-action tests, or other automatic processes. 2. Trouble Notification — Send notification of a specific event or condition to a local display or Operations System (OS). Trouble notifications include output messages and visual and audible alarms. 3. Service Recovery — Minimize the degradation of service by automatic or manual protection actions. 4. Trouble Verification — Determine whether the reported condition still exists. 5. Trouble Isolation — Isolate the trouble to its...

Words: 272 - Pages: 2