SlideShare una empresa de Scribd logo
1 de 39
SUMMER INTERNSHIP
REPORT
SUBMITTED BY:
AAKASH
TIWARI
APOORV GUPTA
ANURAG
NANDAN
GAURAV
EMBEDDED SYSTEMS &
ROBOTICS FROM
I3INDYA
COMPANY PROFILE
• i3indya™ Technologies ( A unit of I THREE INFOTECH PVT
LTD ) with its foundation pillars as Innovation, Information and
Intelligence is exploring indefinitely as a Technology service
provider and as a Training Organization.
• i3indya™ was started by a group of entrepreneurs with a sole
mission of establishing a dedicated Research & Development
Cell and bringing the findings to the benefit of budding
Engineers. Little did they know that their efforts will bring an
enormous change in the world of technology & training. Today
in just four years of its existence, i3indya™ has a pan India
acclaim for its unmatched quality services.
BLUETOOTH BASED HOME
AUTOMATION SYSTEM
WHAT IS HOME
AUTOMATION?
Home automation is the control of electrical/electronic
appliances reducing human effort. Home automation may
include centralized control of lighting, HVAC (heating, ventilation
and air conditioning), appliances, security locks of gates and
doors and other systems, to provide improved convenience,
comfort, energy efficiency and security. Home automation for
the elderly and disabled can provide increased quality of life for
persons who might otherwise require caregivers or institutional
care. The popularity of home automation has been increasing
greatly in recent years due to much higher affordability and
simplicity through smartphone and tablet connectivity.
SYSTEM OVERVIEW
COMPONENTS
• A microcontroller board(ATmega8)
• A 9v adaptor
• A no. of relays
• ULN2803 for driving relays
• A power supply circuit
• A cell-phone running Android OS
• And most importantly Bluetooth module
ATMEGA8L Features
• High Performance, Low-power AVR 8-bit Microcontroller.
• Advanced RISC Architecture
– 130 Powerful Instructions
– Most Single-clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
• Nonvolatile Program and Data Memories
– 8K Bytes of In-System Self-Programmable Flash
– 512 Bytes EEPROM
– 1K Byte Internal SRAM
FEATURES
• I/O and Packages
– 23 Programmable I/O Lines
• Operating Voltages
– 4.5 - 5.5V
• Speed Grades
– 0 - 16 MHz
• Special Microcontroller Features
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
Pin Configurations
Pin Descriptions
• VCC : Digital supply voltage.
• GND : Ground.
• Port B (PB7..PB0) : Port B is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each bit).
• Port C (PC5..PC0)/(ADC5..ADC0): Port C is an 7-bit bi-
directional I/O port with internal pull-up resistors (selected for
each bit).These pins also serve as analog inputs to the A/D
converter .
• PC6/RESET: If the RSTDISBL Fuse is programmed, PC6 is used
as an I/O pin. If the RSTDISBL Fuse is unprogrammed, PC6 is
used as a Reset input.
• Port D (PD7..PD0): Port D is an 8-bit bi-directional I/O port
with internal pull-up resistors (selected for each bit).
• AVCC : AVCC is the supply voltage pin for the A/D Converter. It
should be externally connected to VCC, even if the ADC is not
used.
• AREF: AREF is the analog reference pin for the A/D Converter.
AREF is used to set the TOP value for Analog to Digital
conversion.
WHAT’S A RELAY?
• A relay is an electrically operated switch. Relays are used
where it is necessary to control a circuit by a low-power signal
with complete electrical isolation between control and
controlled circuits, or where several circuits must be
controlled by one signal.
• In this figure, you can see that relay consist
of two separate and completely
independent Circuit (1-3 & 2-4). When the
electromagnet is ON, and it attracts the
armature. The armature is acting as a
switch in the second circuit.
• When the electromagnet is energized, the
armature completes the second circuit and
the light is ON and vice-versa.
TO DRIVE A RELAY…
• To drive a relay, we need the ULN2803A IC which is a high-voltage,
high-current Darlington transistor array. The device consists of eight
NPN-Darlington pairs that feature high-voltage outputs for
switching inductive loads. The collector-current rating of each
Darlington pair is 500 mA.
• Applications include relay drivers, lamp drivers, etc. The ULN2803A
has a 2.7-kΩ series base resistor for each Darlington pair for
operation directly with TTL or 5-V CMOS devices.
POWER SUPPLY
The above shown circuit is used to provide 5v regulated DC
power supply for our Home Automation circuit. This circuit uses
a 7805 5v regulator IC which is used to step down higher DC
voltages to +5v DC voltage. Two different capacitors are used in
this circuit to bypass any AC voltage component present.
ANDROID SMARTPHONE
• Any smartphone with any version of Android installed on it
will do the task.
• We are using an Android application named “Bluetooth
Terminal” which can be easily found on Google Play Store and
installed on the phone.
BLUETOOTH TERMINAL
• Bluetooth Terminal is an Android application that is a
VT-100 terminal emulator for communicating with
serial devices using a Bluetooth module.
• One can download this application from here
https://play.google.com/store/apps/details?id=es.py
masde.blueterm&hl=en
HC-05 Bluetooth
Module
Description
• The Bluetooth module used in this project is HC-05 Linvor
Bluetooth module.
• It is an easy- to-use Bluetooth serial port protocol (SPP)
module, designed for a transparent wireless serial connection
set-up.
• The module has 34 PINS for configuration/interfacing of
Bluetooth module with microcontrollers.
• Bluetooth Serial module can communicate with the other
Bluetooth devices but requires at least two conditions:
(1) The communication must be between master and slave.
(2) The password must be correct.
Pins Description
• PIN1: UART_TXD, Bluetooth serial signal sending PIN, can
connect with MCU’s RXD PIN
• PIN2:UART_RXD, Bluetooth serial signal receiving PIN, can
connect with the MCU’s TXD PIN
• PIN11:RESET, the reset PIN of module
• PIN12:VCC, voltage supply for logic, the standard voltage is
3.3V
• PIN13:GND
• PIN 31:It is used to indicate module state.
• PIN32:Used to control LED indicating pairing. It will be steady
on when pairing is successful.
Hardware details
• Built-in CSR company Bluetooth chip BC417143.
• Bluetooth Technology v2.0+EDR.
• Coverage up to 30 ft/10 m.
• Built-in antenna.
• Power input: +3.3V DC.
• The maximum serial baud rate: 1382400 bps.
• Connection/non-connection status indicator.
• Frequency: 2.4GHz ISM band
• Modulation: FSK (Frequency Shift Keying)
• Emission power: ≤4dBm, Class 2
• Speed: Asynchronous: 2.1Mbps (max.)/160 kbps
• Dimensions: 26.9mm×13mm× 2.2mm
Communication between
Smartphone and MCU
• Start the Bluetooth manager(e.g. Bluetooth Terminal available
on Google play Store).
• Connect device(should find module).
• Pair.
• Send Commands from phone.
• See the magic being done.
THE MOST IMPORTANT
PART
THE UART/USART
COMMUNICATION
USART/UART
UART stands for Universal Asynchronous
Receiver/Transmitter
UART helps to communicate with:-
• Another microcontroller
• Multiple microcontrollers
• Computer using a voltage level shifter or converter
• Other devices that are compatible with USART/UART
WHAT DOES UART DO?
UART can :-
• Transmit data using a buffer and a shift register
• Receive data using a shift register and buffer
• Create a frame of data that is recognised on both the
receiving end and the transmitting end.
All of this, works according to an agreed upon speed
from both sides, or with synchronous mode where
the clock line is directly connected.
Transmission/Reception in
UART
Data to be
transmitted
Data sent to
a buffer
Data is sent
to shift
register
Data moves
along
transmit wire
• This is how transmission is done.
• Receiving information is done in the reverse order
of transmission.
CLOCK MODES
 UCSRC=(1<<UMSEL);//setting the UMSEL bit
