ablab

Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

Relay based PC Controlled Home Automation System with ATmega16-II

6606
Mark as Favourite

In this project, we will learn How to design a relay based PC controlled Home Automation system with AVR ATmega16 microcontroller Part-II. Here, we will use the PC keyboard as the input device to control the appliances i.e 2 bulbs and 2 fans and we will display the status of each appliance in the PC.

PC will send the control signal(ASCII value of pressed key value) to the ATmega16 microcontroller through its serial port. But current generation PCs and Laptops do not have serial port in them, so we will use one USB to Serial converter cable which will create a virtual serial port in the PC /Laptop. Again, the output of USB to Serial cable can not be connected to microcontroller directly as the output voltage of USB to Serial Cable corresponds to RS-232 level. But the ATmega16 microcontroller needs TTL/CMOS voltage levels. For this, we will use MAX-232 voltage converter which will convert RS-232 voltage level to TTL one and vice-versa.

The ATmega16 microcontroller will read the serial output of MAX-232 through its USART and it will process it to know which key of the PC keyboard is pressed. After knowing which key of the PC keyboard is pressed, the ATmega16 microcontroller will send the required control signal to the Quad Relay Driver to turn on and off appliances and it will send status of the appliance to PC also(status of each appliance will be displayed in PC).

Here, we will use one key of the keyboard to control one appliance. Same key will be used to turn on and off the appliance. Each time we press the same key, the appliance changes its status. So, for four appliances, we will use 4 keys of the keyboard. Apart from these 4 keys, we will use 2 more keys to turn on and off all appliances at a time. Now, press different keys from the PC and control the appliances as you want.

Control Keys

Appliance Status Change

1

Appliance 1 On/Off

2

Appliance 2 On/Off

3

Appliance 3 On/Off

4

Appliance 4 On/Off

5

All Appliances On

6

All Appliances Off

 

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega16 1pc
AVR USB Programmer 1pc
12V, 1A DC SMPS Adaptor 1pc
Quad Relay Driver 1pc
RS-232 Driver Board 1pc
Home Appliance Board 1pc
USB to Serial Cable-Y-105 1pc
1 to 1 Connector-Female to Female 6pc
10 to 10 FRC Female to Female Connector 2pc

Circuit Diagram

Video

Connection Guide

The step-by-step connection guide for Relay based PC Controlled Home Automation System with ATmega16-II is as follows

  • Steps - 1 ( 0f 14 )

    Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

  • Steps - 2 ( 0f 14 )

    Connect the 12V and GND pins of Relay Control header of Quad Relay Driver with the 12V and GND pins of 12V and GND header of AVR Trainer Board-100 with 1 to 1 Connectors.

  • Steps - 3 ( 0f 14 )

    Connect the A1, A2, A3 and A4 pins of Relay Control header of Quad Relay Driver with PB0, PB1, PB2 and PB3 pins of PORTB header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

  • Steps - 4 ( 0f 14 )

    Connect the Neutral and Phase of AC Supply from Wall to N and PH of AC Input Terminal Blocks of Quad Relay Driver with wires.

  • Steps - 5 ( 0f 14 )

    Connect the Neutrals of 2 Bulbs and 2 Fans to the N pin of AC Output Terminal Blocks of Quad Relay Driver with wires.

  • Steps - 6 ( 0f 14 )

    Connect the Phases of 2 Bulbs and 2 Fans to the PH1, PH2, PH3 and PH4 pins of AC Output Terminal Blocks of Quad Relay Driver respectively with wires.

  • Steps - 7 ( 0f 14 )

    Connect USB side of USB to Serial Cable to PC USB port and the other side to DB-9 connector of RS-232 Driver.

  • Steps - 8 ( 0f 14 )

    Connect PortD header of AVR Trainer Board-100 with RS-232 header of RS-232 Driver with a 10 to 10 FRC Female Connector.

  • Steps - 9 ( 0f 14 )

    Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

  • Steps - 10 ( 0f 14 )

    Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

  • Steps - 11 ( 0f 14 )

    Download Relay based PC Controlled Home Automation System with ATmega16-II Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

  • Steps - 12 ( 0f 14 )

    Open the RealTerm or any other terminal Software and set the COM port and USART configuration same as ATmega16 microcontroller.

  • Steps - 13 ( 0f 14 )

    Switch on the power with the help of Power Switch of AVR Trainer Board-100.

  • Steps - 14 ( 0f 14 )

    Press keys from PC keyboard and see the output.

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 14 )

  • Connect the 12V and GND pins of Relay Control header of Quad Relay Driver with the 12V and GND pins of 12V and GND header of AVR Trainer Board-100 with 1 to 1 Connectors.

    Steps - 2 ( 0f 14 )

  • Connect the A1, A2, A3 and A4 pins of Relay Control header of Quad Relay Driver with PB0, PB1, PB2 and PB3 pins of PORTB header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

    Steps - 3 ( 0f 14 )

  • Connect the Neutral and Phase of AC Supply from Wall to N and PH of AC Input Terminal Blocks of Quad Relay Driver with wires.

    Steps - 4 ( 0f 14 )

  • Connect the Neutrals of 2 Bulbs and 2 Fans to the N pin of AC Output Terminal Blocks of Quad Relay Driver with wires.

    Steps - 5 ( 0f 14 )

  • Connect the Phases of 2 Bulbs and 2 Fans to the PH1, PH2, PH3 and PH4 pins of AC Output Terminal Blocks of Quad Relay Driver respectively with wires.

    Steps - 6 ( 0f 14 )

  • Connect USB side of USB to Serial Cable to PC USB port and the other side to DB-9 connector of RS-232 Driver.

    Steps - 7 ( 0f 14 )

  • Connect PortD header of AVR Trainer Board-100 with RS-232 header of RS-232 Driver with a 10 to 10 FRC Female Connector.

    Steps - 8 ( 0f 14 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 9 ( 0f 14 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

    Steps - 10 ( 0f 14 )

  • Download Relay based PC Controlled Home Automation System with ATmega16-II Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 11 ( 0f 14 )

  • Open the RealTerm or any other terminal Software and set the COM port and USART configuration same as ATmega16 microcontroller.

    Steps - 12 ( 0f 14 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100.

    Steps - 13 ( 0f 14 )

  • Press keys from PC keyboard and see the output.

    Steps - 14 ( 0f 14 )

Downloads

Relay based PC Controlled Home Automation System with ATmega16-II Project File
  • 13 downloads 0 Kb

Post a Comment