You are on page 1of 27

HOT CAR BABY DETECTOR

By:
Jian Gao
Luis Pabon

Final Report for ECE 445, Senior Design, Fall 2014


TA: Yang Xu

December 10, 2014


Project No. 20

Abstract
The goal of this project is to develop a portable battery powered system that could detect and alert of
the presence of a child in a hot car. This is achieved by monitoring the ambient temperature, sound,
motion, and carbon dioxide concentration. This project explores the reliability of integrating an IC
temperature sensor, an electret condenser microphone, an ultrasonic sensor, and a carbon dioxide
sensor into this baby detection system. The results reveal that monitoring the environment by using an
IC temperature sensor and carbon dioxide sensor is an easily achieved by using a low power Microchip
PIC microcontroller. In contrast, monitoring with an ultrasonic sensor and microphone is a challenging
task that would require computationally intensive algorithms and more processing power.

Contents
1. Introduction .............................................................................................................................................. 5
1.1 Objectives............................................................................................................................................ 5
1.1.1 Goals............................................................................................................................................. 5
1.1.2 Functions ...................................................................................................................................... 5
1.1.3 Features ....................................................................................................................................... 5
2. Design........................................................................................................................................................ 6
2.1 Block Diagram ..................................................................................................................................... 6
2.2 Block Descriptions ............................................................................................................................... 7
2.2.1 Microcontroller ............................................................................................................................ 7
2.2.2 Motion Sensor .............................................................................................................................. 7
2.2.3 Microphone Circuit ...................................................................................................................... 7
2.2.4 Voice Filter ................................................................................................................................... 8
2.2.5 Carbon Dioxide Sensor ................................................................................................................. 9
2.2.6 Temperature Sensor .................................................................................................................... 9
2.2.7 Sleep Switch ............................................................................................................................... 10
2.2.8 Alarm .......................................................................................................................................... 10
2.2.9 Power Supply ............................................................................................................................. 11
2.3 Simulations........................................................................................................................................ 11
2.3.1 Voice Filter ................................................................................................................................. 11
2.4 Flowchart .......................................................................................................................................... 13
3. Design Verification .................................................................................................................................. 14
3.1 Microcontroller ................................................................................................................................. 14
3.2 Motion Sensor................................................................................................................................... 14
3.3 Microphone Circuit ........................................................................................................................... 15
3.4 Voice Filter ........................................................................................................................................ 15
3.5 Carbon Dioxide Sensor ...................................................................................................................... 16
3.6 Temperature Sensor ......................................................................................................................... 17
3.7 Sleep Switch ...................................................................................................................................... 18
3.8 Alarm ................................................................................................................................................. 18
3.9 Power Supply .................................................................................................................................... 18
4. Costs ........................................................................................................................................................ 19
3

4.1 Parts .................................................................................................................................................. 19


4.2 Labors ................................................................................................................................................ 19
4.3 Total Cost .......................................................................................................................................... 19
5. Conclusion ............................................................................................................................................... 20
5.1 Accomplishments .............................................................................................................................. 20
5.2 Uncertainties ..................................................................................................................................... 20
5.3 Ethical considerations ....................................................................................................................... 20
5.4 Safety Considerations ....................................................................................................................... 21
5.5 Future works ..................................................................................................................................... 21
References .................................................................................................................................................. 22
Appendix A

Requirement and Verification Table ................................................................................... 23

Appendix B

Abbreviations ...................................................................................................................... 26

Appendix C

Circuit Schematics ............................................................................................................... 27

1. Introduction
There have been a number of incidents where babies are forgotten in a car by their parents. During a
hot summer day and in direct sunlight, a cars interior temperature can reach as high as 150 F. 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 warns nearby pedestrians if a child is trapped inside a hot car.

1.1 Objectives
1.1.1 Goals
The goal of this project is to design a portable battery powered device that can reliably detect a child in
a hot car. This device must be able to detect the presence of a child through their motion and sounds.
In the case that the child is not moving or crying, the device will detect the presence of a child by
detecting their breathing.
1.1.2 Functions
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 level is
detected, the device alarm will be triggered. However, there will be a 10 seconds beeping warning
before the alarm is activated. This allows an adult to disable the alarm for 10 seconds in case the adult
triggered the alarm by accident.
1.1.3 Features
Small size (4 x 3.2 in)
Compact - all sensors are contained within a single circuit board
Easy to install and independent of car seat
Battery powered ( 4 x AA batteries)
A loud buzzer with warning and alarm modes
Power savings mode results in 14 times reduction in power consumption
Ultrasonic motion sensing for accurate detection
o Unaffected by heat and external movements
Voice filtering to reduce false alarms
Accurate breathing detection by measuring carbon dioxide levels
A sleep button to stop false alarms

