Teeny based full featured radio control system

Status
Not open for further replies.

MMESSITER

Active member
Hello!

This is my first post - so I hope I do it right!
I’m developing a full featured radio control system for models and I’m wondering if anyone else is interested.
I’m using Teeny 4.1 in the transmitter, and a Teensy 4.0 in the receiver. I use a clone version of the nRF24L01+ transceivers, which is screened and
Much more powerful than the original, giving a range of about 2 kilometers.
The features I’ve implemented so far are:
8 channels
4 flight modes
User definable 5 point curves on all channels and modes.
FHSS with my own method of identifying and avoiding busy channels in real time.
16 mixes
99 model memories
TX Modes 1 and 2
Timer
Binding
Full waveband graphic scanner.
Telemetry
Four Definable three-way switches.
GUI on a Nextion 5” screen.
PID gains editor - on the transmitter.
So far, I’ve flown some planes and a quadcopter with it. No problems.
I’m now refining the PID stabilisation because I want it to be also a flybarless system for helicopters.
Later I’d like to add Gps, autopilot, and waypoint/return to home functionality.
It’s a perfect lockdown project.
I’m considering making it open-source, and this really depends on whether anyone is interested.
Ultimately it might equal or exceed commercial offerings, while being significantly cheaper to put together, and infinitely flexible as we have the source code.
Oh - and huge fun of course.
Is anyone interested?
Malcolm Cassan Messiter
 

Attachments

  • 20301FC1-AC2C-4E7F-9476-387D36E99448.jpg
    20301FC1-AC2C-4E7F-9476-387D36E99448.jpg
    122.2 KB · Views: 100
  • 265D04FF-96C4-4013-A433-F42133F1254E.jpg
    265D04FF-96C4-4013-A433-F42133F1254E.jpg
    84.7 KB · Views: 99
welcome home, looks impressive, i'm sure someone will take advantage of any code /designs you make available.
 
I am impressed by the ambitious scope of your project and by how much you have done so far.
I’m considering making it open-source, and this really depends on whether anyone is interested.
That is much recommended. The motto of a former boss was 'lead and others will follow'.
Oh - and huge fun of course.
The best reason of all. This kind of enthusiasm motivates all the best projects.
Is anyone interested?
We always learn from the way other people do things.
 
I am also interested if this will be open source.
Also, how did you increase the range of the NRF module?

Thanks.
 
nRF24L01 clone range.

I am also interested if this will be open source.
Also, how did you increase the range of the NRF module?

Thanks.

Hi!

I did a series of range tests after buying many of these nRF24L01 transceivers from many sources, and making them ‘plug in’ to female headers on my circuit boards. I quickly learned that they vary enormously in several ways. Almost all of them work ok at very close range. Some fail after only a very few yards. Some go on working at 2 km. I have attached an image of my preferred type. These are encased in a metal screen. Here’s a quote from their marketing specifications:

“Specifications:
Item Type: Wireless RF Module
Model Number: nRF24L01P
Default: 2.4GHz (16MHz oscillator)
Working Frequency: 2400-2525MHz
Transmitting Power: 20dBm
Communication Distance: 2500m <———— !!!!! 😳😃
Communication Interface: SPI
Package Type: DIP
Air Data Rate: 250K-2Mbps
Power Supply Voltage: 2-3.6V DC
Transmitting Current: 130mA
Sensitivity: -95dBm
Wireless Type: SMA-K
Material: Circuit Board
Size: 33.4x18mm/1.3x0.7in
Color: As shown
Quantity: 1 Pc”

My tests confirm a real-world range of about 2km which I think is plenty for line of sight rc models. They are very cheap, so I have bought dozens. Production seems inconsistent probably because they’re so cheap. So I suggest test each one. Several I have thrown into the bin.
I’m not an expert in any way. I’m an oboe player. But I’ve learned a bit during lockdown just by experiment. I’m impressed by these chips especially when using Teensy because they’re so fast. I tried at first with an Arduino. This worked, but too slowly. The Teensy 4 seems to be 600x faster! When I very first Teensy arrived I tested with a bit of code that calculated the value of pi 50,000,000 times. An Arduino nano finished in ten minutes. A Teensy 4.0 finished in one second! I was impressed! What’s more the Teensy gave greater precision - more decimal places.

It’s becoming clear that my radio project could be really useful to modellers after a bit more development so here’s what I think I should do:
A friend of mine is designing PCBs so that dangling wires are eliminated. When these are done and tested, I will post here the source code, and the pcb designs and the .stl files for the transmitter case. Then putting one together should be as easy as painting by numbers. What do you think?

Malcolm
 

