You are on page 1of 39

CHAPTER 1: INTRODUCTION

The increased use of mobile technologies and smart devices in the area of health has
caused a great impact on the world. Health experts are increasingly taking advantage of
the benefits these technologies bring, thus generating a significant improvement in health
care in clinical settings. Likewise, countless ordinary users are being served by the
advantages of the M-Health (Mobile Health) applications and E-Health (health care
supported by ICT) to improve, help and assist their health.
According to the constitutions of the World Health Organization (WHO), the highest
attainable standard of health is a fundamental right for an individual. As we are truly
inspired by this, we attempt to propose an innovative system that puts forward a smart
patient health tracking system that uses sensors to track patient vital parameters and uses
the internet to update the doctors and caretakers so that they can help in case of any issues
at the earliest preventing death rates.
Patient Health monitoring using IoT is a technology to enable monitoring of patients
outside of conventional clinical settings (e.g. in the home), which may increase access to
care and decrease healthcare delivery costs. This can significantly improve an individual's
quality of life. It allows patients to maintain independence, prevent complications, and
minimize personal costs. This system facilitates these goals by delivering care right to the
home. In addition, patients and their family members feel comfort knowing that they are
being monitored and will be supported if a problem arises.
1.1 MOTIVATION
Health is always a major concern in every growth the human race is advancing in
terms of technology. Healthcare is given extreme importance now a- days by each country
due to the spread of new viral diseases. The Internet of Things (IoT) is the new revolution
of the internet which is a growing research area, especially in health care.
This project intends to propose an IoT monitoring of health systems that helps in
alerting the caretaker and getting a proper diagnosis of the patient’s state of health, even if
the doctor is at a far distance. Remote Patient Monitoring arrangement empowers
observation of patients outside of customary clinical settings (e.g. at home), which
expands access to human service offices to bring down expenses.
1.2 PROBLEM STATEMENT
Monitoring and Recording of various medical parameters of patients outside hospitals
have become a widespread phenomenon. Humans are facing the problem of unexpected
death due to various illnesses which is because of a lack of medical care for patients at the
right time. In the absence of the doctors, the patient cannot consult the doctors due to
which an emergency situation may also be created.
The personal health monitoring of each individual is considered very important
because of the rise in health problems in today's world. The increasingly stressful lifestyle
is taking a maximum toll on public health. With the ever-increasing queues at hospitals
and an increasing number of patients, the doctor fees have sky-rocketed which is affecting
especially those patients who cannot afford the fee or who are not suffering from major
ailments but get to know so only after paying a hefty fee to the doctor.
1.3 OBJECTIVES
1. To develop an automated health monitoring system that will help to monitor the host
remotely.
2. To enable an advanced solution for remote tracking of patient’s temperature and pulse
rate, also including the detection of the host's fall position.
3. To send alarming notifications via email or mobile application to the concerned
authority or person if any abnormality is detected.
1.4 METHODOLOGY
The proposed system will be based on Arduino Uno microcontroller because of
its numerous advantages of Atmega328P and will have an open-source platform
with the benefit of physical computing. The system consists of different sensors like
the Pulse Rate sensor and LM35 Temperature sensor along with an Accelerometer
module.
The main applications that the system will be able to perform are discussed as
follows: The Pulse Rate sensor and the Temperature sensor will detect the patient’s
heartbeat per minute (BPM) and body temperature respectively and the values are
displayed on the LCD screen. The accelerometer module detects if the patient has
fallen off the bed and alerts the caretaker through IoT application Thingspeak.
1.6 Chapter 2:ORGANIZATION OF REPORT:

This chapter specifies the detailed view of the proposed system including its block
diagram, hardware and software components description.
Chapter 3:
This chapter includes the implementation of the proposed system with a circuit
description, flow chart and detailed working of the designed algorithm.
Chapter 4:
This chapter includes result analysis and further discussions on advantages &
limitations of proposed solution.
Chapter 5:
This chapter includes the conclusion and scope of the project in near future.
CHAPTER 2: HARDWARE IMPLEMENTATION

2.1 ARDUINO UNO

The Arduino UNO is a frequently-used microcontroller in the family of Arduino. This is the
latest third version of an Arduino board and was released in the year 2011. The main features
of this board include a detachable, ATmega328 microcontroller, and available in DIP
(dual-in-line package). The programming board can easily be loaded using an Arduino
computer program (Arduino IDE). This board has huge support from the Arduino
community, which will make a very simple way to start working in embedded electronics,
and many more applications.

Fig: Arduino UNO board

2.1.1 Why Arduino?

The Arduino board is being used for making different engineering projects and different
applications. The Arduino software is very simple to use for beginners, yet flexible and
adequate for advanced users. It runs on Windows, Linux, and Mac. Arduino makes simpler
the working process of microcontrollers and it gives some advantages over other systems for
beginners. The different types of Arduino boards that are used for beginners are Arduino
Uno, Arduino Pro, Arduino Mini, Arduino Micro, Arduino Nano, and many more.
2.1.2 What is Arduino UNO?

