Wifi BT_HDR(Heavy Duty Relay) Board
by Armtronix in Circuits > Wireless
1331 Views, 5 Favorites, 0 Comments
Wifi BT_HDR(Heavy Duty Relay) Board
This instructable is for ARMTRONIX WIFI Heavy Duty Relay Board VER 0.1.
ARMtronix WiFi/BT Heavy Duty Relay Board is an IOT board. It is designed to handle a load with High power consumption at 240 V AC.
Safety Warnings
Note:
that, this board to be powered with AC 230V with required current. Work and handle carefully with AC power as it is harmful and danger for human beings. Touching live wire or board when it is ON is danger and not advisable, it may cause to death, please avoid it.
Even a 50 V AC supply is sufficient to kill you. Please Switch off the mains before you make or change connections, be very careful. If you are not sure of anything related to the AC supply lines, please call an electrician ask and him to help you with it. Do not attempt to interface to mains unless you have adequate training and access to appropriate safety equipment. Never work on high voltages by yourself when you are alone. Always ensure that you have a friend/partner who can see and hear you and who knows how to quickly turn off power in case of an accident. Use a 2A Fuse in series with the input to the board as a safety measure. Basic Wiring diagram is available on our instructables page and github. Please refer them.
Fire Hazard: Making wrong connections, drawing more than rated power, contact with water or other conducting material, and other types of misuse/overuse/malfunction can all cause overheating and risk starting a fire. Test your circuit and the environment in which it is deployed thoroughly before leaving it switched on and unsupervised. Always follow all fire safety precautions.
INTRODUCTION: Wifi_BT HDR(Heavy Duty Relay) Board
Product Features
1) Works directly with AC power 100 - 240 V AC 50-60 Hz.
2) Product firmware can be updated/reloaded/changed as per user requirement.
3) One relay with live AC powered output via NO PIN of relay Neutral accessible to user.
4) Board output can handle Higher load.
5) WiFi with MQTT or HTTP protocol
6) MQTT Authentication with Username and Password.
7) Basic Firmware to enter SSID and password to connect to the router.
8) Firmware has ability to control device through HTTP and MQTT mode.
9) Push Button on board Provided for device Reset.
10) Can be configured for Amazon Alexa or Google Assistant
11) GPIO 21, 22, 33 and 34 are accessible in header to user for their application.
The form factor of the device is 100mm*50mm, as shown in Figure 1. Wifi BT HDR Switch (Heavy Duty Relay) can be used for WiFi enabled Building automation application. This can handle a load with High power consumption at 240 V AC. There is a relay mounted on board to control (ON/OFF) external electrical loads from a mobile application using MQTT/HTTP protocol. It also has features like, power presence detection after relay and AC virtual switch. The board has programming header (TX, RX, DTR, RTS) in compatible to NodeMCU, it can be used with Arduino IDE for programming using an external USB-UART converter. It has on-board power supply module which takes standard AC voltage as input and provides required DC voltage as output. The DC voltage is used to power-up WiFi module used on board to establish WiFi communication with mobile phones.
Functional Block Diagram
SYSTEM OVERVIEW
1. AC to DC Power supply module
AC to DC converter is power supply module. This power supply module rectifies and regulates voltage from 230 V AC to 5 V DC with output current capacity of 0.6A DC. The power of HLK-PM01 is at maximum of 3W. The 5V supply is used to power on relay and USB-UATT converter
2. Wi-Fi Module
Wifi module used on the board is ESP32 with its minimum GPIOs are easily accessible in a header to user for their own application. Wifi module is powered on through 3.3 V DC. It works on both MQTT / HTTP protocol.
3. Electro Mechanical Relay
Electro Mechanical relay is powered by 5 V DC. The AC live powered terminal (NO) is given access to user in a terminal block to control loads. An opto-isolator based driver circuit is used to drive the relay, to create isolation between relay’s AC and DC part.
4. AC Virtual Switch
AC Virtual switch circuit is connected to Wifi module through an opto isolator AC-DC isolation. It gives a ZCD output to Wifi Module to detect the change in status of switch.
5. DC Virtual Switch
DC Virtual switch circuit is connected to Wifi module directly with pull-resistor at GPIO.
Note: Both AC and DC virtual switch circuits are connected to a same GPIO pin of ESP32. Hence, it is suggested to connect only one of the virtual switch at an instant of time.
Header Details and Programming Steps
Make the following connection for ESP32S
1. Connect the “RX of FTDI to TXD” pin of J1.
2. Connect the “TX of FTDI to RXD” pin of J1.
3. Connect the “DTR of FTDI to DTR” pin of J1.
4. Connect the “RTS of FTDI to RTS” pin of J1.
5. Connect the “VCC of FTDI to 3.3V” pin of J1.
6. Connect the “GND of FTDI to GND” pin of J1.
7. For connection refer Figure 4.
Note: Change the Jumper setting 5Vcc to 3.3Vcc in FTDI Board. If you forget to change there is chance of damaging ESP32S.
Open your code in ArduinoIDE, click on tools tab select ‘Board:Arduino/Genuino Uno’ and select ‘NodeMCU-32S’ as shown in below figure 5.
Click on tools tab select ‘Programmer:Arduino as ISP’ refer to figure 6.
Click on tools tab, select “Port: “COMx”, under this click on “COMx” to select. (“x” refers to port number available in your computer) Refer to figure 7.
Uploading the program refer figure 8.
Wiring Diagrams
PROCEDURE POWER ON THE DEVICE.
1. Make an input connection AC phase and Neutral connection as shown in Figure 11.
2. Use an electrical external fuse and MCB with rating 2A/250V, in series to input connections for the purpose of safety.
3. Check and make sure that there is no short circuit between phase and neutral.
4. Ensure that, safety precautions are taken care.
5. Power ON the device by turning ON the main input supply.
6. Then observe the LED D2 on the device is in ON condition.
7. If the device has NOT powered ON, then turn OFF the main input supply and recheck for connections by following above steps.
Board Details are shown in Figure 9.
Load connection wiring diagram refer Figure 10.
Socket connection wiring diagram refer Figure 11.
Note:
1. For higher loads, please do not use the on-board neutral and recommended to use external neutral.
2. On-Board fuse is only for SMPS and not for loads.
PROCEDURE TO CONFIGURE THE DEVICE
Power ON the device, so that, it will host the access point as shown in Figure 12.
Connect the mobile/Laptop to access point with Armtronix-(mac-id). EX: Armtronix-1a-65-7 as shown in Figure 13.
After connecting, open browser and enter 192.168.4.1 IP address, it will open the web server as shown in the Figure 14.
fill the SSID and password and select HTTP, if user wants to connect to MQTT then he has to select MQTT radio button, enter MQTT broker IP address, enter MQTT publish topic then MQTT subscribe topic and submit.
After submitting configuration, the ESP32S will connect to the router and router assigns IP address to the Board. Open that IP address in the browser to control the switch (Relay).
Note:
192.168.4.1 is the default IP address when ESP is hosting, after configuration, to check the IP address provided by router you need login to router, or else download FING app from Google Play store, connect your mobile to router, you can check all the device details connected to your router.
If you have configured with wrong password and SSID is correct, in this case device is trying to connect but password is not matched, it starts resetting, thus the device will not connect to router neither it will host, you need to shut down the router. Then the device starts hosting again and you need to reconfigure (refer Figure 12, 13, 14) and restart router.
Without configuring the SSID and Password we can control the Wifi Switch by connecting to the access point of the device and open the IP address of device i.e. 192.168.4.1 the web server page will show the link with the name Control GPIO as shown in the Figure 10, by clicking this link we can control the Wifi Switch board but the response will be slow.