ESP8266 12E Modbus RTU Master (Improved) Industrial

About: Share - Learn - Makers. Projects, Articles, #automation, #PLC, #Arduino, #IoT and More PDAControl

Intro: ESP8266 12E Modbus RTU Master (Improved) Industrial

We have performed several tests regarding Arduino integrating Arduino-PLC and Arduino-HMI Panasonic for Industrial applications, in this opportunity we have found other libraries for Arduino as Master Modbus RTU, which we will use only in Modules ESP8266, main advantages of the library has Easier facility regarding read and write log settings.

Initially the libraries only worked for Arduino, have been made a series of modifications to be compiled in Arduino IDE and work correctly with the module ESP8266. This time we will highlight the origin of these libraries and the contributions of a community called cooking-hacks.com which market and test platforms such as Arduino, Raspberry pi and Intel galileo, together libelium.com create modules for the integration of The previously mentioned platforms with some existing known protocols.

Complete tutorials available

Tutorial completo: PDAControl Español Tutorial ESP8266 12E Modbus RTU Maestro (Mejorado)

Full Tutorial: PDAControl English Tutorial ESP8266 12E Modbus RTU Master (Improved)

cooking-hacks : www.cooking-hacks.com

libelium :www.libelium.com

Step 1: Video Tutorial ​ESP8266 12E Modbus RTU Master / Arduino IDE Code

Arduino IDE Code

The test strategy performs two-way communication of Holding Registers records.

ESP8266 Slave Simulator

Holding Register[4] <- 00005 (Control diode led -GPIO 04)

Holding Register[5] 00006 -> int random (1 a 999 )

Holding Register[6] 00007 -> Valor ADC0 (LDR- Photoresistor)

Note: ADC0 is valid in ESP versions with this pin available.

Downloads available at PDAControlen.com

Step 2: Components and Materials Required for Testing

Step 3: More Info: Conecctions & Donwloads


The ModbusMaster232.h library is under GNU (General Public License), in this page there are 2 versions available from this library RS232 and RS485, in this case we will use the RS232 version, since the other was created for a module with different hardware To the common Max485.

More Info: Conecctions & Donwloads

Complete tutorials available

Tutorial completo: PDAControl Español Tutorial ESP8266 12E Modbus RTU Maestro (Mejorado)

Full Tutorial: PDAControl English Tutorial ESP8266 12E Modbus RTU Master (Improved)

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Audio Contest 2018

      Audio Contest 2018
    • Metalworking Contest

      Metalworking Contest

    4 Discussions

    0
    None
    Nakshot

    1 year ago

    I am getting compilation error :

    C:\Program Files (x86)\Arduino\hardware\espressif\esp32\libraries\RS485_05_modbus_write_single_coil/avr/sleep.h:224:6: error: #error "No SLEEP mode defined for this device."

    1 reply
    0
    None
    funvill

    1 year ago

    I think you mean Modbus TCP (Ethernet and TCP) not Modbus RTU (RS485)

    1 reply
    0
    None
    Jhon_Controlfunvill

    Reply 1 year ago

    Hi, In this case is modbus RTU serial for RS232 No TCP / IP,

    In case you have a Slave modbus meter or controller, you could do more routines. Example an Mqtt API

    Check this if it is a test Modbus Slave TCP / IP EThernet,

    NodeMCU ESP8266 12E Modbus TCP/IP Control I/O

    greetings