Phil_G wrote: 30 Dec 2024, 21:28
Once you've posted into the public-domain these projects take on a life of their own and Mike has in fact done a PPM version, Tobe has done a PCB for it, but persoally that wasnt a direction I wanted to follow, and since then as can be seen in recent posts both Mike & Tobe have moved on to greater things so I dont know if they continued with it

For me, these projects start as a learning adventure for personal interest, and if they generate sufficient curiosity for someone else to try them then thats a huge bonus for which I'm always grateful even if they diversify outside my own interests. Quite a few have given this one a whirl, though fewer than with the more conventional PPM encoders.
A belated Happy New Year to All, my R/C projects are only now starting up again after the Christmas holidays and I'm catching up with what has been happening on the forum for the past few weeks.
Yes, Tobe and I have done a lot more development with a nRF24L01+ protocol, albeit using a Tobe-designed “ppm in nRF24L01+ protocol” module used together with my multi-model LCD encoders, not a combined encoder/nRF24L01+ transmitter. The first transmitter I used for development was the homemade “MiTo” set (MiTo = Mike/Tobe), with Tx, Rx and servo’s built by Tobe using my encoder design, module firmware and servo firmware, with the 2.4GHz protocol based on the original.
viewtopic.php?p=14166#p14166
There are so many modifications to both the Tx and Rx. I'll publish it in a few posts, each with the modification and why. I don't plan to publish the code until I'm complete and then only if Tobe is planning to sell his modules, otherwise the code has no easily made hardware.

- Tobe's nRF24L01+ ppm in module next to a LemonRx for size comparison
Development One
Before I started using the “MiTo” transmitter I wanted to ensure it would be EU-compliant with EN 300 328 V2.2.2. There are a number of ways a transmitter can conform, those commonly used by R/C are:
1. “Frequency Adaptive” (LBT - “listen before talk/transmit” in R/C parlance) as used by Futaba, FrSky and others
2. “Medium Utilisation” ratio where you can only transmit for <10% of the time as used by Spektrum
3. Transmit at low power (<10mW effective) as used by most brands of R/C telemetry receivers
The original protocol is not “Frequency Adaptive” (i.e., it does not use “LBT), so it needed to conform to the “Medium Utilisation” and transmit less than 10% of the time if transmitting at 100mW (“MU” is analogous to the duty cycle in PWM). The eBytes FCC certification for the nRF24L01+ module confirms 100mW EIRP when used with the supplied 2dB gain antenna.
I haven’t got a spectrum analyser to check the 10% “MU”, so I built a simple 2.4GHz monitor, basing it on an RCgroups rf field strength monitor using a 1N5711 high-frequency Schottky diode, but rather than fit the output smoothing caps to feed a meter, I used a small pF cap and monitored it directly on my scope, the packets are visible as an envelope.
https://www.rcgroups.com/forums/showthr ... ter-for-rc
I found the protocol was transmitting for just under 1.5mS (with 8 channels) which is non-conforming (to conform with a packet every 5mS, the packet length/transmit length should be < 0.5mS). I was confused as to why it was transmitting for so long, my calculations suggested it should be shorter, albeit still non-conforming:
250kbp and 16 bytes data + 8 bytes nRF24 overhead should have been 24 bytes = 192 bytes @ 250kbs = 192 / 250,000 = 0.768mS
To check my rf monitor was working correctly, I also monitored the input power to the nRF24 module with a small shunt resistor, assuming it takes more power when transmitting and it agreed with the rf monitor within a few per cent. What was going on? After investigation, I found the two reasons my calculations didn’t tally.
The nRF24 Arduino library used to control the nRF24L01+ makes it much easier than writing directly to nRF24 registers, but it does set some defaults that are not ideal. The main issue is when a packet is transmitted, by default it contains 32 bytes of data plus a one-byte with the packet length, a 5-byte pipe address and a 2-byte CRC. So if 8 channels are transmitted, it still transmits 32 bytes of data (40 bytes total), not 16 bytes of data (24 in total), assuming 2 bytes are needed per channel, the other 16 bytes are null.
There is a setPayloadSize() command and if set to 16 in both the transmitter and receiver, the transmit timing dropped, but still not quite to my original calculation. Further investigation found that the nRF24L01+ uses a stop bit after transmitting every byte, so it “transmits” 9 bits, not 8 for every byte. Now my measurements agree with the calculations allowing for measurement errors.
So with the original protocol, the actual figures are 32 bytes data + 8 bytes nRF24 overhead (1 byte header, 5 pipe address bytes and 2 byte CRC) = 40 bytes packet @ 250kbps (each byte transmitted as 8 bits + 1 stop bit) = 40 * 9 * 0.004 = 1.44mS transmitted every 5mS.
The “medium utilisation” for the Phil_G’s protocol is 1.44mS / 5mS = 28.8%.
When the setPayloadSize(16); instruction is added to the code (for both the Tx and Rx), “only” 16 data bytes + 8 nRF24 overhead = 24 bytes transmitted (for 8 channels), transmit time is: 24 * 9 * 0.004 = 0.864mS. So I modified the code to transmit the 16 bytes of data every 10mS and the “medium utilisation” is now: 0.864mS / 10mS = 8.64% so it conforms. As the Rx LED flashes at half the rate to the previous, I halved the count to flash, so the Rx LED appears to flash at the same rate.
These alterations were done before the Ponte 2023 meeting where Tobe displayed the MiTo home-built transmitter, receiver and servos, but had not been flown at that stage.
Before test-flying the modified protocol I did a range check and did it back-to-back with another “Tobe nRF24L01+” transmitter using the original protocol. I assumed the range would be adversely affected as we were only transmitting packets at half the original rate (10mS instead of 5mS), but to my surprise, the “range test” distance increased from 68 steps to 72 steps (that highly scientific unit of length, a “step”). I changed the MiTo back to the original protocol and the other transmitter to the modified protocol and the increased range check followed the modified protocol with the same results. Tobe reported the same increase in range.
The answer as to why the range would increase is because the packet length is roughly half the size/transmit time and it is less likely to suffer interference and/or an rf collision. The nRF24 uses CRC checksums and if just a single bit is lost or corrupted, the CRC check will not match and the whole packet is discarded, so the shorter the data packet the more chance of a packet getting through, even when only transmitted half as often. So I then made efforts to reduce the packet size further to see if the range would increase.
Many are worried about the original code transmitting outside of the legally permitted frequency range, yet don’t seem bothered about conforming to other regulations, which I can’t understand, especially if the firmware modifications make the transmitter protocol have a greater range.
This only needs two lines of code changing in the Tx and three lines of code changing in the Rx to get a compliant system that performs better, well worth the effort.