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/

ModBerry 500-CM4 with ESP32 and Arduino for ultimate power management

Sleep functionality for ModBerry 500 CM4 devices

TECHBASE company designed an extended version of Raspberry Pi Compute Module 4 based devices, ModBerry 500-CM4-PM series for better power management in changing conditions of industrial applications. With the use of GPIO the module can manage boot, sleep mode or safe shutdown of the device in terms of unexpected drop in the power network with help of built-in ESP32 module and Arduino environment.

In the last few years developers marketed a wide range of ARM-based development boards, lacking in enhanced power management, especially sleep and wake up modes, commonly used in PC-grade computing. These boards are not adjusted for battery power supply, so it’s natural that sleep/wake functions should be implemented. In connection with the development of solutions based on Linux-SBC, key factor is adding sleep modes to any remote installation

ESP32 based addon module for Raspberry Pi

With built-in algorithms and the possibility to program on your own, the TECHBASE’s sleep/wake addon module can wake the device using a scheduler/timer. The module itself is based on ESP32-WROVER, used in the Moduino X series. ESP32 as a lightweight and low-powered solution is a perfect aid system for Raspberry Pi. Another option is wake on external triggers, e.g. change of input state, etc. All the options for sleep, shutdown and wake can be configured for various scenarios to ensure constant operation of devices, safety of data and continuity of work in case of power failure in any installation.

Sleep mode with additional power backup

Additional power management option for ModBerry devices is sleep functionality enhanced with SuperCap UPS energy backup device. This solution allows programming scenarios including the execution of chosen actions, in order to save data, send a notification and restart/shutdown the controller after completion.

Advanced power management solution

Most advanced configuration includes use of ESP32 module, known from the successful, lightweight Moduino X series, for extra logic for wake up / sleep scripts. This addon will allow the RaspberryPi-based ModBerry device to be woken up by the internal ESP32 controller

Moduino-ModBerry symbiosis allows a wide range of wake-up/sleep schedule customization, in order to perform best and save energy according to power supply state. Arduino and MicroPython environments provide libraries to control different scenarios of data and power management.

ModBerry 500-CM4-PM availability

The preliminary ModBerry 500-CM4-PM devices are available on request and delivery time will be specified by the Sales Dept. depending on the size of the project. Contact via email or Live Chat here: https://iiot-shop.com/

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

 

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