to 1 for synchronous mode
 UCSRC&=~(1<<UMSEL);//setting the UMSEL
bit to 0 for asynchronous mode
Baud Rate-the driving force
The baud is the clock that pushes the data
along the line.
In USART, a clock wire must be connected between
each microcontroller. This wire will pulse like a
heartbeat. In the case of asynchronous(UART), each
microcontroller has its own clock, the clock(baud
rate) at transmitter and receiver end must be same
i.e. the receiving microcontroller must be receiving
data at the same pace at which it is transmitted.
Initializing the UART
Function to initialize the UART :-
void UART_INIT(unsigned int baud)
{
UBBRH=(unsigned char)(baud>>8);
UBBRL=(unsigned char)baud;
//Enable the receiver and transmitter
USCRB=(1<<RXEN)|(1<<TXEN);
UCSRC=(1<<URSEL)|(1<<USBS)|(3<<UCSZ0);
}
• When TXEN is set(Transmitter enabled), the general
purpose function of that pin is not available until TXEN is
disabled. Same idea goes for RXEN pin.
TRANSMISSON
void UART_Transmit(unsigned int data)
{
while(!(UCSRA&(1<<UDRE)));
//wait until the transmitter is ready
UDR=data;
//transmit that data out of here
}
RECEPTION
Function for receiving :-
unsigned char UART_Receive(void)
{
while(!(UCSRA&(1<<RXC));
//wait for RXC to not have 0
return UDR; //get that data out of there and back to
the main program
}
UART I/O Data Register-UDR
UART Control and Status Register A-UCSRA
REGISTERS
UART Control and Status Register B –
UCSRB
UART Control and Status Register C – UCSRC
UART Baud Rate Registers – UBRRL and
UBRRHs
SCHEMATIC
PCB LAYOUT
• To the left is the actual PCB
layout of the product.
• This shows both the
bottom and top copper
layers.
• This image also shows the
silkscreen for placing the
components on the PCB.
• The actual product contains all of the above
mentioned/explained components.
• These components are soldered on a home
made PCB(printed circuit board).
• The product needs some improvisation will be
ready to install at home/office.
• The home automation board has small
dimensions and can be easily installed by any
electrician.
SOME PICS
Bluetooth Home Automation

Más contenido relacionado

La actualidad más candente

Voice Based Home Automation
Voice Based Home AutomationVoice Based Home Automation
Voice Based Home Automation
Sumukh Athrey
 

La actualidad más candente (20)

SMART HOME AUTOMATION USING MOBILE APPLICATION
SMART HOME AUTOMATION USING MOBILE APPLICATIONSMART HOME AUTOMATION USING MOBILE APPLICATION
SMART HOME AUTOMATION USING MOBILE APPLICATION
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINO
 
Home automation using arduino
Home automation using arduinoHome automation using arduino
Home automation using arduino
 
PROJECT REPORT ON Home automation using by Bluetooth
 PROJECT REPORT ON Home automation using by Bluetooth PROJECT REPORT ON Home automation using by Bluetooth
PROJECT REPORT ON Home automation using by Bluetooth
 
Presentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUPresentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCU
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoT
 
IR BASED HOME AUTOMATION USING ARDUINO UNO
IR BASED HOME AUTOMATION USING ARDUINO UNOIR BASED HOME AUTOMATION USING ARDUINO UNO
IR BASED HOME AUTOMATION USING ARDUINO UNO
 
IoT Based Home Automation System Presantation
IoT Based Home Automation System PresantationIoT Based Home Automation System Presantation
IoT Based Home Automation System Presantation
 
Bluetooth based home automation using arduino presentaton
Bluetooth based home automation using arduino presentatonBluetooth based home automation using arduino presentaton
Bluetooth based home automation using arduino presentaton
 
Home automation
Home automationHome automation
Home automation
 
Bluetooth based home automation using Arduino UNO
Bluetooth based home automation using Arduino UNOBluetooth based home automation using Arduino UNO
Bluetooth based home automation using Arduino UNO
 
Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...
 
Home Automation Using Arduino Uno and HC-05
Home Automation Using Arduino Uno and HC-05Home Automation Using Arduino Uno and HC-05
Home Automation Using Arduino Uno and HC-05
 
Home automation Using Arduino Uno and Bluetooth
Home automation Using Arduino Uno and BluetoothHome automation Using Arduino Uno and Bluetooth
Home automation Using Arduino Uno and Bluetooth
 
Electronics projects
Electronics projectsElectronics projects
Electronics projects
 
Voice Based Home Automation
Voice Based Home AutomationVoice Based Home Automation
Voice Based Home Automation
 
Temperature measurement using nodemcu esp8266
Temperature measurement  using nodemcu esp8266Temperature measurement  using nodemcu esp8266
Temperature measurement using nodemcu esp8266
 
Humidity & Temperature monitoring using arduino
Humidity & Temperature monitoring using arduinoHumidity & Temperature monitoring using arduino
Humidity & Temperature monitoring using arduino
 
Home automation voice control
Home automation voice controlHome automation voice control
Home automation voice control
 
Project report on home automation using Arduino
Project report on home automation using Arduino Project report on home automation using Arduino
Project report on home automation using Arduino
 

Similar a Bluetooth Home Automation

Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
ncct
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!D
kameshsept
 
Dtmf based home appliance control 2
Dtmf based home appliance control 2Dtmf based home appliance control 2
Dtmf based home appliance control 2
Krish Karn
 

Similar a Bluetooth Home Automation (20)

Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docu
 
Introduction_to_Mechatronics_Chapter4.pdf
Introduction_to_Mechatronics_Chapter4.pdfIntroduction_to_Mechatronics_Chapter4.pdf
Introduction_to_Mechatronics_Chapter4.pdf
 
Project
ProjectProject
Project
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
 
ACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CAR
 
Bluetooth based home appliances control
Bluetooth based home appliances controlBluetooth based home appliances control
Bluetooth based home appliances control
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
 
embedded system
embedded systemembedded system
embedded system
 
JamesEndl
JamesEndlJamesEndl
JamesEndl
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!D
 
Dtmf based home appliance control
Dtmf based home appliance controlDtmf based home appliance control
Dtmf based home appliance control
 
Dtmf based home appliance control 2
Dtmf based home appliance control 2Dtmf based home appliance control 2
Dtmf based home appliance control 2
 
Dtmf based home appliance control(1)
Dtmf based home appliance control(1)Dtmf based home appliance control(1)
Dtmf based home appliance control(1)
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Presentation on embedded system and robotics
Presentation on embedded system and roboticsPresentation on embedded system and robotics
Presentation on embedded system and robotics
 
IRJET- IoT based Industrial Automation
IRJET-  	  IoT based Industrial AutomationIRJET-  	  IoT based Industrial Automation
IRJET- IoT based Industrial Automation
 
Gsm based garbage disposal
Gsm based garbage disposalGsm based garbage disposal
Gsm based garbage disposal
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Bluetooth Home Automation

  • 3. COMPANY PROFILE • i3indya™ Technologies ( A unit of I THREE INFOTECH PVT LTD ) with its foundation pillars as Innovation, Information and Intelligence is exploring indefinitely as a Technology service provider and as a Training Organization. • i3indya™ was started by a group of entrepreneurs with a sole mission of establishing a dedicated Research & Development Cell and bringing the findings to the benefit of budding Engineers. Little did they know that their efforts will bring an enormous change in the world of technology & training. Today in just four years of its existence, i3indya™ has a pan India acclaim for its unmatched quality services.
  • 5. WHAT IS HOME AUTOMATION? Home automation is the control of electrical/electronic appliances reducing human effort. Home automation may include centralized control of lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and doors and other systems, to provide improved convenience, comfort, energy efficiency and security. Home automation for the elderly and disabled can provide increased quality of life for persons who might otherwise require caregivers or institutional care. The popularity of home automation has been increasing greatly in recent years due to much higher affordability and simplicity through smartphone and tablet connectivity.
  • 7. COMPONENTS • A microcontroller board(ATmega8) • A 9v adaptor • A no. of relays • ULN2803 for driving relays • A power supply circuit • A cell-phone running Android OS • And most importantly Bluetooth module
  • 8. ATMEGA8L Features • High Performance, Low-power AVR 8-bit Microcontroller. • Advanced RISC Architecture – 130 Powerful Instructions – Most Single-clock Cycle Execution – 32 x 8 General Purpose Working Registers – Fully Static Operation – Up to 16 MIPS Throughput at 16 MHz • Nonvolatile Program and Data Memories – 8K Bytes of In-System Self-Programmable Flash – 512 Bytes EEPROM – 1K Byte Internal SRAM
  • 9. FEATURES • I/O and Packages – 23 Programmable I/O Lines • Operating Voltages – 4.5 - 5.5V • Speed Grades – 0 - 16 MHz • Special Microcontroller Features – Internal Calibrated RC Oscillator – External and Internal Interrupt Sources
  • 11. Pin Descriptions • VCC : Digital supply voltage. • GND : Ground. • Port B (PB7..PB0) : Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). • Port C (PC5..PC0)/(ADC5..ADC0): Port C is an 7-bit bi- directional I/O port with internal pull-up resistors (selected for each bit).These pins also serve as analog inputs to the A/D converter . • PC6/RESET: If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input.
  • 12. • Port D (PD7..PD0): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). • AVCC : AVCC is the supply voltage pin for the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. • AREF: AREF is the analog reference pin for the A/D Converter. AREF is used to set the TOP value for Analog to Digital conversion.
  • 13. WHAT’S A RELAY? • A relay is an electrically operated switch. Relays are used where it is necessary to control a circuit by a low-power signal with complete electrical isolation between control and controlled circuits, or where several circuits must be controlled by one signal. • In this figure, you can see that relay consist of two separate and completely independent Circuit (1-3 & 2-4). When the electromagnet is ON, and it attracts the armature. The armature is acting as a switch in the second circuit. • When the electromagnet is energized, the armature completes the second circuit and the light is ON and vice-versa.
  • 14. TO DRIVE A RELAY… • To drive a relay, we need the ULN2803A IC which is a high-voltage, high-current Darlington transistor array. The device consists of eight NPN-Darlington pairs that feature high-voltage outputs for switching inductive loads. The collector-current rating of each Darlington pair is 500 mA. • Applications include relay drivers, lamp drivers, etc. The ULN2803A has a 2.7-kΩ series base resistor for each Darlington pair for operation directly with TTL or 5-V CMOS devices.
  • 15. POWER SUPPLY The above shown circuit is used to provide 5v regulated DC power supply for our Home Automation circuit. This circuit uses a 7805 5v regulator IC which is used to step down higher DC voltages to +5v DC voltage. Two different capacitors are used in this circuit to bypass any AC voltage component present.
  • 16. ANDROID SMARTPHONE • Any smartphone with any version of Android installed on it will do the task. • We are using an Android application named “Bluetooth Terminal” which can be easily found on Google Play Store and installed on the phone.
  • 17. BLUETOOTH TERMINAL • Bluetooth Terminal is an Android application that is a VT-100 terminal emulator for communicating with serial devices using a Bluetooth module. • One can download this application from here https://play.google.com/store/apps/details?id=es.py masde.blueterm&hl=en
  • 19. Description • The Bluetooth module used in this project is HC-05 Linvor Bluetooth module. • It is an easy- to-use Bluetooth serial port protocol (SPP) module, designed for a transparent wireless serial connection set-up. • The module has 34 PINS for configuration/interfacing of Bluetooth module with microcontrollers. • Bluetooth Serial module can communicate with the other Bluetooth devices but requires at least two conditions: (1) The communication must be between master and slave. (2) The password must be correct.
  • 20. Pins Description • PIN1: UART_TXD, Bluetooth serial signal sending PIN, can connect with MCU’s RXD PIN • PIN2:UART_RXD, Bluetooth serial signal receiving PIN, can connect with the MCU’s TXD PIN • PIN11:RESET, the reset PIN of module • PIN12:VCC, voltage supply for logic, the standard voltage is 3.3V • PIN13:GND • PIN 31:It is used to indicate module state. • PIN32:Used to control LED indicating pairing. It will be steady on when pairing is successful.
  • 21. Hardware details • Built-in CSR company Bluetooth chip BC417143. • Bluetooth Technology v2.0+EDR. • Coverage up to 30 ft/10 m. • Built-in antenna. • Power input: +3.3V DC. • The maximum serial baud rate: 1382400 bps. • Connection/non-connection status indicator. • Frequency: 2.4GHz ISM band • Modulation: FSK (Frequency Shift Keying) • Emission power: ≤4dBm, Class 2 • Speed: Asynchronous: 2.1Mbps (max.)/160 kbps • Dimensions: 26.9mm×13mm× 2.2mm
  • 22. Communication between Smartphone and MCU • Start the Bluetooth manager(e.g. Bluetooth Terminal available on Google play Store). • Connect device(should find module). • Pair. • Send Commands from phone. • See the magic being done.
  • 23. THE MOST IMPORTANT PART THE UART/USART COMMUNICATION
  • 24. USART/UART UART stands for Universal Asynchronous Receiver/Transmitter UART helps to communicate with:- • Another microcontroller • Multiple microcontrollers • Computer using a voltage level shifter or converter • Other devices that are compatible with USART/UART
  • 25. WHAT DOES UART DO? UART can :- • Transmit data using a buffer and a shift register • Receive data using a shift register and buffer • Create a frame of data that is recognised on both the receiving end and the transmitting end. All of this, works according to an agreed upon speed from both sides, or with synchronous mode where the clock line is directly connected.
  • 26. Transmission/Reception in UART Data to be transmitted Data sent to a buffer Data is sent to shift register Data moves along transmit wire • This is how transmission is done. • Receiving information is done in the reverse order of transmission.
  • 27. CLOCK MODES  UCSRC=(1<<UMSEL);//setting the UMSEL bit to 1 for synchronous mode  UCSRC&=~(1<<UMSEL);//setting the UMSEL bit to 0 for asynchronous mode
  • 28. Baud Rate-the driving force The baud is the clock that pushes the data along the line. In USART, a clock wire must be connected between each microcontroller. This wire will pulse like a heartbeat. In the case of asynchronous(UART), each microcontroller has its own clock, the clock(baud rate) at transmitter and receiver end must be same i.e. the receiving microcontroller must be receiving data at the same pace at which it is transmitted.
  • 29. Initializing the UART Function to initialize the UART :- void UART_INIT(unsigned int baud) { UBBRH=(unsigned char)(baud>>8); UBBRL=(unsigned char)baud; //Enable the receiver and transmitter USCRB=(1<<RXEN)|(1<<TXEN); UCSRC=(1<<URSEL)|(1<<USBS)|(3<<UCSZ0); } • When TXEN is set(Transmitter enabled), the general purpose function of that pin is not available until TXEN is disabled. Same idea goes for RXEN pin.
  • 30. TRANSMISSON void UART_Transmit(unsigned int data) { while(!(UCSRA&(1<<UDRE))); //wait until the transmitter is ready UDR=data; //transmit that data out of here }
  • 31. RECEPTION Function for receiving :- unsigned char UART_Receive(void) { while(!(UCSRA&(1<<RXC)); //wait for RXC to not have 0 return UDR; //get that data out of there and back to the main program }
  • 32. UART I/O Data Register-UDR UART Control and Status Register A-UCSRA REGISTERS
  • 33. UART Control and Status Register B – UCSRB UART Control and Status Register C – UCSRC
  • 34. UART Baud Rate Registers – UBRRL and UBRRHs
  • 36. PCB LAYOUT • To the left is the actual PCB layout of the product. • This shows both the bottom and top copper layers. • This image also shows the silkscreen for placing the components on the PCB.
  • 37. • The actual product contains all of the above mentioned/explained components. • These components are soldered on a home made PCB(printed circuit board). • The product needs some improvisation will be ready to install at home/office. • The home automation board has small dimensions and can be easily installed by any electrician.