The Arduino UNO is a standard board of Arduino. Here UNO means 'one' in Italian. It was
named UNO to label the first release of Arduino Software. It was also the first USB board
released by Arduino. It is considered a powerful board used in various projects. Arduino. cc
developed the Arduino UNO board.

Arduino UNO is based on an ATmega328P microcontroller. It is easy to use compared to


other boards, such as the Arduino Mega board, etc. The board consists of digital and analog
Input/Output pins (I/O), shields, and other circuits.

The Arduino UNO includes 6 analog pin inputs, 14 digital pins, a USB connector, a power
jack, and an ICSP (In-Circuit Serial Programming) header. It is programmed based on IDE,
which stands for Integrated Development Environment. It can run on both online and offline
platforms. The IDE is common to all available boards of Arduino.

ATmega328P: The ATmega328 is a single-chip microcontroller by Atmel in the mega AVR


family (later Microchip Technology acquired Atmel in 2016). It has a modified Harvard
architecture 8-bit RISC processor core. The Atmel 8-bit AVR RISC-based microcontroller
combines 32 KB ISP flash memory with read-while-write capabilities, 1 KB EEPROM, 2 KB
SRAM, 23 general purposes I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial programmable
USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit A/D
converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer
with internal oscillator, and five software selectable power saving modes. The device
operates between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS per
MHz.

2.1.3 Pin Description of Arduino UNO

The Arduino Uno R3 pin diagram is shown below. It comprises 14-digit I/O pins. From these
pins, 6-pins can be utilized like PWM outputs. This board includes 14 digital input/output
pins, Analog inputs-6, a USB connection, quartz crystal-16 MHz, a power jack, a USB
connection, resonator-16Mhz, a power jack, an ICSP header an RST button.
Fig: Pin Diagram

i. Power Supply: The power of the Arduino can be done with the help of an exterior power
supply otherwise USB connection. The exterior power supply (6 to 20 volts) mainly includes
a battery or an AC to DC-adapter. The connection of an adapter can be done by plugging a
center-positive plug (2.1mm) into the power jack on the board. The battery terminals can be
placed in the pins of Vin as well as GND. The power pins of an Arduino board include the
following.
● Vin: The input voltage or Vin to the Arduino while it is using an exterior power
supply opposite to volts from the connection of USB or else RPS (regulated power
supply). By using this pin, one can supply the voltage.
● 5Volts: The RPS can be used to give the power supply to the microcontroller as well
as the components that are on the Arduino board. This can approach from the input
voltage through a regulator.
● 3V3: A 3.3 supply voltage can be generated with the onboard regulator, and the
highest draw current will be 50 mA.
● GND: Ground pins

ii. Memory: The memory of an ATmega328 microcontroller includes 32 KB and 0.5 KB


memory is utilized for the Boot loader), and also it includes SRAM-2 KB as well as
EEPROM- 1KB.
iii. Input and Output: We know that an Arduino UNO R3 includes 14 digital pins which can
be used as an input otherwise output by using the functions like pinMode (), digitalRead(),
and digitalWrite(). These pins can operate with 5V, and every digital pin can give or receive
20mA, & includes a 20k-50k ohm pull-up resistor. The maximum current on any pin is 40mA
which cannot surpass for avoiding microcontroller damage. Additionally, some of the pins of
an Arduino include specific functions.
● Serial Pins: The serial pins of an Arduino board are TX (1) and RX (0) pins and these
pins can be used to transfer the TTL serial data. The connection of these pins can be
done with the equivalent pins of the ATmega8 U2 USB to the TTL chip.

iv. External Interrupt Pins: The external interrupt pins of the board are 2 & 3, and these
pins can be arranged to activate an interrupt on a rising otherwise falling edge, a low-value
otherwise a modify in value.
● PWM Pins: The PWM pins of an Arduino are 3, 5, 6, 9, 10, & 11, and give an output
of an 8-bit PWM with the function analog Write ().
● SPI (Serial Peripheral Interface) Pins: The SPI pins are 10, 11, 12, and 13 namely SS,
MOSI, MISO, and SCK, and these will maintain the SPI communication with the help
of the SPI library.
● LED Pin: An arguing board is inbuilt with a LED using digital pin-13. Whenever the
digital pin is high, the LED will glow otherwise it will not glow.
● TWI (2-Wire Interface) Pins: The TWI pins are SDA or A4, & SCL or A5, which can
support the communication of TWI with the help of the Wire library.
● AREF (Analog Reference) Pin: An analog reference pin is the reference voltage to the
inputs of an analog i/ps using a function like analogReference().
● Reset (RST) Pin: This pin brings a low line for resetting the microcontroller, and it is
very useful for using an RST button toward shields which can block the one over the
Arduino R3 board.

