Header Ads

Header ADS

Dual Channel AC Load Control by using ESP8266 WiFi Module

Dual-Channel AC Load Control by using the ESP8266 WiFi Module


dual-channel ca load controller using an ESP8266 module

In this Blog Post, I will show you how to make a dual-channel wifi controller.  

Parts Requirements for these projects:

1. ESP8266 Module -1P
2. Atmega328p IC -1P
3. Crystal 16Mhz-1P
4. LED Green -2P
5. Green AC Block 3 Pin - 2P
6. Transistor S9014 - 2P
7. Capacitor 10uf, 50V - 1P
8. AC Terminal Block 3 Pin - 2P
9. AC Terminal Block 2Pin - 1P
10. Capacitor 22pf - 2P
11.  10uf, 50V Capacitor - 1P
12. AC Load - 2P
13. Connecting wire
14. 10k Resistor - 1P
15. 1k Resistor - 4P



This is the main circuit diagram of these projects.


This is the circuit diagram of this project.




Simplify this circuit diagram 




this is not the main circuit diagram but you can get an idea from here how to practice connection all components and devices with Arduino Uno or Atmega 328P.



Now I am going to Explain programming code. This is I think a really easy process. You can see my video which is given below. I am using a website Remotexy.com . This is an impressive site for making Arduino code for Wireless programming. I am using a PCB board which was made by jlcpcb.com. JLCPCB is one of the best PCB company in the world.


Let's explain the program:

#define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT// 
#include <RemoteXY.h> //This Line for esp8266 library


If You are using Wifi module ESP8266. You should use Baud Rate Speed 115200. When you connect your smartphone with wifi module then you using password 12345678.

// RemoteXY connection settings  
#define REMOTEXY_SERIAL Serial 
#define REMOTEXY_SERIAL_SPEED 115200 
#define REMOTEXY_WIFI_SSID "RemoteXY" 
#define REMOTEXY_WIFI_PASSWORD "" 
#define REMOTEXY_SERVER_PORT 6377 



This Code help with your smartphone display.

// RemoteXY configurate   
#pragma pack(push, 1) 
uint8_t RemoteXY_CONF[] = 
  { 255,2,0,0,0,37,0,8,31,0,
  2,0,54,20,43,23,1,24,31,31,
  79,78,0,79,70,70,0,2,0,2,
  20,43,23,1,24,31,31,79,78,0,
  79,70,70,0 }; 





// This structure defines all the variables of your control interface  
struct { 

    // input variable
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t switch_2; // =1 if switch ON and =0 if OFF 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY; 
#pragma pack(pop)



This is the simple code for Arduino.

#define PIN_SWITCH_1 13
#define PIN_SWITCH_2 12


void setup()
{
  RemoteXY_Init ();
 
  pinMode (PIN_SWITCH_1, OUTPUT);
  pinMode (PIN_SWITCH_2, OUTPUT);
 
  // TODO you setup code
 
}

void loop()
{
  RemoteXY_Handler ();
 
  digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
  digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
 
  // TODO you loop code
  // use the RemoteXY structure for data transfer


Click the picture to see this video.


1 comment:

  1. if you know more information about homezenith then pelease cleak the link word.

    ReplyDelete

Theme images by Bim. Powered by Blogger.