SlideShare a Scribd company logo
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.
Embedded system application
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:
Embedded system application
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 (20)

PPTX
Language for Embedded System
vkrhanjeeth .
 
PPTX
Presentation on embedded system by abhishek sharma
AbhishekSharma2517
 
PPT
Embeded system by Mitesh Kumar
Mitesh Kumar
 
PPTX
Embedded systems
Ashok Mutyala
 
PPT
Embedded system by owais
Owais Mushtaq
 
PDF
training report on embedded system and AVR
Urvashi Khandelwal
 
PPTX
Ppt on embedded system
Pankaj joshi
 
PPTX
Microcontoller and Embedded System
Karan Thakkar
 
PPTX
Embedded system
CHANCHAL SONI
 
DOCX
project report on embedded system
ram avtar
 
PDF
Fundamentals of Modern Embedded Systems
eselab
 
PPT
Embeded System
Dhaval09
 
PPTX
Embedded system
Ganesh Vadulekar
 
PPTX
Presentation on Embedded system using micro controller by PARAS JHA
Paras Jha
 
PPTX
Embedded Systems - Training ppt
Nishant Kayal
 
PPTX
Robotics & Embedded Systems
anishgoel
 
PPTX
ppt on embedded system
manish katara
 
PPTX
Embedded and Robotics System
RK Saini
 
PPT
Embedded systems in brief
krnathan
 
DOCX
Embedded System
Sonali Parab
 
Language for Embedded System
vkrhanjeeth .
 
Presentation on embedded system by abhishek sharma
AbhishekSharma2517
 
Embeded system by Mitesh Kumar
Mitesh Kumar
 
Embedded systems
Ashok Mutyala
 
Embedded system by owais
Owais Mushtaq
 
training report on embedded system and AVR
Urvashi Khandelwal
 
Ppt on embedded system
Pankaj joshi
 
Microcontoller and Embedded System
Karan Thakkar
 
Embedded system
CHANCHAL SONI
 
project report on embedded system
ram avtar
 
Fundamentals of Modern Embedded Systems
eselab
 
Embeded System
Dhaval09
 
Embedded system
Ganesh Vadulekar
 
Presentation on Embedded system using micro controller by PARAS JHA
Paras Jha
 
Embedded Systems - Training ppt
Nishant Kayal
 
Robotics & Embedded Systems
anishgoel
 
ppt on embedded system
manish katara
 
Embedded and Robotics System
RK Saini
 
Embedded systems in brief
krnathan
 
Embedded System
Sonali Parab
 

Viewers also liked (6)

