ESP32LR42 User Manual v1.02 ESP32LR42 User Manual Version 1.02 Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 Table of Contents Overview....................................................................................................................................................3 Control Protocols.......................................................................................................................................3 WiFi....................................................................................................................................................
ESP32LR42 User Manual v1.02 Overview The ESP32LR42 is a WIFI connected relay module using the popular ESP32. It provides 4 relays capable switching up to 16Amps and 2 digital inputs with pull-ups than can interface directly with volt free contacts. The normally open relay contacts have snubbers fitted across them, and can drive inductive loads such as contactors and solenoids. Power for the board is 12v dc, which can be provided by a standard universal wall power supply.
ESP32LR42 User Manual v1.02 USB Configuration Commands ST Status. Return the system status Status: Firmware Version: 1.2 IP: 0.0.0.0 (192.168.0.30) Subnet: 0.0.0.0 Gateway: 0.0.0.0 Primary DNS: 0.0.0.0 Secondary DNS: 0.0.0.0 SSID: ******** Password: ******** ASCII TCP Port: 17123 RSSI: -66 MQTT Server: 192.168.0.
ESP32LR42 IP User Manual v1.02 Sets the modules IP address. Enter IP followed by the required IP address. Entering address 0.0.0.0 means the IP will be obtained from your networks DHCP server. The new IP address will take effect after the next re-boot. IP “192.168.0.123” OK. Saved IP Address: 192.168.0.123 SB Sets the SuBnet mask. SB “255.255.255.0” OK. Saved Subnet Mask: 255.255.255.0 GW Sets the GateWay address. This is normally the IP address of your router. GW “192.168.0.1” OK.
ESP32LR42 User Manual v1.02 SS This sets the SSID. The SSID is the public name of your WIFI network Enter your WIFI’s SSID here. SS “Devantech” OK. Saved SSID: Devantech PW Sets your networks WIFI password. PW "K]~kCZUV*UGA6SG~" OK. Saved Password: K]~kCZUV*UGA6SG~ PA Sets the TCP/IP port number for the ASCII commands. PA 17126 OK. Saved ASCII port number: 17126 Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 MS Sets the MQTT broker address MS “192.168.0.121” OK. Saved MQTT Server: 192.168.0.121 MD Sets the MQTT ID for this module MS “UniqueModuleName” OK. Saved MQTT ID: UniqueModuleName MP Sets the MQTT broker’s port. Normally, this should be set to 1883. mp 1883 OK. Saved MQTT port number: 1883 If you are not using MQTT, set the port to 0. This will turn off MQTT, otherwise it will continuously try to connect if there is no MQTT broker.
ESP32LR42 User Manual v1.02 TCP/IP Commands. The ESP32LR42 has a built in TCP/IP command set which allows you to control the module remotely. All commands are sent using plain ASCII text. PuTTY is a good cross platform terminal program to use for testing. The TCP/IP port is the one you set-up with the PA command during USB configuration. Do not use port 80 as that is reserved for the HTML commands and Webpage. SR Set Relay.
ESP32LR42 User Manual v1.02 GR Get Relay. Will return the state of the relay. To get the status of relay 3: GR 3 1 GR 3 0 GR 9 fail GI < relay 9 does not exist. Get Input. Will return the status of an input. GI 2 0 Input 2 is low (Green Led is on) GI 2 1 Input 2 is high (Green Led is off) GI 9 fail Only 2 inputs available AL Get All 2 inputs. AL 10 Here, Input 2 is low, all others are high. Inputs are numbered from left to right, 1 to 2. Copyright © 2018, Devantech Ltd. All rights reserved.
ESP32LR42 User Manual v1.02 HTML Commands. There are a set of HTML commands that can be used to control the module. ?Rly3=1 This will turn on relay 3 ?Rly3=0 This will turn off relay 3 ?Rly3=2 This will toggle relay 3 to the opposite state. You can enter the commands into a browser immediately after the IP address. http://192.168.0.3/?Rly3=1 This will turn on relay 3. In response the module will return an XML file, which your browser will display.
ESP32LR42 User Manual v1.02 Webpage The built in webpage can be used as a remote app to monitor and control the relays. Your can access the page as a default with just the IP address or by specifying index.htm. The webpage contains the Javascript to send an HTML toggle command, as described in the previous section. It will send the toggle command each time a button is clicked. It then uses the responding XML file to colour the buttons and set the Input buttons to indicate input status.
ESP32LR42 User Manual v1.02 Schematics CPU Note. The CPU schematic is the same for the ESP32LR20, ESP32LR42 and ESP32LR88. Relays 5-8 and Inputs 3-8 are not available on the ESP32LR42. Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 Power Supply Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 Relay Outputs 1 of 4 identical circuits shown The relays are capable of switching up to 16 Amps at 24vdc or 230vac. A data sheet of the relay can be found here. Only the normally open (N/O) contact has the snubber circuitry. Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 Digital Input 1 of 2 identical circuits shown Digital Inputs have a pull-up resistor to 3.3v and will operate with a simple contact closure to ground. Alternatively, they may be connected to 3.3v logic. The clamping diodes prevent operation at voltages higher than 3.3v, so don’t connect to 5v logic. Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 PCB dimensions Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.
ESP32LR42 User Manual v1.02 Notes Copyright © 2018, Devantech Ltd. All rights reserved. www.robot-electronics.co.