SlideShare a Scribd company logo
1 of 40
Prepared By: D. Y. Vankawala
ULN2803
 Each of the digital i/o pins on the Arduino can only source or
sink 40mA, and pushing the Arduino past these limits may
damage it. If you need to get a little more power out of your
outputs, try using a Darlington ULN2803.
 The Darlington chip can source up to 500mA of current out each
pin, and operates at up to 50V, so it's beefy enough to drive
motors, incandescent bulbs, relays, solenoids and more.
 The ULN2803APG / AFWG Series are high−voltage,
high−current darlington drivers comprised of eight NPN
darlington pairs. All units feature integral clamp diodes for
switching inductive loads. Applications include relay, hammer,
lamp and display (LED) drivers.
Connection of ULN2803 with relay
Interfacing of relay by using
ULN2803
Code#define RELAY1 0
#define RELAY2 1
#define RELAY3 2
#define RELAY4 3
void setup()
{
// Initialise the Arduino data pins for OUTPUT
pinMode(RELAY1, OUTPUT);
pinMode(RELAY2, OUTPUT);
pinMode(RELAY3, OUTPUT);
pinMode(RELAY4, OUTPUT);
}
void loop()
{
digitalWrite(RELAY1,HIGH); //Turn on RELAY - 1
delay(1000);
digitalWrite(RELAY1,LOW); //Turn off RELAY - 2
digitalWrite(RELAY2,HIGH);
delay(2000);
digitalWrite(RELAY2,LOW);
digitalWrite(RELAY3,HIGH);
delay(2000);
digitalWrite(RELAY3,LOW);
digitalWrite(RELAY4,HIGH);
delay(2000);
digitalWrite(RELAY4,LOW);
}
What is bootloader?
 Atmel AVRs are great little ICs, but they can be a bit tricky to
program. You need a special programmer and some fancy .hex
files, and its not very beginner friendly. The Arduino has largely
done away with these issues. They’ve put a .hex file on their AVR
chips that allows you to program the board over the serial port,
meaning all you need to program your Arduino is a USB cable.
 The bootloader is basically a .hex file that runs when you turn on
the board. It is very similar to the BIOS that runs on your PC. It
does two things. First, it looks around to see if the computer is
trying to program it. If it is, it grabs the program from the
computer and uploads it into the ICs memory (in a specific
location so as not to overwrite the bootloader). That is why when
you try to upload code, the Arduino IDE resets the chip. This
basically turns the IC off and back on again so the bootloader
can start running again. If the computer isn’t trying to upload
code, it tells the chip to run the code that’s already stored in
memory. Once it locates and runs your program, the Arduino
continuously loops through the program and does so as long as
the board has power.
Burning the bootloader
 To burn the bootloader, you'll need to buy an AVR-ISP (in-
system programmer), USBtinyISP or build
aParallelProgrammer. The programmer should be
connected to the ICSP pins (the 2 by 3 pin header) - make
sure you plug it in the right way. The board must be
powered by an external power supply or the USB port.
 Make sure you have the right item selected in the Tools |
Board menu. Then, just launch the appropriate command
from the Tools > Burn Bootloader menu of the Arduino
environment. Burning the bootloader may take 15 seconds
or more, so be patient.
How to burn bootloader?
 For a quick easy programmer we recommend looking into
the AVR Pocket Programmer (Windows only) Or, you can use
the official Atmel AVR MKII programmer.
 The AVR Pocket Programmer or most cheaper options will work
just fine for most applications, but they may have problems with
some boards, specifically ones with lots of memory like the
ATMega2560 based boards.
In circuit serial programmer
 It’s very uncommon to program ICs before they are
soldered onto a PCB. Instead, most microcontrollers
have what’s called an in-system programming (ISP)
header. Particularly, some IC manufacturers, such as
Atmel and Microchip, have a specialized ISP method for
programming their ICs. This is referred to as in-circuit
serial programming (ICSP) Most Arduino and Arduino
compatible boards will have a 2x3 pin ICSP header on
them. Some may even have more than one depending on
how many ICs live on the PCB. It breaks out three of
the SPI pins (MISO, MOSI, SCK), and power, ground,
and reset. These are the pins you’ll need to connect your
programmer to in order to reflash the firmware on your
board.
Continue….
Continue…
Continue….
 Once you have located the six ICSP pins on your