2. Design

Figure 1. PCB prototype

2.1 Block Diagram

Figure 2. Top Level Block Diagram

2.2 Block Descriptions


2.2.1 Microcontroller
The microcontroller is the central processing unit of the device. A 12-bit analog-to-digital converter
reads and converts 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 be triggered. In addition, the microcontroller can switch on and off the power of each
sensor individually.
2.2.2 Motion Sensor
The motion sensor uses ultrasonic technology to detect motion. Unlike PIR and microwave motion
sensors, the ultrasonic sensor is insensitive to heat and external movements.

Figure 3: ultrasonic motion sensor circuit block

This model is the HC-SR04 [5]. In order for this particular model to work, the microcontroller will first
generate a 10 uS pulse to the sensors TRIG port. The sensor senses the distance of an obstacle and
return its distance through the sensors ECHO port. The distance, D (given in cm), is proportional to
the pulse width,
(given in us) of the ECHO signal. The formula is given by equation 1 [5].
The pulse width is then given by equation 2.

2.2.3 Microphone Circuit


The microphone circuit uses a small electret condenser microphone capable of detecting sounds in the
frequency range of 100 to 20,000 Hz. The sensitivity of this microphone is only -47 3 dB. Therefore, the
output is amplified before sending it to the voice filter.

Figure 4. Microphone circuitry with non-inverting amplifier

The gain of the non-inverting amplifier given in Figure 4 is derived in equation 3.


Hence,
(4)
Letting

and

results in a gain of

2.2.4 Voice Filter


The voice filter is specially designed analog filter to remove frequencies unrelated to the distress call of a
baby. The purpose of this filter is to minimize false fails due to outside sounds. The output of this circuit
will be sent to the microcontroller.

Figure 5. band-pass analog voice filter

In the Figure 5 above,

. The transfer function of the first stage is given in equation 5.

The second stage has the same form as the first but with the capacitors set to
function is given in equation 6.

The resulting transfer function is then given in equation 7.

. This transfer

2.2.5 Carbon Dioxide Sensor


The carbon dioxide sensor will be a sensitive device capable of measuring carbon dioxide levels within an
enclosed environment. The sensor output will be sent to the microcontroller for processing and
detecting a breathing life form.

Figure 6: carbon dioxide circuit block

The output voltage of the carbon dioxide sensor if given by equation 8 [7] is:

Where Ec is a constant volume, R is the ideal gas constant, F is Faradays constant, P is the carbon
dioxide partial pressure, and T is the ambient temperature in Kelvin.
Assuming that for a small time interval

the following relation can be derived for changes in

pressure:

From this we can see that for increasing carbon dioxide concentrations,
will be a negative number.
Which suggest the negative relationship between the carbon dioxide level and the sensors output
voltage.
2.2.6 Temperature Sensor
The temperature sensor outputs a voltage in relationship to the current temperature as shown in
equation 10. This voltage is compared against a reference voltage of 901 mV, corresponding to 27. If
the measured temperature voltage is higher than the reference voltage, the voltage comparator will
signal the microcontroller to start monitoring all the sensors.

Figure 7. Temperature sensor circuitry with voltage comparator

The TI LM62 IC temperature circuit outputs a voltage proportional to the temperature and is given by
equation 10 [8].

From that it is clear that the Temperature is given by equation 11.

The model of an op-amp comparator circuit is given as follows:

From this we see that for

, the output will either be 5 V or 0 V.

2.2.7 Sleep Switch


The sleep switch will be a push-button that will allow the parent to disable the devices alarm for 10
seconds. This will allow an adult to disable the alarm if they have arrived to the vehicle. The signal will be
output to the microcontroller.
2.2.8 Alarm
The alarm will be used to alert anyone near the car that a child might be in danger. It is controlled by the
microcontroller through an N-type MOSFET, as shown in Figure 8. The alarm emits a 3.2 KHz tone with a
sound pressure of 85 dB at a distance of 10 cm.

Figure 8: Buzzer alarm circuitry with n-MOSFET switch

