Chapter-1 Introduction To Embedded Systems: Characteristics
Chapter-1 Introduction To Embedded Systems: Characteristics
Characteristics:
1
usability; others may have low or no performance requirements, allowing the
system hardware to be simplified to reduce costs.
2. Embedded systems are not always standalone devices. Many embedded
systems consist of small, computerized parts within a larger device that serves
a more general purpose. For example, the Gibson Robot Guitar features an
embedded system for tuning the strings, but the overall purpose of the Robot
Guitar is, of course, to play music. Similarly, an embedded system in an
automobile provides a specific function as a subsystem of the car itself.
3. The software written for embedded systems is often called firmware, and is
usually stored in read-only memory or Flash memory chips rather than a disk
drive. It often runs with limited computer hardware resources: small or no
keyboard, screen, and little memory.
CPU Platforms:
Peripherals:
Embedded Systems talk with the outside world via peripherals, such as
2
Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485 etc
Synchronous Serial Communication Interface: I2C, JTAG, SPI, SSC and ESSI
Universal Serial Bus (USB)
Networks: Ethernet, Controller Area Network, LAN networks, etc
Timers: PLL(s), Capture/Compare and Time Processing Units
Discrete IO: aka General Purpose Input/output (GPIO)
Analog to Digital/Digital to Analog (ADC/DAC)
Tools:
As for other software, embedded system designers use compilers, assemblers, and
debuggers to develop embedded system software. However, they may also use some
more specific tools:
3
As the complexity of embedded systems grows, higher level tools and operating
systems are migrating into machinery where it makes sense. For example, cell phones,
personal digital assistants and other consumer computers often need significant
software that is purchased or provided by a person other than the manufacturer of the
electronics. In these systems, an open programming environment such as Linux,
NetBSD, OSGi or Embedded Java is required so that the third-party software provider
can sell to a large market.
4
CHAPTER-2
Project Objective:
The goal of the project was to create a device to help a blind person navigate
in an indoor environment and avoid obstacles of varying heights as well as detect
stairs.
Intro:
5
measure the depth in case of dealing with the stairs and on stick vibration circuitry to
inform the obstacle alert. These different units are discussed to implement the design
of a “smart stick”.
Block diagram:
Power supply
ULTRASONIC
LDR
6
Design Process:
Part 1:
The disadvantage if the ultrasound sensor was that it required a pulse trigger
in order for it to work and required additional programming in order to calculate
distances from the pulse width that is the output of the sensor. In the end, we chose to
implement ultrasound sensors in our smart cane. For feedback, we decided to use
vibration motors. Vibration feedback is quicker than, for example, a voice feedback
system that would say “obstacle on the left.” Vibration feedback is also more
advantageous than auditory feedback because it does not distract from auditory
sensory information from the environment that are important for a blind person have.
Part 2:
Programming the Microprocessor All the processing for the project was done
on one arduino uno microcontroller. We chose this model as we had previous
experience with it and because it was in ready supply. The code was relatively simple
and was written and compiled . An external programmer connected to port COM1 on
the computer was utilized in order to program and reprogram the microcontroller as
necessary. Once programmed, the microcontroller was placed onto the circuit board
for use. For debugging purposes, a circuit to interface with the microcontroller to the
serial port on the computer, was used. The microcontroller utilized an external
20MHz clock. The final code triggered the sensors, via pin , and read in the output
one at a time for each of the four sensors, on pins . After the trigger is sent, the
7
microcontroller was programmed to wait while the sensor output was low, then start
counting cycles when it went high. This counter was used as a measure of the pulse
width. Some simple logic was performed to determine whether or not to activate or
deactivate the actuator associated with that sensor
8
CHAPTER-3
ARDUINO
Arduino interface boards provide the engineers, artists, designers, hobbyists and anyone
who tinker with technology with a low-cost, easy-to-use technology to create their creative,
interactive objects, useful projects etc., A whole new breed of projects can now be built that
can be controlled from a computer.
The name “Arduino” is reserved by the original makers. However, clone Arduino designs
often have the letters “duino” on the end of their name, for example, Freeduino or
DFRduino. The software for programming your Arduino is easy to use and also freely
available for Windows, Mac, and LINUX computers at no cost.
9
1.1.1 Microcontroller
Microcontroller can be described as a computer embedded on a rather small circuit
board.To describe the function of a microcontroller more precisely,it is a single chip that can
perform various calculations and tasks,and send/receive signals from other devices via the
available pins. Precisely what tasks and communication with the world it does, is what is
governed by what instructions we give to the Microcontroller. It is this job of telling the chip
what to do, is what we refer to as programming on it.
However, the uC by itself, cannot accomplish much; it needs several external inputs:
power, for one; a steady clock signal, for another. Also, the job of programming it has to be
accomplished by an external circuit. So typically, a uC is used along with a circuit which
provides these things to it; this combination is called a microcontroller board. The Arduino
Uno that you have recieved, is one such microcontroller board. The actual microcontroller at
its heart is the chip called Atmega328. The advantages that Arduino offers over other
microcontroller boards are largely in terms of reliability of the circuit hardware as well as
the ease of programming and using it.
10
“…we started to figure out how could we make the whole platform even simpler, even
cheaper, even easier to use. And then we started to essentially reimplement the whole thing
as an open source project.”
Once they had a prototype, a student wrote the software that would allow
wiring programs to run on the new platform. Upon seeing the project, visiting professor
Casey Reas suggested that there might be wider applications than just design schools for the
new product. The prototype was redesigned for mass production and a test run of 200 boards
was made. Orders began coming in from other design schools and the students looking for
Arduinos, and the Arduino project was born and Massimo Banzi and David Cuartielles
became its founders.”ARDUINO” is an Italian word,meaning “STRONG FRIEND”.The
English version of the name is “Hardwin”. As of May 2011,more than 300,000 Arduino
units are “in the wild”.
11
2011 300 000
1.2.3 Competitors
Before Arduino, the largest players in the design/hobbyist market segment were the PIC
microcontroller family (made by Microchip) and the BASIC Stamp (made by Parallax).
Since the introduction of the Arduino, other large companies have tried to enter the hobbyist
market, including Texas Instruments , and even Microsoft . However, the open-sourced tools
of the Arduino and the size of its community are large barriers for new platforms to
overcome.
1.2.4 Community
As the project is aimed at students and hobbyists who may not have any formal
electronics background, there are many excellent guides online covering everything from
making a light blink to creating a laser harp. The official forum has almost 60 000
registered users, and along with helping users with their projects, is extremely active in
developing new libraries to extend the functionality of the Arduino . The open-source share
and share alike sentiment is very strong, and the vast majority of users freely publish the
code to their projects.
12
1.3 PHYSICAL COMPUTING
Physical Computing is an approach to learn how humans communicate through
computers that starts by considering how humans express themselves physically.
2.1 HARDWARE
16 MHz
8 Kbyte Flash RAM(1K taken by the boot loader)
13
1 Kbyte RAM(eg.for auto/local variables and stack)
14 digital Input/Output Ports
Figure 5 ATmega8
Figure 6 ARDUINO can run off with USB or EXTERNAL power source
14
The power requirement for ARDUINO is 9 to 12V DC,250mA or more,2.1mm plug,centre
pin positive.
Current rating: Since you'll probably be connecting other things to the Arduino
(LEDs, LCDs, servos) you should get an adapter that can supply at least 500mA, or even
1000 mA (1 ampère). That way you can be sure you have enough juice to make each
component of the circuit function reliably.
15
2. Arduino Mega 2560:
A larger, more powerful Arduino board. Has extra digital pins, PWM pins, analog inputs,
serial ports, etc. The version of the Mega released with the Uno, this version features the
Atmega2560, which has twice the memory, and uses the ATMega 8U2 for USB-to-serial
communication.
16
2.Pulse width modulation (PWM)
The Arduino has 8bit of resolution,when outputting a signal using PWM.The range of
output voltage is from 0 to 5 Volts
2power 8=255 Increments
Average of on/off(digital signals to make an average voltage),Duty cycle in 100% of 5Volts.
2.3 LANGUAGE REFERENCES:
The Microcontroller on the board is programmed using the Arduino programming
language(based on wiring) and the arduino development environment(based on
processing).
2.3.1 Arduino Programming Language(APL)(based on wiring)
The Arduino programming language is an implementation of Wiring, a similar physical
computing platform, which is based on the Processing multimedia programming
environment.
2.3.1.1 Wiring
Wiring is an open-source programming framework for microcontrollers. Wiring
allows writing cross-platform software to control devices attached to a wide range of
microcontroller boards to create all kinds of creative coding, interactive objects, spaces or
physical experiences. The framework is thoughtfully created with designers and artists in
mind to encourage a community where beginners through experts from around the world
share ideas, knowledge and their collective experience. There are thousands of students,
artists, designers, researchers, and hobbyists who use Wiring for learning, prototyping, and
finished professional work production.
2.3.2 Arduino development environment(based on processing)
2.3.2.1 Processing
Processing is an open source programming language and environment for people
who want to create images, animations, and interactions. Initially developed to serve as a
software sketchbook and to teach fundamentals of computer programming within a visual
context, Processing also has evolved into a tool for generating finished professional work.
Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists
who use Processing for learning, prototyping, and production.
17
APPLICATIONS OF ARDUINO
Arduino is used by all class of people in a different way.some students use it in their
projects,some using arduino for fun,some went out to become entreupreuners.This only
shows how useful is this tiny device.
the Arduino is both a cute, blue micro controller platform that fits nicely in the palm of your
hand and an expanding community of developers who support it, distributed across two
dozen coun tries, four continents, and counting.
18
The Arduino board is for anyone who wants to build a basic level of
intelligence into an object. Once programmed, it can read sensors, make simple deci sions,
and control myriad devices in the real world. Using it is a snap: first, hook up a few sensors
and output devices to the Arduino, then program it using the free developer’s software.
Next, debug your code and disconnect the Arduino.Then,the little blue Arduino becomes a
standalone computer.
The original intention of the Arduino project was to see what would happen if
community support were substituted for the corporate support that is usually required for
electronics development. The first developers — Massimo Banzi, David Cuartielles, David
Mellis, and Nicholas Zambetti — ran a series of workshops on assembling the Arduino,
giving away the board to stimulate development.
Thousands of projects have been done worldwide using this tiny little
device.some of which to mention are:
19
VU meter
Various power projects like
LCD Thermostat
Computer controlled fan
The hypnotizer
Miscellaneous Projects like
Lie detector
Magnetic door lock
Infrared remote
Lilypad binary clock
Just to name a few….as the trademark goes,there are nearly infinite possible
projects using this tiny device,which we still yet to discover
20
Why Arduino is popular?
Here are five reasons why the Arduino is more popular than beagleboard:
Starter Projects: Editing and rewriting is often easier than writing from
scratch. It’s the same with electronics. It’s easier to mod an idea than start with a blank
slate.That’s where the BeagleBoard falls short. “It has virtually no example application that
you can just copy and hack to learn from,” says Massimo Banzi, one of the co-founders of
the Arduino project. It’s a chicken-and-egg problem for the BeagleBoard. Unless there are
more example codes out there, it is difficult to draw in the audience. And without the
audience it is challenging to get enough sample projects into the community.
21
“Parts of it have aged and you spend quite a bit of time jumping from wikis to mailing list to
track which specific bit of documentation applies to your board, bootloader etc.,” he says.
Maturity is the key: Arduino has had a head start on the BeagleBoard. By
October 2008, about 50,000 Arduino boards had already been shipped. That year, the first
BeagleBoards started making their way into the hands of hardware enthusiasts. The
BeagleBoard is just two years old. Since it hasn’t been around long enough, there’s not
enough people building apps based on it,” says Chellman. That’s not to say that
BeagleBoard isn’t catching up. Earlier this month, we showed five projects ranging from
a videowall to the iPad of ham radios that use the BeagleBoard. There’s also a build-your-
own tablet kit that is based off the BeagleBoard.
22
CHAPTER-4
Introduction
The SRF05 is an evolutionary step from the SRF04, and has been designed to increase
flexibility, increase range, and to reduce costs still further. As such, the SRF05 is fully
compatible with the SRF04. Range is increased from 3 meters to 4 meters. A new
operating mode (tying the mode pin to ground) allows the SRF05 to use a single pin
for both trigger and echo, thereby saving valuable pins on your controller. When the
mode pin is left unconnected, the SRF05 operates with separate trigger and echo pins,
like the SRF04. The SRF05 includes a small delay before the echo pulse to give
slower controllers such as the Basic Stamp and Picaxe time to execute their pulse in
commands.
23
device then sounds an audible alarm together with providing onward signaling in the
presence of enough water to bridge the contacts. These are useful in a normally
occupied area near any infrastructure that has the potential to leak water, such as
HVAC, water pipes, drain pipes, vending machines, dehumidifiers, or water tanks.
Introduction:
24
A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its
own charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic devices the
only available electrons are in the valence band, and hence the photon must have enough
energy to excite the electron across the entire band gap. Extrinsic devices have impurities,
also called dopants, added whose ground state energy is closer to the conduction band;
since the electrons don't have as far to jump, lower energy photons (i.e., longer wavelengths
and lower frequencies) are sufficient to trigger the device. If a sample of silicon has some of
its atoms replaced by phosphorus atoms (impurities), there will be extra electrons available
for conduction. This is an example of an extrinsic semiconductor.
conduction band
band
band valence
bands
gap
(CdS) cells rely on the material's ability to vary its resistance according to the
amount of light striking the cell. The more light that strikes the cell, the lower the
resistance. though not accurate, even a simple CdS cell can have a wide range of
resistance from less than 100 Ω in bright light to in excess of 10 MΩ in darkness.
Standard cadmium based LDRs have a frequency response that varies according
to light level, but typical fall times range from 15ms to 25ms and typical rise times
range from 50ms to 70ms, so they may be unsuitable for data links and picture
scanning. Probably the best known LDR is the ORP12. Smaller cheaper devices are
more popular today.
25
A sample LDR light sencor circuit:
When the light level is low the resistance of the LDR is high. This prevents
current from flowing to the base of the transistors. Consequently the LED does not
light.
26
However, when light shines onto the LDR its resistance falls and current flows into
the base of the first transistor and then the second transistor. The LED lights.
The preset resistor can be turned up or down to increase or decrease resistance, in this
way it can make the circuit more or less sensitive.
Applications:
Photo resistors come in many different types. Inexpensive cadmium sulfide cells
can be found in many consumer items such as camera light meters, clock radios,
security alarms, street lights and outdoor clocks.
They are also used in some dynamic compressors together with a small incandescent
lamp or light emitting diode to control gain reduction.
Lead sulfide and indium antimonite LDRs are used for the mid infrared spectral
region. Ge:Cu photoconductors are among the best far-infrared detectors available,
and are used for infrared astronomy and infrared spectroscopy.
VOICE MODULE:
Features :
Single Chip, High Quality Audio/Voice Recording & Playback Solution
Operating Voltage Range: 3V ~ 6.5V DC
27
Supports Power-Down Mode for Power Saving . Built-in Audio-Recording
Microphone Amplifier
High Quality Analog to Digital and PWM module
Resolution up to 16-bits
Upto 8 voice messages record & playback
How to Operate :
Provide 12v DC as supply to board.On board regulator converts it to 5v for the IC.
While in record mode choose any pin from J5 (M0-M7) to select a channel to
record the message.
For e.g to record message in channel M0 , Connect M0 to GND (you can use
Jumper J3 GND pin).
Speak through the MIC .The LED LD2 will be ON indicating REC is ON. Once the
duration is full ( 1.3 minutes) the LED goes OFF.
Now disconnect the GND Connection from M0 .If you remove this connection in
between,the rest duration for that message slot is kept empty.
To control this board from a Microcontroller connect the I/O port pins to M0 -- M7.
Make the particular Port pin LOW to play back the Recorded message.
28
CHAPTER-5
SOFTWARE IMPLEMMENTATION
Software
The software used by the arduino is Arduino IDE.
he Arduino IDE is a cross-platform application written in Java, and is derived from the IDE
for the Processing programming language and the Wiringproject. It is designed to introduce
programming to artists and other newcomers unfamiliar with software development. It
includes a code editor with features such as syntax highlighting, brace matching, and
automatic indentation, and is also capable of compiling and uploading programs to the board
with a single click. There is typically no need to edit makefiles or run programs on
acommand-line interface. Although building on command-line is possible if required with
some third-party tools such as Ino.
The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same
name), which makes many common input/output operations much easier. Arduino programs
are written in C/C++, although users only need define two functions to make a runnable
program:
setup() – a function run once at the start of a program that can initialize
settings
loop() – a function called repeatedly until the board powers off
29
Figure 9 A screenshot of the Arduino IDE showing the "Blink"program,a simple
biginner program
A typical first program for a microcontroller simply blinks a LED on and off. In the Arduino
environment, the user might write a program like this:
#define LED_PIN 13
void setup () {
pinMode (LED_PIN, OUTPUT); // enable pin 13 for digital output
}
void loop () {
digitalWrite (LED_PIN, HIGH); // turn on the LED
delay (1000); // wait one second (1000 milliseconds)
digitalWrite (LED_PIN, LOW); // turn off the LED
delay (1000); // wait one second
}
For the above code to work correctly, the positive side of the LED must be connected to pin
13 and the negative side of the LED must be connected to ground. The above code would
not be seen by a standard C++ compiler as a valid program, so when the user clicks the
"Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file
with an extra include header at the top and a very simple main() function at the bottom, to
make it a valid C++ program.
30
The Arduino IDE uses the GNU toolchain and AVR Libc to compile programs, and
uses avrdude to upload programs to the board.
Arduino programs can be divided in three main parts: structure, values (variables and
constants), and functions.
•void
•boolean
•char ( 0 – 255)
•float
•double
•String - object
•array
Arithmetic operators
Arithmetic operators include addition,subtraction,multiplication and division.For math that
requires fractions,you can use float variables,if you can bear large size and slow
computation speeds in your microcontroller.
e.g. ,
y = y + 3;
x = x – 7;
i = j * 6;
31
r = r / 5;
Comparision operators
Comparisons of one variable or constant against another are often used in if statements to
test if a specified condition is true.
e.g. ,
x == y // x is equal to y
x != y // x is not equal to y
x < y // x is less than y
x > y // x is greater than y
x <= y // x is less than or equal to y
x >= y // x is greater than or equal to y
Logical operators
Logical operators are usually a way to logically combine two expressions and return a
TRUE or FALSE depending on the operator.
There are three logical operators, AND, OR, and NOT.
e.g. ,
Logical AND:
if (x > 0 && x < 5) // true only if both expressions are true
Logical OR:
if (x > 0 || y > 0) // true if either expression is true
Logical NOT:
if (!x > 0) // true only if expression
TRUE/FALSE
These are Boolean constants that define logic levels of the arduino.
FALSE is easily defined as 0 (zero)
TRUE is often defined as 1, but can also be anything else except zero. So in a Boolean
sense, -1, 2, and -200 are all also defined as TRUE.
e.g. ,
if (abcd== TRUE);
{
DoSomethingNice;
}
else
32
{
DoSomethingHorrible;
}
HIGH/LOW
These constants define pin levels as HIGH or LOW and are used when reading or writing
to digital pins.
HIGH is defined as logic level 1, ON, or 5 volts
LOW is logic level 0, OFF, or 0 volts.
e.g. ,
digitalWrite(13, HIGH);
INPUT/OUTPUT
These constants define pin levels as HIGH or LOW and are used when reading or writing
to digital pins.
HIGH is defined as logic level 1, ON, or 5 volts
LOW is logic level 0, OFF, or 0 volts.
e.g. ,
pinmode(13, OUTPUT);
33
Figure 10 Comparision between Arduino and Processing language
SIMULATOR for ARDUINO:
The Arduino Simulator app gives the user the freedom to work without the basic setup
of hardware and software. It is designed to be used by beginners and also, experienced
developers, who want to quickly develop Arduino projects.
The developer can make the necessary changes in the code - delay, pin number, and state - 0
(low) 1 (high) - and check it immediately. The app shows the breadboard, complete with 14
LED pins.
You can drag and place the wires in the correct positions to connect to Arduino. If the wires
are placed according to the code, then it will show the expected results. Once satisfied, you
can save it and email it. The code can be copied and used in an actual project just as easily.
This app is an easy way to work through Arduino projects. With customisable codes, and a
simple to use interface, this Arduino Simulator app from Schogini Systems is a convenient
app for Arduino developers.
34
CHAPTER-7
RESULT
The Blind Walking Stick has been finally made into a prototype which can be
used to guide the blind. It majorly uses an ultra-sonic sensor to detect the front
obstacles, an infra-red sensor to detect the obstacles underneath, fire sensor to detect
any kind of fire hazard and water sensors that sense any kind water allowing the safe
walk of the blind people. It has buzzers incorporated into itself that gives different
sounds from different sensors making navigation very easy.
35
CHAPTER-8
CONCLUSION
Smart Sensors are not just a fad, they are the wave of the future. As more
people realize the value of these inventions the field will grow without bounds. This
can be demonstrated by the design specified. It’s practical, cost efficient and
extremely useful. If all of these characteristics weren’t enough to warrant
investigation into this field of study, these inventions will also make the inventor very
wealthy. This project is application based as it has an application for blind people. It
can be further improved to have more decision taking capabilities by employing
varied types of sensors and thus could be used for different applications. It aims to
solve the problems faced by the blind people in their daily life. The system also takes
measures to ensure their safety
FUTURE SCOPE
It can be further enhanced by using VLSI technology to design the PCB unit.
This makes the system further more compact. Also, use of active RFID tags will
transmit the location information automatically to the PCB unit, when the intelligent
stick is in its range. The RFID sensor doesn’t have to read it explicitly. A variety of
future scopes are available that can be used of with the stick such as the usage of a
GSM module helping to find the tick with the help of mobile phones, usage of GPS
system incorporating the entire assembly into belt of people. The global position of'
the user is obtained using the global positioning system (GPS), and their current
position and guidance to their destination will be given to the user by voice. It can
also contain special arrangement to connect the walking stick to the aadhar card of
blinds, helping the government serve the physically disabled even better.
36
REFRENCES
1. Mohd Helmy Abd Wahab, Amirul A. Talib, Herdawatie A.Kadir, Ayob Johari,
A.Noraziah, Roslina M. Sidek, Ariffin A. ,”Smart cane: assistive cane for visually
impaired people”, IJCSI, Vol.8 Issue 4, July 2011.
3. F. van der Heijden, P.P.L. Regtien, , ”Wearable navigation assistance - a tool for
the blind “ MEASUREMENT SCIENCE REVIEW, Volume 5, Section 2, 2005 .
4. Larisa Dunai, Guillermo Peris Fajarnes, “Victor Santiago Praderas, Beatriz Defez
Garcia, Ismael Lengua Lengua ―Real–Time Assistance Prototype – a new
Navigation Aid for blind people” 978-1-4244-5226-2/10/$26.00 ©2010 IEEE.
5. Shamsi, M.A.; Al-Qutayri, M.; Jeedella, J., “Blind assistant navigation system
Biomedical Engineering (MECBME)” 1st Middle East Conference on 21-24 Feb.
2011
37