board, it’s time to hook up your programmer to the
board. You can use a programming cable to connect
the two, or, if you don’t have a cable, you can just use
some male-to-female jumper wires.
 If you are using a programmer such as the MKII or the
Pocket Programmer, your setup should look
something like this:
Continue…
 Now, after connecting above circuit diagram follow these
steps
 Step1: Select your appropriate target board. Tools -> Board
Continue…
 Step2: Now select the proper programmer that you have chosen
for the burning of program on arduino. Tools -> Programmer
Continue…
 Step 3: Now you are ready to burn bootloader on your
arduino board. Just select Tools -> Burn bootloader
ATmega8 Basic Circuit diagram
Arduino basic circuit diagram
Design Embedded Development
Board
 Suppose you have an Arduino board, and you want to
run a code independently on another blank Atmega8
IC.
 First of all, u need to burn a bootloader on to the
atmega8, using the Arduino as an ISP.
 Once the bootloader is uploaded, u can now upload a
simple sketch like Led blink on the new IC, and check
whether the program works by connecting the IC on
the breadboard.
 Once checked on the breadboard, u can now go
happy-soldering on a pcb.
Continue…
 Step 1 :Upload ArduinoISP code on ur UNO
Connect ur UNO to ur PC via the USB cable and
go to File -> Examples -> ArduinoISP and upload this
sketch.
 Step 2 :Burn the bootloader
Connect ur Atmega (Atmega8 in my case) to the
UNO via a breadboard as shown.
Continue…
 Now get the arduino IDE
 then u burn the bootloader in 2 steps :
 Step 1: Select Arduino NG or older w/ Atmega8 Bcoz this board used
Atmega8 and so the bootloader for Atmega8 would b selected.
Step: 2 Now select Tools -> Burn Bootloader -> w/ Arduino as ISP. Because you
are loading bootloader on ATmega8 with the help of Arduino.
Home Automation using Arduino
 Ever wanted to make your home automated? Wanted
to control the lights, fan and other appliances from
your smartphone? Or wanted a tutorial about
connected devices and getting started with it? DIY
Android Home Automation will show you how to
make your home automated using an android
smartphone. This requires you to have no experience
of android programming at all, as a free application is
included for you to develop. Using this android
application you will be able to control your lights, air
conditioning, door locks ,etc all from your
smartphone. This system uses bluetooth to connect
with your device and control the various appliances in
your home.
Software and Hardware
requirement
 Software
 Arduino IDE : Arduino .
 Eclipse for android programming (optional, not
required).
 Hardware
 Arduino / Arduino Clone or make your own custom
Arduino board with this tutorial.
 A 5v TTL -UART Bluetooth module like : JY-MCU
BT_BOARD (Cheaper) or Bluesmirf Gold/Silver.
 Five 5V SPDT relays like : 5V relay.
 Prototype board or breadboard.
 Connecting wires.
How does it work?
 Android Home Automation project comes with a free
application called “DIY SmartHome” . This application
controls the various appliances connected to your arduino
and relays. When the toggle buttons on the application are
pressed, corresponding bluetooth signals are sent from
your android phone to the bluetooth module you have
hooked up to your arduino. The arduino finds out which
signal was sent and compares it to the predefined signals
assigned for each appliance. When it identifies that signal,
then the arduino activates the relay hooked up to its digital
pin by passing 5V through it. Thus the relay is switched ON
and the corresponding appliance connected to the relay is
turned ON as well. To switch it OFF , arduino passes a 0V
or logic low to its digital pin.
Block Diagram
Circuit Diagram
Circuit Diagram
Connection
 The connection diagram for arduino is as shown. For
