This page describes in detail the operation of the Micronova / Modbus protocol converter for a pellet stove idea from RidculousLab.
Many pellet stoves on the market are equipped with a branded control unit Micronova, an Italian company leader in the production of customized electronic boards.
Having installed a home automation system at home, I thought of creating a Onewire-Modbus converter that would allow me to read the stove’s operating data.
My home-made home automation system is in fact based on a Raspberry Pi that communicates with various devices via an RS485 serial bus and Modbus protocol.
My pellet thermo stove is one Phebo Athena model. The 14.2 kW power and 11.5 kW of which are water-based and is equipped with a Micronova I023 control unit.
Purpose of the converter
The stove control unit has a onewire serial bus which uses a single conductor for data transmission. The protocol used by Micronova is a proprietary protocol and there is not much information about it. However, the manufacturing company makes available a software called Seraminet which allows the stove to be controlled and analyzed using a personal computer. This system is not suitable for integrating data into my home automation system. I therefore studied the Micronova protocol, partly by finding information on the network and partly by direct experimentation, in order to have enough information to build a suitable protocol converter.
Details of the protocol converter
The parameters of the Micronova bus are: speed 1200 bps – 8 bits – 2 stop bits – parity N. Instead, my home automation bus works at 19200 bps – 8 bits – 1 stop bit – parity N.
The protocol converter must therefore have 2 distinct serial ports. On the first one, he must read the data from the onewire bus. On the second it must behave like a Modbus slave and make the data read by the stove available.
To do this I created a small circuit governed by a PIC18F25K22 microcontroller which has two independent UART serial ports. Everything was mounted on a pre-drilled plate and installed near the Micronova control unit inside the stove casing.
The protocol converter for the pellet stove with micronova control unit allows the reading of the instantaneous data and alarms of the stove. Theoretically it is also possible to change the operating parameters and carry out on / off or alarm reset commands. I preferred to limit the firmware to read only the data for security reasons. In fact, it is not clear to me the command writing mechanism and I would not have problems, after all we are always talking about a stove. In the case of alarms, I prefer to be physically present to check the actual problem. However, I have allowed remote switching on and off using the external contact for the thermostat, already provided by Micronova, which I manage via another unit of the home automation system. The Raspberry Pi, on the other hand, provides instantaneous and historical data on a web page published on the internet and raises the alarms via a Telegram bot.
The microcontroller, as known, works at TTL level so, on the serial with Modbus protocol, I had to add a MAX485 converter to adapt the electrical levels to the RS485. Stove side I had to use instead a transistor, driven by the processor, to divide the single onewire line into the Tx and Rx signals to be connected to the pic.
The control unit also provides a 15V voltage on the connector which I used to power the circuit using a classic LM7805 voltage regulator.
A green LED indicates the communication between the converter and the stove while a yellow LED indicates the communication on the RS485 bus.
On board the protocol converter circuit for Micronova pellet stove I have provided a connector for the connection of the ICSP programmer for any further tests and modifications.
A small cable connects the circuit to the Micronova control unit via a pin strip. The RS485 bus is obviously connected to the home automation system.
The microcontroller reads the data from the stove cyclically. I thought of reading all the 255 addresses of the Micronova RAM sequentially even though I was unable to identify the function of many variables. See the mapping below. I discovered that the message displayed on the stove’s LCD display is also made available in ASCII format on the bus. Since the speed is only 1200 bsp, the reading of all the addresses is rather slow (30 sec) but it is not a problem because the data read are buffered in the pic. Reading via Modbus can therefore return data that is at most 30 seconds old. For simplicity, the only modbus function implemented is Function code 3, that is reading multiple registers. Using the converter, the stove data can therefore be read by any Modbus master on the 485 bus.
The firmware that I made for the protocol converter for pellet stove with micronova control unit is in c language and is written with IDE MPLAB X. The file is visible or downloadable at the link below:
The protocol used by the Micronova control unit is quite simple and is based on two directives: Read (R) and Write (W).
READ-Transmission of data request to the stove
The reading directive is composed of 2 bytes, for example here is the request to read the water temperature:
0x00 – 0x03
Code indicates the location of the data reading memory
- 0x00= RAM
- 0x20= EEPROM
indicates the address of the requested variable from 0 to FF
Map Address RAM (I didn’t investigate EEPROM ).
|Addr start||Addr stop||Description||Unit||Multiplier|
|0x00||Internal cpu counter||#||1|
|0x03||Stove water temperature||°C||1|
|0x0D||Pellet loading activation time||sec||10|
|0x21||Stove status *||code||1|
|0x34||Current stove power||#||1|
|0x37||Smoke fan speed **||rpm||10+ofs|
|0x3B||Stove water temperature like 0x03||°C||1|
|0x5A||Flue gas temperature||°C||1|
|0x65||0x6B||Date (second/day week/hour/minute/day/month/year)||#||1|
* State of the stove (address 0x21)
- 0 = Off
- 1= Start
- 2 = Pellet loading
- 3 = Ignition
- 4 = Work
- 5 = Brazier cleaning
- 6 = Final cleaning
- 7= Standby
- 8= Pellet missing alarm
- 9= Ignition failure alarm
- 10=Undefined alarms (to be investigated)
** Smoke fan speed (address 0x37)
Take the maximum value of the spins and divide it by 255, the result is ofs.
READ-Receiving data requested by the stove
The stove responds with a two bytes:
0x03 – 0x12
Where Checksum is (CODE+ADDRESS) &FF
and Value is the value of the requested variable
WRITE-Transmission of values to the stove (not tested!)
The writing directive is made up of 4 bytes, for example here is the request to switch on the stove, for switching off the value must be 0x06 (see stove status table):
CODE- ADDRESS – VALUE – CECKSUM
0x80 – 0x21 – 0x01 – 0xA2
Code indicates the location of the data reading memory and may be valid:
- 0x80= RAM
- 0xA0= EEPROM
Address indicates the address of the variable concerned from 0 to FF
Value indicates the value to be written
Checksum is the sum (Code+Address+Value) &FF
WRITE-Reception value writing confirmation from the stove (not tested!)
The stove responds with a two bytes:
CHEKSUM – VALUE
0x21 – 0x01
The Modbus protocol implemented is the standard one (see tutorial section).
The Modbus variable mapping reflects the order of the Micronova RAM mapping but the addresses have been translated by 100. Furthermore, only the addresses that seemed useful were mapped, for I have only loaded the first 165 addresses on the buffer and not all the 255 available. The first variable available for reading is therefore the% MW100.