Author Topic: High speed data transmission with RFM69HCW  (Read 2554 times)

jarad

  • NewMember
  • *
  • Posts: 2
  • Country: us
High speed data transmission with RFM69HCW
« on: November 30, 2016, 12:51:04 PM »
Anybody have any pointers on programming a higher speed data transmission (100Hz) using the rf69 library?  I have integer data transmitting from a I2C acceleromter and gyro at about 10Hz right now but am looking for a higher speed ( the sensors are reading at 125 Hz).  I'm using an adafruit feather 32u4 RFM69HCW.  I've disabled encryption and tried to keep my transimision loop tight.  All I want to do is stream data to a feather attached to a pc, basically a wireless datalogger.  Not worried about security only speed (maybe get rid of acknowledging data and just transmit?)Just wanted to see if anyone has done something like this before or has suggestions on bit rates, maybe using binary array data or anything else.  I'm going to plow on through on my own, but decided to see if any out there had any ideas that could point me in a right direction.  Thanks.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: High speed data transmission with RFM69HCW
« Reply #1 on: November 30, 2016, 02:38:18 PM »
100hz is a bit high especially if you plan to use ACKs. That means you only got 10ms budget for everything.
Most overhead is around setting up the radio for transmission and switching between the modes. Staying in TX mode at one end and RX at the other will help reduce that a lot. Continuous mode could be explored since that will also reduce packetizing but you'd then have to have a software method to split your messages. That's not supported in my RFM69 lib.

Going binary will definitely help compact the data - consider structs. Don't use encryption since that has on the order of 5-10ms delay I believe (lookup in the DS for specific number) but that's very significant for your time budget. Use the max 300kbps the RFM69 supports - examples of that here.

Why did you choose a feather?

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: High speed data transmission with RFM69HCW
« Reply #2 on: December 01, 2016, 02:51:59 AM »
I would guess that you don't need ACK's: if you lose a data point every once in a while you probably don't care. That makes it very easy:

With encryption the minimum packet size is 24 bytes (3 /*preamble*/ + 2 /*id*/ + 1 /*len*/ + 2 /*crc*/ + 16 bytes payload). This is because the payload is encrypted in 16 byte chunks. So at Felix standard 55555 rate that's 24 * 8 / 55555 = 3.5 ms. This shows that without ACK's you should be able to easily get to > 125 hz with standard settings.

Quote
Don't use encryption since that has on the order of 5-10ms delay I believe

Fortunately that's not quite right. Encryption takes 28 uS.

My bootloader does about 10kb/second with a more elaborate scheme. I can go into details if the above isn't enough.

Joe

 

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: High speed data transmission with RFM69HCW
« Reply #3 on: December 01, 2016, 03:12:23 AM »
Oh I realized I had already documented the high speed stuff somewhere: https://lowpowerlab.com/forum/wireless-programming-(aka-ota)/wireless-boot-in-2-5-seconds-high-speed-datastreams/. But again in your case I don't think that is necessary.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: High speed data transmission with RFM69HCW
« Reply #4 on: December 01, 2016, 08:27:27 AM »
Joe - thanks for keeping me honest and thanks for being active in the forum with your knowledge and research.
I try to remember lots of stuff so I can give an on the fly answer whenever it seems I could not be too unreasonably wrong and digging the datasheets for each reply is a luxury :)
But it's a fallacy obviously.