10

2.2.9 Power Supply


The power supply consists of a linear regulator circuit. The circuit will be powered by Four AA batteries,
corresponding to 6 V. The linear regulator converts this input voltage into 5 V in order to fulfill the
power specs for the rest of the circuit. Figure 9 shows the schematic of the linear regulator.

Figure 9. 5V linear voltage regulator

2.3 Simulations
2.3.1 Voice Filter
The purpose of the microphone circuit is to detect the presence of a child in a hot car by using sound.
While the sound amplitude may be indicative of how close the sound source is, it may fail to identify the
closest source under certain circumstances. For example, an ambulance siren nearby might exceed the
max amplitude thresholds defined for the childs voice. The motivation for using a band pass filter for cry
detection comes from the fact that human speech has a frequency band from about 300 Hz to 3 KHz [1].
Therefore, a band pass filter should help reduce some false positives by excluding sounds with energy
outside of this range. In this project, the human frequency range is used as a starting point for our band
pass region. The cutoffs are then varied order to try to minimize the number of false fails from a
database of baby cry and ambient noise sound files. Figure 10 below shows that most of the energy of a
baby cry does fall within the 300 Hz to 3 KHz band.

Figure 10. The figure above shows the frequency spectrum for two different baby cry patterns. Overall, they follow a similar
pattern. Most of the energy is contained in 300 Hz to 3 KHz.

11

The lower and upper 3dB cutoffs were varied and the filter was applied to the database of sounds. For
all of the simulations the, the sounds were normalized to have the same max amplitude. The cutoffs that
minimized the number of false positives were experimentally determined to be 517 Hz for the lower
cutoff and 1.358 kHz for the higher cutoff. Figure 11 and Figure 12 show the time domain filter output
for two different crying inputs. These two simulations show that for both of these cases. There exists a
time where the amplitude exceeds 0.8 V. In contrast, Figure 13 shows that applying the filter to the
sound
loud
rain
results
in
an
output
that
does
not
exceed
0.4
V.

Figure 11. Output of analog filter when the input is a baby cry waveform

Figure 12. Output of the analog filter when the input is a second baby cry waveform

Figure 13. Output of the analog filter when the input is a loud rain waveform

12

Figure 14. The simulated frequency response of the analog band-pass filter

The frequency response of the optimal filter was simulated in MATLABs Simulink. The active analog
band-pass filter was designed to match the simulated frequency response.

2.4 Flowchart

Figure 15. Top level flowchart

Shown in Figure 15 is a simplified flowchart that demonstrates the firmware embedded in the
microcontroller. The device will stays in the SET_ALARM_OFF state if the temperature is less than
27. If the temperature is above the threshold, the device will enters the loop of checking the carbon
dioxide, sound, and motion sensors. When a sensor triggers the alarm, the device will enter the
ALARM_ON state. It stays in that state as long as the sleep switch is not pressed. When the sleep
button is pressed, all the sensors and alarm will be temporarily turned off for 10 seconds. After that, the
logic flows back to the SET_ALARM_OFF state and checks the temperature again afterward.
13

3. Design Verification
3.1 Microcontroller
Microchips PIC24FV16KA301 microcontroller satisfied all of the functionalities required in this project. It
offers enough input/output ports to communicate with all the peripheral components. Its 12-bits
analog-to-digital converter has enough resolution to digitize the signals from the microphone and
carbon dioxide sensor. It has enough external interrupt ports for the temperature comparator and sleep
switch to trigger the microcontroller. Its 16-bits (expandable to 32-bits) timers offer great flexibility to
generate periodic firmware interrupts. The microcontroller also consumes very little power, so little that
its current consumption during run mode is just 8 uA.

3.2 Motion Sensor


To test the ultrasonic sensor, a 10uS pulse (shown as green in Figure 16) is generated through the
microcontroller and sent to the TRIG input of the sensor. The sensor responds to this by measuring the
distance of an object using the propagation of ultrasound. It then outputs the distance information
through its ECHO port as shown in the yellow channel of Figure 16. In this particular test, a hand is
located exactly 20 cm away from the sensor.
According to equation 2, 20 cm corresponds to
. The measured
ECHO pulse width (shown in the yellow channel of figure 16) is about 1100us and matches the
calculation.

Figure 16. The ultrasonic sensors TRIG (green) and ECHO (Yellow) signals in one detection cycle

