Beruflich Dokumente
Kultur Dokumente
Submitted by
AYUSH SULTANIA
Roll No: 00596402813
of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
TABLE OF CONTENTS
Title Page (1)
Certificate by the Supervisor (2)
Acknowledgement (3)
List of Figures (4)
List of Tables (5)
List of Photographs (6)
ABSTRACT (7)
3.1 Overview
3.2 Pin Diagram
3.3 Internal Description
CHAPTER 7 REFERENCES
CERTIFICATE
This is to certify that this project report entitled Embedded system development by Ayush
Sultania (Roll no: 00596402813) , submitted in partial fulfillment of the requirements for the
degree of Bachelor of Technology in Electronics and Communication Engineering of the
Maharaja Agrasen Institute of technology, Delhi, during the academic year 2015, is a bonafide
record of work carried out under our guidance and supervision.
The results embodied in this report have not been submitted to any other University or Institution
for the award of any degree or diploma.
date : -------------------
Teacher in charge
First of all I am indebted to almighty God . I have no words to say thanks to him.
Secondly we would like to thank our parents and friends who helped us a lot in finalizing this
project within the time frame.
LIST OF FIGURES
LIST SN FIGU FIGURE DESCRIPTION PAG OF
O RE E
NO NO
1 3.1 Arduino Pin Diagram 16
LIST OF PHOTOGRAPHS
S.No. Photograph Description Page No.
No.
1. 2.1 Creator of 14
Arduino
2. 6.1 My custom 53
Board
ABSTRACT
This is a report about Arduino board and programming environment. It contains basic working of
Arduino , different types of Arduino boards, interfacing with Arduino programming environment,
how to program, basic instructions regarding that and interfacing of a few sensors is shown in the
content.
In fifth chapter different projects based on Arduino uno is explored. Few additional software
like visual studio was used.
CHAPTER 1 : INTRODUCTION
1.1 Aim of the project
The aim of the project is to develop some understanding
about what embedded system is and how we can design our
own modules using Arduino uno.
Arduino UNO
Temperature sensor
GPS module
Ultrasonic sensor
LCD
LED
Bluetooth module
Keypad interfacing
Sending SMS alone cant help the driver, if we send and an SMS saying
that accident had occurred where the ambulance will come without knowing
the location of the accident. So we include GPS location in the SMS which
we are sending so that the ambulance will have perfect information about
where and when the accident has occurred. For this we use GPS module to
extract the location of the accident, the GPS data will contain the latitude
and longitude values using which we can find the accurate position of the
accident place.
To run the GPS and GSM module we use Arduino UNO board which has
ATmega328 microcontroller. The Arduino is a very user friendly device
which can be easily interfaced with any sensors or modules and is very
compact in size.
Also we can make rfid card detector using Arduino UNO using which one
can make detect his own RFID card if available like if one wants to check
balance in metro card, attendance record in office, and many more.
Finally we can sense the room temperature and distance of any object.One
can also glow LEDs in some beautiful dancing patterns and display them
on LCD.
CHAPTER 2 : LITERATURE REVIEW
A literature review is collection of a critical, unbiased, and comprehensive
evaluation of published information in a chosen and specific area of study of
interest. It gives a general understanding of findings of the research work,
conclusions, and recommendations and thereby brings out their strengths
and weaknesses. This helps in identifying gaps, scope for further work and
generalized concepts in the existing body of knowledge.
There are many definitions for this but the best way to define it is to describe
it in terms of what it is not and with examples of how it is used.
Other external hardware like Sensor Modules, Motors, lights etc. could be
attached with the board.
ARDUINO BOARDS:-
The most common Board used is Arduino UNO. UNO" means one in
Italian and was chosen to mark the release of Arduino Software (IDE) 1.0.
The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases.
"Uno" means one in Italian and was chosen to mark the release of Arduino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software
(IDE) were the reference versions of Arduino, now evolved to newer
releases. The Uno board is the first in a series of USB Arduino boards, and
the reference model for the Arduino platform; for an extensive list of
current, past or outdated boards see the Arduino index of boards.
Arduino
Atmega 328p
The AVR(Advanced Virtual RISC) core combines a rich instruction set with
32 general purpose working registers. All the 32 registers are directly
connected to the Arithmetic Logic Unit (ALU), allowing two independent
registers to be accessed in one single instruction executed in one clock cycle.
The resulting architecture is more code efficient while achieving throughputs
up to ten times faster than conventional CISC microcontrollers. The
ATmega48PA/88PA/168PA/328P provides the following features:
4/8/16/32K bytes of In System Programmable Flash with Read-While-Write
capabilities, 256/512/512/1K bytes EEPROM, 512/1K/1K/2K bytes SRAM,
23 general purpose I/O lines, 32 general purpose working registers, three
flexible Timer/Counters with compare modes, internal and external
interrupts, a serial programmable USART, a byte-oriented 2-wire Serial
Interface, an SPI serial port, a 6-channel 10-bit ADC , a programmable
Watchdog Timer with internal Oscillator, and five software selectable power
saving modes.
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters,
USART, 2-wire Serial Interface, SPI port, and interrupt system to continue
functioning.
The Power-down mode saves the register contents but freezes the Oscillator,
disabling all other chip functions until the next interrupt or hardware reset.
In Power-save mode, the asynchronous timer continues to run, allowing the
user to maintain a timer base while the rest of the device is sleeping.
The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC, to minimize switching noise during ADC
conversions. In Standby mode, the crystal/resonator Oscillator is running
while the rest of the device is sleeping. This allows very fast start-up
combined with low power consumption.
The Arduino/Genuino Uno board can be powered via the USB connection or
with an external power supply. The power source is selected automatically.
Vin. The input voltage to the Arduino/Genuino board when it's using an
external power source (as opposed to 5 volts from the USB connection or
other regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 - 12V),
the USB connector (5V), or the VIN pin of the board (7-12V). Supplying
voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your
board. We don't advise it.
Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It
also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and
written with the EEPROM library).
Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(),digitalWrite(), and digitalRead() functions. They operate at
5 volts. Each pin can provide or receive 20 mA as recommended operating
condition and has an internal pull-up resistor (disconnected by default) of
20-50k ohm. A maximum of 40mA is the value that must not be exceeded on
any I/O pin to avoid permanent damage to the microcontroller.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See
the attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
LED: 13. There is a built-in LED driven by digital pin 13. When the pin
is HIGH value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide
10 bits of resolution (i.e. 1024 different values). By default they measure
from ground to 5 volts, though is it possible to change the upper end of their
range using the AREF pin and the analogReference() function.
Communication
Arduino/Genuino Uno has a number of facilities for communicating with a
computer, another Arduino/Genuino board, or other microcontrollers. The
ATmega328 provides UART TTL (5V) serial communication, which is
available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board
channels this serial communication over USB and appears as a virtual com
port to software on the computer. The 16U2 firmware uses the standard USB
COM drivers, and no external driver is needed. However, on Windows, a .inf
file is required. The Arduino Software (IDE) includes a serial monitor which
allows simple textual data to be sent to and from the board. The RX and TX
LEDs on the board will flash when data is being transmitted via the USB-to-
serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
Microcontroller ATmega328P
Operating Voltage 5V
EEPROM 1 KB (ATmega328P)
Length 68.6 mm
Width 53.4 mm
Weight 25 g
CHAPTER 4 : ARDUINO SOFTWARE
4.1 Arduino IDE
WHAT IS IDE?
The source code for the IDE is available and released under the GNU
General Public License, version 2.
https://www.arduino.cc/en/Main/Software
Step 2:Double click the unknown Arduino Uno device, a property window
pops up
Step 3 : Choose the 'Driver' tab, and select 'Update Driver...'
7. Select
your
board
8. Select your serial port
Compiling turns your program into binary data (ones and zeros)
Uploading sends the bits through USB cable to the Arduino
The two LEDs near the USB connector blink when data is
transmitted
Code
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int thisPin;
void setup()
{
lcd.begin(16,2);
Serial.begin(9600);
Serial.println("-----------Main Menu--------------");
Serial.println("-------------------------------------");
for( thisPin=2;thisPin<7;thisPin++);
pinMode(thisPin,OUTPUT);
void loop()
if(Serial.available()>0)
char rx=Serial.read();
switch(rx)
{
case 'a':
Serial.println("LED1 is ON");
lcd.setCursor(0,1);
lcd.print("LED1");
digitalWrite(2,HIGH);
break;
case 'b':
Serial.println("LED2 is ON");
lcd.setCursor(5,1);
lcd.print("LED2");
digitalWrite(3,HIGH);
break;
case 'c':
Serial.println("LED3 is ON");
lcd.setCursor(11,1);
lcd.print("LED3");
digitalWrite(4,HIGH);
break;
case 'd':
Serial.println("LED4 is ON");
lcd.setCursor(0,2);
lcd.print("LED4");
digitalWrite(5,HIGH);
break;
case 'e':
Serial.println("LED5 is ON");
lcd.setCursor(8,2);
lcd.print("LED5");
digitalWrite(6,HIGH);
break;
default:
for(int thisPin=2;thisPin<7;thisPin++)
digitalWrite(thisPin,LOW);
lcd.clear();
}
5.2 Digital temperature sensor interfacing using LCD
Components Required:
1 ) Developments board.
2) 2*16 LCD
4) Pot-Meter (10k)
6) Bread Board
Description:
Code :
#include<OneWire.h>
#include<DallasTemperature.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
#define singleWire 6
OneWire ourWire(singleWire);
DallasTemperature sensors(&ourWire);
void setup()
Serial.begin(9600);
Serial.print("Temperature value");
lcd.begin(16,2);
lcd.print("***Temperature***");
sensors.begin();
void loop()
sensors.requestTemperatures();
Serial.print(sensors.getTempCByIndex(0));
Serial.println(" C");
lcd.setCursor(0,1);
lcd.print(sensors.getTempCByIndex(0));
lcd.print(" C,");
Serial.print(sensors.getTempFByIndex(0));
Serial.println(" F");
lcd.setCursor(8,1);
lcd.print(sensors.getTempFByIndex(0));
lcd.print(" F");
Components Required:
4.) POT-METER(10k)
5.) 2 x 16 LCD
6.) Breadboard
9.) Hex-Keypad
Hex keypad.
Hex key pad is simply an arrangement 0f 16 push button switches in a 4X4
matrix form. Typically a hex keypad will have keys for number 0, 1, 2, 3, 4,
5, 6, 7, 8, 9 and letters A, B, C, D, *, #. The hex keypad will have 8
connection wires namely R1, R2, R3, R4 and C1, C2, C3, C4 representing
the rows and columns respectively. The schematic diagram and photo of a
typical hex keypad is shown in the figure below.
Code :
#include<Password.h>
#include<Keypad.h>
#include<LiquidCrystal.h>
Password password=Password("1#3*5");
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
char keys[ROWS][COLS]={
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS]={5,4,3,2};
byte colPins[COLS]={9,8,7,6};
Keypad
keypad=Keypad(makeKeymap(keys),rowPins,colPins,ROWS,COLS);
void setup()
keypad.addEventListener(keypadEvent);
Serial.begin(9600);
pinMode(ledRed,OUTPUT);
pinMode(ledGreen,OUTPUT);
lcd.begin(16,2);
lcd.setCursor(1,0);
void loop()
keypad.getKey();
switch(keypad.getState())
case PRESSED:
Serial.print("pressed: ");
Serial.println(eKey);
Serial.println(ilosc);
if(ilosc == 1)
lcd.clear();
lcd.setCursor(1,0);
lcd.setCursor(0,1);
lcd.print("*_");
if(ilosc == 2)
lcd.clear();
lcd.setCursor(1,0);
lcd.setCursor(0,1);
lcd.print("**_");
if(ilosc == 3)
lcd.clear();
lcd.setCursor(1,0);
lcd.setCursor(0,1);
lcd.print("***_");
}
if(ilosc==4)
lcd.clear();
lcd.setCursor(1,0);
lcd.setCursor(0,1);
lcd.print("****_");
if(ilosc==5)
lcd.clear();
lcd.setCursor(1,0);
lcd.setCursor(0,1);
lcd.print("*****_");
if(ilosc == len)
delay(250);
checkPassword();
ilosc=0;
}
void checkPassword()
if(password.evaluate())
ilosc = 0;
Serial.println("Success");
digitalWrite(ledRed,LOW);
digitalWrite(ledGreen,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("<<SUCCESS>>");
else
ilosc = 0;
password.reset();
Serial.println("Wrong");
digitalWrite(ledGreen,LOW);
lcd.clear();
lcd.setCursor(1,0);
lcd.print(" :WELCOME:");
lcd.setCursor(0,1);
Components Required:
2.) POT-METER(10k)
3.) 2 x 16 LCD
4.) Breadboard
What is GPS?
GPS Receiver:
4.GND: Ground
Code :
#include<TinyGPS.h>
#include<SoftwareSerial.h>
long lat,lon;
TinyGPS gps;
SoftwareSerial gpsSerial(3,4);
void setup()
{
Serial.begin(9600);
gpsSerial.begin(9600);
void loop()
while(gpsSerial.available())
if(gps.encode(gpsSerial.read()))
gps.get_position(&lat,&lon);
Serial.println("Position:");
Serial.print("Longitude:");
Serial.print(lon);
Serial.print(" ");
Serial.print("Latitude:");
Serial.print(lat);
}
5.5 RFID interfacing
Code :
#include<AddicoreRFID.h>
#include<LiquidCrystal.h>
#include<SPI.h>
AddicoreRFID myRFID;
int chipSelectPin=10;
#define MAX_LEN 16
void setup(){
//led
lcd.begin(16,2);
lcd.println("RFID World");
pinMode(6,OUTPUT);
SPI.begin();
myRFID.AddicoreRFID_Init();
void loop(){
uchar status;
uchar str[MAX_LEN];
status=myRFID.AddicoreRFID_Request(PICC_REQIDL,str);
status=myRFIDAddicoreRFID_Anticoll(str);
if(status==MI_OK){
lcd.setCursor(0,1);
lcd.print("Tag ID:");
lcd.setCursor(8,1);
lcd.print(str[0]);
digitalWrite(6,HIGH);
delay(1000);
digitalWrite(6,LOW);
myRFID.AddicoreRFID_Halt();
}
#include<LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
void setup()
lcd.begin(16,2);
Serial.begin(9600);
void loop()
long inches,cm,duration;
pinMode(trigPin,OUTPUT);
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
pinMode(echoPin,INPUT);
duration=pulseIn(echoPin,HIGH);//time
inches=microsecondsToInches(duration);
cm=microsecondsToCentimeter(duration);
lcd.clear();
lcd.print("Distance Finder:");
lcd.setCursor(0,1);
lcd.print("INCHES");
lcd.setCursor(7,1);
lcd.print(inches);
Serial.print("INCHES");
lcd.setCursor(10,1);
lcd.print("CM:");
lcd.setCursor(13,1);
lcd.print(cm);
Serial.print(cm);
Serial.println("centimeter");
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 decisions, 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 developers software. Next, debug your code and
disconnect the Arduino.Then,the little blue Arduino becomes a standalone
computer.
Thousands of projects have been done worldwide using this tiny little
device. Some of which to mention are:
Simple room temperature readout
Interactive real-time auditory feedback system
GPS receiver Module
Ultrasonic Sensor
Infrared detectors
SONAR
Various sensor projects like
Keypad security code
Sensor tube for heart monitor
Pulse rate monitor
Various light projects like
Multicolor light display
Seven-segment LED display
Double seven-segment LED dice
LED array
LCD module
Various sound projects like
Oscilloscope
Light harp
VU meter
Various power projects like
LCD Thermostat
Computer controlled fan
The hypnotizer
Miscellaneous Projects like
Lie detector
Magnetic door lock
Infrared remote
CHAPTER 7 REFERENCES
2. http://en.wikipedia.org/wiki/Arduino -wikipedia
3. http://www.google.co.in
4. http://forum.arduino.cc/index.php?topic=146315.0
5. http://www.circuitstoday.com/interfacing-hex-keypad-to-arduino
6. http://read.pudn.com - steve heath
7. hackveda-VMDD Technologies