Wpisy

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/

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/product/modberry-500-cm4-pm/

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/product/modberry-500-cm4-pm/

Arduino Portenta H7 - new player on the Industrial IoT market

At the Consumer Electronics Show 2020, Arduino has made a possibly groundbreaking announcement with the Arduino Pro IDE. This could bring the maker scene and classic industrial companies closer together.

Arduino Portenta H7 features

The Portenta H7 is equipped with an STM32H747Xi with a Cortex-M7 and a Cortex-M4. Portenta H7 has 2 megabytes of RAM and a 16 MByte NOR flash. An SD card can be connected via an adapter. The connection to a wireless network is via WiFi 802.11 b/g/n or Bluetooth 5.1. The charging electronics for a 3.7 volt LiPo battery are already integrated.

With the Arduino Portenta H7, the first model of the new Portenta family was announced. This should be tailored specifically to the needs of industrial applications, AI and robotics scenarios.

Arduino Portenta H7
Arduino Portenta H7

The model is equipped with two 80-pin connectors, plus four UART ports. USB Type-C port can output image signals via DisplayPort. The Portenta H7 is also programmable with an interpreter in MicroPython, JavaScript and TensorFlow Light. The single-platinum calculator should be available from February for 90 euros.

Source: https://www.linuxinsider.com/story/86448.html

What the world says about Arduino Portenta?

Fabio Violante, CEO of Arduino, said manufacturers will be able to create modules for robotics, 3D printer and more:

Portenta H7 is directly compatible with other Arduino libraries and offers new features that will benefit hardware manufacturers, such as a DisplayPorl output, much faster ADC multi-channel and high-speed timers.

Arduino Portenta Carrier
Arduino Portenta Carrier

Meanwhile, Charlene Marini, vice president of strategy for Arm’s IoT Services Group commented:

SMEs with industrial requirements require simplified development through secure development tools, software and hardware to economically realize their IoT use cases.

ARM Partnership cooperation

ARM works with Arduino to provide secure, easy-to-manage and manageable devices to a wide range of programmers. Two innovations to date show the results of this partnership.

„Mbed OS Portenty is one of the concrete achievements of the partnership,” said Marini. „Another example is the Arduino SIM card, which uses Pelion connection management.”

She said companies have the ability to provide secure Internet of Things on a large scale. This is the foundation of machine learning, automation and the rapid evolution of applications that cross the physical and digital world.

eModGATE with ESP32

Industrial use of Arduino-like solutions

One of industrial IoT devices, supporting Arduino-like technology is eModGATE from TECHBASE. Economical, ESP32-based solution can serve as an end-point in any installation or works well as a gateway, gathering data from scattered sensor mesh across the installation. For more information check Industrial IoT Shop with all the configuration options for eModGATE.

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/product/modberry-500-cm4-pm/

Technology must transfer data to the central system in real time, otherwise it may have negative consequences. If the sensor battery power runs out, a machine failure may stop production for one day or lead to direct danger. If battery life is unbelievable and short, IoT applications will become useless, causing more interference rather than making life easier for its intended purpose. Therefore battery powered IoT devices come as a standard in up-to-date IoT installations

Wireless sensors and sensor networks are one of the elements of the Internet of Things systems and intelligent factories. Replacing the standard sensors and data collection devices with versions that communicate wirelessly gives many benefits, but also enforces a highly thought-out system design that will minimize energy consumption. This is important because these systems must work for many years without servicing. In the article we present the issues regarding the design of systems and forecasting of energy consumption in IoT systems.

Wireless communication vs Battery power

The idea of wireless sensor networks has been around for at least two decades, while the IEEE subgroup working on personal wireless networks defined the 802.15.4 standard in 2003, a year later the first versions of ZigBee appeared. Since then, many varieties of wireless communication have been developed, such as LoRa & NarrowBand-IoT and additional functions introduced, as a result of which designers now have a choice of various open or proprietary protocols. What significantly affects the way the entire project is implemented is energy consumption.