14

3.3 Microphone Circuit


Figure 17 and Figure 18 show the microphone signal before and after the non-inverting amplifier. The
functionality of the microphone and the amplifier circuit is tested using a series of table tapping sounds
are detected in the oscilloscope screen capture in Figure 17.
As seen from the input in figure 17, the tapping has a peak to peak voltage of 66 mV. According to
equation 4, the corresponding peak to peak output should be
. Figure
18 shows the corresponding output to be 2.47 V, hence verifying the functionality of the non-inverting
amplifier.

Figure 17. Microphone signal before amplification

Figure 18. Microphone signal after amplification

3.4 Voice Filter


The designed 3 dB and 6 dB pass-bands of the analog voice filter are 517 Hz to 1.358 kHz, and 450 Hz to
1.458 kHz respectively. The frequency response of the filter was tested by sending impulses to the filter
input and then viewing the frequency spectrum with the oscilloscopes FFT function. The realized 3 dB
lower cutoff is 560 falls within the 100 Hz tolerance set forward in the requirements. The upper 3 dB
cutoff of 1.48 KHz also falls within the 100 Hz tolerance defined in the requirements. As seen in Figure
16, the ripples in pass-band are less than 1 dB, which falls within the tolerance defined in the
requirements. The 6 dB cutoff requirements were also met.

Figure 19. Frequency response of voice filter

15

3.5 Carbon Dioxide Sensor


As derived in section 2.2.5, the output voltage of the carbon dioxide sensor has an inverse relationship
to the carbon dioxide concentration. In other words, as the level of carbon dioxide increases, the
sensors output voltage decreases. Due to the nature of this particular project, the exact carbon dioxide
level in ppm (part per million) is not critical, it is the change in concentration levels that determines the
presence of a human being.
As derived in equation 9, < 0 and is independent of temperature as long as the two consecutive
samples are measured in a short time span.
To test the performance of the carbon dioxide sensor, it was placed inside a plastic bag to simulate a
cars cabin. We then breathe into the plastic bag to simulate the babys presence in the cabin. The
output of the carbon dioxide sensor was measured using an oscilloscope, as shown in Figure 20. Recall a
falling voltage corresponds to a rising carbon dioxide level, in which Figure 20 confirms the functionality
of the sensor.
The carbon dioxide sensor was then removed from the plastic bag. Figure 21 shows the output voltage
starts to rise back up, which means the sensor detects the decrease in carbon dioxide level.

Figure 20. Increase in carbon dioxide level (voltage decreasing) Figure 21. Decrease in carbon dioxide level (voltage increasing)

16

3.6 Temperature Sensor


The temperature sensor circuit alerts the microcontroller when the cars interior temperature is at a
dangerous level. This was done by comparing the temperature voltage to the reference voltage with
voltage comparator.
The voltage reference is set to 901 mV. According to equation 11, that value corresponds to a
temperature of

The yellow channel in figure 22 shows the output rising from 900 mV when the temperature sensor is
touched. The green channel in figure 22 shows the rising edge of the comparator once the 901 mV
threshold is exceeded. Hence, verifying the functionality of the temperature circuit.

Figure 22. Rising temperature sensor triggers the voltage comparator

17

3.7 Sleep Switch


The sleep switch triggers the microcontroller by generating falling edges. When the switch is not
pressed, the pull up resistor keeps its output voltage to be 5V. When the switch is pressed, it connects
its output to ground. Figure 23 shows a few sample presses and releases of the sleep switch. Please note
the falling edges (as well as the rising edges) are very clean, without any bouncing. This can trigger the
microcontroller very effectively.

Figure 23. Sleep button switching on and off

3.8 Alarm
The buzzer alarms only requirement is its loudness. According to the data sheet of the model used in
this device, the minimum sound pressure level at 10 cm away is 85dB. This has been tested using a
smartphones built-in app. The smartphones microphone was sitting 10cm away from the buzzer alarm
while it is on. The measured sound pressure level is 91dB. It matches with the data sheet and meets our
requirement.

3.9 Power Supply


It is required that the voltage regulator can convert up to 10V of input voltage to 5V. This was tested by
a 12V input voltage using an external power supply. The output of the voltage regulator was measured
and can still maintain a voltage of 5V. In fact, per the datasheet, the voltage regulator can handle up to
16V of input voltage and can supply up to 1A of current.

18

