Connect your M-Bus installations with Moduino ESP32

Moduino ESP32 is a compact, powerful and versatile IoT device that can be used for various industrial automation and control applications. One of the communication protocols it supports is the M-Bus (Meter-Bus) protocol. This protocol is used for communication between energy meters, heat cost allocators and other devices in the energy management and building automation systems.

In this article, we will discuss how to use Moduino ESP32 with the M-Bus protocol using RS-232 communication.

Requirements

  • Moduino ESP32
  • M-Bus devices (e.g energy meters)
  • RS-232 to RS-232 cable

Hardware Connections

  1. Connect the Moduino ESP32 to the M-Bus device using an M-Bus cable.
  2. Connect the Moduino ESP32 to a computer using an RS-232 to RS-232 cable.

Software Setup

  1. Download and install the Arduino IDE from the official website.
  2. Open the Arduino IDE and go to File -> Preferences.
  3. In the Additional Board Manager URLs field, add the following URL: https://dl.espressif.com/dl/package_esp32_index.json
  4. Go to Tools -> Board: -> Board Manager and search for “esp32”.
  5. Install the “ESP32 by Espressif Systems”.
  6. Go to Tools -> Board and select “ESP32 Dev Module”.
  7. Go to Sketch -> Include Library -> Manage Libraries.
  8. Search for “MBus library” and install it.

Code

  1. Create a new sketch in the Arduino IDE.
  2. Include the M-Bus library by adding the following line at the top of the sketch:
cCopy code#include <MBus.h>
  1. Define the M-Bus object and the serial port for communication:
scssCopy codeMBus mbus;
HardwareSerial mbusSerial(2);
  1. In the setup() function, initialize the serial port for communication and start the M-Bus:
scssCopy codevoid setup() {
  mbusSerial.begin(2400, SERIAL_8N1, 16, 17);
  mbus.begin(mbusSerial);
}
  1. In the loop() function, read the M-Bus data and print it to the serial monitor:
scssCopy codevoid loop() {
  if (mbus.available()) {
    MBusDataFrame data = mbus.read();
    Serial.println(data.toString());
  }
}
  1. Upload the code to the Moduino ESP32 using the Upload button in the Arduino IDE.

Conclusion

With the above steps, you have successfully set up Moduino ESP32 with the M-Bus protocol using RS-232 communication. This will allow you to communicate with M-Bus devices and receive data from them, which can be further processed for industrial automation and control applications.

Order Moduino X now: https://iiot-shop.com/product/moduino/

SIMCom modems now available in Industrial IoT Shop

SIMCom SIM7000G

TECHBASE’s Industrial IoT devices, ModBerry & Moduino series supports latest SIMCom global-band SIM7000G eMTC & NB-IoT Module. Now the latest SIM7000G as well as 7000E / 7000A versions of modem are available at IIoT-Shop.

SIMCom SIM7000G

Our ModBerry / Moduino devices equipped with latest SIM7000G modem are perfect for industrial automation solutions, e.g. data logging, metering, telemetrics, remote monitoring, security and data management through all Industrial IoT applications.

Supported bandwidths:

    • Global-Band LTE CAT-M1:  B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B26/B28/B39;
    • Global-Band LTE CAT NB-IoT1:  B1/B2/B3/B5/B8/B12/B13/B17/B18/B19/B20/B26/B28;
    • GPRS/EDGE 850/900/1800/1900Mhz Control Via AT Commands

Supported data transfer:

    • LTE CAT-M1(eMTC) – Uplink up to 375kbps, Downlink up to 300kbps
    • NB-IoT – Uplink up to 66kbps, Downlink up to 34kbps
    • EDGE Class – Uplink up to 236.8Kbps, Downlink up to 236.8Kbps
    • GPRS – Uplink up to 85.6Kbps, Downlink up to 85.6Kbps

You can browse wireless modem category here: https://iiot-shop.com/product-category/modems/

Supported ModBerry series

Supported Moduino series