setting up this system , wiring connections have to be
made between the arduino and bluetooth module and
also with the relays. Here, the bluetooth module’s Tx is
connected to arduino Rx (digital pin 0) and the
module’s Rx to arduino Tx (digital pin 1). 5V and GND
of the module is connected to the arduino’s 5V and
GND.
 The relay your using is SPDT, it has 5 pins on the under
side. As shown above , here pins 1 and 3are the coil
pins. 1 is connected to the arduino digital pin and 3 is
connected to arduino GND. 2 is the common contact
in the relay to which you have to connect the power for
your appliance (AC 230V), and 4 is the pin to which
you have to connect your appliance wire.
PCB Layout
Code
void setup()
{
Serial.begin(115200);//Change the baud rate value
depending on the default baud rate of your bluetooth
module, for Bluesmirf-115200 and for JY-MCU-9600
pinMode(2, OUTPUT);//Light1 pin
pinMode(3, OUTPUT);//Light2 pin
pinMode(4, OUTPUT);//Light3 pin
pinMode(5, OUTPUT);//AC pin
pinMode(6, OUTPUT);//Door Lock
}
void loop()
{
int a=0;
if(Serial.available())
{
val=Serial.read();
Serial.println(int(val));//Display received value on Serial Monitor
if(int(val)==49)//Turn Light1 ON
digitalWrite(2,HIGH);
else if (int(val)==50)//Turn Light1 OFF
digitalWrite(2,LOW);
if(int(val)==51)//Turn Light2 ON
digitalWrite(3,HIGH);
else if(int(val)==52)//Turn Light2 OFF
digitalWrite(3,LOW);
if(int(val)==53)//Turn Light3 ON
digitalWrite(4,HIGH);
else if(int(val)==54)//Turn Light3 OFF
digitalWrite(4,LOW);
if(int(val)==55)//Turn AC ON
digitalWrite(5,HIGH);
else if(int(val)==56)//Turn AC OFF
digitalWrite(5,LOW);
if(int(val)==57)//Lock the DOOR
digitalWrite(6,HIGH);
else if(int(val)==48)//Unlock the DOOR
digitalWrite(6,LOW);
}
}
Download android application and
setting up Bluetooth
 To download the android application to your phone, copy t
.apk file of android application to your phone from the PC
and then click on it from the phone to install it.
 Once you have installed the application, before opening it
you need to pair and connect with your bluetooth module.
For this, you need to power the arduino and bluetooth
module and then turn ON the bluetooth of your phone and
make it visible to other devices. After that, search for new
devices in bluetooth, select your bluetooth module from
the list, enter the pairing code when prompted , it is usually
’1234′ or ’0000′ .
Continue…
 Note the name of your device , in this case it is “HC-
06″. After pairing with the system, go to the “DIY
SmartHome” application and enter the name of your
bluetooth module you noted earlier (case-sensitive)
and click “OK”. After that the phone will get connected
to your system , and on clicking the respective buttons,
the appliances turn ON/OFF. Have fun with your new
DIY Android Home Automation system
Connection Bluetooth
Interfacing RF transmitter with
Arduino
 RF transmitter technical specification
1. Product Model: MX-FS-03V
2. Launch distance :20-200 meters (different voltage,
different results)
3. Operating voltage :3.5-12V
4. Dimensions: 19 * 19mm
5. Operating mode: AM
6. Transfer rate: 4KB / S
7. Transmitting power: 10mW
8. Transmitting frequency: 315Mhz
9. An external antenna: 25cm ordinary multi-core or
single-core line
10. Pinout from left → right: (DATA; VCC; GND)
Continue…
 RF receiver technical specification