4. Costs
4.1 Parts
Table 1 Cost of parts
Part Name

Part Number

Price / Unit

Quantity

Ultrasonic Sensor

HC-SR04

$2.95

Microphone

SPM0406HE3H-SB

$2.01

Carbon Dioxide Sensor

MG-811

$65.00

Temperature Sensor

LM62BIM3

$1.13

Alarm

PB-12N32MP-05AQ

$2.67

Button Switch

PTS645SK43SMTR92 LFS

$0.25

Slide Switch

JS202011SCQN

$0.44

Microcontroller

PIC24FV16KA301-I/SS

$3.07

MOSFET

DMG1012T

$0.31

Voltage Regulator

MCP6561

$0.90

Operational-amplifier IC

NJM2710V-TE1

$2.58

AA batteries

ENERGIZER E91

$5.99

4.2 Labors
Table 2 Cost of labors
Name

Hourly Rate

Total Hours Invested

Total

Jian Gao

$30

150

$11250

Luis Pabon

$30

150

$11250

4.3 Total Cost


Table 3 Total costs combining parts and labors
Section

Total

Labor

$22500.00

Parts

$89.99

Total

$22589.99
19

5. Conclusion
5.1 Accomplishments
This has been a rewarding project because it gives us hands-on experience to work through the process
of product design engineering. From brainstorming to project proposal, from design review to the first
prototype, from project demonstration to the final presentation, our biggest accomplishment is to build
a device that actually works. Not to mention it is a life-saving device.
Project wise, we had accomplished to interface all the sensors to the microcontroller and worked
together to troubleshoot most of the hardware problems. The software is also working smoothly, with
defined state machines and predictable software interrupts, all the sensors are able to work together
without conflicts. The software was also designed to minimize unnecessary power consumption as well.

5.2 Uncertainties
Out of the three detection sensors, it is just the carbon dioxide sensor that performances the best.
Although the ultrasonic sensor works best in a hot cars interior, it turns out to be not very reliable. This
shortcoming is due to the fundamental physics of ultrasound. Because sounds bounce on solid surfaces,
uneven surfaces, such as the cars interior, might cause the sensor to generate false alarms.
The sound detection system in the Baby Detector device also has its flaws. Even with the analog bandpass voice filter integrated into the device, any source of sound within frequencies inside pass-band can
pass through, regardless if it is the babys voice or not. This can also results in unpredictable false alarms
to occur.
The battery life of the device is also a concern. Currently, the carbon dioxide sensor consumes the most
power. However, the battery life can be improved by using a more energy efficient carbon dioxide
sensor and by optimizing the circuits to reduce power. The ultimate goal is for the car manufacturers to
fully integrate this device into their cars, so battery life is no longer a concern.
The last uncertainty of this device is the effectiveness of the alarm. As of now, the buzzer alarm is the
only way to alert people if a baby is in danger. If no one can hear the buzzer alarm, the baby cannot be
saved. An upgrade to the alarm system is needed, such as integrating it to the cars horn, or adding the
GSM feature to the device to alert the parents through text messages.

5.3 Ethical considerations


The purpose of this project is to detect a forgotten baby in a hot car. Therefore, we take responsibility
in fully disclosing the advantages and limitations of our detection system to the end user. This is
consistent the first code of the IEEE Code of Ethics [3]:
1) To accept responsibility in making decisions consistent with the safety, health, and welfare of
the public, and to disclose promptly factors that might endanger the public or the
environment

20

Our circuit utilizes custom design circuits, such as the voice filter, for the purpose of minimizing costs
while improving detection. We will disclose all simulation and test results to be consistent with the
second code of the IEEE Code of Ethics [3].
2) To be honest and realistic in stating claims or estimates based on available data
Our system features several custom designed circuits and methods that to our knowledge, have not
been implemented before. We will continue to improve and document our methods to improve the
understanding of the technology as stated by the fifth code of the IEEE Code of Ethics [3].
5) To improve the understanding of technology its appropriate application, and potential
consequences
The life of a child could potentially depend on this device. Therefore, we will continue to seek
constructive advice to further perfect our system. This follows from the seventh and eighth codes of
the IEEE Code of Ethics [3].
7) To seek, accept, and offer honest criticism of technical work, to acknowledge and correct
errors, and to credit properly the contributions of others
8) To avoid injuring others, their property, reputation, or employment by false or malicious
action

