Documente Academic
Documente Profesional
Documente Cultură
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Todays in the world millions of peoples are blind Even in a developed country this
number will be high. Recent developments in computer vision, digital cameras, and portable
computers make it feasible to assist these individuals by developing camera-based products
that combine computer vision technology with other existing commercial products such
optical character recognition (OCR) systems. Reading is obviously essential in todays
society. Printed text is everywhere in the form of reports, receipts, bank statements, restaurant
menus, classroom handouts, product packages, instructions on medicine bottles, etc. And
while optical aids, video magnifiers, and screen readers can help blind users and those with
low vision to access documents, there are few devices that can provide good access to
common hand-held objects such as product packages, and objects printed with text such as
prescription medication bottles. The ability of people who are blind or have significant visual
impairments to read printed labels and product packages will enhance independent living and
foster economic and social self-sufficiency.
Today, there are already a few systems that have some promise for portable use, but they
cannot handle product labelling. For example, portable bar code readers designed to help
blind people identify different products in an extensive product database can enable users
who are blind to access information about these products through speech and Braille. But a
big limitation is that it is very hard for blind users to find the position of the bar code and to
correctly point the bar code reader at the bar code. Some reading-assistive systems such as
pen scanners might be employed in these and similar situations. Such systems integrate OCR
software to offer the function of scanning and recognition of text and some have integrated
voice output.
However, these systems are generally designed for and perform best with document
images with simple backgrounds, standard fonts, a small range of font sizes, and wellorganized characters rather than commercial product boxes with multiple decorative patterns.
Most state-of-the-art OCR software cannot directly handle scene images with complex
backgrounds.
So we proposed our system to provide accurate informat ion to the blind people. In this
system Product name will be read by using USB camera the data will be send to the MATLAB
system. The information obtained from mat lab is given to Bluetooth module by microcontroller and
this is transferred to Bluetooth inbuilt android mobile. The corresponding information or application
related to the object is opened in the android mobile. The image and the text related to that thing are
displayed in the mobile and also voice announcement of the same text will be announced from the
android mobile. By this the user can know information by connecting earphones.
1.2 OVERVIEW
The primary objectives of the project are:
1.2.1HARDWARE COMPONENTS
1. Microcontroller (I.S3C2440)
Micro controller is used for controlling the entire Patient Condition, here
Friendly ARM is used.
2. PULSE SENSOR
A photoelectric device that measures oxygen saturation of the blood by
recording the amount of light transmitted or reflected by deoxygenated versus
oxygenated hemoglobin. Finger oximeter a pulse
OXIMETER
whose sensor is
microprocessor by John B. Peat man this book is intended that the reader will find a
smooth path to the creative process of writing enhanced application code.
Wireless Health monitoring on Smart Home application implemented by using
ARM9 microcontroller understand by the standard books of architecture,
programming, interfacing and system design by Rajkamal. I implemented this project
by writing code in Friendly ARM in Linux with embedded C programming, for
dumping we are using Qutopia software on board.
CHAPTER 2
FUNCTIONAL DESCRIPTION
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
The Dissertation Design of Smart Home Based Health Monitoring System through
Embedded Linux Gate Way enables us to reduce the human effort to monitoring the patient
in every minute at home or hospitalities and military applications. These objects can be
carried from patient location to a doctor with the help of gateway, based on the movement of
the patient the device can control the entire information has to be sent.
Receiving section:
In this project we required operating voltage for ARM controller board is 12V. Hence the
12V D.C. power supply is needed for the ARM board. This regulated 12V is generated by
stepping down the voltage from 230V to 18V now the step downed a.c voltage is being rectified
by the Bridge Rectifier using 1N4007 diodes. The rectified a.c voltage is now filtered using a
C filter. Now the rectified, filtered D.C. voltage is fed to the Voltage Regulator. This voltage
regulator provides/allows us to have a Regulated constant Voltage which is of +12V. The
rectified; filtered and regulated voltage is again filtered for ripples using an electrolytic capacitor
100F. Now the output from this section is fed to microcontroller board to supply operating
voltage
LCD
In this LCD is displaying device used at receiving section to display the names of the
different objects detected for old age people who are having deaf. It is a flat panel display,
electronic visual display that uses the light modulation properties of liquid crystals.
A two inch Field-effect LCD module shown in the Fig is used to display motor
parameter data. The turn-on and turn-off time is an important consideration in all displays.
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
The response time of LCDs is about 100 ms. the control signals to the LCD are also provided
by the Micro controller with which it is LCD interfaced.
MEMS:
In this project we are using MMA7660FC type MEMS sensor.Accelerometers are
acceleration sensors. An inertial mass suspended by springs is acted upon by acceleration
forces that cause the mass to be deflected from its initial position. This deflection is
converted to an electrical signal, which appears at the sensor output. The application of
MEMS technology to accelerometers is a relatively new development.
THERMISTOR:
Thermistors are a temperature sensing devise. It is used to sense the temperature. In
this project by depends on the value of temperature the exhaust blinking of light.A thermistor
is a type of resistor whose resistance varies significantly with temperature, more so than in
standard resistors.
WI-FI
The WI04 module provides both Ethernet and wifi applications. It is a readymade
component that provides a fully integrated solution for applications, using the
IEEE802.11 standard in the 2.4-2.5GHz ISM frequency band,
including 802.11b/g/n and also provides IEEE802.3 can be quickly and easily
included in product designs.
HUMIDITY SENSOR
Humidity measurement determines the amount of water vapour present in a
gas that can be a mixture, such as air, or a pure gas, such as nitrogen or argon.
PULSE SENSOR
A photoelectric device that measures oxygen saturation of the blood by
recording the amount of light transmitted or reflected by deoxygenated versus
oxygenated hemoglobin. Finger oximeter a pulse OXIMETER whose sensor is attached
to a finger, so that the oxygenation of blood flowing through the finger can be
determined.
The pulse sensor is sensed with help of an LED and LDR arrangement. The LED is a
high intensity type LED. Here the LDR is the sensor.
CHAPTER-3
CIRCUIT DESCRIPTION
3.1 CIRCUIT DESCRIPTION
The project will use ARM9. The Power requirement of S3C2440. Microcontroller is
3.3VDC and VSS ground.
The power supply for the S3C2440. is produced by using available 1 230VAC with
the help of conversion AC to DC supply which includes four most basic steps of step down
the available power to required level of power supply, Rectification of 1 supply to the
pulsated DC supply, filtering of Pulsated DC supply to non regulated DC supply and then
through regulator a pure regulated DC supply is produced.
In this project we are getting data from the sensors those are temperature ,pulse and moment
of the child those data will be collected by microcontroller and those data will be transferred
to monitoring section by using zigbee module .
The system uses a compact circuitry built around S3C2440. (ARM9) microcontroller
Programs are developed in Embedded C. Qutopia is used for loading programs into
Microcontroller.
Here we have two modules in the project
1) Hardware devices
2) Mobile
PERSON SECTION
It consists of S3C2440 microcontroller, Pulse sensor, temperature,
Humidity, MEMS, Wi-Fi transmission module, RS232. The Wi-Fi transmitter is used to
transmit the data. The data for the Users Device operation is send via Wi-Fi module.
MONITORING SECTION
The transmitting data is receiving this section through the Wi-Fi and
results are showing in specific application of a Android mobile.
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
10
The working of the project goes like this: The temperature and heartbeat of the
patient will be monitored continuously and the status of the patient will be monitored and
sent to the doctor wherever he may be.
Thus, the two values, the temperature and the heartbeat pulse will be sent to the
doctor who knows the entire health conditions of the patient. Thus, to send this data, we are
using the wireless technology, WI-FI. When the monitoring system sends a message to the
doctors mobile, even this system should have a device which can send or receive the
messages from/to the doctor. The device we are using is the Wi-Fi modem. The modem will
be interfaced with the microcontroller through serial interface.
The data which are monitored continuously in this project are Temperature and
Heartbeat of the patient. The analog quantities are taken and converted into corresponding
digital values using a single channel ADC. This converted digital value is sent to the
microcontroller. The microcontroller temporarily stores this value.
The doctor can read the temperature, moments and heartbeat value whenever he
wishes to. The doctor can take care of the patients condition wherever he may be. Now, it is
the job of the microcontroller to read the value, process it and send the requested value to the
doctors mobile. The user can read the updated data whenever he reads the predefined
messages to the modem. These values can also be displayed on the LCD.
LCD is interfaced to the controller Port 1 of P1.16 to P 1.21.
PULSE SENSOR IS CONNECTED TO THE P0.21.
TEMP SENSOR IS CONNECTED TO THE P0.22.
3.3 MICROCONTROLLER
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
11
computation and high speed data processing. In such applications advanced microcontrollers
and microprocessors are used. One such advanced architecture is ARM (Advanced RISC
Machine).
In this project we are using friendly ARM Mini 2440 SBC (Single-Board Computer)
with 400 MHz Samsung S3C2440 ARM9 processor.
3.3.1 I.S3C2440AMICROCONTROLLER:
SAMSUNG's S3C2440A 16/32-bit RISC microprocessor. SAMSUNGs S3C2440A is
designed to provide hand-held devices and general applications with low-power, and highperformance microcontroller solution in small die size. To reduce total system cost, the
S3C2440A includes the following components.
The S3C2440A is developed with ARM920T core, 0.13um CMOS standard cells and
a memory complier. Its low power, simple, elegant and fully static design is particularly
suitable for cost- and power-sensitive applications. It adopts a new bus architecture known as
Advanced Micro controller Bus Architecture (AMBA). The S3C2440A offers outstanding
features with its CPU core, a 16/32-bit ARM920T RISC processor designed by Advanced
RISC Machines, Ltd. The ARM920T implements MMU, AMBA BUS, and Harvard cache
architecture with separate 16KB instruction and 16KB data caches, each with an 8-word line
length.
FEATURES:
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
12
13
16/32-Bit RISC architecture and powerful Instruction set with ARM920T CPU
core.
Instruction cache, data cache, writes buffer and Physical address TAG RAM to
reduce the effect of main memory bandwidth and latency on Performance.
SYSTEM MANAGER:
CACHE MEMORY
8words length per line with one valid bit and two dirty bits per line.
On-chip MPLL and UPLL: UPLL generates the clock to operate USB
14
DMA CONTROLLER
Supports 3 types of STN LCD panels: 4-bit dual scan, 4-bit single scan, 8-bit single
scan display type
Supports monochrome mode, 4 gray levels, 16 gray levels, 256 colors and 4096 colors
for STN LCD
15
UART
WATCHDOG TIMER
16
Today, the ARM family accounts for approximately 75% of all embedded 32bit RISC CPUs, making it the most widely used 32-bit architecture. ARM CPUs are found in
most corners of consumer electronics, from portable devices (PDAs, mobile phones, iPods
and other digital media and music players, handheld gaming units, and calculators) to
computer peripherals (hard drives, desktop routers).
ARM does not manufacture the CPU itself, but licenses it to other
manufacturers to integrate them into their own system.
ARM architecture
RISC:
RISC, or Reduced Instruction Set Computer is a type of microprocessor architecture that
utilizes a small, highly-optimized set of instructions, rather than a more specialized set of
instructions often found in other types of architectures.
History:
The first RISC projects came from IBM, Stanford, and UC-Berkeley in the late 70s and early
80s. The IBM 801, Stanford MIPS, and Berkeley RISC 1 and 2 were all designed with a
similar philosophy which has become known as RISC. Certain design features have been
characteristic of most RISC processors:
CISC
Price/Performance Strategies
Price:
move
complexity
RISC
from
software
to
hardware.
Performance: make tradeoffs in favor of decreased
code size, at the expense of a higher CPI.
Design Decisions
Simple,
single-cycle
instructions
that
cycles
instructions
correspond
to
microcode
17
on register
contents only
3. Uniform and fixed length instructions
4. 32 -bit processor
5. Instructions are 32-bit long
3.4.1 ARM Bus Technology:
Embedded systems use different bus technologies. Most common PC bus technology
is the Peripheral Component Interconnect (PCI) bus. This connects devices such as video
card and disk controllers to the X 86 processor buses. This type of technology is called
External or off chip bus technology.
Embedded devices use an on-chip bus that is internal to the chip and allows different
peripheral devices to be inter connected with an ARM core.
There are two different types of devices connected to the bus
1. Bus Master
2. Bus Slave
1. Bus Master: A logical device capable of initiating a data transfer with another device
across the same bus (ARM processor core is a bus Master).
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
18
2. Bus Slave : A logical device capable only of responding to a transfer request from a
bus master device ( Peripherals are bus slaves )
Generally a Bus has two architecture levels
Physical lever: Which covers electrical characteristics an bus width (16, 32, 64 bus).
Protocol level: which deals with protocol
NOTE: - ARM is primarily a design company. It seldom implements the electrical
characteristics of the bus, but it routinely specifies the bus protocol
ARM9 ARCHITECTURE:
ARM9 is an ARM architecture 32-bit RISC CPU family. With this design generation,
ARM moved from a von Neumann architecture (Princeton architecture) to a Harvard
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
19
architecture with separate instruction and data busses (and caches), significantly increasing its
potential speed. Most silicon chips integrating these cores will package them as modified
Harvard architecture chips, combining the two address busses on the other side of separated
CPU caches and tightly coupled memories.
There are two subfamilies, implementing different ARM architecture versions.
Differences from ARM7 cores
Key improvements over ARM7 cores, enabled by spending more transistors, include:
Clock frequency improvements. Shifting from a three stage pipeline to a five stage
one lets the clock speed be approximately doubled, on the same silicon fabrication
process.
20
ARM9TDMI (core)
The ARM9TDMI processor core is a Harvard architecture device implemented using a fivestage pipeline consisting of Fetch, Decode, Execute, Memory, and Write stages. It can be
provided as a standalone core that can be embedded into more complex devices. The
standalone core has a simple bus interface that allows you to design your own caches and
memory systems around it.
The ARM9TDMI family of microprocessors supports both the 32-bit ARM and 16-bit Thumb
instruction sets, allowing you to trade off between high performance and high code density.
The ARM920T processor is a Harvard cache architecture processor that is targeted at
multiprogrammer applications where full memory management, high performance, and low
power are all-important. The separate instruction and data caches in this design are 16KB
each in size, with an 8-word line length. The ARM920T processor implements an enhanced
ARM architecture v4 MMU to provide translation and access permission checks for
instruction and data addresses.
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
21
The ARM920T processor supports the ARM debug architecture and includes logic to assist in
both hardware and software debug. The ARM920T processor also includes support for
coprocessors, exporting the instruction and data buses along with simple handshaking signals.
The ARM920T interface to the rest of the system is over unified address and data buses. This
interface enables implementation of either an Advanced Microcontroller Bus Architecture
(AMBA) Advanced System Bus (ASB) or Advanced High-performance Bus (AHB) bus
scheme either as a fully-compliant AMBA bus master, or as a slave for production test. The
ARM920T processor also has a Tracking ICE mode which allows an approach similar to a
conventional ICE mode of operation.
The ARM920T processor supports the addition of an Embedded Trace Macrocell (ETM) for
real-time tracing of instructions and data.
The ARM920T:
The ARM920T is a high-performance 32-bit RISC processor Macrocell combining an
ARM9TDMI processor core with:
1. 16KB instruction and 16KB data caches
2. instruction and data Memory Management Units (MMUs)
3. write buffer
4. an AMBA (Advanced Microprocessor Bus Architecture) bus interface
5. An Embedded Trace Macrocell (ETM) interface.
High performance
The ARM920T provides a high-performance processor solution for open systems
requiring full virtual memory management and sophisticated memory protection. An
enhanced ARM architecture v4 MMU implementation provides translation and access
permission checks for instruction and data addresses. The ARM920T high-performance
processor solution gives considerable savings in chip complexity and area, chip system
design, and power consumption.
Compatible with ARM7 and Strong-arm
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
22
The ARM920T processor is 100% user code binary compatible with ARM7TDMI, and
backwards compatible with the ARM7 Thumb Family and the Strong ARM processor
families, giving designers software-compatible processors with a range of price/performance
points from 60 MIPS to 200+MIPS. Support for the ARM architecture today includes:
1. Windows CE, Symbian OS, Linux, and QNX operating systems
2. 40+ Real Time Operating Systems
3. co-simulation tools from leading EDA vendors
4. Variety of software development tools.
Applications:
1. Applications running an Open OS:
-
Symbian OS
Linux, Palm OS
WindowsCE
Smart phones
PDAs
3. Networking applications
4. Digital set top boxes
5. Imaging
6. Automotive control solutions
7. Audio and video encoding and decoding
Benefits:
1. Designed specifically for System-on-Chip integration
2. Supports the Thumb instruction set offering the same excellent code density as the
ARM7TDMI
3. High performance allows system designers to integrate more functionality into price
and power-sensitive applications demanding more performance
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
23
4. Cached processor with an easy to use lower frequency on-chip system bus interface.
ARM920T Block diagram:
ARM920T Macrocell:
The ARM920T macrocell is based on the ARM9TDMI Harvard architecture processor
core, with an efficient 5-stage pipeline.
To reduce the effect of main memory bandwidth and latency on performance, the ARM920T
includes:
1. instruction cache
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
24
2. data cache
3. MMU
4. TLBs
5. write buffer
6.
Caches
Two 16KB caches are implemented, one for instructions, the other for data, both with an 8word line size. A 32-bit data bus connects each cache to the ARM9TDMI core allowing a 32bit instruction to be fetched and fed into the instruction Decode stage of the pipeline at the
same time as a 32-bit data access for the Memory stage of the pipeline.
Cache lock-down
Cache lock-down is provided to allow critical code sequences to be locked into the cache to
ensure predictability for real-time code. The cache replacement algorithm can be selected by
the operating system as either pseudo random or round-robin. Both caches are 64-way set
associative. Lock-down operates on a per-set basis.
Write buffer
The ARM920T also incorporates a 16-entry write buffer, to avoid stalling the processor when
writes to external memory are performed.
PATAG RAM
The ARM920T implements PATAG RAM to perform write-backs from the data cache.
The physical address of all the lines held in the data cache is stored by the PATAG memory,
removing the need for address translation when evicting a line from the cache.
MMUs
The standard ARM920T implements an enhanced ARMv4 MMU to provide translation and
access. Permission checks for the instruction and data address ports of the ARM9TDMI.
25
The system controller arbitrates between instruction and data access to schedule single or
simultaneous requests to the MMUs and the Bus Interface Unit. The system controller
receives acknowledgement from each resource to allow execution to continue.
Control coprocessor (CP15)
The CP15 allows configuration of the caches, the write buffer, and other ARM920T options.
Several registers within CP15 are available for program control, providing access to features
such as:
1. invalidate whole TLB using CP15
2. invalidate TLB entry, selected by modified virtual address, using CP15
3. independent lock-down of instruction TLB and data TLB using CP15
register 10
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
26
3.5.1 TRANSFORMER
27
So
The secondary voltage of the transformer depends on the number of turns in the Primary as well as in the
secondary.
3.5.2 RECTIFIER
A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we
use a diode, a diode is a device that allows current to pass only in one direction i.e. when the
anode of the diode is positive with respect to the cathode also called as forward biased
condition & blocks current in the reversed biased condition.
Rectifier can be classified as follows:
1)
28
29
One of the disadvantages of Full Wave Rectifier design is the necessity of using a
center tapped transformer, thus increasing the size & cost of the circuit. This can be avoided
by using the Full Wave Bridge Rectifier.
3)
Bridge Rectifier:
As the name suggests it converts the full wave i.e. both the positive & the negative
half cycle into DC thus it is much more efficient than Half Wave Rectifier & that too without
using a center tapped transformer thus much more cost effective than Full Wave Rectifier.
30
If we use a center tapped transformer for a bridge rectifier we can get both positive &
negative half cycles which can thus be used for generating fixed positive & fixed negative
voltages.
3.5.3 VOLTAGE REGULATOR
A Voltage regulator is a device which converts varying input voltage into a constant regulated
output voltage. Voltage regulator can be of two types
1)
resistively as heat.
2)
Switching Regulators.
They regulate the output voltage by switching the Current ON/OFF very rapidly. Since
their output is either ON or OFF it dissipates very low power thus achieving higher efficiency
as compared to linear voltage regulators. But they are more complex & generate high noise
due to their switching action. For low level of output power switching regulators tend to be
costly but for higher output wattage they are much cheaper than linear regulators.
The most commonly available Linear Positive Voltage Regulators are the 78XX series where
the XX indicates the output voltage. And 79XX series is for Negative Voltage Regulators.
After filtering the rectifier output the signal is given to a voltage regulator. The maximum
input voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across
the regulator so the input voltage should be at least 2-3 Volts higher than the output voltage.
If the input voltage gets below the Vmin of the regulator due to the ripple voltage or due to
any other reason the voltage regulator will not be able to produce the correct regulated
voltage.
31
3.6 SENSORS
The sensors used in this project are Heartbeat and Temperature sensor. The
output of temperature sensor is given to the ADC so as to convert the analog value into digital
data and then give it to the microcontroller. The Heartbeat sensor used is basically a LED and
LDR arrangement.
3.6.1 HERT BEAT SENSOR
32
Heart beat is sensed by using a high intensity type LED and LDR. The finger is
placed between the LED and LDR. As sensor, a photo diode or a photo transistor can be used.
The skin may be illuminated with visible (red) using transmitted or reflected light for
detection. The very small changes in reflectivity or in transmittance caused by the varying
blood content of human tissue are almost invisible. Various noise sources may produce
disturbance signals with amplitudes equal or even higher than the amplitude of the pulse
signal. Valid pulse measurement therefore requires extensive preprocessing of the raw signal.
The setup described here uses a red LED for transmitted light illumination
and a LDR as detector. With only slight changes in the preamplifier circuit the same hardware
and software could be used with other illumination and detection concepts. These values are
sent to the ADC for conversion of analog to digital and then sent to the microcontroller.
3.6.2 LM35 TEMPERATURE SENSOR
LM35 converts temperature value into electrical signals. LM35 series sensors
are precision integrated-circuit temperature sensors whose output voltage is linearly
proportional to the Celsius temperature. The LM35 requires no external calibration since it is
internally calibrated. . The LM35 does not require any external calibration or trimming to
provide typical accuracies of 14C at room temperature and 34C over a full 55 to
+150C temperature range.
The LM35s low output impedance, linear output, and precise inherent calibration make
interfacing to readout or control circuitry especially easy. It can be used with single power
supplies, or with plus and minus supplies. As it draws only 60 A from its supply, it has very
low self-heating, less than 0.1C in still air.
FEATURES
33
34
The ADC chip that is used in this project is ADC0804. The ADC0804 IC is
an 8-bit parallel ADC in the family of the ADC0800 series from National Semiconductor. It
works with +5 volts and has a resolution of 8 bits. In the ADC0804, the conversion time
varies depending on the clocking signals applied to the CLK IN pin, but it cannot be faster
than 110s.
PIN DESCRIPTION
CS (Chip select)
Chip select is an active low input used to activate the ADC0804 chip. To access the
ADC0804, this pin must be low.
RD (read)
This is an input signal and is active low. ADC converts the analog input to its binary
equivalent and holds it in an internal register. RD is used to get the data out of ADC0804
chip. When CS=0, if a high-to-low pulse is applied to the RD pin, the 8-bit digital output
shows up at the D0-D7 data pins.
WR (write)
This is an active low input used to inform the ADC0804 to start the conversion process.
If CS=0 when WR makes a low-to-high transition, the ADC0804 starts converting the analog
input value Vin to an 8-bit digital value. The amount of time it takes to convert varies
depending on the CLK IN and CLK R values.
CLK IN and CLK R
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
35
This is an output pin and is active low. It is a normally high pin and when the
conversion is finished, it goes low to signal the CPU that the converted data is ready to be
picked up. After INTR goes low, the CS pin is made low i.e., CS=0 and send a high-to-low
pulse to the RD pin to get the data out of the ADC0804 chip.
Vin(+) and Vin(-)
These are the differential analog inputs where Vin=Vin(+) Vin(-). The Vin(-) pin is
connected to ground and the Vin(+) pin is used as the analog input to be converted to digital.
Vcc This is the +5 volt power supply. It is also used as a reference voltage when the Vref/2
input (pin 9) is open.
Vref/2
Pin 9 is an input voltage used for the reference voltage. If this pin is open, the analog
input voltage for the ADC0804 is in the range of 0 to 5 volts.Vref/2 is used to implement
analog input voltages other than 0.5V. i.e., if the analog input range needs to be 0 to 4 volts,
Vref/2 is connected to 2 volts.
D0-D7
D0-D7 (D7 is the MSB) are the digital data output pins since ADC0804 is a
parallel ADC chip. To calculate the output voltage, the below equation is used:
Dout = Vin/ (step size)
36
.
Sub-D15 Male
Sub-D15 Female
37
This is a standard 9 to 25 pin cable layout for async data on a PC AT serial cable
FEATURES:
38
Recommendation V.28
APPLICATIONS:
TIA/EIA-232-F
Battery-Powered Systems
Terminals
Modems
Computers
39
Receiver: 30 V
DW package : 105C/W
N package : 78C/W
Lead temperature 1,6 mm (1/16 inch) from case for 10 seconds: 260C
Stresses beyond those listed under absolute maximum ratings may cause permanent
damage to the device. These are stress ratings only, and functional operation of the device at
these or any other conditions beyond those indicated under recommended operating
conditions is not implied. Exposure to absolute-maximum-rated conditions for extended
periods may affect device reliability.
40
IEEE802.11
standard
in
the
2.4-2.5GHz
ISM
frequency
band,
including 802.11b/g/n and also provides IEEE802.3, can be quickly and easily
included in product designs.
41
The wi-fi modem can be tested by connecting it with a PC. The modem is equipped
with a RS232 cable. Just use a Serial to USB converter and connect it with the PC.
Now you can proceed with sending the commands to the modem using any serial
communication program like Hyperterminal, minicom etc. Ensure the serial paramters
are configured to 8N1 and the baudrate is set to 115200bps.
APPLICATIONS
Most reliable
Cost effective.
CHAPTER 4
FLOWCHART
42
CHAPTER 5
IMPLEMENTATION
5.1 OUTPUT ANALYSIS
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
43
44
45
Lastly, also the most important step is to set up the port properties. bits per second
should be set to 115200.
you must select None in the data flow control field otherwise you will only be able
to see outputs.
46
47
48
After that we are pressing the enter button we are observing the message of transmitter and
receiver are ready.
The command enter for execution
cd directory name
ls
cd folder name
ls
49
CHAPTER 6
RESULTS
After assembling the circuit on the PCB, check it for proper connections before
switching on the power supply.
50
51
CHAPTER 7
CONCLUSION
52
Software tools like HyperTerminal communication protocol, Proload to dump the source code
into the microcontroller.
The performance of the system is more efficient. Continuously reading the output
from the sensors and pass the data to the doctors mobile whenever the read values exceed the
normal values or whenever the doctor sends a request to the controlling unit is the main job
carried out by the microcontroller. The mechanism is controlled by the microcontroller.
BIBLOGRAPHY
Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay.
Second edition, THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM
www.eci.gov.in
www.eci.gov.in/faq/evm.asp
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
53
www.eci.gov.in/Audio_VideoClips/presentation/EVM.ppt
www.rajasthan.net/election/guide/evm.htm
www.indian-elections.com/electoralsystem/electricvotingmachine.html
Tutorial on microcontroller:
www.8051projects.net/microcontroller_tutorials/
Tutorial on LCD:
www.8051projects.net/lcd-interfacing/
http://www.national.com/ds/LM/LM35.pdf
http://www.nxp.com/documents/user_manual/UM10139.pdf
APPENDIX
EMBEDDED SYSTEM
An embedded system is a special-purpose system in which the computer is completely
encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
54
predefined tasks, usually with very specific requirements. Since the system is dedicated to
specific tasks, design engineers can optimize it, reducing the size and cost of the product.
Embedded systems are often mass-produced, benefiting from economies of scale.
Personal digital assistants (PDAs) or handheld computers are generally considered
embedded devices because of the nature of their hardware design, even though they are more
expandable in software terms. This line of definition continues to blur as devices expand.
With the introduction of the OQO Model 2 with the Windows XP operating system and ports
such as a USB port both features usually belong to "general purpose computers", the
line of nomenclature blurs even more.In Physically, embedded systems ranges from portable
devices such as digital watches and MP3 players, to large stationary installations like traffic
lights, factory controllers, or the systems controlling nuclear power plants etc.
Examples
of Embedded Systems
In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.
55
Handheld computers
Household appliances, including microwave ovens, washing machines, television
SOURCE CODE
#include "mainwindow.h"
#include "gpio.h"
#include "gpio_monitor.h"
#include <QtGui/QApplication>
#include <QDateTime>
#include <QDebug>
56
int sec=0;
int count1=0;
MainWindow::MainWindow(QWidget *parent) :
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
57
QMainWindow(parent){
setupUi(this);
readTimer->start(10);
readTimer1->start(1000);
readTimer2->start(7000);
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
58
void MainWindow::dataread()
{
// qDebug() << " dataread enter ";
char ch;
if(ch=in1.read())
{
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
59
while(in1.read()==ch);
count1++;
textEdit->clear();
textEdit->setPlainText(QString::number(count1));
}
void MainWindow::dataread1()
{
qDebug() << " dataread1 enter ";
sec++;
textEdit_2->clear();
textEdit_2->setPlainText(QString::number(sec));
if(sec>=60)
{
textEdit_3->clear();
textEdit_3->setPlainText(QString::number(count1));
heartbeat.append((const char*)&count1, sizeof(count1));
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
60
heartbeatt= QByteArray::number(count1);
send_wifi_hb();
SleeperThread::msleep(5);
send_blue_hb();
SleeperThread::msleep(5);
sec=0;
count1=0;
}
// readFileFunction_1();
// readFileFunction_2();
// readFileFunction_3();
// SleeperThread::msleep(5);
// open_port_blue();
// SleeperThread::msleep(5);
// write_port_blue();
// SleeperThread::msleep(5);
// close_port_blue();
// SleeperThread::msleep(5);
// send_wifi();
// SleeperThread::msleep(5);
61
void MainWindow::dataread2()
{
readFileFunction_1();
readFileFunction_2();
readFileFunction_3();
SleeperThread::msleep(5);
open_port_blue();
SleeperThread::msleep(5);
write_port_blue();
SleeperThread::msleep(5);
close_port_blue();
SleeperThread::msleep(5);
send_wifi();
SleeperThread::msleep(5);
}
void MainWindow::readFileFunction_1()
{
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
62
// int n;
FILE *fp;
return;
}
void MainWindow::readFileFunction_2()
{
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
63
// int n;
FILE *fp;
return;
}
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
64
void MainWindow::readFileFunction_3()
{
// int n;
FILE *fp;
65
return;
}
void MainWindow::open_port_blue()
{
qDebug()<<"Bluetooth PORT OPEN";
if (portblue->open(QIODevice::ReadWrite) == true)
{
// connect(portblue,SIGNAL(readyRead()),this,SLOT(onReadyRead_blue()));
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
66
}
else
{
QMessageBox::information(this, "SYSTEM ERROR "," Attempt to open a non-existent
port");
}
}
void MainWindow::write_port_blue()
{
portblue->write("\x0D");
portblue->write("\x0A");
portblue->write("Mems:");
SleeperThread::msleep(3);
portblue->write(memss);
portblue->write("\x0D");
portblue->write("\x0A");
SleeperThread::msleep(3);
portblue->write("Humd:");
SleeperThread::msleep(3);
portblue->write(humdd);
67
portblue->write("\x0D");
portblue->write("\x0A");
SleeperThread::msleep(3);
portblue->write("Temp:");
SleeperThread::msleep(3);
portblue->write(tempe);
SleeperThread::msleep(3);
portblue->write("\x0D");
portblue->write("\x0A");
void MainWindow::onReadyRead_blue()
{
void MainWindow::close_port_blue()
{
portblue->close();
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
68
void MainWindow::open_port_wifi()
{
qDebug()<<" wifi Port OPEN";
this->portwifi = new QextSerialPort(port_name_wifi, QextSerialPort::EventDriven);
portwifi->flush();
portwifi->setBaudRate(BAUD9600);
portwifi->setFlowControl(FLOW_OFF);
portwifi->setParity(PAR_NONE);
portwifi->setDataBits(DATA_8);
portwifi->setStopBits(STOP_1);
if (portwifi->open(QIODevice::ReadWrite) == true)
{
//connect(portwifi,SIGNAL(readyRead()),this,SLOT(onReadyRead_wifi()));
}
else
{
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
69
void MainWindow::onReadyRead_wifi()
{
SleeperThread::msleep(100);
QByteArray data= portwifi->readAll();
void MainWindow::write_port_wifi()
{
portblue->write("\x0D");
portblue->write("\x0A");
portwifi->write("Mems:");
SleeperThread::msleep(3);
portwifi->write(memss);
portblue->write("\x0D");
portblue->write("\x0A");
70
SleeperThread::msleep(3);
portwifi->write("Humd:");
SleeperThread::msleep(3);
portwifi->write(humdd);
portblue->write("\x0D");
portblue->write("\x0A");
SleeperThread::msleep(3);
portwifi->write("Temp:");
SleeperThread::msleep(3);
portwifi->write(tempe);
SleeperThread::msleep(3);
portblue->write("\x0D");
portblue->write("\x0A");
}
void MainWindow::close_port_wifi()
{
portwifi->close();
qDebug()<<" Wifi Port Close";
}
void MainWindow::blue_hb()
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
71
{
qDebug()<<" Heart Beat value send blue";
portblue->write("\x0D");
portblue->write("\x0A");
portblue->write("Heart Beat:");
SleeperThread::msleep(3);
portblue->write(heartbeatt);
SleeperThread::msleep(3);
portblue->write("\x0D");
portblue->write("\x0A");
}
void MainWindow::wifi_hb(){
qDebug()<<" Heart Beat value send wifi";
portblue->write("\x0D");
portblue->write("\x0A");
portwifi->write("HeartBeat:");
SleeperThread::msleep(3);
portwifi->write(heartbeatt);
SleeperThread::msleep(3);
portblue->write("\x0D");
portblue->write("\x0A");
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
72
void MainWindow::send_wifi()
{
open_port_wifi();
SleeperThread::msleep(20);
write_port_wifi();
SleeperThread::msleep(20);
close_port_wifi();
}
void MainWindow::send_blue()
{
open_port_blue();
SleeperThread::msleep(20);
wifi_hb();
SleeperThread::msleep(20);
close_port_blue();
}
void MainWindow::send_wifi_hb(){
open_port_wifi();
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
73
SleeperThread::msleep(20);
wifi_hb();
SleeperThread::msleep(20);
close_port_wifi();
SleeperThread::msleep(5);
void MainWindow::send_blue_hb(){
open_port_blue();
SleeperThread::msleep(20);
blue_hb();
SleeperThread::msleep(20);
close_port_blue();
SleeperThread::msleep(5);
}
SOFTWARE DISCRIPTION
OPERATING SYSTEM:
An operating system (OS) is software, consisting of programs and data that runs on
computers and manages the computer hardware and provides common services for efficient
execution of various application software.
For hardware functions such as input and output and memory allocation, the operating system
acts as an intermediary between application programs and the computer hardware, although
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
74
the application code is usually executed directly by the hardware, but will frequently call the
OS or be interrupted by it. Operating systems are found on almost any device that contains a
computerfrom cellular phones and video game consoles to supercomputers and web
servers.
Kernel:
The kernel is a program that constitutes the central core of a computer operating
system. It has complete control over everything that occurs in the system.
A kernel can be contrasted with a shell (such as bash, csh or ksh in Unix-like operating
systems), which is the outermost part of an operating system and a program that interacts
with user commands. The kernel itself does not interact directly with the user, but rather
interacts with the shell and other programs as well as with the hardware devices on the
system, including the processor (also called the central processing unit or CPU), memory and
disk drives.
LINUX
Linux refers to the family of Unix-like computer operating systems using the Linux
kernel. Linux can be installed on a wide variety of computer hardware, ranging from mobile
phones, tablet computers and video game consoles, to mainframes and supercomputers.
Linux is the leading server OS, accounting for more than 50% of installations. Desktop use of
Linux has increased in recent years, partly owing to the popular Ubuntu, Fedora, and open
USE distributions and the emergence of net books and smart phones running an embedded
Linux.
Features of Linux:
Linux has evolved to have the following features as an outstanding operating system which is
strong in security and networking.
Multitasking: Several programs can run at the same time.
Multiuser: Several users can logon to the same machine at the same time There is no need to
have separate user licenses.
Multiplatform: Linux runs on many different CPUs, that means it supports multiprocessor
machine.
INSTITUTE OF AERONAUTICAL ENGINEERING COLLEGE-2015
75
Multithreading: Linux has native kernel support for multiple independent threads of control
within a single process memory space.
In this project the program has to be written in Embedded C, the output is run by the GCC
compiler.
Embedded C
GCC compiler
GCC COMPILER:
The original GNU C Compiler (GCC) is developed by Richard Stallman, the founder
of the GNU Project.
GCC, formerly for "GNU C Compiler", has grown over times to support many
languages such as C++, Objective-C, Java, Fortran and Ada. It is now referred to as
"GNU Compiler Collection.
76