1. Product Model: MX-05V
2. Operating voltage: DC5V
3. Quiescent Current: 4mA
4. Receiving frequency:315Mhz
5. Receiver sensitivity:-105DB
6. Size: 30 * 14 * 7mm
Circuit Diagram
Code for RF transmitter#include <VirtualWire.h>
char *controller;
void setup()
{
pinMode(13,OUTPUT);
vw_set_ptt_inverted(true); //
vw_set_tx_pin(12);
vw_setup(4000);// speed of data transfer Kbps
}
void loop()
{
controller="1" ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,1);
delay(2000);
controller="0" ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,0);
delay(2000);
}
Code for RF receiver#include <VirtualWire.h>
void setup()
{
vw_set_ptt_inverted(true); // Required for DR3100
vw_set_rx_pin(12);
vw_setup(4000); // Bits per sec
pinMode(13, OUTPUT);
vw_rx_start(); // Start the receiver PLL running
}
void loop()
{
int buf[VW_MAX_MESSAGE_LEN];
int buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) // Non-blocking
{
if(buf[0]=='1')
{
digitalWrite(13,1);
}
if(buf[0]=='0')
{
digitalWrite(13,0);
}
}
}

More Related Content

What's hot

Language for Embedded System
Language for Embedded System Language for Embedded System
Language for Embedded System vkrhanjeeth .
 
Presentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharmaPresentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharmaAbhishekSharma2517
 
Embeded system by Mitesh Kumar
Embeded system by Mitesh KumarEmbeded system by Mitesh Kumar
Embeded system by Mitesh KumarMitesh Kumar
 
Embedded system by owais
Embedded system by owaisEmbedded system by owais
Embedded system by owaisOwais Mushtaq
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVRUrvashi Khandelwal
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded systemPankaj joshi
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded SystemKaran Thakkar
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded systemram avtar
 
Fundamentals of Modern Embedded Systems
Fundamentals of Modern Embedded SystemsFundamentals of Modern Embedded Systems
Fundamentals of Modern Embedded Systemseselab
 
Embeded System
Embeded SystemEmbeded System
Embeded SystemDhaval09
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHAParas Jha
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Robotics & Embedded Systems
Robotics & Embedded SystemsRobotics & Embedded Systems
Robotics & Embedded Systemsanishgoel
 
ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded systemmanish katara
 
Embedded and Robotics System
Embedded and Robotics SystemEmbedded and Robotics System
Embedded and Robotics SystemRK Saini
 
Embedded systems in brief
Embedded systems   in briefEmbedded systems   in brief
Embedded systems in briefkrnathan
 

What's hot (20)

Language for Embedded System
Language for Embedded System Language for Embedded System
Language for Embedded System
 
Presentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharmaPresentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharma
 
Embeded system by Mitesh Kumar
Embeded system by Mitesh KumarEmbeded system by Mitesh Kumar
Embeded system by Mitesh Kumar
 
Embedded systems
Embedded systems Embedded systems
Embedded systems
 
Embedded system by owais
Embedded system by owaisEmbedded system by owais
Embedded system by owais
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVR
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded system
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded System
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
 
Fundamentals of Modern Embedded Systems
Fundamentals of Modern Embedded SystemsFundamentals of Modern Embedded Systems
Fundamentals of Modern Embedded Systems
 
Embeded System
Embeded SystemEmbeded System
Embeded System
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHA
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Robotics & Embedded Systems
Robotics & Embedded SystemsRobotics & Embedded Systems
Robotics & Embedded Systems
 
ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded system
 
Embedded and Robotics System
Embedded and Robotics SystemEmbedded and Robotics System
Embedded and Robotics System
 
Embedded systems in brief
Embedded systems   in briefEmbedded systems   in brief
Embedded systems in brief
 
Embedded System
Embedded System Embedded System
Embedded System
 