5.4 Safety Considerations


The baby detector device does not pose any electrical safety hazards since it operates at a low voltage.
There are no large mechanical parts, nor any transmissions of any sort, so it cannot cause injuries or
interfere with RF devices.
However, this device should be used as a last resort for detecting the presence of a baby. The user
should never attempt to leave a child in the car, no matter what.
The device uses a loud 85 dBA alarm. At a 1 foot distance from the user, it should not cause any damage.
But any close exposure (i.e. right next to the ear) could lead to permanent hearing loss. Do not place
alarm next to the ear.

5.5 Future works


Hardware:
Replace the currently model of carbon dioxide sensor with a more energy efficient model, such
as the COZIR Ambient CO2 Sensor.
Add a GSM wireless module to the Baby Detector for offsite alerts
Implement a low battery indication circuit to remind the use to change battery
Implement a reverse battery protection circuit to avoid user errors
Interface the alarm to the vehicles alarm system for more effective alerts
Software:
Implement a more advanced DSP algorithm to differential the babys voice to all other noises
Implement an algorithm to detect movement, regardless the distance from the ultrasonic
sensor.
21

References
[1] Behzad, Munir. Voice Fundamentals Human Speech Frequency, uoverip, *online+ 2012,
http://www.uoverip.com/voice-fundamentals-human-speech-frequency, (Accessed: 20 September
2014)
[2] Filter Wizard | Analog Devices, Analog Devices" [online] 2014, http://www.analog.com/
designtools/en/filterwizard/#/type (Accessed: 20 September 2014).
[3] IEEE Code of Ethics, IEEE [Online]. Available: http://www.ieee.org/about/corporate/governance/
p7-8.html (Accessed: 20 September 2014).
[4] PIC24FV32KA304, Microchip, 2013. [Online] Available: http://ww1.microchip.com/downloads/
en/DeviceDoc/39995d.pdf
[5] SR04, ElecFreaks. [Online] Available: http://users.ece.utexas.edu/~valvano/Datasheets/HCSR04b
.pdf
[6] SPM0406HE3H-SB, Rev. E, Knowles Electronics, 2013. [Online] Available: http://media.digikey.co
m/pdf/Data%20Sheets/Knowles%20Acoustics%20PDFs/SPM0406HE3HSB.pdf
[7] MG811 Sensor, Rev. 1, Futurlec,New York, NY, 2012. [Online] Available: https://www.futurlec.
com/CO2_Sensor.shtml
[8] LM62, Rev. E, Texas Instruments, Dallas, TX, 2013. [Online] Available: http://www.ti.com/lit/ds/
symlink/lm62.pdf
[9] PB-12N32MP-05AQ, Rev. A, Mallory Sonalert Products Inc, Indianapolis, IN. [Online] Available:
http://www.mallory-sonalert.com/specifications/PB-12N32MP-05AQ.pdf

22

Appendix A Requirement and Verification Table


Table 4 System Requirements and Verifications

Requirement
Microcontroller Requirements
1. Internal ADC module should have the
sampling Nyquist sampling rate of at
least 40 KHz
2. The
microcontroller can output
several pulses:
a. at 10% and 50% duty cycle
b. at 1 s and 2 s periods

3. Output to sensor power switches


circuit has a logic low of < 0.7 V
4. Output to sensor power switches
circuit has a logic high of > 3 V
Alarm Requirements
5. The alarm will emit at least an 85 dB
tone at a distance of 10 cm, when
triggered by the microcontroller.

Passed?
(Y or N)

Verification
1. Use function generator to slowly sweep
the ADC input with a sinusoid with
frequencies from 0 to 20 KHz.
2. Heat up the temperature sensor and
trigger one of the sensors, in order to
activate the alarm:
a. Listen for a warning alarm with a 1 s
period and 10% duty cycle
b. Listen for an alert alarm with a 2 s period
and a 50% duty cycle
3. Use a multimeter to verify that the
microcontroller output to sensor power
switches circuit has a logic low of < 0.7V
4. Use a multimeter to verify that the
microcontroller output to sensor power
switches circuit has a logic high of > 3 V

5. Trigger the alert signal microcontroller by


touching the temperature sensor and
activating any of the other sensors.

Use an external device to measure that alarm


