An –Najah National University Faculty of Engineering Electrical Engineering Department. This project submitted for requirements of graduation project -2 Hot car baby detector Prepared by : Nema Abu Alkheer Samah Amodi Rima'a Shehada Submitted to : Dr . Jamal Kharrousheh Dedication : إلى الإمام المصطفي ......إلى سيد الخلق ....إلى رسولنا الكريم سيدنا محمد (صلى هللا عليه وسلم) منارة العلم ...وينبوع الحكمة ....والنور لكل درب إلى من استقيت منه دروس الحياة في أي لحظة من لحظات عمري .............إلى من رووني من ينابيع الفضيلة ،وأخذوا بيدي إلى منهل المعرفة...وأظلوني بشجرة الإيمان...أهلي الأعزاء أمي الرؤوم ،التي بدفئها حضنتني ،وبفيض حنانها غمرتني ...وعلمتني أن الشمعة لا تحترق لتذوب، بل تذوب لتتوهج ... إلى والدي ،الذي استلهمت منه قيم الإنسانية ،و كان مثالا ً يحتذى للمضي في الحياة إلى شاطئي عندما أضيع ،ومنبع الحنان عندما تقسو الأيام ،وقلبي الكبير عندما أفقد كل القلوب ...الروح لجسدي ،والماء لصحرائي ...أخوتي وأخواتي إلى من ضحوا بحريتهم من اجل حرية غيرهم ........الأسرى والمعتقلين إلى من هم أكرم منا مكانة ........شهداء فلسطين إلى من احتضنتني كل هذا الكم من السنين ...........فلسطين الحبيبة إلى كل محبي العلم والمعرفة.................. إلى الأساتذة الأفاضل في كلية الهندسة ونتوجه بالشكر الجزيل إلى الدكتور ( جمال خروشة ) الذي تكرم بإشرافه على هذا البحث فجزاه هللا عنا كل خير وله منا كل الاحترام والتقدير Acknowledgment : We have taken effort at this project . However , it would not have been possible without the help and support of many persons .We would like to extend my sincere thanks to all . 2 First , we would like to express our grateful to Allah , who gives us the faith and patience all the time .Also , we would like to express our gratitude towards our parents for their extra support and encouragement since we were a child until now and they did everything that they can do for us . Second ,we would like to show our greatest appreciations to our supervisor Dr. Jamal Kharrousheh. We can't say thank you only, it’s not enough for his tremendous support and help . Without his encouragement , this project would not have materialized . Finally , we would like to express our love to who was beside us along this year .Our appreciation also go to our colleagues and people who had helped us with their abilities . Abstract The technology in this project developed where used several sensors to make sure that have a child or pet inside a closed and high-car temperature as has been done to bring these sensors and rebuilt it to do its job and give the best results to the fullest and programmable microcontrollers (it has been chosen to be easy programming and scalable to deal with all the inputs and outputs), where We learned programming 3 language so that could to link the coming input from the sensors and give the output required by the need to send short messages to the mobile phone of the mother through the use of GSM modem which rely on Wi-Fi technology which gives a period of time(from10 to 15 minute ) before the vehicle starts to give warning of the surrounded so that they can carry out the rescue of a children or pet .Then if no help the window will open a little to allow to oxygen to bath to the car and rescue the child. Table of contents : DIDECATION ………………………………………………………………….……2 ACKNOWLEDGEMENTS…………………………………………………………..3 ABSTRACT…………………………………………………………………….……..4 CONTENTS…………………………………………………………………………...5 4 LIST OF TABLES ………………………………………………………………..…7 LIST OFFIGURES ………………………………………………………………...….8 CHAPTER ONE : INTRODUCTION ..……………………….9 1.1 Statement of Purpose ……………………………………………….....9 1.2 Objectives……………………………………………………………...9 1.3 Related Work……………………………………………………….….9 1.4 Users……………………………………………………………….......10 1.5 Motivation………………………………………………………….......10 CHAPTER TWO :Standards And Constrains..................................11 2.1 Standards………………………………………………………………11 2.1.1 : GSM modem …………………………………………….11 2.2.2 Microcontroller (ATmega328P)……………………………11 2.2 Constraints …………………………………………………….……12 CHAPTER THREE :METHDOLOGY …………………………...13 3.1 Methodology of the system. ………………………………………………….13 3.2 The mechanism of the system ………………………………………………..13 3.3 methodology of our work ……………………………………………………..14 Chapter FOUR : DESIGN ………………………………....15 4.1 Block Descriptions ……………………………………………….15 4.4.1 Microcontroller …………………………………………15 4.4.2 Motion Sensor…………………………...............………16 4.4.3 Sound Detector………………………………………….16 4.4.4 Smoke Sensor …………………………….…..17 4.4.5 Temperature Sensor ……………………………………17 4.4.6 Alarm ………………………………………………………17 4.4.7 Power Supply ………………………………………………17 4.4.8 Servo motor …………………………………………………18 4.4.8: GSM MODEM ……………………………………….……18 CHAPTER FIVE : Cost and Schedule ………………….…………19 5.1 Cost Analysis…………………………………………..……19 5.2 Schedule ………………………………………………………….19 CHAPTER SIX : Requirements and Verification……………………..20 6.1 Requirement ………………………………………………………20 5 6.1.1 Microcontroller ……………………………………………..20 6.1.2 Motion Sensor …………………………………………..…..20 6.1.3 Sound Detector ……………………………………………..20 6.1.4 Smoke Sensor …………………………………....................21 6.1.5 Temperature Sensor …………………………………….…..21 6.1.6 Alarm ………………………………………………………..21 6.1.7 Power Supply …………………………………………...…...21 6.1.8 Servo motor ……………………………………………….…22 6.1.9 GSM modem ………………………………………..…….…22 6.2 Verification…………………………………………………..23 6.1.1 Microcontroller ……………………………………………..23 6.1.2 Motion Sensor …………………………………………..…..23 6.1.3 Sound Detector ……………………………………………..23 6.1.4 Smoke Sensor …………………………………....................23 6.1.5 Temperature Sensor …………………………………….…..23 6.1.6 Alarm ………………………………………………………..23 6.1.7 Power Supply …………………………………………...…...23 6.1.8 Servo motor ……………………………………………….…23 6.1.9 GSM modem ………………………………………..…….…23 6.3 Tolerance …………………………………………………..23 CHPTER Seven : FUTAR WORK ………………………..….24 CHAPTER EAIGT : RESULT AND ANAYSIS ……………………….....25 CHAPTER NINE : DISCUTION …………………………………….……26 CHAPTER TEN : CONCLUISON AND RECOMMENDATION …....28 10.1 conclusion ……………………………………………………28 10.2 recommendation …………………………………….…….…28 References………………………………………………………..…….…29 Attachment A ………………………………………………………….30 Appendix B ……………………………………………………31 List of tables : Table 5.2 cost of components …………………………………. 19 Table 5.3 Schedule tables ……………………………………... 19 6 List of Figures : Fig.3.1methdology of our work Fig.4.1 design block diagram Figure 4.2 Microcontroller Figure 4.3 PIR Motion Sensor 7 Figure 4.4 Sound Detector Figure 4.5 Smoke Sensor (MQ_3) Figure 4.6 Temperature Sensor Figure 4.7 Alarm Figure 4.8Power Supply Figure 4.9Servo motor Figure 4.10 GSM MODEM Figure 6.2 : connection the motion sensor with arduino Figure 6.3 : connection the sound sensor with arduino Figure 6.4 : connection the smoke sensor with arduino Fig ure6.5 : connection the temperature sensor with arduino Figure 6.6 : connection the servo motor with arduino Figure 8.1 the first form of the car Figure 8.2 The final connection of all sensors with arduino Figure 9.1 : Flowchart of the system Chapter1:Introduction 1.1 Statement of Purpose In recent years, there have been a number of incidents where babies are forgotten in a car. During a hot summer day and in direct sunlight, a car’s interior temperature can reach as high as 65.5° C. Within minutes, a car can become a hot furnace exposing the child to life threatening conditions. For these reasons, we are designing a device that warms nearby pertains if a child (or a pet) is trapped in a hot car. 1.2 Objectives 8 The goal of this project is to design a reliable device that can accurately detect a child in a hot car. This device must be able to detect the presence of a child through their motion and sound. In the case that the child is not moving or crying, the device will detect the presence of a child by detecting their breath. This way has many benefits, likes : Life saving: A loud alarm will alert anyone nearby Reliable: o Device utilizes three human sensors, greatly increasing the detection rate o Device alerts you of required battery replacement Low maintenance: the device only requires battery replacement Easy to install single package 1.3 RELATED WORK The device will monitor the car using several sensors. The device will use a temperature sensor, a motion sensor, a sound detector, and a carbon dioxide sensor. The device will be in sleep mode if the temperature is below a certain threshold. If that threshold is reached, the device will exit sleep mode and start monitoring its surroundings. Then, if motion, sound, or a rise in carbon dioxide levels is detected, the device send sms .And then wait for a period of 10 minutes, if the readings have not changed (less temperature and the proportion of carbon dioxide) it starts to give warning of the oceans around the car so that they rescued the child The following diagram illustrates the steps to work this device. Since battery life is crucial, the device will also alert the user when battery life is running low. 1.4 Users: This device is used in a wide range of matters little where parents used when going on picnics or shopping when the high temperature is to ensure the safety of the child. As well as being used in thekindergarten bus to make sure that all students converged to leave the bus and reduce choking incidents. so we thought about this project. And obtaining safety department in the car also its share of these updates, but did not provide any company until today any technology that helps to protect children and pets from high temperatures have to stay inside the car. As recorded several cases of deaths caused by forgetting the children in the car under high temperatures. While not think the big companies in the solution to this problem we try to developed a technique dedicated to this phrase 1.5 motivation : this project began with the research of the proposed title . The result of that research was then discussed with the supervisor . Once we had agreed with the supervisor on the title , the background study of this project was reached . when the project has progressed thus far , the process of designing the system could be done . Components now could be chosen and the control elements programmed using the desired software . The correct software is chosen to comply with control elements. 9 Chapter 2 : standards and constrains 2.1 standards We have many standards like : 2.1.1 : GSM modem IEEE 802.11g is an amendment to the IEEE 802.11 specification that extended throughput to up to 54 Mbit/s using the same 2.4 GHz band . This specification under 10 the marketing name of Wi-Fi has been implemented all over the world.IEEE 802.11 is the third modulation standard for wireless LANs. It works in the 2.4 GHz band operates at a maximum raw data rate of 54 Mbit/s. The modulation scheme used in 802.11g is orthogonal frequency-division multiplexing (OFDM). 2.2.2 Microcontroller (ATmega328P) : The high – performance Atmel Pico power 8-bit reduced instruction set computing (RISC) based micro controller combines 32KB ISP flash memory with read – whilewrite capabilities , 1024B EEPROM , 2KB SRAM,23 general purpose Input/ output lines,23 general purpose working register , three flexible timer / counters with compare modes , internal and external interrupts, a 6-channel 10bit Analog/Digital converter , programmable watchdog timer with internal oscillator , and five software selectable power saving modes . The device operate between 1.8-5.5 volts . Simple – to- use , low cost yet powerful programmer for the ATMEL 8051 family of micro controller . It will Program , Read and Verify Code Data , Write Lock Bits , Erase and Blank Check . By executing powerful instructions in a single clock cycle , the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed . 2.2 constraints 1.Car companies offer new updates on a daily basis, whether from internal or external design techniques or motor capabilities hand. And obtaining safety department in the car also its share of these updates, but did not provide any company until today any technology that helps to protect children and pets from high temperatures have to stay inside the car. As recorded several cases of deaths caused by forgetting the children in the car under high temperatures. While not think the big companies in the solution to this problem we try to developed a technique dedicated to this phrase. 11 This technique can be used everywhere and by everyone because many children suffer from suffocation due to leave them in the car at high temperatures, which leads to many of the problems that have up to death, that's why we thought of a new device that holds the sensor to warn parents in the case of high temperature inside the car. We therefore work project, which was its features: 1) ● Achieves long battery life by utilizing sleep modes 2) ● Ultrasonic motion sensing for accurate detection. ○ Unaffected by heat and external movements 3) ● Voice filtering to reduce false alarms 4) ● Accurate breathing detection by measuring carbon dioxide levels 5) ● Pushbutton to minimize false alarms 6) ● Low battery indicator 2.Get the right pieces :we faced a problem in the price of CO2 sensor , it's very expensive so we have to replace it with a smoke sensor and we suppose that when the reading of a smoke sensor increased the percentage of CO2 increased. . 3. Programming language: when we try to connect the codes of all sensors together and connected them to GSM modem we faced a large number of errors so we took a long time to reach an appropriate code to operate the system correctly Chapter three :Methodology 3.1 Methodology of the system. the hot baby car detector system comprises of three main part: 1)In put(Motion Sensor, Sound Detector, Carbon Dioxide Sensor, Temperature Sensor, Power Supply) 2) Processing (Arduino) 3) Output (SMS ,Alarm ,open the window) 3.2 The mechanism of the system: Input: for project consisting of several sensors.These are ,temperature sensor, a motion sensor, a sound detector, and a carbon dioxide sensor. Processing : Theinput will be insleep mode if the temperature is below a certain threshold. If that threshold is reached, thesensorswill exit sleep mode and start monitoring its surroundings. Then, if motion, sound, or arise in carbon dioxide levels is detected,. 12 Output :send SMS message for parents' ,then output alarm will be triggered and the widow will be opened . 3.3 methodology of our work: In this semester We have to bring the rest of the necessary pieces and we began to design the body work of the car. We continue the search for codes for each Sensor We start to connect the sensors together one by one 13 Then we connect all sensors to GSM modem 1. After we connected them , we check the output . so ,we add Alarm and servo motor to open the window . Finally , we operated the system fully Fig.3.1methdology Chapter FOUR : DESIGN 14 Fig.4.1 design block diagram 4.1 Block Descriptions : 4.4.1 Microcontroller The microcontroller will be the central processing unit of the device. It will read and convert the analog inputs from the motion sensor, voice filter output, carbon dioxide sensor, temperature sensor, and sleep switch. The microcontroller will read all inputs and determine if the alarm should trigger. In addition, the microcontroller can switch on and off the power of each sensor individually. Figure 4.2 Microcontroller 4.4.2 PIR Motion Sensor 15 The PIR (Passive Infra-Red) Sensor is a pyroelectric device that detects motion by measuring changes in the infrared levels emitted by surrounding objects. This motion can be detected by checking for a high signal on a single I/O pin. Figure 4.3PIR Motion Sensor 4.4.3 Sound Detector The sound detector sensor will contain a small microphone capable of detecting sounds in the audible range. This sensor will listen for the presence of a child or pet. Figure 4.4 Sound Detector 4.4.4 Smoke Sensor(MQ-3) Sensitive material of MQ-3 gas sensor is SnO2, which with lower conductivity in clean air. When the target alcohol gas exist, The sensor’s conductivity is more higher along with the gas concentration rising. MQ-3 gas sensor has high sensitity to Alcohol, and has good resistance to disturb of gasoline, smoke and vapor. The sensor could be used to detect alcohol with different concentration, it is with low cost and suitable for different application. Figure 4.5 Smoke Sensor 4.4.5 Temperature Sensor 16 The temperature sensor will be used to enable all other sensors and wake up the microcontroller from low power mode. The temperature sensor will be connected to the microcontroller. Figure 4.6 Temperature Sensor 4.4.6Alarm The alarm will be used to alert anyone near the car that a child might be in danger. It will be triggered by the microcontroller and will emit a loud tone in the audible range. Figure 4.7 Alarm 4.4.7 Power Supply We will use battery as the power supply, in which it will supply DC voltage to the circuit. Voltage regulators will be used to meet the voltage requirements of different components. Figure 4.8 Power Supply 4.4.8: Servo Motor 17 A servo motor is a combination of DC motor, position control system, gears. The position of the shaft of the DC motor is adjusted by the control electronics in the servo, based on the duty ratio of the PWM signal the SIGNAL pin. Figure 4.9 Servo Motor 4.4.9: GSM MODEM A GSM modem is a specialized type of modem which accepts a SIM card, and operates over a subscription to a mobile operator, just like a mobile phone. From the mobile operator perspective, a GSM modem looks just like a mobile phone. When a GSM modem is connected to a computer, this allows the computer to use the GSM modem to communicate over the mobile network. While these GSM modems are most frequently used to provide mobile internet connectivity, many of them can also be used for sending and receiving SMS and MMS messages. Figure 4.10 GSM MODEM 18 CHAPTER FIVE :Cost and Schedule 5.1 Cost Analysis In order for our project to be considered a particular implementation, the cost should not exceed a reasonable amount . The following table shows the cost of the component that we used in our project : Component of project Microcontroller Motion Sensor Sound Detector Smoke Sensor Temperature Sensor leds Alarm Power Supply GSM modem Wires Total Cost NIS 140 50 47 50 20 10 7 3 140-800 40 1000 Table 5.2 cost of components 5.2 Schedule : Week Tasks 23/8-27/8 30/8-3/9 6/9-10/9 13/9-1/10 4/10-15/10 Prepare a complete plan of work. 18/10-29/10 1/11-12/11 start to design a small module for the car and start to write the report. after finishing the car design , we start to connect the final device inside the car. Check the final product and adjust any defect. Finally finished the report . Feedback for the project and prepare for the presentation. Project delivery 15/11-19/11 22/11-26/11 29/11- 30/11 1/12 bring the rest of the necessary pieces. Find how to connect these pieces and understand the principle of work study GSM modem and start to program it. start to connect the sensors together one by one , then connect all of them to GSM modem and check the final program. Table 5.3Schedule tables 19 CHAPTER SIX : Requirements 6.1 : Requirements 6.1.1 Microcontroller The microcontroller must have at least 11 I/O ports to interface with the sensors and their respective power supplies. The microcontroller must feature a sleep mode. It must also contain a port to wake the device up from low power mode. The microcontroller should contain a built in ADC for the signals from each sensor. The microcontroller must also control the frequency of the alarm’s beeping. This will be use to distinguish from the different kinds of warnings for the alarm. 6.1.2 Motion Sensor Since the ultrasonic motion sensor’s detection angle is relative narrow, it must be pointing at the car seat where the child will most likely to be present. Also, the ultrasonic sensor must be able to detect motions within 4 feet, enough to cover the interior of the car. Fig 6.2 : connection the PIR motion sensor with arduino 6.1.3 Sound Detector Detect the surrounding sound then output analog value, adjustable Sensitivity with stable performance and High Sensitivity, built-in amplifier circuit, gain can be adjusted. Fig 6.3 : connection the sound sensor with arduino 20 6.1.4 Smoke Sensor (MQ-3) Structure and configuration of MQ-3 gas sensor, sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer, measuring electrode and heater are fixed into a crust made by plastic and stainless steel net. The heater provides necessary work conditions for work of sensitive components. Fig 6.4 : connection the smoke sensor with arduino 6.1.5 Temperature Sensor The temperature will provide an analog output voltage proportional to the ambient temperature to the microcontroller for temperature readings. The sensor will also wake up the microcontroller from sleep mode through a separate I/O port. The sensor will tolerate an error of +/- 2° C. Fig 6.5 : connection the temperature sensor with arduino 6.1.6 Alarm The alarm will emit at least an 84 dB tone (measured from 1 foot away) when triggered by the microcontroller. 6.1.7 Power Supply Four AA batteries will be powering the device. With each battery having 1.4V, four of them will add up to 6V. If necessary, voltage regulators will be used to convert the voltages for different components. 6.1.8 :Servo Motor 21 Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board. The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board. Note that servos draw considerable power, so if you need to drive more than one or two, you'll probably need to power them from a separate supply (i.e. not the +5V pin on your Arduino). Be sure to connect the grounds of the Arduino and external power supply together. Fig 6.6 : connection of the Servo Motor with arduino 6.1.9:GSM modem : A GSM modem can be a dedicated modem device with a serial, USB or Bluetooth connection, or it can be a mobile phone that provides GSM modem capabilities. For the purpose of this document, the term GSM modem is used as a generic term to refer to any modem that supports one or more of the protocols in the GSM evolutionary family, including the 2.4G technologies GPRS and EDGE, as well as the 3G technologies WCDMA, UMTS, HSDPA and HSUPA. A GSM modem exposes an interface that allows applications such as NowSMS to send and receive messages over the modem interface. The mobile operator charges for this message sending and receiving as if it was performed directly on a mobile phone. To perform these tasks, a GSM modem must support an “extended AT command set” for sending/receiving SMS messages, as defined in the ETSI GSM 07.04 and and 3GPP TS 27.004 specifications. GSM modems can be a quick and efficient way to get started with SMS, because a special subscription to an SMS service provider is not required. In most parts of the world, GSM modems are a cost effective solution for receiving SMS messages, because the sender is paying for the message delivery. A GSM modem can be a dedicated modem device with a serial, USB or Bluetooth connection, such as the Falcom Samba 74. (Other manufacturers of dedicated GSM modem devices include Wavecom, Multitech and iTegno. We’ve also reviewed a number of modems on our technical support blog.) To begin, insert a GSM SIM card into the modem and connect it to an available USB port on your computer. A GSM modem could also be a standard GSM mobile phone with the appropriate cable and software driver to connect to a serial port or USB port on your computer. Any phone that supports the “extended AT command set” for sending/receiving SMS messages, as defined in ETSI GSM 07.04 and/or 3GPP TS 27.004, can be supported by the Now SMS & MMS Gateway. Note that not all mobile phones support this modem interface. 22 6.2 Verification 6.2.1 Microcontroller The microcontroller is at the heart of our design. The functionality between the sensors and the microcontroller will be verified. Each sensor will be individually triggered, and the alarm will be used to verify the functionality of the microcontroller. To verify sleep mode, the temperature of the sensor will be lowered below the threshold and the reduction input currents will be measured with an ammeter. 6.2.2 Motion Sensor To verify the motion sensor is working properly, we can program the microcontroller to lower the temperature threshold to room temperature and at the same time disable the other two sensors (sound and carbon dioxide sensors). Within 5 feet, we then move in front of the motion sensor to see if the alarm is triggered. We can also monitor the output voltage of the motion sensor using an oscilloscope. 6.2.3 Sound Detector A spectrum analyzer will be used to measure the output of the sound detector circuit. A set of recorded sounds will be played into the microphone. Then, the spectrum analyzer will be used to confirm the expected spikes within the passband of the sound detector circuit. 6.2.4 Carbon Dioxide Sensor Reading the datasheet should tell us the carbon dioxide detection rating of the sensor. To verify it is working, we will have the temperature threshold lowers to room temperature, with motion and sound sensor disabled, we put the baby detector device into a plastic bag and start breathing in the plastic bag. Doing this will increase the carbon dioxide levels and thus should trigger the alarm. 6.2.5 Temperature Sensor Touching the surface of the temperature sensor will induce heat to the sensor. An oscilloscope will be used to verify if the output of the temperature sensor increased. 6.2.6 Alarm Trigger the alarm by any method. Then, measure the output volume using an external microphone device (a smartphone with an appropriate app can do this) to make sure it can output at least 85 dBA from 1 foot away. 6.2.7 Power Supply Use a multimeter to measure the voltages powering each component. 6.3 Tolerance Analysis The detection system relies on utilizing three sensors to detect the presence of a child. The component expected to produce the largest number of false fails is the sound detector. For this component we are aiming to have a maximum false positive rate of 10%. The sound detector alone will be specified to detect the presence of the child in 80% of the cases. However, we aim for the device to use the feedback from all other sensors to detect the presence of a child 100% of the time. To verify that the sound sensor meets the maximum 10% false positive specification, the sound sensor will be enabled and all other sensors will be disabled. A large number of preselected sounds such as ambulances, motorcycle engines, and other expected noise will be played towards the microphone. Then, the alarm trigger rate will be recorded. To verify that the sound sensor meets the minimum 80% success rate specification, the sound sensor will be enabled and all other sensors will be disabled. A large number of unique baby and child sounds will be played towards the microphone and the number successes will be recorded. Chapter Seven : FUTAR WORK 23 In this semester , the project was completed as planned ,but in the future some development may be added: 1.Add oxygen sensor to see the time remaining for the life of the child and rescue him. 2.Add push button to prevent the alarm in case it is not needed 3.connect the device directly with the Civil Defense to increase the possibility to rescue the Children. So ,It can convert this project with the development to product can be sold in markets. CHAPTER EAIGT : RESULT AND ANAYSIS 24 In this chapter , the code for each sensor were prepared and checked then all of them were connected with arduino by using a comprehensive code (show appendix B) , and the rest Pieces like leds and servo motor are programmed and connected to the arduino. After the device was finished completely , a small form of car was started to design and then the final device was connected to it. Then the project has been checked and adjusted mistakes , the temperature and smoke sensor was run firstly and become on so the other sensors were operated and gave output (sms , alarm and open the window ). This picture shows how they connect together with arduino and computer , also how they communicate Fig 8.1 the first form of the car Fig 8.2 The final connection of all sensors with arduino 25 CHAPTER NINE : DISCUTION The project in this semester has been accomplished and prepared it to work correctly which can detect a child in a hot car. This device must be able to detect the presence of a child through their motion and sound. In the case that the child is not moving or crying, the device will detect the presence of a child by detecting their breath. The device will monitor the car using several sensors. The device will use a temperature sensor, a motion sensor, a sound detector, and smoke sensor. It will be in sleep mode if the temperature is below a certain threshold. If that threshold is reached, the device will exit sleep mode and start monitoring its surroundings. Then, if motion, sound, or a rise in smoke levels is detected, the device send sms And then wait for a period of 10 minutes, if the readings have not changed (less temperature and the proportion of carbon dioxide) it starts to give warning of the oceans around the car so that they rescued the child The following diagram illustrates the steps to work this device . 26 Fig 9.1 : Flowchart of the system 27 CHAPTER TEN : CONCLUISON AND RECOMMENDATION 10.1 Conclusion In this semester , sensors has been bought completely and programming it check each sensor separately to make sure his work is required. It was necessary to program the machine work writing and after making sure that the work of each sensor was their connection with each other with a piece arduino and create the environment necessary to activate this device also have designed the final prototype of the car 10.2 Recommendation The limitation of this design would be improved upon in future by considering thefollowing Recommendations : 1- For Those who believe that leaving the child in the air-conditioned vehicle protects him , reduces the high temperature , but the child might try to playwith the vehicle so it is advisable to take the children from the vehicle. 2- Providing some of the pieces that are not found in the local Palestinian market, we were forced to request from outside the country. 3- The system needs to test medically because it is Dedicated for babies. But there is an excellent opportunity to turn the system into a commercial product that fits the purchasing power of the average consumer . 4- Finally , transport vehicles for babies must be developed to contain such a device 28 References : 1-http://www.alldatasheet.com/view.jsp?Searchword=Lmt85 2- http://co2meters.com/Documentation/Datasheets/DS30-01%20-%20K30.pdf 3- http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en552769 4- http://www.arduino.cc/en/Main/ArduinoBoardUno 5- http://www.invensense.com/mems/microphone/documents/ADMP401.pdf 6- https://www.sparkfun.com/products/8502 7- https:://courses.engr.illinois.edu/ece445/projects.asp 8-Sadiku,M. , & Alexander ,C.K .Fundamental Of Electrical Circuit (4th ed) . 9-McGraw-Hill, Inc.Engineering Circuit Analysis, (6thed ). 10-Boylestad ,R ,&Nashelsky ,L. Electronic Device And Circuit Theory(7th ) . 11-https://www.facebook.com/Ramalla.Mix 12http://air.imag.fr/index.php/Microphone_Sound_Detection_Sensor_Module_for_Ar duino . 13-https://www.pololu.com/file/0J310/MQ3.pdf 29 Attachment A : DISCLAIMER This report was written by student at s at the Electrical Engineering Department , Faculty of Engineering , An-Najah National University . It has not been altered or corrected , other than editorial corrections , as a result of assessment and it may contain language as well as content errors . The views expressed in it together with any outcomes and recommendations are solely those of the students. An-Najah National university accepts no responsibility or liability for the consequences of this report being used for a purpose other than the purpose for which it was commissioned . 30 Appendix B: Code that had been used for the project : >include <Servo.h# define MServo 9# define Klaxon 2# define LED 3# define PIR_Sensor 4# define Smoke_Sensor A0# define Sound_Sensor A1# define LM35_Sensor A2# "include "SIM900.h# >include <SoftwareSerial.h# "include "sms.h# ;SMSGSM sms ;int numdata ;boolean started=false ;]char smsbuffer[160 ;]char n[20 ;Servo myservo ;float LM35_Sensor_Value ;float Sensor_temp ;int LM35_Value=0 ;int Smoke_Sensor_Value=0 ;int Smoke_Value=0 31 ;int Sound_Sensor_Value=0 ;int Sound_Value=0 ;int PIR_Sensor_Value=0 ;int PIR_Value=0 { )(void setup :initialize INPUT // ;)pinMode(PIR_Sensor, INPUT ;)pinMode(Smoke_Sensor, INPUT ;)pinMode(Sound_Sensor, INPUT ;)pinMode(LM35_Sensor, INPUT :initialize OUTPUT // ;)pinMode(Klaxon, OUTPUT ;)pinMode(LED, OUTPUT ;)pinMode(MServo, OUTPUT attaches the servo on pin 9 to the servo object // ;)myservo.attach(MServo :initialize serial communication with computer // ;)Serial.begin(9600 ;} { )(void loop 32 ; )( PIR ;)( Sound ;)( Smoke ;)(temp if ( ((LM35_Value & Smoke_Value & Sound_Value & PIR_Value)==1)|((Smoke_Value & {))LM35_Value)==1 ;)(sm ;)( LED_Klaxon_ON ;)delay(50000 ;)(MServo_ON ;)delay(2000 } { else ;)( LED_Klaxon_OFF ;)(MServo_OFF } ;} {)(void sm ;)".Serial.println("GSM Shield testing { ))if (gsm.begin(2400 ;)"Serial.println("\nstatus=READY ;started=true } ;)"else Serial.println("\nstatus=IDLE { )if(started 33 if (sms.SendSMS("00972595400047", "Your child in dengours")) Serial.println("\nSMS sent ;)"OK } ;)delay(200 if (sms.SendSMS("00972569833087", " Your child in dengours")) Serial.println("\nSMS sent ;)"OK ;)delay(2000 } { )( void PIR ;)PIR_Sensor_Value=digitalRead(PIR_Sensor {)if (PIR_Sensor_Value==1 ;PIR_Value=1 ;)"Serial.println("PIR_Sensor_ON ;)delay(100 } {else ;PIR_Value=0 ;)"Serial.println("PIR_Sensor_OFF ;)delay(100 } } {)( void Sound ;)Sound_Sensor_Value= analogRead(Sound_Sensor {) if ( Sound_Sensor_Value > 50 ;Sound_Value=1 34 ;)"Serial.println("Sound_Sensor_ON ;)delay(100 } { else ;Sound_Value=0 ;)"Serial.println("Sound_Sensor_OFF ;)delay(100 } } {)( void Smoke ;)Smoke_Sensor_Value = analogRead(Smoke_Sensor {)if ( Smoke_Sensor_Value > 50 ;Smoke_Value=1 ;)"Serial.println("Smoke_Sensor_ON ;)delay(100 } { else ;Smoke_Value=0 ;)"Serial.println("Smoke_Sensor_OFF ;)delay(100 } } {)(void temp 35 ;)Sensor_temp = analogRead(LM35_Sensor ;LM35_Sensor_Value = Sensor_temp *0.48828125 {) if ( LM35_Sensor_Value >50 ;)"Serial.println("LM35_Sensor_ON ;LM35_Value=1 ;)delay(100 } {))else if (~( LM35_Sensor_Value > 35 ;LM35_Value=0 ;)"Serial.println("LM35_Sensor_OFF ;)delay(100 } } { )( void LED_Klaxon_ON ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 36 ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 ;)digitalWrite(Klaxon, HIGH ;)digitalWrite(LED, HIGH ;)delay(100 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(500 } { )( void LED_Klaxon_OFF 37 ;)digitalWrite(Klaxon, LOW ;)digitalWrite(LED, LOW ;)delay(1000 } {)(void MServo_ON myservo.write(180); delay(15); // sets the servo position according to the scaled value // waits for the servo to get there } {)(void MServo_OFF myservo.write(90); delay(15); // sets the servo position according to the scaled value // waits for the servo to get there } 38