Viewers also liked

Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (Dhruwank Vankawala
 
Embedded system-in-automobile
Embedded system-in-automobileEmbedded system-in-automobile
Embedded system-in-automobileSiddharth Sanskar
 
robotics and embedded system ppt
robotics and embedded system pptrobotics and embedded system ppt
robotics and embedded system pptNilgiri publicity
 
Unit 1 embedded systems and applications
Unit 1 embedded systems and applicationsUnit 1 embedded systems and applications
Unit 1 embedded systems and applicationsDr.YNM
 
Home automation control system using dtmf technology
Home automation control system using dtmf technologyHome automation control system using dtmf technology
Home automation control system using dtmf technologyGovind Ekshinge
 

Viewers also liked (6)

Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
 
Ppt on embedded systems
Ppt on embedded systemsPpt on embedded systems
Ppt on embedded systems
 
Embedded system-in-automobile
Embedded system-in-automobileEmbedded system-in-automobile
Embedded system-in-automobile
 
robotics and embedded system ppt
robotics and embedded system pptrobotics and embedded system ppt
robotics and embedded system ppt
 
Unit 1 embedded systems and applications
Unit 1 embedded systems and applicationsUnit 1 embedded systems and applications
Unit 1 embedded systems and applications
 
Home automation control system using dtmf technology
Home automation control system using dtmf technologyHome automation control system using dtmf technology
Home automation control system using dtmf technology
 

Similar to Embedded system application

Introduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptIntroduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptansariparveen06
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt maineddy royappa
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION NAGASAI547
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfKadiriIbrahim2
 
ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)Brian Huang
 
Unit 2-IoT.ppt Introduction to Elements of IOT
Unit 2-IoT.ppt  Introduction to Elements of IOTUnit 2-IoT.ppt  Introduction to Elements of IOT
Unit 2-IoT.ppt Introduction to Elements of IOTpoojashinde511268
 
Digital home automation with arduino bluetooth
Digital home automation with arduino bluetoothDigital home automation with arduino bluetooth
Digital home automation with arduino bluetoothShishupal03012015
 
Touch Switch (Smart Switches) by arduino Project report file
Touch Switch (Smart Switches) by arduino  Project  report fileTouch Switch (Smart Switches) by arduino  Project  report file
Touch Switch (Smart Switches) by arduino Project report fileimkanhaiyalal
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (Dhruwank Vankawala
 
Office automation system using arduino
Office automation system using arduinoOffice automation system using arduino
Office automation system using arduinoAshfaqul Haque John
 
1.Arduino Ecosystem.pptx
1.Arduino Ecosystem.pptx1.Arduino Ecosystem.pptx
1.Arduino Ecosystem.pptxMohamed Essam
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docxAjay578679
 
Education Documantary
Education DocumantaryEducation Documantary
Education Documantarytagataho
 

Similar to Embedded system application (20)

Introduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptIntroduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).ppt
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt main
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdf
 
Arduino guide
Arduino guideArduino guide
Arduino guide
 
ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)
 
Unit 2-IoT.ppt Introduction to Elements of IOT
Unit 2-IoT.ppt  Introduction to Elements of IOTUnit 2-IoT.ppt  Introduction to Elements of IOT
Unit 2-IoT.ppt Introduction to Elements of IOT
 
Digital home automation with arduino bluetooth
Digital home automation with arduino bluetoothDigital home automation with arduino bluetooth
Digital home automation with arduino bluetooth
 
Touch Switch (Smart Switches) by arduino Project report file
Touch Switch (Smart Switches) by arduino  Project  report fileTouch Switch (Smart Switches) by arduino  Project  report file
Touch Switch (Smart Switches) by arduino Project report file
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
 
Office automation system using arduino
Office automation system using arduinoOffice automation system using arduino
Office automation system using arduino
 
Arduino Uno Pin Description
Arduino Uno Pin DescriptionArduino Uno Pin Description
Arduino Uno Pin Description
 
Arduino uno
Arduino unoArduino uno
Arduino uno
 
1.Arduino Ecosystem.pptx
1.Arduino Ecosystem.pptx1.Arduino Ecosystem.pptx
1.Arduino Ecosystem.pptx
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
Education Documantary
Education DocumantaryEducation Documantary
Education Documantary
 

Recently uploaded

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 

Recently uploaded (20)

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 