amplitude is at least 85 dB 10 cm away
from the alarm.
6. The alarm can emit a continuous beep
when applied a constant 5 V
Sleep Switch Requirements
7. Sleep switch output is at 5V 1 %
when untouched.
8. Sleep switch output is at 0 V 1 %
when untouched.
Microphone Circuit Requirements

6. Setup microcontroller to
constant 5 V for at least 1 (s)

7. Use multimeter to verify that switch


output is at 5 V 1 % when untouched.
8. Use multimeter to verify that switch
output is at 0 V 1 % when untouched.

23

output

9. Must have a pass-band frequency


response from 300 Hz to 10 KHz in
order to detect human voice
10. The microphone output should have a
DC output of Vdc 2.5V 200 mV.

9. Use an audio source with fixed amplitude


to play tones from 300 Hz to 10 kHz.
Setup oscilloscope to display FFT and
view the sweeping tone.
10. Verify with multimeter that microphone
circuit output is within Vdc 2.5V 200
mV.

11. Send an impulse to the filter input and


measure spectrum using oscilloscope FFT
12. Send an impulse to the filter input and
measure spectrum using oscilloscope FFT

13. Send an impulse to the filter input and


measure spectrum using oscilloscope FFT
14. Send an impulse to the filter input and
measure spectrum using oscilloscope FFT

15. Send an impulse to the filter input and


measure spectrum using oscilloscope FFT

16. Put the baby detector in a plastic bag.


Breathe into it for 1 second and verify
that alarm rings.

17. Place obstacle between 0.5 to 5 ft and


verify that it was detected with alarm.

18. Verify with a multimeter that the voltage


reference falls within spec

19. Verify with a multimeter that the


temperature sensor voltage falls within
spec
20. Allow the temperature sensor to cool
below 27C and verify that the
comparator output voltage is within 0
20 mV
21. Heat up the temperature sensor above
27C and verify that the comparator rises
to be within 5 V 200 mV

Voice Filter Requirements


11. Band-pass filter has a lower -3 dB
frequency cutoff of 517 100 Hz
12. Band-pass filter has a high -3 dB
frequency cutoff of 1.358 KHz 100
Hz.
13. Band-pass filter has a low -6 dB
frequency cutoff of 450 Hz 100 Hz
14. Band-pass filter has a high -6dB
frequency cutoff of 1.458 KHz 100
Hz.
15. Band-pass filter has ripples of less
than 1 dB in the pass-band region
Carbon Dioxide Sensor Requirements
16. The sensor can detect average rising
carbon dioxide levels > 100 ppm/sec
Motion Sensor Requirements
17. The ultrasound sensor must be able to
detect distances of 0.5 to 5 ft
Temperature Sensor Requirements
18. The temperature reference voltage
should be 27C 3C, which
corresponds to 0.932V
19. The temperature sensor should
measure the room temperature to be
24C 3C, which corresponds 0.925V
20. The temperature sensor voltage
comparator output is 0 20 mV when
the temperature is less than 27C
21. The temperature sensor circuit output
is 5 20 mV when the temperature is
more than 27C

24

Power Supply Requirements


22. The
voltage
regulator
output
powering all the sensor must be 5V
0.1V
23. The virtual ground powering all the
op-amps must be 2.5V 0.2V
24. The current consumption of the circuit
in standby mode must be less than
50mA
25. The current consumption of the circuit
when all sensors are on must be less
than 300mA
26. The voltage regulator must handle
input voltage up to 10V.

22. Use a voltmeter to verify that all the


sensor power pins are 5V 0.1V

23. Use a voltmeter to verify that the virtual


ground powering all the op amps is 2.5V
0.2V
24. Use an external power supply to supply
the voltage and measure the supplied
current
25. Use an external power supply to supply
the voltage and measure the supplied
current
26. Use an external power supply to supply
10 V. Check if voltage regulator can still
convert it to 5V

25

Appendix B Abbreviations
Table 5 Abbreviations explained
Abbreviation

Full Name

in

inch

ft

feet

cm

centimeter

second

us

microseconds

Hz

Hertz

ampere

mA

Milli-ampere

volt

mV

millivolt

CO2

carbon dioxide

dB

decibel

ADC

analog-to-digital

PIR

Passive infrared sensor

IC

integrated circuit

FFT

fast Fourier transform

MOSFET

metaloxidesemiconductor field-effect transistor

op-amp

operational amplifier

26

Appendix C Circuit Schematics

Figure 24. Full Schematics of the device

27

You might also like