Battery powered IoT installation. Source: https://modberry.techbase.eu/

The basic elements of these systems are sensors that measure physical quantities. Some signal and data processing capabilities are also important. After all, the communication interface is important, which will allow you to pass the measured data on. Such a sensor node should wake up from time to time, make contact with its superordinate controller, transfer data and fall back to sleep again. Battery life depends on the total charge collected. Minimizing this consumption in the long run means that you need to minimize energy consumption during each work cycle. In many cases, the sensor will only work for a small fraction of the time. A measurement that lasts a few milliseconds can be triggered once per second, once per minute, or even less frequently. Therefore, the energy consumed in sleep mode may dominate the total energy consumption.

Battery powered sensors market growth

The lifetime of IoT sensors varies greatly: some last a year years, others 10, the first being the most realistic. When organizations need to deploy engineers to install new batteries in sensors and employ staff to monitor them, the benefits of technology itself are beginning to run out.

Battery powered IoT devices crucial to 2020+ standards

It is estimated that in 2020 nearly 31 billion devices will be connected to the Internet of Things. Such forecasts provide ample opportunities, especially for producers associated with the products that make up it, and they are intensified by the developing IoT technology.

Source: https://globenergia.pl/co-laczy-internet-rzeczy-i-perowskity-fotowoltaika-do-zastosowan-wewnetrznych/

Battery-ready IoT devices based on ESP32

Battery / SuperCap power support allows the processes and data to be securely executed, saved or transferred, and the operating system to be safely shutdown or reboot, if the power source has been restored. The power failure alert can also be sent to cloud service, to perform custom task, specified by user or self-learning AI algorithm.

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.

Battery powered Moduino ESP32
Battery powered IoT installation. Source: https://modberry.techbase.eu/

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

With built-in algorithms and the possibility to program on your own, the TECHBASE’s sleep/wake addon module can wake the device using schedule/timer. Another option is wake on external trigger, e.g. change of input, 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.

Arduino or Raspberry Pi? Pros and cons in IoT use.

Some people consider the Arduino platform to be the best for beginners, however, the novice will handle both Arduino and Raspberry Pi board. The choice between platforms should mainly depend on the characteristics of the project.

The origin of both platfoms

The founder of Arduino is Massimo Banzi, a lecturer at the now-defunct Italian Interaction Design Institute Ivrea, who developed a microcontroller in cooperation with students from this university. The Arduino programming language, based on the Wiring environment and basically on the C/C++ language, was designed by Hernando Barragán, a student of Banzi. The site prepared by Hernando Barragán presents exactly all the work on the project, which clearly shows that this success has more than one father.

In the case of Rasberry Pi, the project also had its source at the university. More specifically, at the University of Cambridge. Three lecturers: Jack Lang, Alan Mycroft and Robert Mullins came up with the idea of ​​developing a simple and above all cheap computer for learning programming. The first prototypes were created between 2006 and 2008. In the next step, seeing the potential of their solution, the men established cooperation with Pete Lamas, an integrated circuit designer at BroadCom, and David Braben, one of the developers of the Elite game, and together they founded the Raspberry Pi Foundation.

As a result, both platforms, which were originally intended to be used for learning by students, due to their low price and simplicity of use, became extremely popular among amateur users of consumer electronics and control, and appeared in mass sales.

So what should you choose – Arduino or Raspberry Pi?

The answer is basically simple – Arduino is ideal for simpler projects. Raspberry Pi will be useful for solutions that require more computing power. Arduino has only 2 kilobytes of RAM. Raspberry Pi has a RAM size of 1 GB. So Arduino is a simple microcontroller, meanwhile Raspberry is actually a small computer. Not without significance is the fact that the Arduino IDE is easier to use than Linux. So if you need a simple control of watering your garden, Arduino will work perfectly. Several sensors and a few lines of code will do the trick. For Raspberry Pi, to achieve the same effect, you will first need to install the system and the necessary libraries. There will be a lot more work and the effect will be the same – watering the garden at a specific time.

