Inroduction 1.1 Embedded System
Inroduction 1.1 Embedded System
Inroduction 1.1 Embedded System
INRODUCTION
1.1 EMBEDDED SYSTEM:
Embedded system is the only technology which is developing and used in day to
day life. Embedded system is defined as the combination of hardware and software. This
combinations ultimate result will be a specified task done by a machine or a prototype.
Some of the commonly known control devices used in embedded system is
microprocessor and microcontroller. But they have the oldest technology at present because of
their low memory, slow process unit etc.
The current trend of technology development in embedded system needs more
process memory because of multitask. In the embedded system world the technology was
developed this much faster is by simple proverb which is hard work has to be replaced by
smart work for time management.
There is no clear definition of what embedded system is-it may vary in size from
a single chip to a large multiple-processor system. To make a complete based on the purpose of
the project the size and working unit controllers count will vary in embedded system. Any
task can be achieved by embedded technology.
The embedded system was now a days is used to make many prototypes useful for
making the human work easy and it make sure that the peoples safety and comfort zone in a
good manner.
The one of the first recognizable modern embedded system was Apollo guidance
computer, developed by Charles Stark Darper at MIT instrumentation laboratory. This have
happened in 1960s and after this the development was grown faster as we are seeing and the
size of the chips were reduced by the VLSI technology.
The memory of the processor was also raised and the weight also reduced and this
development also a reason for making the developer to develop their ideas in embedded
system.
Using embedded system the society oriented projects were developed to guide
people and to make some alert, or make some remote controlled devices to make automation in
field work like agricultural, gas leak alert, theft find and remote lock the bike are some
examples for the embedded system projects.
Current technology was guiding the visually limited people by tactic feedback. This
current technology was guiding them but they must be very clear about the vibration meaning
else they will be resulted in danger.
1.4 ABSTRACT:
To study about the visually limited people and create a compact tool. This is the
combination of a controller (Atmega 328) with ultrasonic sensor (HR_SR04) for input and to
guide the user by an audio output by voice module (SD_Shield) through earphone. These are
interfaced and embedded to work by the Arduino IDE programing software. There are three
HR-SR04 was used each sensor has a specific task. first sensor will cover the upper body of the
user and detect
the problems approaching it, followed by the second sensor will cover and
detect the overhead problems and the third sensor will cover and detect the problems
approaching in the lower body. The reaction of the HR_SR04 were concordinated and based on
evaluated sampled values the respective wave files stored in SD_Shield were picked and
played through Earphone.
CHAPTER 2
Provides brief explanation regarding background of our embedded project.
CHAPTER 3
Complete technical details, modification and our module study.
CHAPTER 4
Presents the discussion about simulations done and the results.
CHAPTER 5
Provides the conclusion and future scope of the project.
CHAPTER 2
2 THE BACKGROUND TOOLS AND SOFTWARE USED:
The List of Tools:
Atmega 328 [controller]
Ultrasonic sensor [input device]
SD Shield [to store the audio file]
Head set [output device]
THE LIST OF SOFTWARE
Arduino IDE.
Online mp3towave file converting website [any].
2.1 ARDUINO PROGRAMING LANGUAGE:
This Arduino was the best programing language which is free of cost and easy to
use and to present our idea. Its reach was in the world wide because of its user friendly nature.
If we need to help or to do some modification in Arduino by adding a library or creating a
library is easy and maximum of library and sample codes are available in the software itself for
tutorial purpose. So we can learn the Arduino very easily.
In Arduino the programming and interfacing is simple and availability of
programmable board are in a wide variety. The program controller we used in this project is
Atmega 328.
It has more or less the same functionality of the Arduino Duemilanove, but in a
different package. It lacks only a DC power jack, and works with a Mini-B USB cable instead
of a standard one. The Nano was designed and is being produced by Gravitech.
2.2.1 POWER:
The Atmega 328 can be powered via the Mini-B USB connection, 6-20V
unregulated external power supply (pin 30), or 5V regulated external power supply (pin 27).
The power source is automatically selected to the highest voltage source.
The FTDI FT232RL chip on the Nano is only powered if the board is being
powered over USB. As a result, when running on external (non-USB) power, the 3.3V output
(which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if
digital pins 0 or 1 are high.
2.2.2 MEMORY:
The ATmega168 has 16 KB of flash memory for storing code (of which 2 KB is
used for the boot loader); the ATmega328 has 32 KB, (also with 2 KB used for the boot
loader). The ATmega168 has 1 KB of SRAM and 512 bytes of EEPROM (which can be read
and written with the EEPROM Library; the ATmega328 has 2 KB of SRAM and 1 KB of
EEPROM.
5
2.2.4 PROGRAMING:
The Atmega 328 can be programmed with the Arduino software. Select "Arduino
Diecimila, Duemilanove, ATmega328" from the Tools > Board menu (according to the
microcontroller on your board). For details, see the reference and tutorials.
The ATmega328 on the Atmega 328 comes preburned with a boot loader that
allows you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol.
You can also bypass the bootloader and program the microcontroller through the
ICSP (In-Circuit Serial Programming) header; see these instructions for details.
2.3 HR_SR04:
When voltage is applied to piezoelectric ceramics, mechanical distortion is
generated according to the voltage and frequency. On the other hand, when vibration is applied
to piezoelectric ceramics, an electric charge is produced. By applying this principle, when an
electric signal is added to a vibrator, constructed of 2 sheets of piezoelectric ceramics or a sheet
of piezoelectric ceramics and a metal sheet, an electric signal is radiated by flexure vibration.
As a reverse effect, when an ultrasonic vibration is added to the vibrator, an electric signal is
produced Because of these effects, piezoelectric ceramics are utilized as ultrasonic sensors.
2.2Simulation of Vibration
Ultrasonic Sensor
2.4 SD_Shield:
SD_Shield is device which helps to add or extend the memory. In our project
SD_Shield place the ultimate role because our new idea in this project guidance done by voice.
The module (Micro SD Card Adapter) is a Micro SD card reader module, and
the SPI interface via the file system driver, micro controller system to complete the Micro SD
card read and write files. Users can directly use the Arduino IDE comes with an SD card to
complete the library card initialization and read-write
SD_Shield image
2.4.1 FEATURES:
Support Micro SD Card, Micro SDHC card (high-speed card). The level
conversion circuit board that can interface level is 5V or 3.3V
Power supply is 4.5V ~ 5.5V, 3.3V voltage regulator circuit board Communication
interface is a standard SPI interface4 M2 screw positioning holes for easy installation Control
Interface: A total of six pins (GND, VCC, MISO, MOSI, SCK, CS), GND to ground, VCC is
the power supply, MISO, MOSI, SCK is the SPI bus, CS is the chip select signal pin; 3.3V
regulator circuit: LDO regulator output 3.3V as level converter chip, Micro SD card supply
Level conversion circuit: Micro SD card into the direction of signals into 3.3V,
Micro SD card toward the direction of the control interface MISO signal is also converted to
3.3V, general AVR microcontroller system can read the signal
Micro SD card connector: yes since the bomb deck for easy card insertion and
removal Positioning holes: 4 M2 screws positioning hole diameter of 2.2mm, the module is
easy to install positioning, to achieve inter-module combination Micro SD Card Interface
Module Control Interface: A total of six pins (GND, VCC, MISO, MOSI, SCK, CS), GND to
ground , VCC is the power supply , MISO, MOSI, SCK is SPI bus , CS is the chip select signal
pin3.3V voltage regulator circuit : LDO regulator output is 3.3V level converter chip , Micro
SD card supply
Level conversion circuit : Micro SD card into the direction of the signal is
converted to 3.3V, Micro SD card interfaces to control the direction of the MISO signal is also
converted into 3.3V, general AVR microcontroller system can read the signal ;
Micro SD card connector: a self- bomb deck, easy card insertion.
Positioning holes: 4 M2 screws positioning whole diameter is 2.2mm, the
positioning of the module is easy to install, to achieve inter- module combination;
10
The above layout is the actual circuit to build the project. This bread circuit is the
working lab module designed in a fritzing.0.9.2b.64.pc software. The circuit has all the specified
parts and they were been connected by wire.The power supply is directly given in the Atmega 328
through power bank.
11
CHAPTER-3
WORKING CONDITION
3.1 THE WORKING CONDITION TEXT FORMAT:
12
3.2 PROGRAM:
#include <SD.h>
#include <pcmConfig.h>
#include <pcmRF.h>
#include <TMRpcm.h>
#include <SPI.h>
String inputString ;//= "";
char mychar;
const int CS_PIN = 4;
TMRpcm tmrpcm;
/*int resetPin = A2; // The pin number of the reset pin.
int clockPin = A3; // The pin number of the clock pin.
int dataPin = A4; // The pin number of the data pin.
int busyPin = A5; // The pin number of the busy pin.
Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);*/
#define echoPin_0 2 // Echo Pin
#define trigPin_0 3 // Trigger Pin
//#define LEDPin 13 // Onboard LED
//#define LED2Pin 11
int maximumRange_0 = 200; // Maximum range needed
13
14
{
Serial.begin (9600);
pinMode(trigPin_0, OUTPUT);
pinMode(echoPin_0, INPUT);
pinMode(trigPin_1, OUTPUT);
pinMode(echoPin_1, INPUT);
pinMode(trigPin_2, OUTPUT);
pinMode(echoPin_2, INPUT);
//pinMode(LEDPin, OUTPUT); // Use LED indicator (if required)
//wtv020sd16p.reset();
tmrpcm.speakerPin = 9;
Serial.println("Initializing Card");
pinMode(CS_PIN, OUTPUT);
if(!SD.begin(CS_PIN))
{
Serial.println("Card Failure");
return;
}
Serial.println("Card Ready");
tmrpcm.play("1.wav");
}
//******************************************************************
15
void loop()
{case_0();
delay(500);
case_1();
delay(500);
case_2();
delay(500);
Serial.println(inputString);
if (inputString == "A1B1C1")
{
tmrpcm.play("1.wav");
//inputString = "";
}
else if(inputString == "A1B1C2")
{
tmrpcm.play("2.wav");
}
else if(inputString == "A1B1C3")
{
tmrpcm.play("3.wav");
}
else if(inputString == "A1B1C4")
16
{
tmrpcm.play("4.wav");
}
else if(inputString == "A1B2C1")
{
tmrpcm.play("5.wav");
}
else if(inputString == "A1B2C2")
{
tmrpcm.play("6.wav");
}
else if(inputString == "A1B2C3")
{
tmrpcm.play("7.wav");
}
else if(inputString == "A1B2C4")
{
tmrpcm.play("8.wav");
}
else if(inputString == "A1B3C1")
{
tmrpcm.play("9.wav");
17
}
else if(inputString == "A1B3C2")
{
tmrpcm.play("10.wav");
}
else if(inputString == "A1B3C3")
{
tmrpcm.play("11.wav");
}
else if(inputString == "A1B3C4")
{
tmrpcm.play("12.wav");
}
else if(inputString == "A2B1C1")
{
tmrpcm.play("13.wav");
}
else if(inputString == "A2B1C2")
{
tmrpcm.play("14.wav");
}
else if(inputString == "A2B1C3")
18
{
tmrpcm.play("15.wav");
}
else if(inputString == "A2B1C4")
{
tmrpcm.play("16.wav");
}
else if(inputString == "A2B2C1")
{
tmrpcm.play("17.wav");
}
else if(inputString == "A2B2C2")
{
tmrpcm.play("18.wav");
}
else if(inputString == "A2B2C3")
{
tmrpcm.play("19.wav");
}
else if(inputString == "A2B2C4")
{
tmrpcm.play("20.wav");
19
}
else if(inputString == "A2B3C1")
{
tmrpcm.play("21.wav");
}
else if(inputString == "A2B3C2")
{
tmrpcm.play("22.wav");
}
else if(inputString == "A2B3C3")
{
tmrpcm.play("23.wav");
}
else if(inputString == "A2B3C4")
{
tmrpcm.play("24.wav");
}
delay(1000);
inputString = "";
}
20
/*gets(A1B1C1,A1B1C2,A1B1C3,A1B1C4,A1B2C1,A1B2C2,A1B2C3,A1B2C4,A1B3C1
,A1B3C2,A1B3C3,A1B3C4,A2B1C1,A2B1C2,A2B1C3,A2B1C4,A2B2C1,A2B2C2,A2B
2C3,A2B2C4,A2B3C1,A2B3C2,A2B3C3,A2B3C4)*/
//inputString += inChar;
//***********************************************************
void case_0(void)
{
//String inputString ;//= "";
/* The following trigPin/echoPin cycle is used to determine the
distance of the nearest object by bouncing soundwaves off of it. */
digitalWrite(trigPin_0, LOW);
delayMicroseconds(2);
digitalWrite(trigPin_0, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin_0, LOW);
duration_0 = pulseIn(echoPin_0, HIGH);
//Calculate the distance (in cm) based on the speed of sound.
distance_0 = duration_0/58.2;
y_0 = (201 - distance_0)*2.55 ;
if (distance_0 >= maximumRange_0)
21
{
/* Send a negative number to computer and Turn LED ON
to indicate "out of range" */
Serial.println("A1");
inputString += "A1";
//digitalWrite(LEDPin, HIGH);
// analogWrite(LED2Pin,0);
}
else if(distance_0 <= minimumRange_0)
{Serial.println("A2");
inputString += "A2";
//digitalWrite(LEDPin, HIGH);
//analogWrite(LED2Pin,255);
}
else
{
/* Send the distance to the computer using Serial protocol, and
turn LED OFF to indicate successful reading. */
Serial.println(y_0);
//digitalWrite(LEDPin, LOW);
//analogWrite(LED2Pin,y_0);
delay(100);
22
}
//Delay 50ms before next reading.
delay(50);
}
//****************************************************************
void case_1(void)
{
//String inputString ;//= "";
/* The following trigPin/echoPin cycle is used to determine the
distance of the nearest object by bouncing soundwaves off of it. */
digitalWrite(trigPin_1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin_1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin_1, LOW);
duration_1 = pulseIn(echoPin_1, HIGH);
//Calculate the distance (in cm) based on the speed of sound.
distance_1 = duration_1/58.2;
y_1 = (201 - distance_1)*2.55 ;
if (distance_1 >= minimumRange_1)
{
if((distance_1>100)&&(distance_1<150))
23
{
//X = distance_1;
Serial.println(y_1);
//analogWrite(LED2Pin,y_1);
delay(100);
Serial.println("B3");
inputString += "B3";
}
else if(distance_1>150)
{
Serial.println("B1");
inputString += "B1";
//analogWrite(LED2Pin,0);
}
else if(distance_1<150)
{
Serial.println("B3");
inputString += "B3";
}
}
else
{
24
Serial.println("B2");
inputString += "B2";
//analogWrite(LED2Pin,255);
}
}
//************************************************************************
***
void case_2(void)
{
String inputString ;//= "";
digitalWrite(trigPin_2, LOW);
delayMicroseconds(2);
digitalWrite(trigPin_2, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin_2, LOW);
duration_2 = pulseIn(echoPin_2, HIGH);
distance_2 = duration_2/58.2;
y_2 = (201 - distance_2)*2.55 ;
if((distance_2>100)&&(distance_2<150))
{
Serial.println(y_2);
//analogWrite(LED2Pin,y_2);
25
delay(100);
Serial.println("C1");
inputString += "C1";
analogWrite(LED2Pin,0);}
}
else if(distance_2<100)
{
Serial.println("C2");
inputString += "C2";
}
else if((distance_2>150)&&(distance_2<200))
{
Serial.println("C3");
inputString += "C3";
}
else if(distance_2>200)
{
Serial.println("C4");
inputString += "C4";
analogWrite(LED2Pin,255);
}
}
26
3.3 FLOWCHART
27
28
29
30
31
3.4 TABULATION
TABLE I:
SI.NO
VALUE
OUTPUT
A1B1C1
PATH IS CLEAR
A1B1C2
A1B1C3
PIT DETECTED
A1B1C4
NEED ASSISTANCE
A1B2C1
OVERHEAD DETECTED
A1B2C2
A1B2C3
A1B2C4
NEED ASSISTANCE
A1B3C1
10
A1B3C2
11
A1B3C3
12
A1B3C4
NEED ASSISTANCE
32
13
A2B1C1
14
A2B1C2
FLOOR
15
A2B1C3
16
A2B1C4
NEED ASSISTANCE
YOU ARE APPROACHING SOMETHING & OVERHEAD
17
A2B2C1
DETECTED
18
A2B2C2
NEED ASSISTANCE
19
A2B2C3
NEED ASSISTANCE
20
A2B2C4
NEED ASSISTANCE
21
A2B3C1
22
A2B3C2
NEED ASSISTANCE
23
A2B3C3
NEED ASSISTANCE
24
A2B3C4
NEED ASSISTANCE
33
3.5 OUTPUT:
34
CHAPTER 4
4.RESULT:
We had invented a small module which is helpful for the visually limited people, it is
named as I-Guesser. A very small module it has the Arduino Nano, ultrasonic sensor, SD card
slot and the ear phone connecting module is also there which give the guide about to move .the
components which are all used in our invention were explained above.
4.1.BLOCK DIAGRAM:
We have learn about how ultrasonic sensors work, reinforcing the connection
between this sensor and how humans, bats and dolphins estimate distance. They learn the
echolocation process sound waves transmitted, bounced back and received, with the time
difference used to calculate the distance of objects. Apart from distance measurement, they are
also used in ultrasonic material testing (to detect cracks, air bubbles, and other flaws in the
products), Object detection, position detection, ultrasonic mouse, etc.
35
36
CHAPTER 5
5.1 CONCLUSION:
Our module I _GUESSER will guide the visually limited people and guide them
through voice. The current technology which has gsm module and gps tracking devices which
will register their location so the user location can be tracked easily.
5.2.1 I_GUESSER
37