This tutorial is derived from previous tests enter pdacontrolen.com or pdacontroles.com look for evidence with “modbus tcp” tests with “Node-RED” and ESP8266 Although this test is old it serves as a reference for the current application tests and implementations of modbus tcp in esp8266 easily adaptable to Arduino “Node-RED” IoT connection platform, has Modbus TCP / IP nodes Well our hardware a Meter PZEM-004 and ESP8266 We will measure the electrical consumption of a 110VAC Water Heating Resistance Non-invasive meter features CT Current Transformer From previous tests the Modbus TCP / IP slave implementation was taken and cut for reading and writing only “Holding Registers” is a simple customizable routine Technically Read the meter PZEM-004 and send data in 4 HR, we use 5 HR but the first one is empty in 0 To clarify, in this case you can not use the serial port since it is used to communicate with the meter At the beginning I use it only to print the IP address of the ESP8266, then I will only communicate with the PZEM Our visualization in Node-RED Dashboard Constant reading via Modbus TCP Configuration for connection with ESP8266 slave, requires IP address of the module Technically the modbus array is separated processed and displayed in Dashboard Dashboard configuration Node-RED is running locally on my Lubuntu Linux Some “Gauge”, “Chart” and could create a professional visualization This application will only be displayed on my Network locally We turn on the RESITENCIA so that the visualization was similar to the display some multiplications and divisions were made not to adjust the measured values, are for the transport of floats in arduino IDE to integers in HR with the documentation and testing you will see the practical solution Then we could add a RELE and a Temperature Sensor approximately 920 Watts enough consumption and quite Hot the visualization can be done on a PC or a phone with WEB browser the Modbus TCP / IP trimmed version works fine, for the application every 5 Sec updates the data next improvements OTA Update, Wifimanager, and a web server for debugging I created a playlist with other tests with blynk, cayenne and more … regards

Leave a Reply

Your email address will not be published. Required fields are marked *