So choose Arduino when you need to use a simple solution for frequently repeated activities, e.g. controlling the watering of the garden, switching on and off the external lighting at a specific time, opening the gate, etc. However, because Raspberry can run many tasks at the same time, it is a computer, work simultaneously as a home printer server and operate the monitoring system. Home weather stations are popular and Raspberry will be perfect for this application because of the need to collect information from several sensors (temperature, wind strength, humidity). Raspberry Pi will therefore be a good choice for anyone interested in IoT, i.e. the Internet of Things at home. Examples of ready projects can be found here: https://modberry.techbase.eu/

Why not both?

Nothing prevents you from starting with Arduino and continuing with Raspberry Pi. By using Arduino or ESP32-based solutions you will learn the basics and you will get the effect quickly and relatively easily. But only Rasbperry Pi will allow you to make much more difficult projects. And both platforms can be combined with each other. Arduino/ESP32 can be used to read information from sensors and control e.g. motors (for example a garage door). Raspberry Pi will control all devices and send the collected data, e.g. to a mobile phone. You can do more together.

When the news came out that ventilator shortages could be a problem, many saw the need for alternatives to the big manufacturers and rushed to create them. Unlike industrial projects, these projects were open and shared. Currently, Robert Reed and his group are starting to systematically evaluate the ranking of over 80 such open source projects.

Their work is a milestone in public research and development efforts to solve problems. For many ventilator builders, the group recognized the need for independent evaluation and testing of various projects. This control provides important feedback to both designers and future builders. This is a service you can expect from government regulators if they can act very quickly.

Reid and colleagues Geoff Mulligan, Lauria Clarke, Juan E. Villacres Perez and Avinash Baskaran to help to learn about these studies. This includes submission of modular team designs that allow distributed production and unique suggestions for testing and monitoring these systems. This is called VentMon.

Industrial Arduino-like devices as a base of medical equipment?

When industrial IoT devices and edge devices, like medical equipment work together, digital information becomes more powerful. Especially in contexts where you need to collect data in a traditional edge context, or control the servo-motors of a ventilatr. You can then remotely monitor the container using the sensor.

By introducing AI (artificial intelligence) into the device itself, edge computing can also make more context-sensitive, quick decisions at the edge. Data gathered from the sensors can be transferred to the cloud at any time after local work has been completed, contributing to a more global AI process, or archived. With the combination of industrial IoT devices and advanced technology, high quality analysis and small footprint will become the AI standard in 2020.

Industrial IoT use of ESP32 chip in eModGATE

Latest innovations used in industrial solutions

One of many uses of IoT can be edge devices, dedicated to data management, process control (e.g. with MQTT protocol) and monitoring. Latest ESP32-based eModGATE controller from TECHBASE company is a series utilizing MicroPython environment to provide data management solutions for end-points applications. The eModGATE has built-in Wi-Fi/BT modem and can be equipped with additional NarrowBand-IoT, LoRa, ZigBee, etc.

For example eModGATE eqipped with wireless NB-IoT modem are perfect for industrial automation solutions, e.g. data logging, metering, telemetrics, remote monitoring, security and data management through all Industrial IoT applications.

When the news came out that ventilator shortages could be a problem, many saw the need for alternatives to the big manufacturers and rushed to create them. Unlike industrial projects, these projects were open and shared. Currently, Robert Reed and his group are starting to systematically evaluate the ranking of over 80 such open source projects.

Their work is a milestone in public research and development efforts to solve problems. For many ventilator builders, the group recognized the need for independent evaluation and testing of various projects. This control provides important feedback to both designers and future builders. This is a service you can expect from government regulators if they can act very quickly.

Reid and colleagues Geoff Mulligan, Lauria Clarke, Juan E. Villacres Perez and Avinash Baskaran to help to learn about these studies. This includes submission of modular team designs that allow distributed production and unique suggestions for testing and monitoring these systems. This is called VentMon.

