Professional Documents
Culture Documents
CHILD SAFETY ASSISTANT SYSTEM (FINAL REPORT)
CHILD SAFETY ASSISTANT SYSTEM (FINAL REPORT)
CHILD SAFETY ASSISTANT SYSTEM (FINAL REPORT)
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
By
April,2022
Page 1 of 55
CERTIFICATE
This is to certify that the project report entitled Child Safety Assistant System submitted
by ADITYA SURENDRA TRIPATHY, SHAHBAZ ALI MIKRANI, SHEMPHANG
RYNTATHIANG, VISHAL KUMAR to the Department of Computer Science and Engineering,
Bharath Institute of Higher Education and Research, in partial fulfillment for the award of the
degree of B. Tech in (Computer Science and Engineering) is a bona fide record of project work
carried out by them under my supervision. The contents of this report, in full or in parts, have not
been submitted to any other Institution or University for the award of any other degree.
<SIGNATURE>
DR.N.NITHIYANANDAM
Department of Computer Science and Engineering,
School of Computing,
Bharath Institute of Higher Education & Research,
April2022,
Page 2 of 55
DECLARATION
We declare that this project report titled Loan approval system based on machine learning approach
submitted in partial fulfillment of the degree of B. Tech in (Computer Science and Engineering) is a
record of original work carried out by us under the supervision of DR. N.NITHIYANANDAM and
has not formed the basis for the award of any other degree or diploma, in this or any other
Institution or University. In keeping with the ethical practice in reporting scientific information, due
acknowledgements have been made wherever the findings of others have been cited.
(U18CN234)
(U18CN222)
SHEMPHANG RYNTATHIANG
(U18CN224)
VISHAL KUMAR
(U18CN187)
CHENNAI
23/04/2022
Page 3 of 55
ACKNOWLEDGMENTS
First, we wish to thank the almighty who gave us good health and success throughout our
project work.
We express our deepest gratitude to our beloved President Dr. J. Sundeep Aanand, and Managing
Director Dr.E. Swetha Sundeep Aanand for providing us the necessary facilities for the completion of our
project.
We take great pleasure in expressing sincere thanks to Vice Chancellor (I/C) Dr. K. VijayaBaskar Raju,
Pro Vice Chancellor (Academic) Dr. M. Sundararajan, Registrar Dr. S. Bhuminathan and Additional Registrar
Dr. R. Hari Prakash for backing us in this project.We thank our Dean Engineering Dr. J. Hameed Hussain
for providing sufficient facilities for the completion of this project.
We express our immense gratitude to our Academic Coordinator Mr. G. Krishna Chaitanya for his
eternal support in completing this project.
We thank our Dean, School of Computing Dr. S. Neduncheliyan for his encouragement and the valuable
guidance.
We record indebtedness to our Head, Department of Computer Science and Engineering Dr. B.
Persis Urbana Ivy for immense care and encouragement towards us throughout the course of this project.
We also take this opportunity to express a deep sense of gratitude to our Supervisor
DR. N.NITHIYANANDAM for her cordial support, valuable information and guidance, she
helped us in completing this project through various stages.
We thank our department faculty, supporting staff and friends for their help and guidance to
complete this project.
Page 4 of 55
ABSTRACT
distracted parent. This project gives full safety to the children who is being locked in
microcontroller board that is able to combine all acquired data for detecting the
alarm scenario. Consequently, acting some warning procedures and sends alert
messages to user with the help of GSM module. Finally, the data will be updated in
IOT.
5
TABLE OF CONTENT
CHAPTER TITLE PAGE NO
NUMBER
ABSTRACT iv
LIST OF FIGURES vii
LIST OF ABREVIATIONS viii
1 INTRODUCTION 1
1.1 EMBEDDED SYSTEM 2
1.1.1 EMBEDDED SYSTEM HARDWARE 2
1.1.2 EMBEDDED SYSTEM SOFTWARE 3
1.1.3 EMBEDDED FIRMWARE 4
1.1.4 EMBEDDED SYSTEM VS VLSI 4
1.1.5 DEBUGGGING EMBEDDED SYSTEM 4
1.1.6 THE INTERNET OF THINGS 5
2 LITERATURE REVIEW 7
3 PROJECT DESCRIPTIONS 10
3.1 EXISTING SYSTEM 10
3.1.1 DISADVANTAGES 12
3.2 PROPOSED SYSTEM 12
3.3 BLOCK DIAGRAM 13
3.4 CIRCUIT DIAGRAM
3.5 HARDWARE REQUIREMENTS 14
3.5.1 ARDUINO UNO 15
3.5.1.1 ARDUINO BOARD 15
3.5.1.2 FEATURES OF ARDUINO 15
3.5.2 IR SENSOR 16
3.5.2.1 DIFFERENT TYPES OF IR SENSORS 17
3.5.2.2 IR SENSOR APPLICATION 17
3.5.3 TOUCH SENSOR 18
6
3.5.4 DHT11 SENSOR 12
3.5.5 GSM 13
3.5.5.1 FEATURES OF GSM MODULE 14
3.5.5.2 GSM MODEM 15
3.5.5.3 WORKING OF GSM MODEM 15
3.5.5.4 INTELLIGENT GSM DEVICE FOR 15
AUTOMATION AND SECURITY
3.5.6 ESP8266 MODULE 16
3.5.6.1 FEATURES 17
3.5.6.2 ESP8266-01 WIFI MODULE 17
3.5.7 SERVO MOTOR 18
3.5.7.1 MECHANISM
3.5.7.2 CONTROLLING A SERVO MOTOR
3.5.7.3 ADVANTAGES
3.5.7.4 TYPES OF SERVO MOTOR
3.5.8 POWER SUPPLY UNIT
3.5.8.1 CIRCUIT DESCRIPTION
3.6 SOFTWARE REQUIREMENTS
3.6.1 ARDUINO IDE
3.6.2 EMBEDDED C
3.6.2.1 PROGRAMMING EMBEDDED SYSTEM
3.6.2.2 FACTORS FOR SELECTING THE
PROGRAMMING LANGUAGE
3.6.2.3 DIFFERENCE BETWEEN C AND
EMBEDDED C
4 RESULT & DISCUSSION
4.1 CODING FOR THE SYSTEM
4.2 WORKING OF THE SYSTEM
5 CONCLUSION
REFERENCES
LIST OF FIGURES
LIST OF ABREVIATIONS
GSM GLOBAL SYSTEM FOR MOBILE COMUNICATIONS
IOT INTERNET OF THINGS
CPU CENTRAL PROCCESSING UNIT
SoT SYSTEM ON A CHIP
ROM READ ONLY MEMORY
VLSI VERY LARGE-SCALE INTEGRATION
IR INFRA RED
ICSP IN-CIRCUIT SERIAL PROGRAMMING
TCP/IP TRANSMISSION CONTROL PROTOCOL/INTERNET PROTOCOL
RAM RANDOM ACCESS MEMORY
PID PROPORTIONAL-INTEGRAL-DERIVATIVE
9
CHAPTER 1
INTRODUCTION
Every summer, there are some children who have been forgotten in the car and
died due to heatstroke. Some careless parents have forgotten to take the children
out, and finally the irreparable tragedy happens. Just in the United States, 52
children died in 2018 and 43 children died in 2017 because of heatstroke in
vehicle, and the majority of these in-car heatstroke deaths are accidents that are
preventable. In recent years, the number of heatstroke deaths of children in
vehicles is still increasing. How to remind these careless parents is an urgent
problem to solve. An effective solution to these preventable tragedies is to
effectively detect rear seat children, and send a prompt and accurate alert to their
parents. There exist some techniques in the market or in the literature to remind
parents of the children left in the rear seat. The most common way is to install a
pressure sensor under the car seat, but it cannot distinguish between heavy stuff
(e.g., grocery items) and the child in the rear seat. Thus, it may send annoying false
alarms. Another option is to install a 2-D surveillance camera in the vehicle.
According to the image captured by the camera, it can easily analyze whether the
children are left unattended in a parked car or not. Even though with high accuracy
for alerts, all of the activities in the car will be exposed to the camera, which may
lead to the privacy leakage of the driver and passengers. Some other works try to
detect the baby by using the infrared cameras. However, it cannot detect the baby
when the interior environment is already heated in hot summer. Recently, DeWald
et al. in propose an RF-based baby detection system, but additional expensive
devices such as CW-radar are needed.
1
Some examples of embedded systems are MP3 players, mobile phones, video
game consoles, digital cameras, DVD players, and GPS. Household appliances,
such as microwave ovens, washing machines and dishwashers, include embedded
systems to provide flexibility and efficiency.
2
system. As a result most embedded system are micro controller based ,where are
used to run one or limited number of applications.
The embedded market was estimated to be in excess of $140 billion in 2013, with
many analysts projecting a market larger than $20 billion by 2020. Manufacturers
of chips for embedded systems include many mainstays of the computer world,
such as Apple, IBM, Intel and Texas Instruments, as well as numerous other
companies less familiar to those outside the field. Arm has been a highly
influential vendor in this space. The company began as an outgrowth of Acorn, a
U.K. maker of early PCs. Arm chips, produced under license by other companies,
are based on the reduced instruction set computer (RISC) architecture and are often
used in mobile phones; they remain the most widely deployed SoC in the
embedded world, with billions of units fielded.
3
FIG 1.2 EMBEDDED SYSTEM APPLICTIONS
4
have increasingly decided the systems are generally fast enough and the tasks
tolerant of slight variations in reaction time that near-real-time approaches are
suitable. In these instances, stripped-down versions of the Linux operating system
are commonly deployed, although other operating systems have been pared down
to run on embedded systems, including Embedded Java and Windows IoT
(formerly Windows Embedded).
designers have increasingly decided the systems are generally fast enough and the
tasks tolerant of slight variations in reaction time that near-real-time approaches
are suitable. In these instances, stripped-down versions of the Linux operating
system are commonly deployed, although other operating systems have been pared
down to run on embedded systems, including Embedded Java and Windows IoT
(formerly Windows Embedded).
5
specific functions and provide input and output functionality.
The delineation between the terms embedded firmware and embedded software are
blurring, but embedded software often refers to the only code running on a piece of
hardware, while firmware can also refer to the chip that houses a device's basic
input/output system (BIOS) or Unified Extensible Firmware Interface (UEFI),
which connect software and a system's operating system.
VLSI circuits are common features of embedded systems. Many ICs in embedded
systems are VLSI, and the use of the VLSI acronym has largely fallen out of favor.
One area where embedded systems part ways with the operating systems and
development environments of other, larger-scale computers is in the area
of debugging. While programmers working with desktop computer environments
have systems that can run both the code being developed and separate debugger
applications that monitor the actions of the development code as it is executed,
embedded system programmers generally cannot.
6
Some programming languages run on microcontrollers with enough efficiency that
rudimentary interactive debugging is available directly on the chip. Additionally,
processors often have CPU debuggers that can be controlled -- and, thus, control
program execution -- via a JTAG or similar debugging port.
Broadly speaking, embedded systems have received more attention to testing and
debugging because a great number of devices using embedded controls are
designed for use in situations where safety and reliability are top priorities.
While some embedded systems can be relatively simple, a growing number either
supplant human decision-making or offer capabilities beyond what a human could
provide. For instance, some aviation systems, including those used in drones, are
able to integrate sensor data and act upon that information faster than a human
could, permitting new kinds of operating features.
7
CHAPTER 2
LITERATURE SURVEY
M. Vamsi et al. [1] “IN-VEHICLE OCCUPANCY DETECTION AND
CLASSIFICATION USING MACHINE LEARNING” Occupancy detection is
a difficult problem. There are several mechanisms exists for occupancy detection
in vehicles, particularly in Automobiles. Now, safety has become an important and
necessary aspect of the automobile industry. Airbag became a basic and important
safety measure in cars. Even though airbag is a vehicle safety device, it can kill
children below 12 years due to its rapid action by the exerting lot of force. This
project explains about detecting the number of passengers sitting in the car and
then classifying each person whether he/she is a child or an adult by processing the
image taken from the camera. So that the deployment of airbags can be avoided
near children. Each time car speeds from 0 Kmph to 20 Kmph, occupancy of the
car is determined and each one is classified again. We are using widely used
technique Haar Cascades, for detection. First, we detect faces and then classify
each occupant adult or child.
10
CHAPTER 3
PROJECT DESCRIPTIONS
3.1 EXISTING SYSTEM:
• In existing system, they used WIFI signals to detect the persons in car.
• In existing systems, they use camera to detect the persons, but it will affect
the user’s privacy.
3.1.1. DISADVANTAGES:
• Users’ privacy will affect if we use camera.
• Lack of integrity.
• Lack of availability and continuity of service.
• lack of accuracy
• Buzzer will beep, when the IR sensor or touch sensor will be HIGH during
the car is locked.
11
3.4 CIRCUIT DIAGRAM
12
HARDWARE REQUIREMENTS:
• Arduino Uno.
• IR Sensor.
• Touch Sensor
• DH11 Sensor.
• GSM Modem.
• Buzzer.
• IOT Module.
13
• Servo Motor.
• Power Supply.
SOFTWARE REQUIREMENTS:
• Arduino IDE
• Embedded C
• PHP
There are many versions of Arduino boards introduced in the market like Arduino
Uno, Arduino Due, Arduino Leonardo, Arduino Mega, however, most common
versions are Arduino Uno and Arduino Mega. If you are planning to create a
project relating to digital electronics, embedded system, robotics, or IoT, then
using Arduino Uno would be the best, easy and most economical option.
14
FIG 3.1 ARDUINO UNO
There are various types of Arduino boards in which many of them were third-party
compatible versions. The most official versions available are the Arduino Uno R3
and the Arduino Nano V3. Both of these run a 16MHz Atmel ATmega328P 8-bit
microcontroller with 32KB of flash RAM 14 digital I/O and six analogue I/O and
the 32KB will not sound like as if running Windows. Arduino projects can be
stand-alone or they can communicate with software on running on a computer. For
e.g. Flash, Processing, Max/MSP). The board is clocked by a 16 MHz ceramic
resonator and has a USB connection for power and communication. You can easily
add micro SD/SD card storage for bigger tasks.
15
FIG 3.2 ARDUINO UNO WITH DIGITAL INPUT/OUTPUT
• It is an easy USB interface. This allows interface with USB as this is like a
serial device.
• The chip on the board plugs straight into your USB port and supports on
your computer as a virtual serial port. The benefit of this setup is that serial
communication is an extremely easy protocol which is time-tested and USB
makes connection with modern computers and makes it comfortable.
• It is easy-to-find the microcontroller brain which is the ATmega328 chip. It
has more number of hardware features like timers, external and internal
interrupts, PWM pins and multiple sleep modes.
16
FIG 3.3 PIN DIAGRAM OF ARDUINO UNO
You can then use Atmel’s FLIP software (Windows) or the DFU programmer
(Mac OS X and Linux) to load a new firmware.
3.5.2. IR SENSOR
An infrared sensor is an electronic device, that emits in order to sense some aspects
of the surroundings. An IR sensor can measure the heat of an object as well as
detects the motion. These types of sensors measure only infrared radiation, rather
than emitting it that is called as a passive IR sensor. Usually in the infrared
spectrum, all the objects radiate some form of thermal radiations. These types of
radiations are invisible to our eyes, that can be detected by an infrared sensor. The
emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an
IR photodiode which is sensitive to IR light of the same wavelength as that emitted
17
by the IR LED. When IR light falls on the photodiode, The resistances and these
output voltages, change in proportion to the magnitude of the IR light received.
IR sensors are classified into different types depending on the applications. Some
of the typical applications of different types of sensors are
The speed sensor is used for synchronizing the speed of multiple motors.
The temperature sensor is used for industrial temperature control. PIR sensor is
used for automatic door opening system and Ultrasonic sensor are used for
distance measurement.
3.5.2.2. IR Sensor Applications
IR sensors are used in various Sensor based projects and also in various electronic
devices which measures the temperature that are discussed in the below.
Radiation Thermometers
18
• Measurement without direct contact with the object
• Faster response
• Easy pattern measurements
19
Touch sensors work similar to a switch. When they are subjected to touch, pressure
or force they get activated and acts as a closed switch. When the pressure or
contact is removed, they act as an open switch.
Capacitive touch sensor contains two parallel conductors with an insulator between
them. These conductors’ plates act as a capacitor with a capacitance value C0.
When these conductor plates come in contact with our fingers, our finger acts as a
conductive object. Due to this, there will be an uncertain increase in the
capacitance.
The resistive touch sensors calculate the pressure applied on the surface to sense
the touch. These sensors contain two conductive films coated with indium tin
oxide, which is a good conductor of electricity, separated by a very small distance.
Across the surface of the films, a constant voltage is applied. When pressure is
applied to the top film, it touches the bottom film. This generates a voltage drop
which is detected by a controller circuit and signal is generated thereby detecting
the touch.
3.5.3.2. Applications
The capacitive touch sensors can be easily manufactured with an attractive design
and in less investment. These sensors are highly used in mobile phones, iPods,
automotive, small home appliances, etc.… These are also used for measuring
pressure, distance, etc.… A drawback of these sensors is that they can give a
20
false alarm. The other type of touch sensors includes resistive. These sensors
could not detect anything because of small touching sense or contact.
21
FIG 3.6 DHT11 SENSOR
3.5.5. GSM
GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in
1970. It is widely used mobile communication system in the world. GSM is an
open and digital cellular technology used for transmitting mobile voice and data
services operates at the 850MHz, 900MHz, 1800MHz and 1900MHz frequency
bands.
GSM system was developed as a digital system using time division multiple access
(TDMA) technique for communication purpose. A GSM digitizes and reduces the
data, then sends it down through a channel with two different streams of client
data, each in its own particular time slot. The digital system has an ability to carry
64 kbps to 120 Mbps of data rates.
22
FIG 3.7 GSM MODEM
There are various cell sizes in a GSM system such as macro, micro, pico and
umbrella cells. Each cell varies as per the implementation domain. There are five
different cell sizes in a GSM network macro, micro, pico and umbrella cells. The
coverage area of each cell varies according to the implementation environment.
23
telecommunications standard currently accessible. Although the confidentiality of
a call and secrecy of the GSM subscriber is just ensured on the radio channel, this
is a major step in achieving end-to- end security.
A GSM modem is a device which can be either a mobile phone or a modem device
which can be used to make a computer or any other processor communicate over a
network. A GSM modem requires a SIM card to be operated and operates over a
network range subscribed by the network operator. It can be connected to a
computer through serial, USB or Bluetooth connection.
A GSM modem can 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.
GSM modem is usually preferable to a GSM mobile phone. The GSM modem has
wide range of applications in transaction terminals, supply chain management,
security applications, weather stations and GPRS mode remote data logging.
From the below circuit, a GSM modem duly interfaced to the MC through the level
shifter IC Max232. The SIM card mounted GSM modem upon receiving digit
command by SMS from any cell phone send that data to the MC through serial
communication. While the program is executed, the GSM modem receives
command ‘STOP’ to develop an output at the MC, the contact point of which are
used to disable the ignition switch. The command so sent by the user is based on an
intimation received by him through the GSM modem ‘ALERT’ a programmed
message only if the input is driven low. The complete operation is displayed over
16×2 LCD display.
24
FIG 3.8 GSM MODEM CIRCUIT
In these days, the GSM mobile terminal has become one of the items that are
constantly with us. Just like our wallet/purse, keys or watch, the GSM mobile
terminal provides us a communication channel that enables us to communicate
with the world. The requirement for a person to be reachable or to call anyone at
any time is very appealing.
In this project, as the name says project is based on GSM network technology for
transmission of SMS from sender to receiver. SMS sending and receiving is used
for ubiquitous access of appliances and allowing breach control at home. The
system proposes two sub-systems. Appliance control subsystem enables the user to
control home appliances remotely and the security alert subsystem gives the
automatic security monitoring.
25
The system is capable enough to instruct user via SMS from a specific cell number
to change the condition of the home appliance according to the user’s needs and
requirements. The second aspect is that of security alert which is achieved in a way
that on the detection of intrusion, the system allows automatic generation of SMS
thus alerting the user against security risk.\
The chip first came to the attention of western makers in August 2014 with
the ESP-01 module, made by a third-party manufacturer Ai-Thinker. This small
module allows microcontrollers to connect to a Wi-Fi network and make simple
TCP/IP connections using Hayes-style commands. However, at first there was
almost no English-language documentation on the chip and the commands it
accepted.[2] The very low price and the fact that there were very few external
components on the module, which suggested that it could eventually be very
inexpensive in volume, attracted many hackers to explore the module, chip, and the
software on it, as well as to translate the Chinese documentation
3.5.6.1. FEATURES
• Memory:
• 32 KiB instruction RAM
• 32 KiB instruction cache RAM
• 80 KiB user-data RAM
• 16 KiB ETS system-data RAM
26
• External QSPI flash: up to 16 MiB is supported (512 KiB to 4 MiB typically
included)
• IEEE 802.11 b/g/n Wi-Fi
• Integrated TR switch, balun, LNA, power amplifier and matching network
• WEP or WPA/WPA2 authentication, or open networks
• 16 GPIO pins
• SPI
• I²C (software implementation)[6]
• I²S interfaces with DMA (sharing pins with GPIO)
• UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
• 10-bit ADC (successive approximation ADC)
ESP8266 module is low-cost standalone wireless transceiver that can be used for
end-point IoT developments.
27
FIG 3.9 ESP8266 MODULE
A servomotor is a rotary actuator or linear actuator that allows for precise control
of angular or linear position, velocity and acceleration.[1] It consists of a suitable
motor coupled to a sensor for position feedback. It also requires a relatively
sophisticated controller, often a dedicated module designed specifically for use
with servomotors.
Servomotors are not a specific class of motor although the term servomotor is often
used to refer to a motor suitable for use in a control system.
3.5.7.1. MECHANISM
28
A servomotor is a closed-loop servomechanism that uses position feedback to
control its motion and final position. The input to its control is a signal (either
analogue or digital) representing the position commanded for the output shaft.
The motor is paired with some type of encoder to provide position and speed
feedback. In the simplest case, only the position is measured. The measured
position of the output is compared to the command position, the external input to
the controller. If the output position differs from that required, an error signal is
generated which then causes the motor to rotate in either direction, as needed to
bring the output shaft to the appropriate position. As the positions approach, the
error signal reduces to zero and the motor stops.
More sophisticated servomotors use optical rotary encoders to measure the speed
of the output shaft[2] and a variable-speed drive to control the motor speed.[3] Both
of these enhancements, usually in combination with a PID control algorithm, allow
the servomotor to be brought to its commanded position more quickly and more
precisely, with less overshooting
The servo motor is actually an assembly of four things: a normal DC motor, a gear
reduction unit, a position-sensing device and a control circuit. The DC motor is
connected with a gear mechanism which provides feedback to a position sensor
which is mostly a potentiometer. From the gear box, the output of the motor is
delivered via servo spline to the servo arm. For standard servo motors, the gear is
normally made up of plastic whereas for high power servos, the gear is made up of
29
metal.
A servo motor consists of three wires- a black wire connected to ground, a
white/yellow wire connected to control unit and a red wire connected to power
supply.
The pulse width determines the angular position of the servo motor. For example a
pulse width of 1 ms causes a angular position of 0 degrees, whereas a pulse width
of 2 ms causes a angular width of 180 degrees.
3.5.7.3. Advantages
• If a heavy load is placed on the motor, the driver will increase the current to the
motor coil as it attempts to rotate the motor. Basically, there is no out-of-step
condition.
• High-speed operation is possible.
Servo motors are classified into different types based on their application, such as
AC servo motor, DC servo motor, brushless DC servo motor, positional rotation,
continuous rotation and linear servo motor etc. Typical servo motors comprise of
three wires namely, power control and ground. The shape and size of these motors
depend on their applications. RC servo motor is the most common type of servo
30
motor used in hobby applications, robotics due to their simplicity, affordability and
reliability of control by microprocessors.
DC Servo Motor
The motor which is used as a DC servo motor generally have a separate DC source
in the field of winding & armature winding. The control can be archived either
by controlling the armature current or field current. Field control includes some
particular advantages over armature control. In the same way armature control
includes some advantages over field control. Based on the applications the control
should be applied to the DC servo motor. DC servo motor provides very accurate
and also fast respond to start or stop command signals due to the low armature
inductive reactance. DC servo motors are used in similar equipment and
computerized numerically controlled machines.
31
AC servo motor is an AC motor that includes encoder is used with controllers for
giving closed loop control and feedback. This motor can be placed to high
accuracy and also controlled precisely as compulsory for the applications.
Frequently these motors have higher designs of tolerance or better bearings and
some simple designs also use higher voltages in order to accomplish greater
torque. motor mainly involve in automation, robotics, CNC machinery, and other
applications a high level of precision and needful versatility.
Positional rotation servo motor is a most common type of servo motor. The shaft’s
o/p rotates in about 180o. It includes physical stops located in the gear mechanism
to stop turning outside these limits to guard the rotation sensor. These common
servos involve in radio-controlled water, radio-controlled cars, aircraft, robots, toys
and many other applications.
32
Continuous rotation servo motor is quite related to the common positional rotation
servo motor, but it can go in any direction indefinitely. The control signal, rather
than set the static position of the servo, is understood as the speed and direction of
rotation. The range of potential commands sources the servo to rotate clockwise or
anticlockwise as preferred, at changing speed, depending on the command signal.
This type of motor is used in a radar dish if you are riding one on a robot or you
can use one as a drive motor on a mobile robot.
Linear servo motor is also similar the positional rotation servo motor is discussed
above, but with an extra gear to alter the o/p from circular to back-and-forth. These
servo motors are not simple to find, but sometimes you can find them at hobby
stores where they are used as actuators in higher model airplanes.
33
FIG 3.13 LINEAR SERVO MOTOR
110VDC (AVERAGE
345V (PEAK TO PEAK) 173V PEAK 110VDC
VOLTAGE WITH AC
(PULSATING DC)
ROPPLE)
34
alternating current input signal to a pulsating direct current. However, as you
proceed in this chapter you will learn that pulsating dc is not desirable. For this
reason, a FILTER section is used to convert pulsating dc to a purer, more desirable
form of dc voltage.
The final section, the REGULATOR, does just what the name implies. It maintains
the output of the power supply at a constant level in spite of large changes in load
current or input line voltages. Now that you know what each section does, let's
trace an ac signal through the power supply. At this point you need to see how this
signal is altered within each section of the power supply. Later on, in the chapter
you will see how these changes take place. An input signal of 115 volts ac is
applied to the primary of the transformer.
The transformer is a step-up transformer with a turn’s ratio of 1:3. You can
calculate the output for this transformer by multiplying the input voltage by the
ratio of turns in the primary to the ratio of turns in the secondary; therefore, 115
volts ac ´ 3 = 345 volts ac (peak-to- peak) at the output. Because each diode in the
rectifier section conducts for 180 degrees of the 360-degree input, the output of the
rectifier will be one-half, or approximately 173 volts of pulsating dc. The filter
section, a network of resistors, capacitors, or inductors, controls the rise and fall
time of the varying signal; consequently, the signal remains at a more constant dc
level. You will see the filter process more clearly in the discussion of the actual
filter circuits. The output of the filter is a signal of 110 volts dc, with ac ripple
riding on the dc. The reason for the lower voltage (average voltage) will be
explained later in this chapter. The regulator maintains its output at a constant 110-
volt dc level, which is used by the electronic equipment (more commonly called
the load).
35
This circuit is a small +5V power supply, which is useful when experimenting with
digital electronics. Those transformers are easily available, but usually their
voltage regulation is very poor, which makes then not very usable for digital circuit
experimenter unless a better regulation can be achieved in some way.
This circuit can give +5V output at about 150 mA current, but it can be increased
to 1 A when good cooling is added to 7805 regulator chip. The circuit has over
overload and terminal protection.
36
3.6 SOFTWARE REQUIREMENTS
3.6.1 ARDUINO IDE:
37
Projects made using the Arduino are called sketches, and such sketches are
usually written in a cut-down version of C++ (a number of C++ features are not
included). Because programming a microcontroller is somewhat different from
programming a computer, there are a number of device-specific libraries (e.g.,
changing pin modes, output data on pins, reading analog values, and timers).
This sometimes confuses users who think Arduino is programmed in an
“Arduino language.” However, the Arduino is, in fact, programmed in C++. It
just uses unique libraries for the device.
While more advanced projects will take advantage of the built-in tools in the
IDE, most projects will rely on the six buttons found below the menu bar.
1. The check mark is used to verify your code. Click this once you have
written your code.
2. The arrow uploads your code to the Arduino to run.
3. The dotted paper will create a new file.
4. The upward arrow is used to open an existing Arduino project.
5. The downward arrow is used to save the current file.
6. The far-right button is a serial monitor, which is useful for sending data
from the Arduino to the PC for debugging purposes.
38
FIG 3.19 ARDUINO IDE 2
The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code
only requires two basic functions, for starting the sketch and the main program
loop, that are compiled and linked with a program stub main() into an
executable cyclic executive program with the GNU toolchain, also included with
the IDE distribution.
The Arduino IDE employs the program avrdude to convert the executable code
into a text file in hexadecimal encoding that is loaded into the Arduino board by a
loader program in the board's firmware.
3.6.2 EMBEDDED C
Embedded C is one of the most popular and most commonly used Programming
Languages in the development of Embedded Systems. So, in this article, we will
see some of the Basics of Embedded C Program and the Programming Structure of
39
Embedded C.
Embedded C is perhaps the most popular languages among Embedded
Programmers for programming Embedded Systems. There are many popular
programming languages like Assembly, BASIC, C++ etc. that are often used for
developing Embedded Systems but Embedded C remains popular due to its
efficiency, less development time and portability.
Before digging in to the basics of Embedded C Program, we will first take a look at
what an Embedded System is and the importance of Programming Language in
Embedded Systems.
All these devices have one thing in common: they are programmable i.e. we can
write a program (which is the software part of the Embedded System) to define
how the device actually works.
40
From the above statement, it is clear that the Software part of an Embedded System
is equally important to the Hardware part. There is no point in having advanced
Hardware Components with poorly written programs (Software).
There are many programming languages that are used for Embedded Systems like
Assembly (low-level Programming Language), C, C++, JAVA (high-level
programming languages), Visual Basic, JAVA Script (Application-level
Programming Languages), etc.
The following are few factors that are to be considered while selecting the
Programming Language for the development of Embedded Systems.
• Size: The memory that the program occupies is very important as Embedded
Processors like Microcontrollers have a very limited amount of ROM.
• Speed: The programs must be very fast i.e. they must run as fast as possible.
The hardware should not be slowed down due to a slow running software.
• Portability: The same program can be compiled for different processors.
• Ease of Implementation
• Ease of Maintenance
• Readability
41
Even though Assembly Language is closest to the actual machine code
instructions, the lack of portability and high number of resources spent on
developing the code, made the Assembly Language difficult to work with.
There are other high-level programming languages that offered the above-
mentioned features but none were close to C Programming Language.
There is actually not much difference between C and Embedded C apart from few
extensions and the operating environment. Both C and Embedded C are ISO
Standards that have almost same syntax, datatypes, functions, etc.
42
CHAPTER 4
RESULT & DISCUSSION
#include <Servo.h>
Servo myservo;
#include <SoftwareSerial.h>
SoftwareSerial myserial(2, 3);/* (Rx, Tx) */
#include <dht.h>
dht DHT;
#define DHT11_PIN 8
int irpin = 11;
int buzzer = 6;
int touchpin=10;
int pos = 0;
void setup()
{
myservo.attach(9);
43
Serial.begin(9600);
myserial.begin(9600);
pinMode(6, OUTPUT);
pinMode(irpin, INPUT);
pinMode(touchpin, INPUT);
}
void loop()
{
int ir=digitalRead(irpin);
Serial.print("ir data= ");
44
Serial.println(ir);
delay(1000);
int seat=digitalRead(touchpin);
Serial.print("seat occupency= ");
Serial.println(seat);
delay(1000);
if((ir==0 || seat==1))
{
digitalWrite(buzzer, HIGH);
delay(1000);
digitalWrite(buzzer, LOW);
delay(1000);
for (pos = 90; pos <= 180; pos += 1)
{
// in steps of 1 degree
myservo.write(pos);
delay(15);
45
}
myserial.println("AT+CMGF=1");
delay(1000);
myserial.println("AT+CMGS=\"+919774546083\"\r");
delay(1000);
myserial.println("children is in car");
Serial.println("children is in car");
delay(200);
myserial.println((char)26);
delay(1000);
}
}
46
4.2. WORKING OF THE SYSTEM
47
FIG 4.2 TOUCH SENSOR
48
FIG 4.4 GSM MODULE AND POWER SUPPLY
49
FIG 4.6 ARDUINO UNO
50
FIG 4.8 IR SENSOR BEFORE DETECTING MOTION
51
FIG 4.10 TOUCH SENSOR BEFORE SENSING TOUCH
52
FIG 4.12 SCREENSHOT OF IOT CLOUD DATA
CONCLUSION
To avoid hot car deaths, we have developed a new sensor-based system with
IOT and GSM alert. In this system we implemented infrared sensors, a touch
sensor and a temperature/humidity sensor. These acquisition devices are connected
to a microcontroller board that is able to combine all acquired data for detecting
the alarm scenario and consequently acting some warning procedures, and sends
alert messages to user with GSM module. We get the expected results in the
project and implemented a safety system for children forgotten in cars.
54
REFERENCES
[1] O. Kids and Cars, “Heatstroke deaths of children in vehicles,” https://
www.kidsandcars.org/how-kids-get-hurt/heat-stroke/, accessed April 1, 2019.
[2] E. Gold, “Sensorsafe securemax smart infant car seat,”
https://www.evenflo.com/gold/, accessed April 1, 2019.
[3] B. Security, “Dual view car camera,” https://www.brickhousesecurity. com/car-
cameras/, accessed April 1, 2019.
[4] A. R. Diewald, J. Landwehr, D. Tatarinov, P. Di Mario Cola, C. Watgen, C.
Mica, M. Lu-Dac, P. Larsen, O. Gomez, and T. Goiva, “Rfbased child occupation
detection in the vehicle interior,” in 2016 17th International Radar Symposium
(IRS), May 2016.
[5] D. Shi, J. Ding, S. M. Errapotu, H. Yue, W. Xu, X. Zhou, and M. Pan, “Deep
Q-network based route scheduling for transportation network company vehicles,”
in IEEE Global Communications Conference (GLOBECOM), Abu Dhabi,
December 2018.
[6] Y. Sun, M. Peng, Y. Zhou, Y. Huang, and S. Mao, “Application of machine
learning in wireless networks: Key techniques and open issues,” IEEE
Communications Surveys Tutorials, vol. 21, no. 4, pp. 3072–3108, Fourthquarter
2019.
[7] W. Xu, X. Li, C. Lee, M. Pan, and Z. Feng, “Joint sensing duration adaptation,
ser matching, and power allocation for cognitive ofdm-noma systems,” IEEE
Transactions on Wireless Communications, vol. 17, no. 2, pp. 1269–1282, Feb
2018.
[8] C. Wang, J. Liu, Y. Chen, H. Liu, and Y. Wang, “Towards in-baggage
suspicious object detection using commodity wifi,” in 2018 IEEE Conference on
Communications and Network Security (CNS), May 2018.
[9] X. Wang, L. Gao, S. Mao, and S. Pandey, “Csi-based fingerprinting for indoor
55
localization: A deep learning approach,” IEEE Transactions on Vehicular
echnology, vol. 66, no. 1, pp. 763–776, Jan 2017.
[10] D. Zhang, Y. Hu, and Y. Chen, “Breath status tracking using commodity
wifi,” in 2018 IEEE Global Communications Conference (GLOBECOM), Abu
Dhabi, December 2018.
[11] D. Zhang, Y. Hu, Y. Chen, and B. Zeng, “Breathtrack: Tracking indoor
human breath status via commodity wifi,” IEEE Internet of Things Journal, vol. 6,
no. 2, pp. 3899–3911, April 2019.
[12] X. Ma, Y. Zhao, L. Zhang, Q. Gao, M. Pan, and J. Wang, “Practical device-
free gesture recognition using wifi signals based on metalearning,” IEEE
Transactions on Industrial Informatics, vol. 16, no. 1, pp. 228–237, Jan 2020.
[13] C. Wu, Z. Yang, Z. Zhou, K. Qian, Y. Liu, and M. Liu, “Phaseu: Realtime los
identification with wifi,” in 2015 IEEE Conference on Computer Communications
(INFOCOM), April 2015.
[14] X. Wang, L. Gao, and S. Mao, “Csi phase fingerprinting for indoor
localization with a deep learning approach,” IEEE Internet of Things Journal, vol.
3, no. 6, pp. 1113–1123, Dec 2016.
56