v. Communication: The communication protocols of an Arduino Uno include SPI, I2C, and
UART serial communication.
● UART: An Arduino Uno uses two functions the transmitter digital pin1 and the
receiver digital pin0. These pins are mainly used in UART TTL serial communication
● I2C: An Arduino UNO board employs an SDA pin otherwise A4 pin & A5 pin
otherwise SCL pin is used for I2C communication with the wire library. In this, both
the SCL and SDA are CLK signals and data signals.
● SPI Pins: SPI communication includes MOSI, MISO, and SCK.
● MOSI (Pin11): This is the master out slave in the pin, used to transmit the data to the
devices
● MISO (Pin12): This pin is a serial CLK, and the CLK pulse will synchronize the
transmission which is produced by the master.
● SCK (Pin13): The CLK pulse synchronizes data transmission that is generated by the
master. Equivalent pins with the SPI library are employed for the communication of
SPI. ICSP (in-circuit serial programming) headers can be utilized for programming
the ATmega microcontroller directly with the boot loader.

2.1.4 Specifications of Arduino UNO

The Arduino Uno R3 board includes the following specifications.


● It is an ATmega328P-based microcontroller
● The Operating Voltage of the Arduino is 5V
● The recommended input voltage ranges from 7V to 12V
● The i/p voltage (limit) is 6V to 20V
● Digital input and output pins - 14
● Digital input & output pins (PWM)-6
● Analog i/p pins are 6
● DC Current for each I/O Pin is 20 mA
● DC Current used for 3.3V Pin is 50 mA
● Flash Memory - 32 KB and 0.5 KB memory is used by the bootloader.
● SRAM is 2 KB
● EEPROM is 1 KB

2.2 PULSE RATE SENSOR


A heartbeat sensor is designed to give a digital output of a heartbeat when a finger is placed
on it. When the heartbeat detector is working, the beat LED flashes in unison with each
heartbeat. This digital output can be connected to a microcontroller directly to measure the
Beats Per Minute (BPM) rate. It works on the principle of light modulation by blood.
2.2.1 Principle of Pulse Rate Sensor

The heartbeat sensor is based on the principle of photoplethysmography. It measures the


change in the volume of blood through any organ of the body which causes a change in the
light intensity through that organ (a vascular region). In the case of applications where the
pulse rate is to be monitored, the timing of the pulses is more important. The flow of blood
volume is decided by the rate of heart pulses and since light is absorbed by the blood, the
signal pulses are equivalent to the heartbeat pulses.

Here the APDS-9008 miniature surface-mount ambient light photo sensor plays an important
role and is responsible to detect the concentration of light which bounces back through the
fingertip. D1 LED gives the light source for this operation. The signal from the ambient light
sensor is amplified through op-Amp and the signal is ready to read by the microcontroller.

2.2.2 Working of Pulse Rate Sensor

The working of the Pulse/Heartbeat sensor is very simple. The sensor has two sides. On one
side, the LED is placed along with an ambient light sensor, and on the other side lies the
circuitry. This circuitry is responsible for the amplification and noise cancellation work. The
LED on the front side of the sensor is placed over a vein in the human body. This can either
be a fingertip or an ear tip, but it should be placed directly on top of a vein. Now the LED
emits light that will fall on the vein directly. The veins will have blood flow inside them only
when the heart is pumping, so if the flow of blood is monitored, the heartbeats can be
monitored as well. If the flow of blood is detected then the ambient light sensor will pick up
more light since it will be reflected by the blood, this minor change in received light is
analyzed over time to determine our heartbeats.

2.2.3 Pin Configurations of Pulse Rate Sensor


2.2.4 Interfacing Of Pulse Rate Sensor with Arduino:

● GND pin of pulses sensor to GND of Arduino


● VCC of pulse sensor to 5V of Arduino
● A0 of pulse sensor to A0 of Arduino

2.3 LM35 TEMPERATURE SENSOR

The LM35 is an integrated circuit sensor that can measure temperature with an electrical
output proportional to the temperature (in °C). It can measure temperature with better
accuracy than using a thermistor. The sensor circuitry is sealed and not subject to oxidation.
The LM35 generates a higher output voltage than thermocouples and may not require that the
output voltage be amplified. The LM35 has an output voltage that is proportional to the
Celsius temperature. The scale factor is .01V/°C.

The LM35 does not require any external calibration or trimming and maintains an accuracy
of +/-0.4°C at room temperature and +/-0.8°C over a range of 0°C to +100°C. Another
important characteristic of the LM35 is that it draws only 60 microamps from its supply and

possesses a low self-heating capability.


2.3.1 Working Principle of LM35
There are two transistors in the center of the drawing. One has ten times the emitter area of
the other. This means it has one-tenth of the current density since the same current is going
through both transistors. This causes a voltage across the resistor R1 that is proportional to
the absolute temperature and is almost linear across the range. The "almost" part is taken care
of by a special circuit that straightens out the slightly curved graph of voltage versus
temperature. The amplifier at the top ensures that the voltage at the base of the left transistor
(Q1) is proportional to absolute temperature (PTAT) by comparing the output of the two
transistors.
The amplifier at the right converts absolute temperature (measured in Kelvin) into either
Fahrenheit or Celsius, depending on the part (LM34 or LM35).The little circle with the "i" in
it is a constant current source circuit. The two resistors are calibrated in the factory to
produce a highly accurate temperature sensor. The integrated circuit has many transistors in it
-- two in the middle, some in each amplifier, some in the constant current source, and some in
the curvature compensation circuit. All of that is fit into the tiny package with three leads.