Attachments

  • 1003718C-BE15-4902-AE99-3EA087A78DA2.jpg
    1003718C-BE15-4902-AE99-3EA087A78DA2.jpg
    48.1 KB · Views: 59
What bandwidth do you actually need for this - the nRF24L01 only supports 250k/1M/2Mbaud, so its sensitivity is correspondingly poor.

Sensitivity increases with narrower bandwidth, so if you only need 25kbaud (for instance) and use a 25kbaud transceiver you are likely
to get more like -105dBm sensitivity, allowing more range (or less transmit power: 10dBm is the max legal TX power for 2.4GHz in the
UK I believe).

My preference is for lower frequency ISM bands where you get the advantage of more antenna gain (proportional to square of the
wavelength in a LoS link). Thus 20dBm at 2.4GHz is roughly equivalent to 5dBm at 433MHz, all else being equal - this effect is
purely due to the antennas being longer for lower frequencies. (All assuming quater-wave antenna).
 
I wish I knew!

What bandwidth do you actually need for this - the nRF24L01 only supports 250k/1M/2Mbaud, so its sensitivity is correspondingly poor.

Sensitivity increases with narrower bandwidth, so if you only need 25kbaud (for instance) and use a 25kbaud transceiver you are likely
to get more like -105dBm sensitivity, allowing more range (or less transmit power: 10dBm is the max legal TX power for 2.4GHz in the
UK I believe).

My preference is for lower frequency ISM bands where you get the advantage of more antenna gain (proportional to square of the
wavelength in a LoS link). Thus 20dBm at 2.4GHz is roughly equivalent to 5dBm at 433MHz, all else being equal - this effect is
purely due to the antennas being longer for lower frequencies. (All assuming quater-wave antenna).

Hello Mark,

Truth is I really don’t know! I’ve spent most of my life playing oboe, and flying RC models. I did write an 8086 assembler comms app in the early 80s, but my training was in 1968 at the Paris Conservatoire of music. I’m very keen to learn and I appreciate enormously all and any guidance from you, and others.

I’m a complete beginner.

Last May I bought an Arduino and a get-started book. It was and is my lockdown project. I knew nothing, except a bit of old 8086 assembler. So I had to learn some C++. I loved it, but I loved Teensy 4 approximately 600 times more!

Because of my life long passion for flying RC models, I rather ambitiously decided that was going to be the project for me. I worked hard as there was nothing else to do. I assumed it’d be just a bit of fun, but no real use - ever.

So I have been very surprised how it’s turning out. In late September I flew a model with it for the first time. The model setup involved several ‘mixes’ and my version of FHSS. I had dozens of flights with zero issues. I thought ... WOW! ... and backed up all the source code.

Of course, these days there’s really no point in creating a commercial radio system for sale. To much cheap competition. But we can have fun!

Also, I reckon that at the current rate I might end up with a system that’s as good as one costing >£1000, for only the cost of the components. To achieve this I may well need a bit of guidance from those with more experience.

My work is almost entirely empirical. I implement an idea, test it, then keep it in, or discard it. I’m really glad the nRF24L01 does lots of the work for me. I did set it to lowest speed and highest power - to maximise range. But that’s only two lines of code. I also had to slow down the SPI bus since the Teensy was at first rather to fast for it. The transceiver’s “ack payload” feature handles telemetry perfectly, almost effortlessly.

I’ve tested massively. At home I can test with a toy car and the simulator (with RX2SIM). Of course there’s masses of noise on 2.4 ghz from WiFi. So my transmitter system now scans the waveband for one second as it boots up. It records all channels that seem busy, and thereafter it won’t hop to any of those. What’s more, during a connection when a packet fails, the offending channel number is added to the array of channels to be avoided. The list can grow to about 70% of the waveband before new entries just overwrite the earliest ones. I thought it better not to avoid all!! This setup seems remarkably robust and has run for many hours continuously without problem.

Please pardon me for waffling on excessively. I’ll say good night from London now!

Malcolm
 
Hello

I thought I should explain briefly my recent silence.
I think I shall make my radio control system open-source. But before I do, I need to do a little more work...
Yesterday I increased the number of channels from 8 to 12. Two day before, I had added SBUS support to the receiver (using Brian Taylor’s excellent library!)
These features need tidying and rigorous testing before I let others into the code because it’d be bad manners to release frustratingly buggy code!
I’ve made the four three-way switches completely user definable- so I think I probably ought to make all sticks and knobs user defined too - rather than only an option for modes 1 and 2.

I’ll get to it! I just hope lockdown and winter last long enough ... These are perfect coding conditions!

Malcolm
 
Status
Not open for further replies.
Back
Top