Economical Moduino X3 with ESP32 on-board available NOW

Moduino X3 ESP32

New version of Moduino ESP32, model X3 designed for various economical applications

Moduino X3 model offers new approach to Industrial IoT by upgrading mainboard elements to ensure high performance and ultra-low cost of implementation. In comparison with X2 version, new X3 limits additional ExCard expansion modules, drasticly changing the price of the device, but maintaining the 3-terminal I/Os of previous model. An important change is providing opto-isolation for DIO interface (optionally interchangeable with Relay interface for that I/O).

New version of Moduino ESP32, model X3 is designed for various economical applications, such as Industrial IoT installations, data management & remote edge-devices control. Basic configurations of X3 can be purchased for a price even lower than X1/X2 models for development purposes. Please contact our Sales Department (via Chat or e-mail) to get best price for these devices.

To read more about Industrial Moduino X solution, check here: 

PDF Datasheet  

Full comparison below:

Moduino ESP32 Comparison

To order configurable devices, choose Moduino X3 option in Moduino X product configurator here:

ORDER NOW

 

Moduino ESP32 controller now powered with Pycom modules

New base platforms for Moduino device

Revised version of TECHBASE’s Moduino edge controller offers now support and compatibility with wide range of Pycom’s compute modules with built-in communication interfaces, e.g. LoRa, Sigfox, NarrowBand-IoT / LTE cat. M1/NB1 and WiFi/BT4.2, similarly to standard Moduino devices, powered by Espressif’s ESP32-WROVER module.

With new Moduino platform you can choose from variety of Pycom modules to power the unit, in order to receive specific wireless features. At the present day Moduino supports these models:

    • WiPy 3.0 with WiFi & Bluetooth 4.2
    • SiPy with WiFi/BT and Sigfox
    • LoPy4 with WiFi/BT and LoRa, Sigfox
    • GPy with WIFi/BT and NarrowBand-IoT / LTE cat.M1/NB1
    • FiPy with WIFi/BT and LoRa, Sigfox, NarrowBand-IoT / LTE cat.M1/NB1

If physical network connection is a must, you can always choose standard Moduino ESP32 with Ethernet expansion module to ensure communication via LAN. Of course the possibility to choose wired-to-wireless communication is also available with the Moduino configurator.

All Pycom-based Moduino solutions are compatible with wide range of interface expansions for standard Moduino ESP32 platform, e.g. RS-232/485, Analog I/Os, Digital I/Os, Relay, CAN and many more, including SuperCap & OLED screen options. You can find the whole list of available expansions here: https://iiot-shop.com/product/moduino/

To read more about Industrial Moduino X solution, visit: https://moduino.techbase.eu/

ORDER NOW

 

New ModBerry M2000 based on Aaeon’s UP Squared x86 board

UP Board Squared ModBerry M2000

First Industrial IoT device based on UP Board
In 2017, the first unit that entered the ModBerry series was a device called ModBerry M1000, utilizing the capabilities of Aaeon’s UP Board platform. The solution uses Quad-core Intel Atom x5-Z8350 processor with 4x 1.44GHz frequency (boost up to 4x 1.92GHz), up to 4GB RAM and 64GB eMMC on board. The platform also features USB 3.0 and Gigabit Ethernet 10/100/1000Mbps for faster communication and supports various operating systems, e.g.: full distribution of Microsoft Windows 10 Pro/Home/IoT, Microsoft Windows 10 IoT Core, Linux and Android.

To read more about Industrial ModBerry solutions, visit: https://modberry.techbase.eu/

New base platform for Industrial ModBerry device
New addition to TECHBASE’s Industrial IoT Ecosystem is Modberry M2000, powered by Aaeon’s UP Squared development platform, to maximise the performance of Gateway Layer and provide the best data management for end-point layer, built with Industrial Moduino ESP32 devices.