fig 2.7 LM35 SCHEMATIC

2.3.2 Pin Configuration:

Pin Pin Description


Number Name

1 Vcc Input voltage is +5V for typical applications

2 Analog There will be increase in 10mV for raise of


every 1°C. Can range from -1V(-55°C) to
Out 6V(150°C)

3 Ground Connected to ground of circuit

TABLE 2.2 PIN CONFIGURATIONS


2.3.3 Interfacing Of Lm35 with Arduino:

❖ The ground of lm35 is connected to Gnd pin of Arduino


❖ The Vcc of LM35 is connected to the 5V of Arduino
❖ The Vout is connected to A1 pin of Arduino

fig 2.8 INTERFACING LM35 WITH ARDUINO

2.3.4 Lm35 Regulator Features:

• Minimum and Maximum Input Voltage is 35V and -2V respectively. Typically 5V.

• Can measure temperature ranging from -55°C to 150°C

• Output voltage is directly proportional (Linear) to temperature (i.e.) there


will be a rise of 10mV (0.01V) for every 1°C rise in temperature.

• ±0.5°C Accuracy

• Drain current is less than 60uA

• Low cost temperature sensor


• Small and hence suitable for remote applications

• Available in TO-92, TO-220, TO-CAN and SOIC package

2.3.5 Lm35 Temperature Sensor Applications:

• Measuring temperature of a particularenvironment

• Providing thermal shut down for a circuit/component

• Monitoring BatteryTemperature

• Measuring Temperatures for HVAC applications.


2.4 ACCELEROMETER
ADXL335 Accelerometer Module
An accelerometer is an electromechanical device that will measure
acceleration force. It shows acceleration, only due to cause of gravity i.e. g force. It
measures accelerationing unit.

fig .2.9 ADLX335 ACCELEROMETER


On the earth, 1g means acceleration of 9.8 m/s2 is present. On moon, it is 1/6th of earth
and on mars it is 1/3rd of earth. Accelerometer can be used for tilt-sensing applications as
well as dynamic acceleration resulting from motion, shock, or vibration.

● ADXL335 module

- The ADXL335 gives complete 3-axis acceleration measurement.

- This module measures acceleration within range ±3 g in the x, y and z axis.

- The output signals of this module are analog voltages that are proportional to
the acceleration.
- It contains a polysilicon surface-micro machined sensor and signal
conditioning circuitry.
2.4.1 Working Mechanism:

- As we can see from the figure, basic structure of accelerometer consists


fixed plates and moving plates (mass).
- Acceleration deflects the moving mass and unbalances the differential
capacitor which results in a sensor output voltage amplitude which is
proportional to the acceleration
- Phase-sensitive demodulation techniques are then used to determine the
magnitude and direction of the acceleration.

fig .2.10 WORKING MECHANISM OF ACCELEROMETER

ADXL335 accelerometer provides analog voltage at the output X, Y, Z


pins; which is proportional to the acceleration in respective directions i.e. X, Y, Z

2.4.2 ADXL335 ACCELEROMETER PINOUT

Before diving into hookup and example code, let’s first take a look at its Pin out.

fig.2.11 PIN OUT OF ACCELEROMETER

● VCC pin provides power for the accelerometer which can be connected to
5V on the Arduino.
● X-OUT pin outputs analog voltage proportional to acceleration exerted on Xaxis.
● Y-Out pin outputs analog voltage proportional to acceleration exerted on Yaxis.
● Z-Out pin outputs analog voltage proportional to acceleration exerted on Z-axis.
● GND pin is connected to GND on Arduino
● ST (Self-Test) pin controls the self-test feature. This feature is discussed in
detail at the end
2.4.3 Angles using ADXL335

We can calculate angle of inclination or tilt by using X, Y, Z‟s value. Also,


we can calculate Roll, Pitch and Yaw angles with respect to X, Y and Z axis. So
first we need to convert 10-bit ADC values into g unit.

As per ADXL335 datasheet maximum voltage level at 0g is 1.65V and


sensitivity scale factor of 330mV/g. formula gives us acceleration values in g unit
for X, Y and Z axis as,

Axout = (((X axis ADC value * Vref) / 1024) – 1.65) / 0.330

Ayout = (((Y axis ADC value * Vref) / 1024) – 1.65) / 0.330

Azout = (((Z axis ADC value * Vref) / 1024) – 1.65) /


0.330
Note that, practically we get slightly different voltage at 0g. So, put the
practical value of voltage at 0g.
● Angle of Inclination

fig.2.12 ANGLES OF INCLINATION

Angle of inclination means by how much angle the device is tilted from its plane of
surface.

- Angle of inclination is shown in below figure.

- To calculate angle of inclination of X, Y, Z axis from its reference, we need to


use below formulas.
Angle of inclination can be calculated as,

We get these angles in radians. So, multiply these values by (180/π) to get angle in
degrees within range of -90° to +90° each axis.
● Angle of Rotation
● Now let‟s find a complete angle of rotation (0° to 360°) around X, Y, Z axis, which
we can, Also call as

