2Touch 2Wifi Home Automation Project
615 0
Utsab kayal

2Touch 2Wifi Home Automation Project

This is a two-channel touch & two-channel wifi home automation project. This project can...

Description:-

This is a two-channel touch & two-channel wifi home automation project. This project can control four appliances via two touch sensor and smartphone(wifi).

Project Used Hardware

Home Automation Hardware

Blank pcb, transistor(bc547), resistor(220ohm), diode(1N4007), relay(5volt), 3pin terminal, smps(5volt), touch sensor(ttp223), esp8266 12e, ams11179(3.3v.), 10k resistor

Project Used Software

arduino ide, blynk(legacy)

Project Hardware Software Selection

for set-up the blynk app, add switches and then first switch-V1 & second switch-V2. For set-up the code, change wifi ssid, password & change auth token given by blynk.

Circuit Diagram

Home Automation Circuit Diagram

For program the esp8266 12e module, you can use different type of programmer like witty cloud development board, nodemcu, cp2102 usb to TTL converter.

Code

//write the wifi name,password and auth token given by the blynk.
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
int relay1 = D1;
int relay2 = D2;
char auth[] = "xxxxxxxxxxxxxxxx";
char ssid[] = "xxxxxxxx";
char pass[] = "xxxxxx";
BLYNK_WRITE(V1)
{
  int pinValue = param.asInt();
  digitalWrite(relay1, pinValue);
}
BLYNK_WRITE(V2)
{
  int pinValue = param.asInt();
  digitalWrite(relay2, pinValue);
}
void setup() 
{
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}
void loop() 
{
  Blynk.run();
}