PPTX
Basics of open source embedded development board (
Dhruwank Vankawala
 
PPTX
Ppt on embedded systems
Vaibhava Mishra
 
PPTX
Embedded system-in-automobile
Siddharth Sanskar
 
PPTX
robotics and embedded system ppt
Nilgiri publicity
 
DOC
Unit 1 embedded systems and applications
Dr.YNM
 
PPTX
Home automation control system using dtmf technology
Govind Ekshinge
 
Basics of open source embedded development board (
Dhruwank Vankawala
 
Ppt on embedded systems
Vaibhava Mishra
 
Embedded system-in-automobile
Siddharth Sanskar
 
robotics and embedded system ppt
Nilgiri publicity
 
Unit 1 embedded systems and applications
Dr.YNM
 
Home automation control system using dtmf technology
Govind Ekshinge
 
Ad

Similar to Embedded system application (20)

PPT
Introduction to Arduino 16822775 (2).ppt
ansariparveen06
 
PPTX
Lecture 7
vishal choudhary
 
PDF
Introduction to arduino
Jawaher Abdulwahab Fadhil
 
PPTX
Introduction to arduino ppt main
eddy royappa
 
DOCX
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
DOCX
Neno Project.docx
AditiBhushan3
 
DOC
Intro arduino
MaLcom MooNwalker
 
PDF
SKAD Electronics Training Manual.pdf
KadiriIbrahim2
 
DOCX
embedded manual for students to learn and do
areeba15775n
 
PPTX
IoT applications With Arduino coding and real life examples
AnuragSingh841686
 
PDF
Arduino guide
Rajan Gautam
 
PPT
Unit 2-IoT.ppt Elements of IOT And Its Feature
poojashinde511268
 
PDF
ATTiny Light Sculpture Project - Part I (Setup)
Brian Huang
 
PPT
Unit 2-IoT.ppt Introduction to Elements of IOT
poojashinde511268
 
PDF
Digital home automation with arduino bluetooth
Shishupal03012015
 
DOCX
Touch Switch (Smart Switches) by arduino Project report file
imkanhaiyalal
 
PDF
Arduino microcontroller ins and outs with pin diagram
ArifatunNesa
 
PPTX
Basics of open source embedded development board (
Dhruwank Vankawala
 
PDF
The document proceeds to explain the main components of an Arduino Uno board ...
QucngV
 
PDF
Office automation system using arduino
Ashfaqul Haque John
 
Introduction to Arduino 16822775 (2).ppt
ansariparveen06
 
Lecture 7
vishal choudhary
 
Introduction to arduino
Jawaher Abdulwahab Fadhil
 
Introduction to arduino ppt main
eddy royappa
 
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
Neno Project.docx
AditiBhushan3
 
Intro arduino
MaLcom MooNwalker
 
SKAD Electronics Training Manual.pdf
KadiriIbrahim2
 
embedded manual for students to learn and do
areeba15775n
 
IoT applications With Arduino coding and real life examples
AnuragSingh841686
 
Arduino guide
Rajan Gautam
 
Unit 2-IoT.ppt Elements of IOT And Its Feature
poojashinde511268
 
ATTiny Light Sculpture Project - Part I (Setup)
Brian Huang
 
Unit 2-IoT.ppt Introduction to Elements of IOT
poojashinde511268
 
Digital home automation with arduino bluetooth
Shishupal03012015
 
Touch Switch (Smart Switches) by arduino Project report file
imkanhaiyalal
 
Arduino microcontroller ins and outs with pin diagram
ArifatunNesa
 
Basics of open source embedded development board (
Dhruwank Vankawala
 
The document proceeds to explain the main components of an Arduino Uno board ...
QucngV
 
Office automation system using arduino
Ashfaqul Haque John
 
Ad

Recently uploaded (20)

PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PDF
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PDF
Digital water marking system project report
Kamal Acharya
 
PDF
Pictorial Guide To Checks On Tankers' IG system
Mahmoud Moghtaderi
 
PPTX
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
PDF
this idjfk sgfdhgdhgdbhgbgrbdrwhrgbbhtgdt
WaleedAziz7
 
PDF
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
PDF
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
PPTX
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
PPTX
Explore USA’s Best Structural And Non Structural Steel Detailing
Silicon Engineering Consultants LLC
 
PPTX
darshai cross section and river section analysis
muk7971
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PPTX
Alan Turing - life and importance for all of us now
Pedro Concejero
 
PPTX
Diabetes diabetes diabetes diabetes jsnsmxndm
130SaniyaAbduNasir
 
PDF
NTPC PATRATU Summer internship report.pdf
hemant03701
 
PPTX
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
PPTX
template.pptxr4t5y67yrttttttttttttttttttttttttttttttttttt
SithamparanaathanPir
 
DOCX
Engineering Geology Field Report to Malekhu .docx
justprashant567
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Digital water marking system project report
Kamal Acharya
 
Pictorial Guide To Checks On Tankers' IG system
Mahmoud Moghtaderi
 
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
this idjfk sgfdhgdhgdbhgbgrbdrwhrgbbhtgdt
WaleedAziz7
 
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
Explore USA’s Best Structural And Non Structural Steel Detailing
Silicon Engineering Consultants LLC
 
darshai cross section and river section analysis
muk7971
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
Alan Turing - life and importance for all of us now
Pedro Concejero
 
Diabetes diabetes diabetes diabetes jsnsmxndm
130SaniyaAbduNasir
 
NTPC PATRATU Summer internship report.pdf
hemant03701
 
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
template.pptxr4t5y67yrttttttttttttttttttttttttttttttttttt
SithamparanaathanPir
 
Engineering Geology Field Report to Malekhu .docx
justprashant567
 

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.
  • 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:
  • 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); } } }