fig 2.13 ANGLE OF ROTATION

• Roll - Angle of rotation along the X axis

• Pitch - Angle of rotation along the Y axis

• Yaw - Angle of rotation along the Z axis

These angles are in degrees and can give readings of a complete rotation.
Now let’s calculate these angles. As we get Θ, Ψ and Φ in the range of -90°
to +90°. Here we need to make these values in the range of -180° to +180° so that
we can calculate complete 360° angle of rotation. Let calculate these with arc
tangent function which can be expressed as,

This function will produce the result in the range of -π to π. These values in radians we
can convert into degree by multiplying it with (180/π ≈ 57.29577951) factor. So here we
get values in -180° to +180°, and we can convert it to complete 0° to 360° by just
adding 180° to range.

Hence, we get roll, pitch and yaw angles as,


Roll = (atan2 (Ayout, Azout)) *57.29577951+180

Pitch = (atan2(Azout, Axout)) *57.29577951+180

Yaw = (atan2(Axout, Ayout)) *57.29577951+180

Note that, rotation along X (roll) and Y (pitch) axis will produce change in
acceleration but rotation along with Z axis (yaw) will not produce any change in
acceleration as it is perpendicular to the plane of surface. Hence using only
accelerometer, yaw cannot be calculated.

We can also see this effect on X and Y axis when these axes are made
perpendicular with plane of surface.
2.4.4 Hardware Overview of ADXL335 Accelerometer:

At the heart of the module is a small, low power triple axis MEMS accelerometer from
Analog devices with extremely low noise – ADXL335. The sensor has a full sensing range of
±3 g. It can measure the static acceleration due to gravity in tilt-sensing applications, as well
as dynamic acceleration resulting from motion, shock, or vibration.

fig.2.14 ADXL335 ACCELEROMETER

The sensor works on power between 1.8V to 3.6VDC (3.3V optimal), and typically consumes just
350µA of current. However, an on-board 3.3V regulator makes it a perfect choice for interfacing with
5V microcontrollers such as the Arduino.

This breadboard friendly board breaks out every pin of the ADXL335 to a 6-pin, 0.1″ pitch
header. This includes 3 analog outputs for X, Y and Z axis measurements, 2 supply pins and a
self-test pin which allows you to check the functioning of the sensor in the final application.

The analog outputs are Ratiometric, meaning 0g measurement output is nominally equal
to half of the 3.3V supply voltage (1.65V), -3g is at 0v and 3g is at 3.3V with full
scaling in between.
2.4.5 Interfacing Accelerometer With Arduino:

fig.2.14 INTERFACING OF ACCELEROMATER WITH ARDUINO

The three output pins of accelerometer give analog output and should therefore be connected
to the analog input pins of your Arduino, A0, A1 and A2. Connect the VCC pin of the
accelerometer to the 5V pin of the Arduino. Connect GND of accelerometer to the GND of
Arduino. Set the reference voltage of ADC as 3.3V by connecting the AREF pin to 3.3V so
as to match the output of ADXL335.
2.4.5 Specifications:

TABLE 2.3 SPECIFICATIONS


2.5 LIQUID CRYSTAL DISPLAY (LCD)
A liquid crystal display or LCD draws its definition from its name itself. It is
combination of two states of matter, the solid and the liquid. LCD uses a liquid crystal
to produce a visible image.

fig.2.15 LCD

The 16×2 LCD display is a very basic module commonly used in DIYs and circuits. The
16×2 translates o a display 16 characters per line in 2 such lines. In this LCD each character
is displayed in a 5×7 pixel matrix.

2.5.1 Construction:
Liquid crystal should able be to control both of the operation to transmit or can also able to change the
polarized light

fig.2.16 CONSTRUCTION OF LCD


As mentioned above that we need to take two polarized glass pieces filter in the making of the liquid
crystal. The glass which does not have a polarized film on the surface it must be rubbed with a special
polymer which will create microscopic grooves on the surface.
The grooves must be in the same direction of the polarized film. Now we have to add a
coating of pneumatic liquid phase crystal on one of the polarized filter of the polarized glass. The
microscopic channel cause the first layer molecule to align with filter orientation. When the right
angle appears at the first layer piece, we should add a second piece of glass with the polarized film.
The first filter will be naturally polarized as the light strikes it at the starting stage.

Thus the light travels through each layer and guided on the next with the help of molecule.
The molecule tends to change its plane of vibration of the light in order to match their angle. When
the light reaches to the far end of the liquid crystal substance, it vibrates at the same angle as that of
the final layer of the molecule vibrates. The light is allowed to enter into the device only if the second
layer of the polarized glass matches with the final layer of the molecule.

2.5.2 Working:

The principle behind the LCD‟s is that when an electrical current is applied to the liquid
crystal molecule, the molecule tends to untwist. This causes the angle of light which is passing
through the molecule of the polarized glass and also cause a change in the angle of the top
polarizing filter.

