How to Make 2-Channel ESP8266 ESP-01 Wi-Fi Relay | ESP-01 Home Automation | RemoteXY | FLProg

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
After I posted this video of the single  channel ESP8266 ESP-01 WiFi relay with FLProg,   a lot of people found it very  easy to use for home automation.  So, I ordered this two-channel ESP8266  ESP-01 relay module from Aliexpress.  Since it will take a couple of  weeks before it is delivered,   I am going to make one with what I currently have.  The two relays can be operated independently with  the RemoteXY app like the single channel one.   I have here the regular 5-volt 2-channel  relay module with an opto-isolator.  An ESP-01 adapter module that regulates  5 volts connected to the VCC and GND   to 3.3 volts required by the ESP-01. The other two pins are the TX and RX pins,   which we will use to control the relays. The ESP01 module itself will go into   the 8-pin header on the board. And of course, a 5-volt power source So here is how they come together. The TX and RX pins on the ESP-01   adapter module go to the IN1 and  IN2 terminals of the relay module.  A 5-volt DC power supply goes to  the VCC and GND of both modules.  Two lamps are connected to a 110- or 220-volt  AC power supply live and to the respective NO1   and NO2 terminals of the relay module. The COM1 and COM2 terminals are then   connected to the AC power supply neutral line. But before the ESP-01 is left on the adapter   module, we will plug it into the ESP-01  programmer and program it with FLProg.   Let us start the programming in Remotexy.com. First of all, configure the Wi-Fi access point,   select the ESP8266-based board, the  Wi-Fi on-chip module, and the FLProg IDE.  Set the smartphone orientation view to horizontal.  Drag two labels to the screen and change  their text to RELAY 1 and RELAY 2.  Place and resize two edit fields below the  labels and change their input type to Integer.  Place three push switches  below the first edit field.   And another three push switches  below the second edit field.  Then set their default display status to OFF.   Select the first push switch and  change the draw-type to ellipse.  Also, change the switch-off caption to OFF DELAY.  Do the same for the push switch  below the second edit field.  The next two sets of push switches should  also be changed to ellipse draw type.  But their switch on caption should be ON DELAY. The final set will have their switch-on   caption as BLINK ON and their  switch-off caption as BLINK OFF.  You can resize and rearrange  the elements as required.  And that will do, just click on the get source  code button to copy the code for FLProg IDE.   In FLProg, I will create a new  FBD project for the ESP-01.  And enable the Wi-Fi access point with 2CH ESP01  RELAY network name and IP address of 192.168.0.1.  I will bring in the RemoteXY block. And paste the RemoteXY code here.  Just make sure that the push switches in the  output window are arranged in ascending order.  Now, I will bring in two timer blocks,  a generator block and an OR block.   The first timer block is changed to an off-delay  timer type with an external delay input.  The second timer block is left as an  on-delay timer with external delay input.  While the generator type is set to a symmetrical  multivibrator with external pulse length input.  The EN inputs of the blocks are then  connected to the push switch outputs 1,   2, and 3 of the RemoteXY block.  While the delay inputs of the  blocks go to the edit_1 output.  The OR block input should be increased  by one and connected to the outputs of   the timers and generator blocks. Now, I will duplicate these blocks   and connect them to the remaining  inputs of the RemoteXY block.  Finally, I will create two digital relay output  tags for the TX and RX pins of the ESP-01.  And connect them to the output of the OR blocks. In compiling the project, the file size mapping   defined by hardware and sketch option should  be selected, the reset method should be set   to dtr (aka nodemcu), and the COM selected  before the code is uploaded into the ESP-01.   Now we can insert the ESP-01 back into the  adapter module and power up the circuit.  Notice that both relays click and the lamps  blink once when the board is powered up.  This is caused by the ESP-01 during booting.  If you don’t mind that, we can go  ahead and connect to the RemoteXY app.   Connect your smartphone to the ESP-01 hotspot,  open the RemoteXY app and add a new device.  Select Wi-Fi point, input 6377 as the  port number, and connect to the ESP01.  Oops! we can only use the free  license version of the app for   just 30 seconds because we have used more  than five elements to make our interface. We will have to activate the Pro version  to use an unlimited number of elements. Here we go. When you buy the Pro license, the  30-second time limit is removed.  You can independently set the  delay values for each relay.  And operate their off delay, on delay   and blink buttons. Now, we have the 2-channel ESP-01  relay operated with the RemoteXY app. Thanks for watching. Please support this   channel by clicking on the "Thanks" button and get   the components used in this video with  the AliExpress links in the description.  Also, hit the "like" button if this video is  helpful, and don’t forget to subscribe to this   channel if you are yet to. See you in the next video.
Info
Channel: OnosTech
Views: 2,288
Rating: undefined out of 5
Keywords:
Id: Mp5QvvD7b4o
Channel Id: undefined
Length: 8min 14sec (494 seconds)
Published: Sun Oct 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.