IoT based Web controlled Home Automation using PIC Microcontroller and Adafruit IO

Home Automation has always been inspiring projects for most of us. Toggling an AC load from the comfort of our chairs or bed of any room without reaching for the switch in another room sounds cool doesn’t it!!. And now in the era of IoT, thanks to the ESP8266 module which made it easy to control anything from anywhere in the world.

IoT based Web controlled Home Automation using PIC Microcontroller and Adafruit IO

In this IoT based project, we will use Adafuit IO to control Home appliaces from a webpage using ESP8266 and PIC microcontroller. We have connected three AC light as loads and they can be controlled remotely using either your phone or computer. Here ESP8266 is used with PIC microcontroller so learn about Interfacing ESP8266 with PIC16F877A Microcontroller before proceeding. Also check IoT projects section to learn more ESP8266 Wi-Fi module.

Component Required

  1. ESP8266
  2. PIC microcontroller(PIC16f877A)
  3. 12V 5A Electromagnetic Relay Module -1
  4. 12v Power supply (12V/1A or above) -1
  5. LM7805 Voltage Regulator -1
  6. LM317 Regulator -1
  7. 10k ohm Resistor -1
  8. 1k Resistor – 3
  9. 10k Pot – 1
  10. 1k Pot -1
  11. 16×2 LCD
  12. 1000uF capacitor -1
  13. 10uF capacitor -2
  14. Wires for connection
  15. 18.432 MHz Crystal oscillator -1
  16. LED -2
  17. 22pF capacitor -2
  18. BreadBoard or PCB (optional)

Circuit Diagram

Circuit Diagram Circuit Diagram

In Web controlled Home Automation project, we have used PIC microcontroller PIC16F877A for performing all the operations. It will communicate with ESP8266 Wi-Fi module to send and receive data from the Adafruit server and take action accordingly to turn ON/OFF relay or load and displaying the status of loads over LCD. We have used 16×2 LCD display for displaying the status of connected AC appliances.

In this project we have three power supplies:

  1. As we have used a 12v relay module we need 12v so we have used a 12v adaptor to power the relay.
  2. We needed 5v for powering the PIC microcontroller, LCD and some of the relay module circuit. So we have used a 7805 voltage regulator connected with a 12v supply. This voltage regulator provides 5v output.
  3. A 3.3v power supply is used for powering the ESP8266 as it works on 3.3v. This supply is made by using LM317 voltage regulator which can be configurable to 3.3v by using some voltage divider circuitry with this. Learn more about creating a LM317 based variable power supply.

All the connections for this project have been shown in the circuit diagram. The final setup will look like this:


Setup Adafruit IO for IoT Home Automation

In this project, we are going to control some home AC appliance via a web page crated using Adafruit IO. Adafruit IO is a simple to use internet service that easily enables IoT devices to GET and POST data. Additionally, it can be used to create GUI interfaces for viewing data, controlling devices, and triggers for alerts/warnings.

Follw below steps to setup Adafruit IO for IoT Home Automation

Step 1: in this step, we have to create an account on or if you already have an account just login into it.

Setup Adafruit IO for IoT Home Automation

Step 2: Create a dashboard by clicking on ‘Dashboards’ at the left side of the page and then click on ‘Action’ and then on ‘Create a New Dashboard’.

Source: IoT based Web controlled Home Automation using PIC Microcontroller and Adafruit IO

About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.