As a result a little light is allowed to pass the polarized glass through a particular area
of the LCD. Thus that particular area will become dark compared to other. The LCD works on
the principle of blocking light. While constructing the LCD‟s, a reflected mirror is arranged at
the back. An electrode plane is made of indium-tin oxide which is kept on top and a polarized
glass with a polarizing film is also added on the bottom of the device. The complete region of
the LCD has to be enclosed by a common electrode and above it should be the liquid crystal
matter.

Next comes to the second piece of glass with an electrode in the form of the rectangle
on the bottom and, on top, another polarizing film. It must be considered that both the pieces are
kept at right angles. When there is no current, the light passes through the front of the LCD it
will be reflected by the mirror and bounced back. As the electrode is connected to a battery the
current from it will cause the liquid crystals between the common-plane electrode and the
electrode shaped like a rectangle to untwist. Thus the light is blocked from passing through.
That particular rectangular area appears blank.
2.5.3 Pin Configuration:

Pin No: Pin Name: Description

1. Vss (Ground) Ground pin connected to system


ground

2. Vdd (+5 Volt) Powers the LCD with +5V (4.7V –


5.3V)

3. VE (Contrast V) Decides the contrast level of display.


Grounded to get maximum contrast.

4. Register Select Connected to Microcontroller to shit


between command/data register

5. Read/Write Used to read or write data. Normally


grounded to write data to LCD

6. Enable Connected to Microcontroller Pin and


toggled between 1 and 0 for data
acknowledgement

7. Data Pin 0-7 Data pins 0 to 7 forms a 8-bit data


line. They can be connected to
Microcontroller to send 8-bit data.
These LCD‟s can also operate on 4- bit
mode in such case Data pin 4,5,6 and 7
will be left free.

8. LED positive Backlight LED pin positive terminal

9. LED Negative Backlight LED pin negative terminal

.TABLE 2.4 PIN CONFIGURATION OF LCD

–- RS (Register select): A 16X2 LCD has two registers, namely, command and data.
The register select is used to switch from one register to other. RS=0 for command
register, whereas RS=1 for data register

– Command Register: The command register stores the command instructions given to
the LCD. A command is an instruction given to LCD to do a predefined task like
initializing setting the cursor position, controlling displayetc.

– Data Register: The data register stores the data to be displayed on the LCD. The data
is the ASCII value of the character to be displayed .When we send data to LCD it goes
to the data register and is processed there. When RS=1, data register selected.
2.5.4 Important Command Codes For LCD:

TABLE 2.5 COMMAND CODES FOR LCD


2.5.5 Interfacing Of Lcd With Arduino:

fig.2.17 INTERFACING LCD WITH ARDUINO

2.5.6 Features Of 16×2 LCD Module:

● Operating Voltage is 4.7V to 5.3V


● Current consumption is 1mA without backlight
● Alphanumeric LCD display module, meaning can display alphabets and
numbers.
● Consists of two rows and each row can print 16 characters.
● Each character is built by a 5×8 pixel box
● Can work on both 8-bit and 4-bit mode
● It can also display any custom generated characters
● Available in Green and Blue Backlight
2.6 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
frequencybands.

fig.2.18 GSM
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.
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.

● · Time Division Multiple Access

TDMA technique relies on assigning different time slots to each user on the
same frequency. It can easily adapt to data transmission and voice communication
and can carry 64kbps to 120Mbps of data rate.
2.6.1 GSM Architecture

AGSM network consists of the following components:

● A Mobile Station: It is the mobile phone which consists of the transceiver, the
display and the processor and is controlled by a SIM card operating over
thenetwork.
● Base Station Subsystem: It acts as an interface between the mobile station
and the network subsystem. It consists of the Base Transceiver Station which
contains the radio transceivers.It also consists of the Base Station Controller
which controls the Base Transceiver station and acts as an interface between the
mobile station and mobile switching centre.
● Network Subsystem: It provides the basic network connection to the mobile
stations. The basic part of the Network Subsystem is the Mobile Service
Switching Centre which provides access to different networks like ISDN, PSTN
etc. It also consists of the Home Location Register and the Visitor Location
Register. It also contains the Equipment Identity Register which maintains an
account of all the mobile equipment’s.

2.6.2 Working of GSM Module:

From the below circuit, a GSM modem duly interfaced to the MC through the
level Shifter.

fig.2.19 GSM SCHEMATIC


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.
2.6.3 SIM900A Overview:

The SIM900A is a readily available GSM/GPRS module, used in many


mobile phones and PDA. The module can also be used for developing IOT (Internet
of Things) and Embedded Applications. SIM900A is a dual-band GSM/GPRS
engine that works on frequencies EGSM 900MHz and DCS 1800MHz. SIM900A
features GPRS multi-slot class 10/ class 8 (optional) and supports the GPRS coding
schemes CS-1, CS-2, CS-3 and CS-4.

fig.2.20 SIM900A HARDWARE OVERVIEW.

This is an ultra-compact and reliable wireless module. The SIM900A is a


