Record temperature from Lexibook ASM30 sensor with Arduino

Needed hardware

Lexibook ASM30 temperature sensor: I had one since many years and I noticed it communicates with 433RF signals with the base

Assembly

It is very simple. Just connect the RF 433 receiver like this:

GND to Arduino pin GND

VCC to Arduino pin 5V

DATA to Arduino DIGITAL pin 2

Then I suppose you have the Arduino connected with a USB cable to a PC running the Arduino development environment.

Reverse engineering Lexibook ASM30 temperature sensor

I tried RFControl sniffer to see if some signals can be discovered. RFControl outputs pulse timing if the same code is received twice.

The ASM30 sensor sends data every 30 seconds, corresponding to the time when the LED is flashing. And RFControl detects some data exactly at the same time!

Analysing the timings show several things :

There is a short timing (<500µs) every other pulse

Some pulses have medium duration (around 1900µs)

Some pulses have long duration (around 4500µs)

The full frame is sent 3 times with a timing >9500µs between frames

My asumption was a short pulse was a separator, a medium pulse was a “0” bit and a long pulse a “1” bit. So I tried to decode bytes knowing the expected temperature which is displayed on the sensor itself: so easy, the 3rd byte is the temperature x10 simply encoded in decimal.

So now, this is what I found:

First byte can vary but I don't know yet what is it. Maybe contains the sensor ID

Second byte is always the same: “11110000” (240). Probably not an ID (or I am really lucky!), maybe a separator

Third byte is the temperature in °C x10

2 next bits are the channel you can choose on the sensor itself: 1, 2 or 3. This is to be able to know the source of the temperature when you have several sensors.

Last 2 bits are always “00”, probably stop bits

The arduino sketch

The following sketch reads the temperature and outputs to the serial line in JSON format. In this sketch, I use RFControl library as is, so it is not very optimized for my needs. However, for now it works and it is enough!