Industrial Arduino-like devices as a base of medical equipment?

When industrial IoT devices and edge devices, like medical equipment work together, digital information becomes more powerful. Especially in contexts where you need to collect data in a traditional edge context, or control the servo-motors of a ventilatr. You can then remotely monitor the container using the sensor.

By introducing AI (artificial intelligence) into the device itself, edge computing can also make more context-sensitive, quick decisions at the edge. Data gathered from the sensors can be transferred to the cloud at any time after local work has been completed, contributing to a more global AI process, or archived. With the combination of industrial IoT devices and advanced technology, high quality analysis and small footprint will become the AI standard in 2020.

Industrial IoT use of ESP32 chip in eModGATE

Latest innovations used in industrial solutions

One of many uses of IoT can be edge devices, dedicated to data management, process control (e.g. with MQTT protocol) and monitoring. Latest ESP32-based eModGATE controller from TECHBASE company is a series utilizing MicroPython environment to provide data management solutions for end-points applications. The eModGATE has built-in Wi-Fi/BT modem and can be equipped with additional NarrowBand-IoT, LoRa, ZigBee, etc.

For example eModGATE eqipped with wireless NB-IoT modem are perfect for industrial automation solutions, e.g. data logging, metering, telemetrics, remote monitoring, security and data management through all Industrial IoT applications.

One of the main problems during the COVID-19 crisis is the lack of adequate ventilator support for patients, a key component of equipment that has a major impact on the breathing of critically ill patients. It’s clear that more ventilators are needed because there aren’t enough devices currently in the hospital for all potential patients who can get infected. Developers use existing creation tools to participate in service calls, for example trying to create a cheap open source Arduino-based ventilators.

Another solution is the AgVa phone ventilator produced by the Indian based company AgVa Healthcare which used one tool we already have: smartphone. The AgVa Phone Ventilator, known officially as the AgVa Advance Pure, is a portable and mobile ventilator system that does the work of a typical ventilator. The vision around the ventilator is that patients should not always have to be stuck to the hospitals all the time.

The primary focus of the ventilator is to provide mechanical ventilation for everyone in need. Its small package ensures easy storage and transportation, whereas its intuitive user interface makes it extremely easy to use even for a non trained person. Finally due to its phenomenally low cost and no need for infrastructure requirement makes it ideal for scaling up the ICU.

Source: https://www.cnx-software.com/2020/04/09/agva-phone-ventilator-connects-to-a-smartphone-to-fight-covid-19/

Industrial Arduino-like devices as a base of medical equipment?

When industrial IoT devices and edge devices, like medical equipment work together, digital information becomes more powerful. Especially in contexts where you need to collect data in a traditional edge context, or control the servo-motors of a ventilatr. You can then remotely monitor the container using the sensor.

By introducing AI (artificial intelligence) into the device itself, edge computing can also make more context-sensitive, quick decisions at the edge. Data gathered from the sensors can be transferred to the cloud at any time after local work has been completed, contributing to a more global AI process, or archived. With the combination of industrial IoT devices and advanced technology, high quality analysis and small footprint will become the AI standard in 2020.

Industrial IoT use of ESP32 chip in eModGATE

Latest innovations used in industrial solutions

One of many uses of IoT can be edge devices, dedicated to data management, process control (e.g. with MQTT protocol) and monitoring. Latest ESP32-based eModGATE controller from TECHBASE company is a series utilizing MicroPython environment to provide data management solutions for end-points applications. The eModGATE has built-in Wi-Fi/BT modem and can be equipped with additional NarrowBand-IoT, LoRa, ZigBee, etc.

For example eModGATE eqipped with wireless NB-IoT modem are perfect for industrial automation solutions, e.g. data logging, metering, telemetrics, remote monitoring, security and data management through all Industrial IoT applications.