complete Dual- band GSM/GPRS solution in a SMT module which can be
embedded in the customer applications allowing you to benefit from small
dimensions and cost-effective solutions. Featuring an industry-standard interface,
the SIM900A delivers GSM/GPRS 900/1800MHz performance for voice, SMS,
Data, and Fax in a small form factor and with low power consumption. With a tiny
configuration of 24mm x 24mm x 3 mm, SIM900A can fit almost all the space
requirements in your applications, especially for slim and compact demand of
design.

Once you connect the SIM900A modem using the USB to RS232
connector, you need to find the correct COM port from the Device Manager of the
USB to Serial Adapter. Then you can open Putty or any other terminal software and
open a connection to that COM port at 9600 baud rate, which is the default baud
rate of this modem. Once a serial connection is open through the computer or your
micro-controller you can start sending the AT commands. When you send AT
commands for example “AT\r” you should receive back a reply from the SIM800A
modem saying “OK”.

2.6.4 Pin Out Diagram:

fig.2.21 SIM900A PIN OUT


➢ Pin Description:

Interface Pin Description

Rst 1 Reset the SIM900 module

P 2 Power switch pin of


SIM900 module

Tx 3 UART data output

Rx 4 UART data in

DT 5 Debug UART data output

DR 6 Debug UART data input

- 7 GND

+ 8 VCC

2.6.5 Interfacing OF Gsm with Arduino:

fig.2.22 INTRFACING GSM WITH ARDUINO

➢ Connect TX pin of GSM Module to any digital pin of Arduino Uno.


➢ Connect RX pin of GSM Module to the digital pin of Arduino Uno.
➢ Connect GND pin of GSM Module to GND pin of Arduino Uno.
2.6.6 Features:

● Single supply voltage: 3.4V – 4.5V


● Frequency bands:SIM900A
● Dual-band: EGSM900, DCS1800.
● GPRS connectivity: GPRS multi-slot class 10 (default) , GPRS multi-slot
class 8 (option)
● Transmitting power: Class 4 (2W) at EGSM 900, Class 1 (1W) at DCS 1800
● Operating Temperature: -30ºC to +80ºC
● Storage Temperature: -5ºC to +90ºC
● DATA GPRS: download transfer max is 85.6KBps, Upload transfer max
42.8KBps
● Supports CSD, USSD, SMS ,FAX
● Supports single SIM card
● Firmware upgrade by debug port
● Communication by using AT commands
2.6.7 Application:

● Remote Data Monitor and Control.


● Water, gas and oil flow metering.
● AMR (automatic meter reading).
● Power station monitoring and control.
● Remote POS (point of sale)terminals.
● Traffic signals monitor and control.
● Fleet management.
● Power distribution network supervision.
● Central heating system supervision.
● Weather station data transmission.
● Hydro-logic data acquisition.
● Vending machine.
● Traffic info guidance.
● Parking meter and Taxi Monitor.
● Telecom equipment supervision (Mobile base station, microwave or optical relay
station).
2.7 PIEZO BUZZER:

A buzzer is an audio signalling device, which may be mechanical,


electromechanical, or piezoelectric. Typical uses of buzzer and beepers include
alarm devices, timers, and confirmation of user input such as a mouse click or
keystroke.

fig.2.23 PIEZO BUZZER

Piezo buzzer works on the principle of inverse piezo electricity, discovered


in 1880 by Jacques and Pierre Curie. Inverse piezo electricity is “When an
alternating input is applied to certain material or piezo materials they tend to move
forth and back or vibrate.”

2.7.1 Working:

The piezo buzzer works on the principle of inverse piezo electricity. A


piezo material such as quartz is placed in between a brass plate and a silver
electrode. This is placed in the plastic case leaving a small gap in between the case
and the plates called Resonator.

fig.2.24 CONSTRUCTION OF BUZZER


Resonator is for making a loud resonant sound. The leads are attached to a
transistor, a resistor and an inductor circuit. The transistor and resistor combination is to
produce the oscillations and the inductor is for amplifying the oscillations.

When a low voltage DC signal is applied to the buzzer the transistor circuit
creates low voltage oscillations and the inductor amplifies the low voltage
oscillations and the alternating signal is applied to the two electrodes, the piezo
material moves forth and back producing a buzz sound.

2.7.2 Types of Buzzers:

• Electromechanical buzzer: Early devices were based on an electromechanical


system identical to an electric bell without the metal gong. Similarly, a relay may be
connected to interrupt its own actuating current, causing the contacts to buzz. Often
these units were anchored to a wall or ceiling to use it as a sounding board. The
word “buzzer” comes from the rasping noise that electromechanical buzzers made.

• Mechanical buzzer: A joy buzzer is an example of purely mechanical buzzer.


They require drivers.

• Piezoelectric buzzer: A piezoelectric element may be driven by an oscillating


circuit or other audio signaling source, driven with a piezoelectric audio amplifier.
Sounds commonly used to indicate that a button has been pressed are a click, a ring or
beep.

2.7.3 Interfacing Buzzer with Arduino:

fig.2.25 INTEFACING OF BUZZER WITH ARDUINO