ModBerry M2000 is an industrial computer series designed for the needs of automation, telecommunications, remote supervision and monitoring. ModBerry M2000 comes a choice of processor: Dual-Core Intel N3350 2×2.4GHz or Quad-Core Intel N4200 4×2.5GHz, 2/4/8GB and 16/32/64/128GB eMMC on-board with possibility to expand the storage even further with SATA3 & M.2 slot.

ModBerry M2000 platform can be extended with supported ExCard modules, including physical industrial interfaces: RS-232/485 ports, Digital I/Os, Analog I/Os, Relay, Ethernet, 1-Wire, USB, CAN; and wide range of wireless communication modules: Wi-Fi, Bluetooth GPRS/3G/LTE, for energy-efficient NarrowBand-IoT/LTE cat. M1/NB1, GPS, Wireless M-Bus, LoRa, ZigBee and many more.

Industrial IoT ExCard

ModBerry device and be equipped with dedicated iMod software platform to support standard protocol, such as MQTT, MODBUS, SNMP, M-Bus and many custom protocols. iMod – an innovative software platform allowing for quick start-up and full exploitation of device capabilities without the need for writing programs. A fully configurable system is reflecting typical C-L-V (Convert-Log-Visualize) use. Of course, the PLC software for creation of algorithms in the ladder system with the capability of operation on ModBerry device services the MODBUS protocol is also available.

To order sample devices, visit our new Industrial IoT Shop and ask our Sales Department via chat about new ModBerry M2000: 

ORDER NOW

 

ESP32 Modbus Master TCP

Welcome to the series of configuration instructions for ModBerry and Moduino ESP32 devices. In this class, you will program ESP32 processor to be Modbus TCP Master.

We will use two devices, which contain this processor: Moduino ESP32 and Pycom. Both devices are running in MicroPytthon environment. Our Modbus Slave will be PC computer with Modbus simulator software running on it.

You will need:

  • Moduino ESP32 or Moduino Pycom device (check this website to find out more about Moduino ESP32 device and this to check Pycom device)
  • PC with Linux operating system
  • RS-232/RS-485 port in your computer or USB to RS-232/RS-485 converter

You can read the complete tutorial at Instructables.com:

READ MORE

 

New SIM7000G modem for ModBerry / Moduino Industrial IoT devices

TECHBASE’s Industrial IoT devices, ModBerry & Moduino series, now supports latest SIMCom global-band SIM7000G eMTC & NB-IoT Module. New SIM7000G supersedes previous 7000E / 7000A / 7000C versions of modem and provides a universal band set with global coverage, in opposite to Europe, America and China-only solutions.

Our ModBerry / Moduino devices equipped with latest SIM7000G modem are perfect for industrial automation solutions, e.g. data logging, metering, telemetrics, remote monitoring, security and data management through all Industrial IoT applications.

Supported bandwidths:

  • Global-Band LTE CAT-M1:  B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B26/B28/B39;
  • Global-Band LTE CAT NB-IoT1:  B1/B2/B3/B5/B8/B12/B13/B17/B18/B19/B20/B26/B28;
  • GPRS/EDGE 850/900/1800/1900Mhz Control Via AT Commands

Supported data transfer:

  • LTE CAT-M1(eMTC) – Uplink up to 375kbps, Downlink up to 300kbps
  • NB-IoT – Uplink up to 66kbps, Downlink up to 34kbps
  • EDGE Class – Uplink up to 236.8Kbps, Downlink up to 236.8Kbps
  • GPRS – Uplink up to 85.6Kbps, Downlink up to 85.6Kbps

Our ModBerry / Moduino devices with global-band SIM7000G are available for testing and developing purposes, due to pending certifications of this module. For more information please contact our sales managers via live chat or contact forms.

Supported ModBerry series

Supported Moduino series

M-Bus/Wireless M-Bus support for Moduino X1/X2

Moduino based on ESP32 can now be equipped with TECHBASE’s original mBus10/60/400 converter module. The converter operates as a M-Bus Master and allows user to connect up to 400 standard M-Bus receivers (Slaves) through M-Bus Master output or fewer devices at a higher M-Bus load over long distances. Moduino, as a fully capable Industrial IoT device, can now be used with every device equipped with M-Bus interface, e.g. heat meters, electricity meters, gas meters, executive modules, recorders, measuring instruments.

