Experimental project around RFM radio modules using an AVR MCU

.github/ workflows Update build.yml 1 year ago
nbproject Configurability (#29) 11 months ago
.gitignore librfm (#20) 1 year ago
CODE_OF_CONDUCT.md Initial commit 1 year ago
LICENSE Initial commit 1 year ago
Makefile Libs based on makefile setting, LoRa configurable 11 months ago
README.md Update README.md 10 months ago
avrrfm.c Simplify periodic transmission 10 months ago
bitmaps.c Display received temperature on a nice IPS TFT 1 year ago
bitmaps.h librfm (#20) 1 year ago
colorspace.c Allow to pass bg and fg color for monochrome bitmaps and fonts (#3) 1 year ago
colorspace.h Allow to pass bg and fg color for monochrome bitmaps and fonts (#3) 1 year ago
dejavu.c Display received temperature on a nice IPS TFT 1 year ago
dejavu.h Display received temperature on a nice IPS TFT 1 year ago
display.c Allow to pass bg and fg color for monochrome bitmaps and fonts (#3) 1 year ago
display.h Allow to pass bg and fg color for monochrome bitmaps and fonts (#3) 1 year ago
font.c Display received temperature on a nice IPS TFT 1 year ago
font.h Display received temperature on a nice IPS TFT 1 year ago
i2c.c Add I2C, some cleanup 1 year ago
i2c.h Add I2C, some cleanup 1 year ago
librfm69.a Some recommendations from Semtech AN1200.24 (#30) 10 months ago
librfm69.h Some recommendations from Semtech AN1200.24 (#30) 10 months ago
librfm95.a Set watchdog timeout to 1 second (#31) 10 months ago
librfm95.h Some recommendations from Semtech AN1200.24 (#30) 10 months ago
libsdc.a Fix function names 1 year ago
libsdc.h Fix function names 1 year ago
mcp9808.c Resolve suspectibility to temperature changes (#7) 1 year ago
mcp9808.h Do not block CPU while waiting to receive temp. reading (#1) 1 year ago
pins.h Add SD card to transmit larger amount of data (#16) 1 year ago
rfm.c Configurability (#29) 11 months ago
sdc.c Use libsdc (#21) 1 year ago
spi.c RFM95 (#25) 11 months ago
spi.h RFM95 (#25) 11 months ago
tft.c Give display some more time to power up 1 year ago
tft.h Allow to pass bg and fg color for monochrome bitmaps and fonts (#3) 1 year ago
types.h Use radio module's timeout function instead of homebrew... (#22) 1 year ago
unifont.c Temp. "log", Unifont, LNA 50 Ohm + high sensitivity 1 year ago
unifont.h Temp. "log", Unifont, LNA 50 Ohm + high sensitivity 1 year ago
usart.c Improve RSSI - output power control loop by averaging (#23) 12 months ago
usart.h Improve RSSI - output power control loop by averaging (#23) 12 months ago
utils.h Read and display RSSI value (#4) 1 year ago
README.md

avrrfm

make

About

Experimental project around RFM radio modules using an ATmega328P MCU
and librfm69 (FSK)/librfm95 (FSK + LoRa).

To do something really extraordinary, the temperature reading of an MCP9808
sensor is periodically transmitted to the receiver.
To save battery power, the controller, radio module and temperature sensor
are put to power down/sleep mode in between transmissions. The idle current
is ~75µA, which is still quite a lot, but already better than 8mA 🙂
MCU, radio and temp sensor take about 5µA, so the TC1262 3.3V regulator seems
to account for ~70µA.
There is basic SD card support
that might be useful for something like a data logger.

IMG_20250413_184140

The receiver currently converts the raw temperature reading to °C and displays
it with the RSSI value, CRC result and transmitter output power on a nice IPS
TFT display. It responds to the transmitter as kind of ack with the RSSI, which
is used for some very basic power management in the transmitter, significantly
reducing the supply current by reducing the output power i.e. on short distance.
The transmitter waits for this response with a timeout so it won't be blocked
and consumes a lot of power just because there is no response coming back.

IMG_20250413_190306

Fun Stuff

Looking at the payload in the FSK modulated signal from the transmitter in URH (with an RTL-SDR Blog V4):

urh

The four selected payload bytes are:

  • 0b00000011 Payload length (address byte + 2 byte temperature value)
  • 0b01000010 Address (0x42)
  • 0b11000001 Upper byte of raw temperature value from MCP9808
  • 0b01010011 Lower byte of raw temperature value from MCP9808

Calculating the temperature (assuming >= 0°C):

jshell> (0b11000001 & 0x1f) * 16 + 0b01010011 / 16f
$1 ==> 21.1875

So, 21.2 °C 🙂

The first 15 0b10101010 bytes are the preamble, then there are 4 sync word
bytes. After the 4 payload bytes, there are 2 CRC bytes as described in the
datasheet of the RFM69HCW:

PackageFormat

LoRa

With LoRa, the signal of course looks a bit different:

urhLoRa

And it doesn't look like URH can decode LoRa for the time being.
Interesting information about decoding LoRa can be found at DecodingLora - RevSpace.

The chirps of the LoRa signal in the waterfall view of SDR++:

41_7kHz-SF10s

Silly Stuff

A hopelessly underpowered RFM95 in FSK mode going haywire (turn on sound):

https://github.com/user-attachments/assets/85de6b50-0ec8-4264-92a5-a77f90162c87