RFM69HCW Configuration

Started by Aerokeith, May 23, 2025, 06:12:07 PM

Aerokeith

Hi, sorry to ask noob questions that might have already been answered (but I couldn't find it). My application requires sending data at an effective rate of 54 Kbps from one transmitter to four receivers mounted less than 3m away on the wheels of a moving vehicle (i.e. lots of metal nearby). Each receiver will get the same data, so broadcast is appropriate. No packet acknowledgement or encryption is needed. Power consumption isn't important, so I'd like to use a Tx power level that will ensure good-enough reliability. The data is refreshed every 30ms, so occcasional dropouts aren't a problem.

I'm currently prototyping this with Sparkfun RFM69HCW modules connected to Teensy 4.0 MCUs. Everything seems to be working fine with just a simple monopole antenna (3.07" wire @ 915 MHz).

I've read the documentation and snooped through the code, but I'm still unclear how I should go about setting the bitrate and/or Tx power to optimize for my application. Can someone point me in the right direction? Thanks!

P.S. Can you guess the application?

Felix

The bitrate of the radio is 55.5kbps by default. It can be increased to a max of 300kbps.
The packets are 61 bytes payload, and have some header overhead.
If you don't care about retries or ack's use the send() function.
Have you tried sending the packets, what data rate are you getting?


Aerokeith

I ran a test using set300KBPS() and then send() with 61 byte packets, and I got an effective data rate of about 220 Kbps (I don't remember exactly). But since I don't need that high a data rate, I wasn't sure how to optimize the link for a lower data rate. Do I need to explicitly set the data rate and power level, and how do I do this?

Felix

powerLevel is more for saving power, when you run on batteries etc. You probably don't need to do that.
Or you can manually set the TX power level to something that's still giving you enough signal strength and not have to blast the transmitter at max power.

(Isn't faster better?)
How often do you send? As fast as possible? Can you add some delay to achieve your desired data rate?
And did you try with the default settings (55.5kbps)? Is that too slow?

So I do wonder what the application is :-)

Aerokeith

OK, I'll leave the power at maximum. It will be battery powered, but the battery is pretty big (100 Ah).

I need to send ~228 bytes every 30ms. So probably four 57-byte packets. I can burst the four packets at 300Kbps (every 30ms) or I can run at a lower data rate and send the four packets over the entire 30ms. Either way is OK.

At maximum power, isn't there a reliability advantage in using a lower data rate? I'm not sure what library call to use for setting the bit rate.

The application is LED lighting for a Burning Man art car (aka Mutant Vehicle). We want to have lights on the wheels, and since there are no axle-mounted slip rings to send power and data, each wheel hub will contain a LiFePo4 battery and a custom RF receiver/LED controller board. A single transmitter in the car body will broadcast to all four wheel receivers. The RGB LED pixel data is refreshed at 33 Hz.

Thanks for your help!

Felix

I would try the default 55.5kbps, if that's not fast enough then go 300kbps. Regardless of power level, lower bitrate is like .. talking slower, easier to understand but takes longer :-)
You might want to sniff the spectrum and make sure you are away from busy frequencies. Normally 915mhz (default when using 915 preset) is pretty open but you'd be surprised. Ex - use setFrequency(914500000) to set to 914.5mhz.

Aerokeith

OK. But I think the default bit rate won't be quite enough, so shouldn't I increase it slightly without going all the way to 300Kbps? In any case, I don't know how to change the bit rate to anything other than using set300KBPS().

Felix

For such close range 300kbps is just fine. We are using it in large industrial spaces for wireless firmware updates and it works great.