feasability of fast duplex communication for RC model control

Hi all,

my project :
So I'm literally building a homemade heavy RC vehicle from scratch. More info here :

my issue :
I've been kind of stuck on this problem for a year now : I need a duplex communication that is fast enough to send data back and forth from the radio to the vehicle AND from the vehicle to the radio. I'm using an arduino mega 2560 on both sides.
data rate :
I need to send data (lets say 20 bytes) from the radio to the vehicle at least every 40ms. the other way around is less critical. even if ideally the same speed would be appreciated, every 1s would do.
range :
a few hundred meters on open field would be good.

What I tried :
First, I used nrf24l01 modules :
It's been very hard for me and took me weeks to code. I used Robin2 tutorial found on this forum, (big thanks if you were to read this !!). The communication speed was good enough but signal quality was worryingly poor (lots of losses of connections if too close, too far, or if a single house is in between... And I can't afford loosing signal for several seconds...
Now I'm trying to use a pair of AI thinker LoRa 1276 module :
It turned easier to program, signal looks much better, but I can't seem to find a way to exchange data fast enough : If I try to send data more often than 100ms from the radio, then the radio won't receive data from the vehicle... Moreover, when the vehicle module is sending data, the servo control is interrupted for a few ms, well long enough to be noticed...

I spent hours of searches on the internet, and I'm running out of ideas. I'm actually wondering if what I am trying to do is achievable with an arduino and compatible radio modules...

Does anyone know how to achieve that ? Any module recommendation ? I guess would even be willing to spend up to $200 for a couple quality modules easy to program, if I'm sure it would work.

Before you ask :
NO I CANNOT use a remote control system from conventional rc vehicles :
-I need about 20 different bytes of data to send
-I need to be able to program what the data will do. e.g. : when pushing a single shift button -> disengage engine clutch -> shift to neutral -> read sensors -> shift gear -> Give engine control back to pilot. This is very unlikely to be done with conventional RC off the shelf components.
-I need the remote to be modular as the project evolves.
-I need to be able to find spare and standard components for a long time. This is a lifetime project.

Yes I can post my codes if needed, but I think it should be on another topic, since whats I'm asking here, is if such fast duplex communication can be achieved with arduino, if so : how ?

Bonus Question : Why in the world is it so difficult to program fast duplex radio communication when it is so easy to program a lcd screen or a semi automatic gearbox ??

thanks

You obviously used omni-directional antennas, but did you try vertical antenna types that offered more gain than just a single piece of wire?
Paul

If your after a radio control system using the LoRa devices, there are several in use, so clearly its possible, but efficient code is non-trivial.

Probably best to ask in the RCGroups forum where such things are discussed;

Bonus Question : Why in the world is it so difficult to program fast duplex radio communication

Its not, but a good understanding of LoRa devices helps.

You should avoid both radios sending at the same time. Receive and process data, wait a bit, send data back, on both sides. Also send after a timeout, when the preceding transmission may have got lost.

I'm still learning a lot about radio comms so apologies if this is wrong, but isn't there a duty cycle "limit" when using LoRa and/or ISM bands? If so then I think the transmission rate you require would exceed this.

markd833:
I'm still learning a lot about radio comms so apologies if this is wrong, but isn't there a duty cycle "limit" when using LoRa and/or ISM bands? If so then I think the transmission rate you require would exceed this.

There is indeed a very significant issue with duty cycle (and interference) which makes the ISM 434Mhz bands a very poor choice for model radio control (RC). This applies to all modulation types and there are no special restrictions for LoRa.

Its no coincidence that most all modern RC control systems use 2.4Ghz, which are readily available and low cost in simple versions with advanced systems readily available too. No duty cycle issues with 2.4Ghz. Been available with back telemetry for years. More than adequate range for legal use with models. There is even 2.4Ghz LoRa devices for the DIY enthusiast.

Unfortunatly, in my experience, the average RC model enthusiast does not appreciate such complex issues as duty cycle and they do not seem to care whether the RC systems they use or build are legal or not.

1 Like

As an example of the throughput of a LoRa device, I have a transmitter setup that sends a 24 byte payload and waits for a 12 byte reply from the receiver. That send and receive happens once every 18.6mS.

There seem to be loads of write-ups of home made RC controllers and every one I've looked at uses nrf24l01.

There's a long thread going on here at the moment about a home made sawmill driven by a small gasoline engine. One of the problems at the moment is that the engine is putting out a lot of electrical interference.

I wonder if your problems are similar and whether keeping the electronics well away from the motor and some attempts at shielding them would help.

Many of the popular hobby radios are designed with the idea of reliable transmission, and therefore the default behavior involves ACKs, timeouts and retries. This all takes time and hence the slow throughput.

The trick is to disable all that stuff and just blast a repeating frame of data at 20Hz or whatever is appropriate. You work on the assumption that some percentage of the frames make it through. This is how the RC model world operates.

For the reverse communication you have a duplicate transmitter/receiver pair doing the same thing on a different RF channel.

RF channels in the unlicensed ISM bands are all in the high MHz or GHz range and therefore are easily blocked by obstacles such as trees and houses. You need to be operating in the low MHz or high kHz range. Money will be required for licenses.

