Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
Certain operating systems or language platforms are tailored for the embedded
market, such as Embedded Java and Windows XP Embedded. However, some low-end
consumer products use very inexpensive microprocessors and limited storage, with the
application and operating system both part of a single program. The program is written
Now, let us see the details of the various building blocks of the hardware of an embedded
system. As shown in Fig. the building blocks are;
· Input Devices
· Output devices
· Communication interfaces
· Application-specific circuitry
The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a
low-cost processor. Its main attraction is that on the chip itself, there will be many other
components such as memory, serial communication interface, analog-to digital converter etc.
So, for small applications, a micro-controller is the best choice as the number of external
components required will be very less. On the other hand, microprocessors are more
powerful, but you need to use many external components with them. D5P is used mainly for
applications in which signal processing is involved such as audio and video processing.
Memory:
The memory is categorized as Random Access 11emory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the
chip, whereas ROM retains the contents even if the power is switched off. So, the firmware is
stored in the ROM. When power is switched on, the processor reads the ROM; the program is
program is executed.
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one key
to give a specific command. A keypad may be used to input only the digits. Many embedded
systems used in process control do not have any input device for user interaction; they take
inputs from sensors or transducers 1‟fnd produce electrical signals that are in turn fed to other
systems.
Output devices:
The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status
of the system modules, or for visual indication of alarms. A small Liquid Crystal Display
(LCD) may also be used to display some important parameters.
Communication interfaces:
The embedded systems may need to, interact with other embedded systems at they
may have to transmit data to a desktop. To facilitate this, the embedded systems are provided
with one or a few communication interfaces such as RS232, RS422, RS485, Universal Serial
Bus (USB), IEEE 1394, Ethernet etc.
BLOCK DIAGRAM:
Power
Supply
16X2 LCD
IR IR
transmitter1 receiver 0
1
5
Buzzer
IR IR 1
transmitter2
receiver 2
2.2 MICROCONTROLLER
2.2.1 FEATURES
8051 is the name of a big family of microcontrollers. The device which we used in
our project was the 'AT89S52' which is a typical 8051 microcontroller manufactured by
Atmel™. The block diagram provided by Atmel™ in their datasheet that showed the
architecture of 89S52 device seemed a bit complicated. A simpler architecture can be
represented below.
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of 32
I/O lines. Those ports can be used to output DATA and orders do other devices, or to read the
state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning that
they can be used for two different functions.
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total
of 32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to
read the state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function'
meaning that they can be used for two different functions.
The first one is to perform input/output operations and the second one is used to
implement special features of the microcontroller like counting external pulses, interrupting
the execution of the program according to external events, performing serial data transfer or
connecting the chip to a computer to update the software. Each port has 8 pins, and will be
treated from the software point of view as an 8-bit variable called 'register', each bit being
connected to a different Input/Output pin.
There are two different memory types: RAM and EEPROM. Shortly, RAM is used to
store variable during program execution, while the EEPROM memory is used to store the
program itself, that's why it is often referred to as the 'program memory'. It is clear that the
CPU (Central Processing Unit) is the heart of the micro controllers. It is the CPU that will
Read the program from the FLASH memory and Execute it by interacting with the different
peripherals.
Diagram below shows the pin configuration of the 89S52, where the function of each
pin is written next to it, and, if it exists, the dual function is written between brackets. Note
that the pins that have dual functions can still be used normally as an input/output pin. Unless
the program uses their dual functions, all the 32 I/O pins of the microcontroller are
configured as input/output pins.
VCC
Pin 40 provides Supply voltage to the chip. The voltage source is +5v
GND
Pin 20 is the grounded.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance
inputs.
Port 0 can also be configured to be the multiplexed low-order address/data bus during
accesses
to external program and data memory. In this mode, P0 has internal pull-ups.Port 0 also
receives the code bytes during Flash programming and outputs the code bytes during program
verification. External pull-ups are required during program verification
.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input
(P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the
following table.
Port 1 also receives the low-order address bytes during Flash programming and verification
Table 2.2.3 (a) Port1 Pin Functions
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory and
during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this
application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external
data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2
Special Function Register
Port 2 also receives the high-order address bits and some control signals during Flash
programming and verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because pull-ups Port 3 also serves the functions of
various special features of the AT89S52, as shown in the followingtable
Table 2.2.3 (b) Port3 Pin Functions
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The
DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default
state of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming.
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may
be used for external timing or clocking purposes. Note, however, that one ALE pulse is
skipped during each access to external data memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external
execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory.
When the AT89S52 is executing code external program memory, PSEN activated twice each
machine cycle, except that two PSEN activations skipped during each access to external data
memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch
code from external program memory locations starting at 0000H up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
The total memory of 89S52 system is logically divided in Program memory andData
memory. Program memory stores the programs to be executed, while data memorystores the
data like intermediate results, variables and constants required for the executionof the
program. Program memory is invariably implemented using EPROM, because itstores only
program code which is to be executed and thus it need not be written into.However, the data
memory may be read from or written to and thus it is implementedusing RAM.
Further, the program memory and data memory both may be categorized as on-chip (internal)
and external memory, depending upon whether the memory physicallyexists on the chip or it
is externally interfaced. The 89S52 can address 8Kbytes on-chipmemory whose map starts
from 0000H and ends at 1FFFH. It can address 64Kbytes of external program memory under
the control of PSEN (low) signal.
2.3.1 INTRODUCTION
Liquid crystal displays (LCD‟s) have materials which combine the properties of both
liquids and crystals. Rather than having a melting point, they have a temperature range within
which the molecules are almost as mobile as they would be in a liquid, but are grouped
together in an ordered form similar to a crystal. An LCD consists of two glass panels, with
the liquid crystal material sand witched in between them. The inner surface of the glass plates
are coated with transparent electrodes which define the character, symbols or patterns to be
displayed polymeric layers are present in between the electrodes and the liquid crystal, which
makes the liquid crystal molecules to maintain a defined orientation angle.
In recent years the LCD is finding widespread use replacing LED‟s (seven-segment
LED or other multi segment LED‟s). This is due to the following reasons, the declining
prices of LCD‟s and the ability to display numbers, characters and graphics. This is in
contract to LED‟s, which are limited to numbers and a few characters. Incorporation of a
refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the
LCD. In the contrast, the LED must be refreshed by the CPU to keep displaying the data.
Ease of programming for characters and graphics.
2.3.4 USES
The LCD‟s used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. These have resulted
in the LCD‟s is being extensively used in telecommunications and entertainment electronics.
The LCD‟s have even started replacing the cathode ray tubes (CRT‟s) used for the display of
text and graphics, and also in small TV applications.LCD adds a lot to our application in
terms of providing a useful interface for the user, debugging an application or just giving it a
"Professional" looks. The most common type of LCD controller is the Hitachi 44780, which
provides a relatively simple interface between a processor and an LCD.
1 Vss -- Ground
2.3.5 INTERFACING
To send any command to the LCD, make pin RS=0. For data, make RS=1.Then place
a high to low pulse on the E pin to enable the internal latch of the LCD.
A variable regulated power supply, also called a variable bench power supply, is one
where we can continuously adjust the output voltage to our requirements. This type of
regulation is ideal for having a simple variable bench power supply. While a dedicated supply
is quite handy, it‟s much handier to have a variable supply on hand, especially for testing.
Most digital logic circuits and processors need a 5 volt power supply. To use these parts we
need to build a regulated 5 volt source. Usually we start with an unregulated power supply
ranging from 9 volts to 24 volts DC. To make a 5 volt power supply, we use a LM7805
voltage regulator IC (Integrated Circuit).
CIRCUIT DIAGRAM
Transformers convert AC electricity from one voltage to another with a little loss of
power. Step-up transformers increase voltage, step-down transformers reduce voltage. Most
power supplies use a step-down transformer to reduce the dangerously high voltage to a safer
low voltage.
The input coil is called the primary and the output coil is called the secondary. There
is no electrical connection between the two coils; instead they are linked by an alternating
magnetic field created in the soft-iron core of the transformer. The two lines in the middle of
the circuit symbol represent the core. Transformers waste very little power so the power out
is (almost) equal to the power in. Note that as voltage is stepped down and current is stepped
up, the ratio of the number of turns on each coil, called the turn‟s ratio, determines the ratio
of the voltages. A step-down transformer has a large number of turns on its primary (input)
coil which is connected to the high voltage mains supply, and a small number of turns on its
secondary (output) coil to give a low output voltage.
Where,
2.4.4 FILTER
Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until the mains
voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage
received at this point changes. Therefore a regulator is applied at the output stage.
Figure 2.4.4 Filter
The LM7805 is simple to use. We simply connect the positive lead of our unregulated
DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative
lead to the Common pin and then when we turn on the power, we get a 5 volt supply from the
Output pin.
The light our eyes see is but a small part of a broad spectrum of electromagnetic
radiation. On the immediate high energy side of the visible spectrum lies the ultraviolet, and
on the low energy side is the infrared. The portion of the infrared region most useful for
analysis of organic compounds is not immediately adjacent to the visible spectrum, but is that
having a wavelength range from 2,500 to 16,000 nm, with a corresponding frequency range
from 1.9*1013 to 1.2*1014 Hz.( From http://hyperphysics.phy-astr.gsu.edu/hbase/ems3.html :
the frequency of infrared ranges from 0.003 - 4 x 1014 Hz or about 300 gigahertz to 400
terahertz.).
Infrared imaging is used extensively for both military and civilian purposes. Military
applications include target acquisition, surveillance, night vision, homing and tracking. Non-
military uses include thermal efficiency analysis, remote temperature sensing, short-ranged
wireless communication, spectroscopy, and weather forecasting. Infrared astronomy uses
sensor-equipped telescopes to penetrate dusty regions of space, such as molecular clouds;
detect cool objects such as planets, and to view highly red-shifted objects from the early days
of the universe
IR LED QED234:
2.5.2 FEATURES:
Emitter/Detector Alignment:
Good alignment of the emitter and detector is important for good operation, especially if
the gap is large. This can be done with a piece of string stretched between and in line with
LED and phototransistor. A length of dowel or stiff wire could be used to set the alignment.
Another method that can be used for longer distances is a laser pointer shone through one of
the mounting holes.
Connecting Block
This is simply a place for all the parts to plug in or connect to. Connecting blocks are
usually classified based on the number of outputs (how many IR emitters can connect to the
block) Amplified connecting blocks can generally support more outputs. All connecting
blocks can support many IR receivers wired in parallel. Connecting blocks are usually located
near the equipment that is to be controlled, along with the power supply and emitters. See our
connecting blocks here.
Infrared Emitters
IR Emitters generally "stick" onto the front of the device you want to control.
Therefore you need one emitter for each device. "Dual" emitters have two emitters and one
plug, so they only take up one jack of the connecting block. "Blink" emitters blink visibly as
well as infrared, so they are easier to troubleshoot. All emitters come with long cords and
extra double-stick tape. "Blast" style emitters, where one emitter blinks into several devices,
are usually less reliable but can be used when the environment is tightly controlled and
Applications:
Infrared Filters
Night vision
Thermography
Other imaging
Tracking
Heating
Communications
Spectroscopy
Meteorology
Climatology
Astronomy
Art history
Biological systems
Photobiomodulation
Health hazard
BUZZER
A buzzer or beeper is a signaling device, usually electronic, typically used in automobiles,
household appliances such as a microwave oven, or game shows.
It most commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually
illuminates a light on the appropriate button or control panel, and sounds a warning in the
form of a continuous or intermittent buzzing or beeping sound. Initially this device was based
on an electromechanical system which was identical to an electric bell without the metal gong
. Often these units were anchored to a wall or ceiling and used the ceiling or wall as a
sounding board. Another implementation with some AC-connected devices was to implement
a circuit to make the AC current into a noise loud enough to drive a loudspeaker and hook
this circuit up to a cheap 8-ohm speaker. Nowadays, it is more popular to use a ceramic-based
piezoelectric sounder like a Son alert which makes a high-pitched tone. Usually these were
hooked up to "driver" circuits which varied the pitch of the sound or pulsed the sound on and
off.
CHAPTER 3
SOFTWARE IMPLEMENTATION
Software Tools
Keil u Vision
Proteus simulation
Flash Magic
Keil provides a broad vary of development tools like ANSI C compiler, library managers ,
linkers , macro assemblers ,debuggers, simulators, IDE, period of time in operation systems
and analysis boards for 8051, 251, ARM, and XC16x/C16x/ST10 families.
In Oct 2005, Keil (KeilElektronik GmbH in Muenchen, Germany, and Keil computer code,
Inc. in Plano, Texas) was noninheritable by ARM.
Concept of Compiler:
ompilers are programs accustomed convert a High Level Language to computer code.
Desktop compilers manufacture AN output computer code for the underlying microchip,
however not for different microprocessors. I.E the programs written in one among the HLL
like „C‟ can compile the code to run on the system for a specific processor like x86
(underlying microchip within the computer). as an example compilers for Dos platform is
totally different from the Compilers for UNIX platform.
o if one desires to outline a compiler then compiler may be a program that interprets
ASCII text file into computer code. The compiler derives its name from the means it works,
watching the whole piece of ASCII text file and collection and reorganizing the instruction
Interpreter simply interprets whole program at a time whereas compiler analyses and execute
every line of ASCII text file in succession, while not watching the whole program.
The advantage of interpreters is that they'll execute a program instantly. second programs
created by compilers run a lot of quicker than a similar programs dead by AN interpreter. but
compilers need it slow before AN possible program emerges. currently as compilers translate
ASCII text file into computer code, that is exclusive for every variety of pc, several compilers
are on the market for a similar language.
Speed:
Assembly language programs are usually the quickest programs around.
Space:
Assembly language programs are typically the littlest.
Knowledge:
programing language can assist you write higher programs, even once victimization High
level languages.
KEIL uVision is the name of software dedicated to the development and testing of a family of
microcontrollers based on 8051 technology, like the 89S52 which we are going to use along
this tutorial. You can download an evaluation version of KEIL at their
website: https://www.keil.com/c51/. Most versions share merely the same interface, this
tutorial uses KEIL C51 uVision 3 with the C51 compiler v8.05a.
Flash Magic could also be a tool that accustomed program hex code in EEPROM of micro-
controller. It‟s a code package tool. It exclusively supports the micro-controller of Philips and
NXP. You‟ll burn a hex code into those controller that supports ISP (in system programming)
feature. To envision whether or not your micro-controller supports ISP or not take verify its
datasheet. Therefore if your device supports ISP then you will merely burn a hex code into
EEPROM of your device.
Flash magic supports several chips like ARM Cortex M0, M3, M4, ARM7 and 8051.
CHAPTER 4
HARDWARE TESTING
Devices that can be used to perform continuity tests include multi meters which
measure current and specialized continuity testers which are cheaper, more basic devices,
generally with a simple light bulb that lights up when current flows.An important application
is the continuity test of a bundle of wires so as to find the two ends belonging to a particular
one of these wires; there will be a negligible resistance between the "right" ends, and only
between the "right" ends.
This test is performed to check whether the voltage at different terminals is according
to the requirement or not. We take a multi meter and put it in voltage mode. Remember that
this test is performed without microcontroller. Firstly, we check the output of the transformer,
whether we get the required 12 v AC voltage Then we apply this voltage to the power supply
circuit. Note that we do this test without microcontroller because if there is any excessive
voltage, this may lead to damaging the controller. We check for the input to the voltage
regulator i.e., are we getting an input of 12v and an output of 5v. This 5v output is given to
th th
the microcontrollers‟ 40 pin. Hence we check for the voltage level at 40 pin.
4.3 STANDARD CONNECTIONS TO MICRO CONTROLLER
ATMEL series of 8051 family of micro controllers need certain standard connections.
The actual number of the Micro controller could be “89C51” , “89C52” , “89S51” , “89S52” ,
as regards to 20 pin configuration a number of “89C2051”. The 4 set of I/O ports are used
based on the project requirement. Every micro controller requires a timing reference for its
internal program execution therefore an oscillator needs to be functional with a desired
frequency to obtain the timing reference as t =1/f.
A crystal ranging from 2 to 20 MHz are required to be used at its pin number 18 and
19 for the oscillator. Typically 11.0592 MHz crystal is used in general for most of the
circuits. Crystal provides the reference frequency only and it is not a crystal oscillator as miss
understood by many but it oscillates at 11.0592MHz. Two small value ceramic capacitors‟
of33PF each is used as a standard connection for the crystal as shown in the circuit diagram.
CHAPTER 5
RESULT AND ANALYSIS
After checking the hardware components and the circuit thoroughly, the output of the
circuit is verifies and the results are noted. Power up the Circuit and To control the wheel
Chair using Mems sensor,toggle switch to Sensor mode,according to hand movements the
wheel rotates. To control the wheel chair using RF module ,toggle switch to RF mode and
according to switched.
LIMITATIONS
1. The on-board batteries occupy a lot of space and are also quite heavy. We can either
use some alternate power source for the batteries or replace the current DC Motors
with ones which require less power.
2. Secondly, as we are using RF for wireless transmission, the range is quite limited;
nearly 50-80m. This problem can be solved by utilizing a GSM module for wireless
transmission. The GSM infrastructure is installed almost all over the world. GSM will
not only provide wireless connectivity but also quite a large range.
APPLICATIONS
1. Through the use of gesture recognition, remote control with the wave of a hand of
various devices is possible.
2. Gesture controlling is very helpful for handicapped and physically disabled people to
achieve certain tasks, such as driving a vehicle.
3. Gestures can be used to control interactions for entertainment purposes such as
gaming to make the game player's experience more interactive or immersive.
CONCLUSION
The project “WHEEL CHAIR BASED ON MEMS AND RF” has been successfully designed
and tested. This system is designed at low cost and is used to for physically challenged
persons for their independent movement.. The remote control function by the RF module and
MEMS sensor provides the ability and freedom to turn the wheelchair into the desired
direction. Of course some training is essential to use the sensor as its quite sensitive but in the
end there could not be a better use of technology for an individual who is deprived of the
same physical strength.Improvements can be made by using various body gestures such as
eye gaze, legmovement or head movement accordingly.
FUTURE SCOPE
In Anti falling system there will be a sensor system that will find the edges and
corners and will raise the command for stop movement. For this modification we can use
accelerometer as well as Infrared sensors.
In Ramp detection system there will be a sensor system that will find the Ramp edges
and corners and will raise the command for stop movement. For this modification we can use
accelerometer, accelerometer again measure the tilt angle and will stop the backward
movement of the wheelchair but forward movement will be continued.
This project can be extended by using a heart beat sensors to this system. Heart beat
sensor continuously monitors the heart rate, which can be designed such that alarm horns if
the heart level goes beyond set level.
We can use voice command IC to interface our voice signals with microcontroller.
The voice stored in IC could be sufficient to analyze speakers voice Command .