● Connect the Supply wire (RED) of the buzzer to the Digital Pin 9 of the
Arduino through a 100 ohm resistor.
● Connect the Ground wire (BLACK) of the buzzer to any Ground Pin on theArduino.
● That's all of it. Time to Code.
● Note: The resistor is used in order to protect board from damage due to audio output.

2.7.4 Applications:

While technological advancements have caused buzzers to be impractical and


undesirable, there are still instances in which buzzers and similar circuits may be used.
Present day applications include:

• Novelty uses

• Judging panels

• Educational purposes

• Annunciator panels

• Electronic metronomes

• Game show lock-out device

• Microwave ovens and household appliances

• Sporting events such as basketball games

• Electric alarms

• Joy buzzer (mechanical buzzer used forpranks)


2.8 LIGHT EMITTING DIODE (LED)

The Light emitting diode is a two-lead semiconductor light source. In


1962, Nick Holon yak has come up with an idea of light emitting diode, and he
was working for the general electric company. The LED is a special type of diode
and they have similar electrical characteristics of a PN junction diode. Hence the
LED allows the flow of current in the forward direction and blocks the current in
the reverse direction. The LED occupies the small area which is less than the 1
mm2.

2.8.1 What Is A Light Emitting Diode?

The lighting emitting diode is a p-n junction diode. It is a specially doped diode
and made up of a special type of semiconductors. When the light emits in the forward
biased, then it is called as a light emitting diode.

fig.2.26 LED

2.8.2 Working Of Light Emitting Diode

fig.2.27 WORKING OF LED


The light emitting diode simply, as a diode. When the diode is forward biased,
then the electrons & holes are moving fast across the junction and they combined
constantly, removing one another out. Soon after the electrons are moving from the n-type
to the p-type silicon, it combines with the holes, and then it disappears.

Hence it makes the complete atom & more stable and it gives the little burst of
energy in the form of a tiny packet or photon of light. The N-type silicon is in red color
and it contains the electrons, they are indicated by the black circles.
● The P- type silicon is in the blue color and it contains holes, they
are indicated by the white circles.
● The power supply across the p-n junction makes the diode forward
biased and pushing the electrons from n-type to p-type. Pushing the
holes in the opposite direction.
● Electron and holes at the junction are combined.
● The photons are given off as the electrons and holes are recombined.

2.8.3 Types Of Light Emitting Diodes


There are different types of light emitting diodes present and some of them are
mentioned below.
● Gallium Arsenide (GaAs) – infra-red
● Gallium Arsenide Phosphide (GaAsP) – red to infra-red, orange
● Aluminium Gallium Arsenide Phosphide (AlGaAsP) –
high-brightness red, orange-red, orange, and yellow
● Gallium Phosphide (GaP) – red, yellow and green
● Aluminium Gallium Phosphide (AlGaP) – green
● Gallium Nitride (GaN) – green, emerald green
● Gallium Indium Nitride (GaInN) – near ultraviolet, bluish-green and blue
● Silicon Carbide (SiC) – blue as a substrate
● Zinc Selenide (ZnSe) – blue
● Aluminium Gallium Nitride (AlGaN) – ultraviolet
2.8.4 Working Principle of LED
The working principle of the Light emitting diode is based on the quantum theory.
The quantum theory says that when the electron comes down from the higher energy level
to the lower energy level then, the energy emits from the photon. The photon energy is
equal to the energy gap between these two energy levels. If the PN-junction diode is in the
forward biased, then the current flows through the diode.

The flow of current in the semiconductors is caused by the both flow of holes in
the opposite direction of current and flow of electrons in the direction of the current.
Hence there will be recombination due to the flow of these charge carriers.

fig.2.28 WORKING PRINCIPLE OF LED


The recombination indicates that the electrons in the conduction band jump
down to the valence band. When the electrons jump from one band to another
band the electrons will emit the electromagnetic energy in the form of photons and
the photon energy is equal to the forbidden energy gap.

2.8.5 I-V Characteristics of LED


There are different types of light emitting diodes are available in the market and there are
different LED characteristics which include the color light, or wavelength radiation, light
intensity. The important characteristic of the LED is color. In the starting use of LED, there is
the only red color. As the use of LED is increased with the help of the semiconductor process
and doing the research on the new metals for LED, the different colors were formed.

fig.2.29 I-V Characteristics of LED


The graph shows the approximate curves between the forward voltage and the
current.

➢ LED Characteristics

TABLE 2.7 LED CHARACTERISTICS

2.8.6 Interfacing Of LED with Ard uino:

fig.2.30 INTERFACING LED WITH ARDUINO

● External led is connected to the digital pin 13.


2.8.7 Applications of Light Emitting Diodes

There are many applications of the LED and some of them are explained below.

● LED is used as a bulb in the homes and industries


● The light emitting diodes are used in the motorcycles andcars
● These are used in the mobile phones to display themessage
● At the traffic light signals led’s used.

2.8.8 Advantages of LED’s

● The cost of LED‟s is less and they aretiny.


● By using the LED‟s the electricity is controlled.
● The intensity of the LED differs with the help of the microcontroller.

You might also like