Author Topic: Multiple nodes - latency  (Read 1175 times)

jkenett

  • NewMember
  • *
  • Posts: 2
Multiple nodes - latency
« on: May 25, 2020, 03:46:27 PM »
Hi everyone,

This is my first project with RFM69, and here's what I'm trying to do .
   .
I have 4 emitters node that transmit data from accelerometers as quickly as possible to one receiver node.
The receiver node ("gateway") then transmit the received data via a serial communication to a computer.
I'm using the adafruit feather 32u4 RFM69 HCW in 433 Mhz

The main idea is to trigger audio events from the computer in "real time", in response to the distant accelerometers.
That's why latency matters here.

Basically here's what I'm doing now:
1 - at fixed interval, gateway broadcasts an invitation (message "TALK") to all emitters node
2 - gateway immediately turns in RX mode and starts listening for answers, doing nothing else
3 - once the TALK message is received, the nodes answer with the data (about 10 bytes), after a unique little delay (to avoid talking at the same time)
4 - when the 4 messages are received, or timeout occurs, the gateway transmits the messages in serial communication (serial.print)

For now I get more than 60ms of total latency, which is too high for my application.
If I shorten the round cycle I get collisions and lot of lost packets.
This is with "default" settings.

Before going any further, I'd like to ask, do you think this is doable with this hardware ?
Do you think it's possible to go below 30ms ?

Any help is appreciated,
Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Multiple nodes - latency
« Reply #1 on: May 26, 2020, 10:44:24 AM »
What library are you using?
See this thread on latency and speeding up transmissions.

jkenett

  • NewMember
  • *
  • Posts: 2
Re: Multiple nodes - latency
« Reply #2 on: May 28, 2020, 05:12:41 AM »
Thanks Felix !

I didn't see this thread before, but that definitely helped.
I just speeded up the bitrate to 300kbps, no ACK, no encryption, just tried with 2 emitters and 1 receiver.
I'm using the master branch of lowpowerlab/RF69 library (not the adafruit fork),

Time measured between [gateway asking -> gateway got response] is now around 3-4ms, with peaks between 2 - 7 ms.
So I should manage to get the 4 radios answering in less than 30ms. This is good news!

Generally speaking, are there any other/better ways of having multiple emitters speaking to the same receiver ?

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Multiple nodes - latency
« Reply #3 on: May 28, 2020, 12:45:08 PM »
Generally speaking, are there any other/better ways of having multiple emitters speaking to the same receiver ?
Yes, here's a time slotting technique that works for over 1000 nodes in a 1minute window with 50ms time slots (with default settings). The given time window when all nodes should report is split in time slots. Each node should then transmit at the middle of their time slot. A pairing mechanism ensures the joining node is first sync-ed to its appropriate window. Further transmissions are then time corrected in each ACK to ensure the nodes don't drift.
This is great when you have lots of nodes that transmit fairly. But its not suitable when you want maximum throughput (transmit as fast as possible).