Embedded system application

  • 1. Prepared By: D. Y. Vankawala
  • 2. ULN2803  Each of the digital i/o pins on the Arduino can only source or sink 40mA, and pushing the Arduino past these limits may damage it. If you need to get a little more power out of your outputs, try using a Darlington ULN2803.  The Darlington chip can source up to 500mA of current out each pin, and operates at up to 50V, so it's beefy enough to drive motors, incandescent bulbs, relays, solenoids and more.  The ULN2803APG / AFWG Series are high−voltage, high−current darlington drivers comprised of eight NPN darlington pairs. All units feature integral clamp diodes for switching inductive loads. Applications include relay, hammer, lamp and display (LED) drivers.
  • 3.
  • 5. Interfacing of relay by using ULN2803
  • 6. Code#define RELAY1 0 #define RELAY2 1 #define RELAY3 2 #define RELAY4 3 void setup() { // Initialise the Arduino data pins for OUTPUT pinMode(RELAY1, OUTPUT); pinMode(RELAY2, OUTPUT); pinMode(RELAY3, OUTPUT); pinMode(RELAY4, OUTPUT); } void loop() { digitalWrite(RELAY1,HIGH); //Turn on RELAY - 1 delay(1000); digitalWrite(RELAY1,LOW); //Turn off RELAY - 2 digitalWrite(RELAY2,HIGH); delay(2000); digitalWrite(RELAY2,LOW); digitalWrite(RELAY3,HIGH); delay(2000); digitalWrite(RELAY3,LOW); digitalWrite(RELAY4,HIGH); delay(2000); digitalWrite(RELAY4,LOW); }
  • 7. What is bootloader?  Atmel AVRs are great little ICs, but they can be a bit tricky to program. You need a special programmer and some fancy .hex files, and its not very beginner friendly. The Arduino has largely done away with these issues. They’ve put a .hex file on their AVR chips that allows you to program the board over the serial port, meaning all you need to program your Arduino is a USB cable.  The bootloader is basically a .hex file that runs when you turn on the board. It is very similar to the BIOS that runs on your PC. It does two things. First, it looks around to see if the computer is trying to program it. If it is, it grabs the program from the computer and uploads it into the ICs memory (in a specific location so as not to overwrite the bootloader). That is why when you try to upload code, the Arduino IDE resets the chip. This basically turns the IC off and back on again so the bootloader can start running again. If the computer isn’t trying to upload code, it tells the chip to run the code that’s already stored in memory. Once it locates and runs your program, the Arduino continuously loops through the program and does so as long as the board has power.
  • 8. Burning the bootloader  To burn the bootloader, you'll need to buy an AVR-ISP (in- system programmer), USBtinyISP or build aParallelProgrammer. The programmer should be connected to the ICSP pins (the 2 by 3 pin header) - make sure you plug it in the right way. The board must be powered by an external power supply or the USB port.  Make sure you have the right item selected in the Tools | Board menu. Then, just launch the appropriate command from the Tools > Burn Bootloader menu of the Arduino environment. Burning the bootloader may take 15 seconds or more, so be patient.
  • 9. How to burn bootloader?  For a quick easy programmer we recommend looking into the AVR Pocket Programmer (Windows only) Or, you can use the official Atmel AVR MKII programmer.  The AVR Pocket Programmer or most cheaper options will work just fine for most applications, but they may have problems with some boards, specifically ones with lots of memory like the ATMega2560 based boards.
  • 10. In circuit serial programmer  It’s very uncommon to program ICs before they are soldered onto a PCB. Instead, most microcontrollers have what’s called an in-system programming (ISP) header. Particularly, some IC manufacturers, such as Atmel and Microchip, have a specialized ISP method for programming their ICs. This is referred to as in-circuit serial programming (ICSP) Most Arduino and Arduino compatible boards will have a 2x3 pin ICSP header on them. Some may even have more than one depending on how many ICs live on the PCB. It breaks out three of the SPI pins (MISO, MOSI, SCK), and power, ground, and reset. These are the pins you’ll need to connect your programmer to in order to reflash the firmware on your board. Continue….
  • 12. Continue….  Once you have located the six ICSP pins on your board, it’s time to hook up your programmer to the board. You can use a programming cable to connect the two, or, if you don’t have a cable, you can just use some male-to-female jumper wires.  If you are using a programmer such as the MKII or the Pocket Programmer, your setup should look something like this:
  • 13.
  • 14. Continue…  Now, after connecting above circuit diagram follow these steps  Step1: Select your appropriate target board. Tools -> Board
  • 15. Continue…  Step2: Now select the proper programmer that you have chosen for the burning of program on arduino. Tools -> Programmer
  • 16. Continue…  Step 3: Now you are ready to burn bootloader on your arduino board. Just select Tools -> Burn bootloader
  • 19. Design Embedded Development Board  Suppose you have an Arduino board, and you want to run a code independently on another blank Atmega8 IC.  First of all, u need to burn a bootloader on to the atmega8, using the Arduino as an ISP.  Once the bootloader is uploaded, u can now upload a simple sketch like Led blink on the new IC, and check whether the program works by connecting the IC on the breadboard.  Once checked on the breadboard, u can now go happy-soldering on a pcb.
  • 20. Continue…  Step 1 :Upload ArduinoISP code on ur UNO Connect ur UNO to ur PC via the USB cable and go to File -> Examples -> ArduinoISP and upload this sketch.
  • 21.  Step 2 :Burn the bootloader Connect ur Atmega (Atmega8 in my case) to the UNO via a breadboard as shown.
  • 22. Continue…  Now get the arduino IDE  then u burn the bootloader in 2 steps :  Step 1: Select Arduino NG or older w/ Atmega8 Bcoz this board used Atmega8 and so the bootloader for Atmega8 would b selected.
  • 23. Step: 2 Now select Tools -> Burn Bootloader -> w/ Arduino as ISP. Because you are loading bootloader on ATmega8 with the help of Arduino.
  • 24. Home Automation using Arduino  Ever wanted to make your home automated? Wanted to control the lights, fan and other appliances from your smartphone? Or wanted a tutorial about connected devices and getting started with it? DIY Android Home Automation will show you how to make your home automated using an android smartphone. This requires you to have no experience of android programming at all, as a free application is included for you to develop. Using this android application you will be able to control your lights, air conditioning, door locks ,etc all from your smartphone. This system uses bluetooth to connect with your device and control the various appliances in your home.
  • 25. Software and Hardware requirement  Software  Arduino IDE : Arduino .  Eclipse for android programming (optional, not required).  Hardware  Arduino / Arduino Clone or make your own custom Arduino board with this tutorial.  A 5v TTL -UART Bluetooth module like : JY-MCU BT_BOARD (Cheaper) or Bluesmirf Gold/Silver.  Five 5V SPDT relays like : 5V relay.  Prototype board or breadboard.  Connecting wires.
  • 26. How does it work?  Android Home Automation project comes with a free application called “DIY SmartHome” . This application controls the various appliances connected to your arduino and relays. When the toggle buttons on the application are pressed, corresponding bluetooth signals are sent from your android phone to the bluetooth module you have hooked up to your arduino. The arduino finds out which signal was sent and compares it to the predefined signals assigned for each appliance. When it identifies that signal, then the arduino activates the relay hooked up to its digital pin by passing 5V through it. Thus the relay is switched ON and the corresponding appliance connected to the relay is turned ON as well. To switch it OFF , arduino passes a 0V or logic low to its digital pin.
  • 29. Connection  The connection diagram for arduino is as shown. For setting up this system , wiring connections have to be made between the arduino and bluetooth module and also with the relays. Here, the bluetooth module’s Tx is connected to arduino Rx (digital pin 0) and the module’s Rx to arduino Tx (digital pin 1). 5V and GND of the module is connected to the arduino’s 5V and GND.  The relay your using is SPDT, it has 5 pins on the under side. As shown above , here pins 1 and 3are the coil pins. 1 is connected to the arduino digital pin and 3 is connected to arduino GND. 2 is the common contact in the relay to which you have to connect the power for your appliance (AC 230V), and 4 is the pin to which you have to connect your appliance wire.
  • 31. Code void setup() { Serial.begin(115200);//Change the baud rate value depending on the default baud rate of your bluetooth module, for Bluesmirf-115200 and for JY-MCU-9600 pinMode(2, OUTPUT);//Light1 pin pinMode(3, OUTPUT);//Light2 pin pinMode(4, OUTPUT);//Light3 pin pinMode(5, OUTPUT);//AC pin pinMode(6, OUTPUT);//Door Lock }
  • 32. void loop() { int a=0; if(Serial.available()) { val=Serial.read(); Serial.println(int(val));//Display received value on Serial Monitor if(int(val)==49)//Turn Light1 ON digitalWrite(2,HIGH); else if (int(val)==50)//Turn Light1 OFF digitalWrite(2,LOW); if(int(val)==51)//Turn Light2 ON digitalWrite(3,HIGH); else if(int(val)==52)//Turn Light2 OFF digitalWrite(3,LOW); if(int(val)==53)//Turn Light3 ON digitalWrite(4,HIGH); else if(int(val)==54)//Turn Light3 OFF digitalWrite(4,LOW); if(int(val)==55)//Turn AC ON digitalWrite(5,HIGH); else if(int(val)==56)//Turn AC OFF digitalWrite(5,LOW); if(int(val)==57)//Lock the DOOR digitalWrite(6,HIGH); else if(int(val)==48)//Unlock the DOOR digitalWrite(6,LOW); } }
  • 33. Download android application and setting up Bluetooth  To download the android application to your phone, copy t .apk file of android application to your phone from the PC and then click on it from the phone to install it.  Once you have installed the application, before opening it you need to pair and connect with your bluetooth module. For this, you need to power the arduino and bluetooth module and then turn ON the bluetooth of your phone and make it visible to other devices. After that, search for new devices in bluetooth, select your bluetooth module from the list, enter the pairing code when prompted , it is usually ’1234′ or ’0000′ .
  • 34. Continue…  Note the name of your device , in this case it is “HC- 06″. After pairing with the system, go to the “DIY SmartHome” application and enter the name of your bluetooth module you noted earlier (case-sensitive) and click “OK”. After that the phone will get connected to your system , and on clicking the respective buttons, the appliances turn ON/OFF. Have fun with your new DIY Android Home Automation system
  • 36. Interfacing RF transmitter with Arduino  RF transmitter technical specification 1. Product Model: MX-FS-03V 2. Launch distance :20-200 meters (different voltage, different results) 3. Operating voltage :3.5-12V 4. Dimensions: 19 * 19mm 5. Operating mode: AM 6. Transfer rate: 4KB / S 7. Transmitting power: 10mW 8. Transmitting frequency: 315Mhz 9. An external antenna: 25cm ordinary multi-core or single-core line 10. Pinout from left → right: (DATA; VCC; GND)
  • 37. Continue…  RF receiver technical specification 1. Product Model: MX-05V 2. Operating voltage: DC5V 3. Quiescent Current: 4mA 4. Receiving frequency:315Mhz 5. Receiver sensitivity:-105DB 6. Size: 30 * 14 * 7mm
  • 39. Code for RF transmitter#include <VirtualWire.h> char *controller; void setup() { pinMode(13,OUTPUT); vw_set_ptt_inverted(true); // vw_set_tx_pin(12); vw_setup(4000);// speed of data transfer Kbps } void loop() { controller="1" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,1); delay(2000); controller="0" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,0); delay(2000); }
  • 40. Code for RF receiver#include <VirtualWire.h> void setup() { vw_set_ptt_inverted(true); // Required for DR3100 vw_set_rx_pin(12); vw_setup(4000); // Bits per sec pinMode(13, OUTPUT); vw_rx_start(); // Start the receiver PLL running } void loop() { int buf[VW_MAX_MESSAGE_LEN]; int buflen = VW_MAX_MESSAGE_LEN; if (vw_get_message(buf, &buflen)) // Non-blocking { if(buf[0]=='1') { digitalWrite(13,1); } if(buf[0]=='0') { digitalWrite(13,0); } } }