Thank you for all of your interesting answers !!
I guess I'll first give a try to a couple 2.4GHz lora module (SX1280) then !

srnet:
As an example of the throughput of a LoRa device, I have a transmitter setup that sends a 24 byte payload and waits for a 12 byte reply from the receiver. That send and receive happens once every 18.6mS.

Very interesting, would you be willing to share the code for that ? Or the relevant part of it ?

What kind of hardware did you use exactly ?

DrDiettrich:
You should avoid both radios sending at the same time. Receive and process data, wait a bit, send data back, on both sides. Also send after a timeout, when the preceding transmission may have got lost.

Indeed, most of those radios will interfere with themselves.
Easiest way to do this is to make one side (say the controller) the master; the other side (the controlled model) only sends data upon receiving a transmission from the master. This ensures no collisions. One side only transmits on demand, and the other side knows when to wait for a response.
20 bytes = 160 bits in 40 ms or 4 kbps. That's not much.

rc_ordnance:
Very interesting, would you be willing to share the code for that ? Or the relevant part of it ?

What kind of hardware did you use exactly ?

Cant share the code, it uses library routines that are not yet published.
You will often on here see LoRa devices described as slow, and then can be, but a lack of experience means that few approciate how fast they can be.

The example I quoted was for a file transfer application I have been working on, it can transfer with a UHF LoRa device a 64K file, between two Arduinos, SD card to SD card in 16 seconds. The 2.4Ghz LoRa device can do the same transfer in 8.5 seconds. Thats not what I would call slow. Thats send and acknowledge, so duplex, with full error checking.

The transfers were using Arduino DUEs, ESP32s run at the same speed.

With a duplex operation you need the transmitter to quickly flip between TX and RX (to receive telemetry) and the receiver needs to quickly flip between RX and TX (to send the telemetry). The tricky bit is the processing and reading of sensors, switches, joysticks and telemetry data in the gaps, it sounds easy but doing it without slowing down the packet rate needed for effective RC is perhaps not so easy.

There are simple examples of one-way RC control for SX127x, SX126X and SX128x LoRa devices here;

Myself, I just would not bother, off the shelf RC systems will be far better than you can DIY program.

srnet:
The example I quoted was for a file transfer application I have been working on, it can transfer with a UHF LoRa device a 64K file, between two Arduinos, SD card to SD card in 16 seconds. The 2.4Ghz LoRa device can do the same transfer in 8.5 seconds. Thats not what I would call slow.

All depends on your definition of "slow". Compared to WiFi, it's very slow. For LoRa it's indeed pretty decent.

LoRa is anyway not designed for speed and large data volume (like WiFi is), it's designed for transmitting small quantities of data using minimal power over a long distance.

RFM69 radios may be a better option for OP. Much faster than LoRa, and line of sight (it's an RC vehicle so that should be a safe assumption) it should easily manage a couple hundred meters.

wvmarle:
RFM69 radios may be a better option for OP. Much faster than LoRa, and line of sight (it's an RC vehicle so that should be a safe assumption) it should easily manage a couple hundred meters.

If you can ignore or work around the duty cycle limits, then indeed the UHF RFM69 at 300kbps FSK would be viable and faster than a LoRa device using LoRa at its max of circa 60kbps.

Advantage of the 'LoRa' device is that it supports 300kbps FSK as well, so you get the choice.

The 2.4Ghz SX1280 will do 200kbps in LoRa mode and 1200kbps in FLRC mode, both should cover the distances mentioned, and would have none of the duty cycle issues.

Thanks all for your advises. the library suggested by srnet is much more efficient and easy to use than the one I was using so far. The log also says that bidirectional communication functions and examples should be published on a next release. I'll wait for it, the one way com is efficient enough for me to keep going for now.

rc_ordnance:
What I tried :
First, I used nrf24l01 modules :
It's been very hard for me and took me weeks to code. I used Robin2 tutorial found on this forum, (big thanks if you were to read this !!). The communication speed was good enough but signal quality was worryingly poor (lots of losses of connections if too close, too far, or if a single house is in between... And I can't afford loosing signal for several seconds...

2.4GHz (microwave) is far too high a frequency, the range is immediately severely limited by the miniscule
antenna size, and the requirement for strict line-of-sight means a small tree will knock out the
signal substantially (or entirely if its been raining, wet leaves are strong microwave absorbers!)

Also the nRF24L01 chipset only supports high baud rates, and range is intrinsically lower for high baudrates,
meaning the range is even less.

You need to understand the issues of different RF bands to use them effectively...

Something like 315 or 433MHz with a baudrate tailored to your requirements should give much
better range, given an appropriate antenna (alas directional antennas are only much use at the base-station
end of the link). You need to take into account the legal restrictions for each band too though.

I would concur that perhaps the nrf24l01 modules are not suitable for the type of RC control you have in mind.

And whilst 434Mhz would intially appear to be a better option, there are often significant legal restrictions around duty cycle that make RC operation in that band 'difficult'.

I did recently compare a basic 2.4Ghz LoRa setup versus the nrf24l01+PA+LNA modules, and at the approx same data rate (200kbps (LoRa) vs 250kbps (nrf24l01) the LoRa device went 10 times further. The LoRa device can go further still of course by reducing the data rate.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.