Wireless M-Bus support

TECHBASE has added high performance module for wireless M-Bus connectivity and multi-hop networking into Moduino series expansion options. The module is configured as an embedded micro system or simple data modem for low power applications in the metering specifically allocated band of 169 MHz or in the ISM band of 868 MHz. The device is can be configured for interoperability in a WMBus network for Industrial IoT applications.

The RF implementation guarantees best-in-class performance in terms of covered area and power consumption. The output power can be increased up to +30 dBm on the 169 MHz band (+27 dBm on optimized version for highest power efficiency) and up to +15 dBm on the 868 MHz band. The extremely reduced power consumption gives access to long lasting battery life requirement (up to 2 μA in sleep mode for wireless M-Bus module with an RTC clock running).

The Moduino devices  can be provided with a W-MBus stack specifically developed by Embit for the platform that allows to integrate the module in the desired system without effort and simplify the interaction in WMBus networks.

MEET MODUINO X SERIES

 

First industrial gateways series based on new ESP32 chips

The newest addition to TECHBASE’s Industrial IoT Ecosystem is a lightweight, but powerful energy-efficient and fully capable automation controller series, called Moduino – an industrial computer for remote data control and management, equipped with latest ESP32 compute module, wide range of serial, digital and analog inputs/outputs and wireless communication interfaces. This cost effective solution is perfect for end-point devices.

Moduino is powered by ultra-low power Dual-Core Tensilica LX6 240 MHz processor with 512KB RAM (up to 4MB) and 4MB SPI flash memory on-board. Integrated Wi-Fi/BLE modem and extra wireline/wireless interfaces make the Moduino micro-computer a versatile addition to Industrial IoT solutions offered by TECHBASE company. For more complex installations and for those, who need high integration capabilities, the Moduino devices can easily work remotely with existing ModBerry gateway for data accumulation and monitoring, to perform specific actions before sending the data to cloud services. The Moduino-ModBerry installation can work as standalone Ecosystem (for example via MQTT), providing fog-computing to any installation.

Wireless solution

Both Moduino X1 & X2 offer built-in Wi-Fi & Bluetooth 4.2 and support for LoRa, Sigfox, LTE cat. M1, NarrowBand-IoT (LTE cat. NB1) modems. Currently the support of ZigBee modems is under development. Moduino is equipped with standard U.FL (IPEX) external antenna connectors, allowing the device to reach up to 1km range (for Wi-Fi modem) and expanding the range for other wireless interfaces.

Battery and AC powered

Two multi-sized units X1 and X2 represent diversified approach to IIoT installations for remote data access & management. The main difference between Moduino X1 and it’s larger brother Moduino X2, apart from size, is a battery power support for X1 due to lower energy demand, making it independent from local power grid – perfect for remote installations and scattered objects monitoring. Both solutions can be powered by regular power supply with UPS support (LiPo & Supercapacitor batteries), offer wide range of serial, digital and analog inputs/outputs assisted with support of wireless communication interfaces.

Operating systems & software

Use of ESP32-WROVER compute module adds the support for real-time operating systems (compared to most Raspberry Pi based Linux and Windows OS versions), and openness of the Espressif’s platform to Moduino industrial automation controller. Thanks to enormous community of ESP32 and Arduino users and developers, the Moduino can now adapt existing software solutions, tools and programming environments,  for example:

  • ESP-IDF (Espressif IoT Development Framework)
  • Zephyr Project (scalable RTOS)
  • Arduino (C++)
  • MicroPython
  • Mongoose OS
  • etc.

End-point sensors

The Moduino device is a comprehensive end-point controller for variety of sensors located throughout any installation. It fully supports temperature and humidity sensors and new ones are currently developed, e.g. accelerometer, gyroscope, magnetometer, etc.

MEET MODUINO X SERIES