Yesterday I received a new Seeed Studio EdgeBox RPI 200 that looks perfect to build an industrial IoT edge gateway connecting Modbus Serial sensors using RS485 and RS232 and more.
To start playing with it, I decided to use the N3uron application to read the data of the RS485 in the edge.
First of all, I clicked Deploy on balenaHub for the N3uron app and clicked
Add a new device. In my case I downloaded the balenaOS image on my laptop.
As it brings a CM4 with eMMC, i just opened it with a screwdriver to get the Raspberry Pi CM4 to flash balenaOS as the main operating system of the SeeedStudio EdgeBox RPI200.
To flash the Raspberry Pi CM4 you can use a CM4 IO board such as the official Raspberry Pi CM4 IO board, the Waveshare CM4 IO board that i used or the inexpensive Nebra CM4 IO board.
Just flashed balenaOS using balenaEtcher.
Next step will be to power up the device following the instructions from the User Manual and check if the device works well with the balenaOS CM4 device type OS version.
Today I connected the EdgeBox RPI 200 with a Power Supply (24V) to bring the needed power on a DIN rail to the device.
Now I can see my device online. As i don’t use a WiFi antenna on the EdgeBox RPI200, i need an Ethernet cable to get the device online.
Next step is to see how to access to the Phoenix Connector GPIO from balenaOS and get the data coming from the Modbus serial sensors connected to it.
To access to the Seeed Studio EdgeBox RPI 200 Phoenix Connector GPIO it is needed to update the Device Tree parameters of the default balenaOS image. Luckily, it looks like the Edgebox RPI200 works as a Raspberry Pi with a CM4 with any changes.
The device tree is defined on
Define DT overlays as
Define DT parameters for the default overlay. I added the parameter
To know what DT overlay parameters I needed, i downloaded the edgebox RPI200 official image and checked the
bcm2711-rpi-cm4.dtb and used the same overlays.
Once the device is restarted, you should be able to access to the
/dev/ttyACM0 to read all the data from RS485 devices and
/dev/ttyACM1 for RS232 devices connected through the Phoenix Connector.
Now, the device is fully functional and I would like to connect the Seeed Studio Modbus sensor collecting temperature and humitidy using the RS485 with N3uron on the EdgeBox RPI200 running on balena.
To connect the sensor to the power supply on the DIN rail the
VCC-. The A and B cables to the RS485
B ports of the EdgeBox RPI200 as you can see in the image above.
Next step is to get all the data of the sensor and visualize it.
Remember that we are running N3uron on the Seeed Studio EdgeBox RPI200. And now it’s time to access to the N3uron application to access to the Modbus data generated by the Seeed Studio Temperature and Humidity sensor.
To access to N3uron, copy your local ip address and paste it on a browser using the port
8003 (e.g. http://192.168.1.53:8003/).
Use the credentials
n3uron to access to the N3uron platform.
Config on the left menu and go to
Modules on the Explorer menu and click
I called the module
Modbus and selected the
Now go to the Explorer menu, click
Modbus and click to create a
New Channel. I called it
As we are connecting a Modbus Serial device, I selected
Serial type and then the port name as
/dev/ttyACM0 as this sensor is using the RS485. Create a device there, I called it
SHT-1 and I left the default parameters as they matched with the parameters from the sensor manual.
Now, we need to create
Tags. Go to the Explorer menu on Tags. Create the first tag (e.g. Temperature) and add all the parameters needed. The temperature register from the device is on the address
Afterthat, duplicte the Tag and just change the address to read from the right address, in this case the
Real Time on the left menu, and you should be able to see the data streaming into the n3uron application.
Next experiments with the Seeed Studio EdgeBox RPI200 will include more data such as the Modbus TCP, send data over MQTT and more.