James, please create a USB Joystick (like a T1600m) to RC-link setup, that would be a lot of fun to drive a robot around the house from your gaming PC. Or a racing wheel setup!
why not use cheap cell phones and send data via telephony like an old modem would? Then your range would be essentially unlimited so long as it had a basic phone signal and some code to transmit and receive confirmations like a checksum would? Cheap cell phones would probably work like this instead of using radio, plus your frequency would be higher so your compressability should be higher, including video streams potentially?
In the world of drones and RC, DSM/DSM2 is practically ancient these days! ExpressLRS is more or less the modern "budget" standard - and radios that support it can be had for very cheap. Building your own radio is cool in itself, but I feel like it's being held back from its full potential by the tech inside it.
Also I think any RC plane/drone pilot will agree that DSM/DSM2 isn't exactly great for range and interference stability - I know I've almost lost models previously due to lost signal - but I guess if you're coming from bluetooth anything is hundreds of times more stable - and I guess a driving robot rarely goes as far as a model airplane.
I agree, DSM2 has a really bad name in the R/C industry for having lots of failsafe and brownout issues. DSMX is a lot better in that regard. ELRS will still have way better range, features, reliability and hackability (it's an open source project, DSM is very propietary) tho
@@jamesbruton Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
James, an idea for encoding your switches/buttons/binary. Use the bits! ie you can think of an int32 number as 32 binary numbers (referenced by their index). It's pretty simple maths to encode and decode and you can use 1 channel for all the buttons you could ever want :)
@@Mike-oz4cv PPM channels are analogue as the value for each channel depends on the width which represents an analogue value. The PPM is then being fed through a DSM/DSM2/DSMX modulator which is digital. so I'm pretty sure that PPM can represent as many bits as you would want but the limitation would be the modulator.
Coming from the drone space, I suggest you check out Express LRS. The TX modules are the same form factor as yours (and there are also smaller ones). The RX modules are much smaller. Everything is open source (hardware + software). The range is much better thanks to LoRa (reception works below noise floor, this is dark magic to me). Supports up to 16ch (10 bit) at 333Hz or 10ch (10 bit x4 + 1 bit + 7 bits x5) at 1kHz (though that's using FLRC and not LoRa). Transmitter modules are available up to 2W as of right now. Receivers up to 100mW for telemetry (around 2 cm² of PCB + antenna). And yes, they use basic UART for communication.
How would you do that with an ESP32? I am working on a project and am still trying to figure how to separate receiving data and processing data separately. would be nice to just keep them entirely indpendent.
@@a154james in the receiving data callback function just copy the received data in a ring buffer (do nothing else). In the main loop, check for data in the ring buffer, and if there is any, pop it from the ring buffer and process it. After you have done that, process other input in the main loop, like button presses etc. If you want to be safe, use a thread safe ring buffer library.
@@a154james Use the RMT peripheral to read the pulses (doesn't use a core) and then you can read the values encoded for you from the RMT receive buffer.
Reminds me of my early forays into arduino stuff. I actually had more success range-wise with the nRF24 modules than with the (kinda junk) orange RC stuff, although they are quite finicky about antenna and power supply. Your idea for sending different sets of data in alternating packets works well with nRF24, I used that method on my high altitude balloon. Having two radio transmitters right next to each other might not be ideal for range.
I'd be tempted to look into the Express LRS project (Express Long Range System or ELRS). Its the current thing in the world of FPV quadcopters. Its all open source and cheap, and the transmitter modules and receivers interface over a UART serial port. It's a modern system that has incredible range and reliability, people are flying model planes more than 40 Km.
I was musing to myself last night 'I wish I knew how to make my own transmitter, because none of these ones on the market have QUITE the combination I need and they're all really expensive'. Then you go and do this! Cheers James, I'm sure I'll be using this as a reference at some point!
Wow. Amazing. Great workarounds to get what you want.... Maybe accelerometer that's available to use on some channels, or a second slave remote for use by another person. I love the telemetry and screen idea for the future! You make it look so easy!
ESPNow is a surprisingly good, long-range capable w/ built-in optional ACK/retransmission baked in communication protocol. ESPs are also cheap as chips, and code is easy to write for it.
…always good to see diy builds and love it…thanks…i have about a hundred of dsm receivers…almost everyone in nano sub 20 gram mylar planes…i love em n keep them forever…never lost a signal…short range ones but fly them sometimes outdoors and better than frsky which i gave up a couple of years ago…will transfer all my about eighty big planes and some quads to open source protocol express lrs…sold all jeti and frsky radios and radiomaster tx12, tx16…two radiomaster zorro for everything…
Not sure if this would be right for your use case, but esp-now is extremely fast and reliable. I use it to control my electric skateboard from a custom remote that I have built (about 2ms for a 4 way trip). You can also turn the esp into long-range mode which allows about 30 m of transmission distance through brick and building, some people have even tested up to a kilometre line of sight. Not only that, you also get a microcontroller which is far superior to arduino, boasting infinitly faster speed, far larger storage and many extremely high speed pins
Have you looked at ELRS? It's a fully open source project Radio Link based on the ESP32. DSM really isn't used as much in RC anymore(aside from Horizon Hobby/ Spektrum off shoot companies)because of it's reliability issues and since it's closed source if you run into limitations there really isn't much you can do. With ELRS on the other hand not only is it fully open source, but rolling your own module is really easy and really well documented.
If you want more range, at the cost of having to work out the settings to keep it within the law, the RFD868 radios support a PPM/SBUS uplink and a UART telemetry downlink. They do however use 868MHz instead of 2.4GHz. They boast a range of several kilometers however I think in the UK we're limited by power levels.
Without buying any additional hardware, I was planning to just use ESP-NOW from the ESP line. On LR mode you should be able to get 200kbps, which should give plenty for a few signals. You could get 16-bit for 12 channels and a few 1-bit switches in there at 1000Hz. The main appeal was that it could also get info from the robot, as it's effectively two-way.
Thanks! I just grabbed a few😊. My solution has been to use a wifi router modified with OpenWRT, and UDP. And that is very resistant to large amounts of interference. But I will try playing with these.
You should definitely look into ELRS. All of the hardware from all manufacturers works together, it's open source, cheap, and uses WiFi. You can even make your own modules using an ESP8*** (I forget, but it's documented everywhere.) I'd say this is your best bet. Excellent range (miles possible), up to 24 channels, and fully open. It's also bi-dorectional, so you send things back like telemetry.
Have you heard about the HC-12 UART module? The DIY Tech Bros did a great video series about this transmitter-receiver set. It has a lower data rate than the NRF-24, but everything else is better.
Hey James, clever setup interfacing with the DSM2 transmitter directly! I was afraid to try this, so instead I've had good luck creating an even simpler _40_ channel tx/rx. I used 2 bog-standard esp32s + ESPNOW protocol. I went this route as it doesn't require bit bashing, and supports {n} channels, and was easily expandable to basically infinite range using a wifi->LTE dongle.
This is an awesome project. Thank you much for sharing. I will probably make something like this but with my own cad. I can’t code well yet so this is so cool. Cheers
For buttons you can do what car dasboards do on CAN. Binary decoding. Sending 00 = all switch off sending FF = all 8switch on and 04 = third swich on. 06 = second and third on
This is brilliant! I'm working on my entirely custom drone build and stuck with exactly that fly sky remote, as I don't see spending more on a remote then on all other parts together. Tried bluetooth as well, but the range is simply not enough. Guess I'll build a similar remote
@@tjorbim ELRS is the new standard basically it is amazing multiple miles of range on 2.4ghz with the lowest latency of any link and you can build it yourself.
Mentioned by a lot of others but you should really check out Express LRS! super low latency and really long range (tens of kilometers) serial connections on both ends, and its open source as well, great stuff. you can get better range with better antennas as well
The attempt to multiplex the channels failed because the receiver is decoding the channels asynchronously from the ibus reporting. So you get some values from the current frame and some from the previous frame.
Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
For what James is doing FRsky is probably fine (and dang cheap) since he can code around dropouts since it sounds like he already has had to before. I’ve lost signal on an XM+ at 75’ LOS so I moved on personally. One thing a newer protocol would have helped with is serial in/out from the start rather than the PPM code, but it works now so why change.
As many people have already mentioned, ExpressLRS is a far superior transimisstion protocol as compared to DSM2, but Id like to add that those liner polarized antennas are junk. Great project, love it!
Very impress on the content of all your video. I just cant imagine how you keep searching a problem to be solve in everyday routine. Yet came with the great solutions and share with others. Thank you for the most priceless contribution that you make. May god bless you with more incredible knowledge and ideas. 🇲🇾
ELRS (extreme long range system) open source, cheapest, one of the best links available. 12 channel. the module was 6 bucks because Dsm in FPV is pretty much extinct.
I also implemented a decoder for an Arduino and DSMX, I loved Spektrum and all my drones worked with it but... I was always disapointed by the range of this technology. Now my drones uses CrossFire modules from TBS, and my next bots will probably use it too.
That DSM hardware is 5+ years out of date. Check out Express LRS. Its an open source project being actively developed with 40km+ of range. Because its open source, the Rx and Tx are very inexpensive. And the devs are so enthusiastic about it, if its missing a feature, I'm sure you could work with them to develop it.
You should look into the LoRa based open source project expressLRS, best latency with an unreal range that seemingly defies physics, bidirectional telemetry and it's all quite cheap too. Just have to communicate with a serial protocol instead PPM
@James Bruton: you can find all over internet radio modules on any band (433/868/915Mhz/2.4Ghz) that just provide a transparent UART. And they are cheap. Having a digital UART makes things easier, you can send any data you want. And they do provide reliability and range (hundreds of meters, kilometers). Using analog PPM signals or IBus or any RC protocol is not the way to go for your projects. Just a transparent radio UART is the best approach. Being full digital, you can add checksums, error correction and whatever you want to your digital packets.
@@jamesbruton Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
Ah so cool finally something like ive done at home! You should try out more opentx stuff perhaps! Explore Express LRS maybe and other open hobby radio protocols?
I know this is an old video but you could consider using the HC-12 wireless module gives you 1km @433.4-473.0 MHz for Arduino to Arduino communications. They have hit 2km in some situations.
You can likely get more switches into a single channel if you coerce you signal values into a binary number. Essentially, take your channel value, subtract the minimum possible value, and then integer divide the result by a fraction of the maximum possible value range. the number you would divide by is (Maximum Possible Value Range / A Power of two, the more the better). You would have to fine-tune that power of two so you get reliable reconstruction on the receiving end (your channel value will likely fluctuate by some small amount even when the input is consistent). Then you can use each bit of the resultant number (your number of bits will be equal to the power you raised the 2 in the denominator by) as a flag for whether that switch is on or not. With the variance I was seeing, I imagine 4 to 6 bits of precision may be possible, meaning you can encode 4 to 6 switches per channel. If you can get closer to 16bits of precision (doubtful but maybe), you can use a similar trick to encode two seperate 8bit data streams into a single channel. This type of multiplexing can go a long way. It is unfortunate that you weren't able to get the nieve time-based multiplexing working, as there are really robust time-signal schemes that can power seriously over-the-top multiplexing. Those are the same methods used by cell phone towers to service hundreds to thousands of clients per network cell.
look into expresslrs if you want reliabilty and range at a low cost, but might be simpler to use lora modules directly for custom integrations and dataset lora might be helpful but relatively slow compared to wifi, it should not be very different speed wise compared to the nrf24 depending on selected data speed, there are many modules with varying tx power for arduino some with more functions built into the chip directly like interference mitigation and error checking and correction... elrs uses lora and it gets very low latency, high refresh rate and very long range, it's also open source so you can also probably adapt it to your needs.
I love your videos and actually kind of got what you were doing on the coding in this one. Beautiful code btw! Also, you always choose really good music too. I'm curious what track you used on the Filament ad section? I'm a DJ always looking for good tracks and while that type of EDM typically isn't what I use I did like how it was brought in. Thanks for sparking my curiosity into coding!
I remember when you could make an 8-channel PWM link with 4000-series CMOS 1-of-10 counter chips and a few capacitors and stuff. :) And these, of course, won't try to be clever by mixing up different frames. (I hate systems which do that; hardware or software.) I've still got the book with the circuit diagrams somewhere. 4 quite simple circuits: encoder, decoder, 27 MHz transmitter and receiver. Having a quick search, it looks like you can even still get the adjustable inductors; Toko branding and all, though I haven't checked the values. The book is Mastering Electronics; I'd post author & ISBN but I've just moved and don't want to go raiding boxes just now. Oof! 3km? I don't think those 27MHz circuits had that kind of range. :D
Dunno... think the biggest issue they had with that thing was the sheer effort/time involved in each test run and that every error caused damage. The other issue was that they were working with imprecise actuators (and sensors? or at least not enough of them). It was a good try (an excellent try even) but not sure any more minds on the job would have helped.
TDS PP has an industrial version of the 6-DoF thumb joystick (aka Space Mouse) module with UART or USB interface. I think some of your applications would really benefit from having that.
@@skylar7320 I use it for CAD, 3D, I programmed a plug-in for Cities Skylines to manipulate the camera, and with many other games it can be configured as a joystick, for example in Elite Dangerous. Not sure whether the small dynamic range is good for a drone. And yes there is a bit of a learning curve. Although in both ways, as I really struggled with CAD with just a mouse.
You get a lot more configurability and control with something like the nrf24 since each packet is 32 bytes and you can send whatever you want, that could be 32 separate 8 bit channels. You can also do what you tried to do which is to make the first byte an identification byte and then send packets containing different data. Where did you get your nrf24 modules? There are a lot of fake ones out there that have rubbish range or don’t work properly.
maybe use the blank in the middle of the rc remote for a screen either simple liquid crystal or even a touch one with lvgl, for telemetry and battery percentage ... in addition to switches and buttons if necessary..
Your mixing problem is due to out of order packet transmission on a digital buss/radio interface. Same problem as UDP packet transmission. You aren't guaranteed the order. You would have to tag the data with orders for packets. Then encode and decode your data in the chain of data.
You could probably also read the PPM using a RP2040 microcontroller and PIO. Though that also means writing assembly, so spending an extra tenbux on the better receiver is probably the right way to go.
You can buy any TX module and do this. There are many out there in fact they have LRS and multi protocol ones. This is an old one that's why it's so cheap I have used a rangerx to do the same it's a multi protocol. Connect to dsm2 plus many more.
6:20 The "best" solution imo would be to use a microcontroller with DMA (the atmega2560 doesn't), set the PPM output as DMA trigger, leave a timer running in the background, and use the DMA to save the timer count value at each PPM trigger, and reset/stop the timer if overflow That way, you use exactly 0 processor cycles and get full data acquisition Yes I love DMAs
The atmega328, used by the baseline arduino, has input capture hardware to record the time when an input changes. This should work for capturing the PPM signal without resort to interrupts. It would require reading the status more often than the input changes.
For all the sofa-'makers' in the comments posting "why didn't he use ELRS" -- Do you think James, who puts together more working robots in a weekend than most of you have completed in a lifetime, didn't consider ELRS? Really? Guess what dumbdumbs- there are _no_ reasonable working implementations of interfacing an Arduino with an off-the-shelf cheap ELRS transmitter. None. Zero. Zilch. You'd know this if you tried it, so we all know you haven't and just spouting BS. (there is a single example of an amazing one-off custom Arudino->>ELRS transmitter on YT, it uses a custom PCB, and a complex custom toolchain that doesn't even run on the Arudino IDE, so no, this doesn't count) Prove me wrong.
Join my DISCORD! discord.gg/fc6MedG7eW
INSTAGRAM: instagram.com/xrobotsuk
TWITTER: twitter.com/xrobotsuk
MASTODON: fosstodon.org/@XRobotsUK
Aren't you a bit too old to use the word super ?
this is a super cool project!
James, please create a USB Joystick (like a T1600m) to RC-link setup, that would be a lot of fun to drive a robot around the house from your gaming PC. Or a racing wheel setup!
why not use cheap cell phones and send data via telephony like an old modem would? Then your range would be essentially unlimited so long as it had a basic phone signal and some code to transmit and receive confirmations like a checksum would? Cheap cell phones would probably work like this instead of using radio, plus your frequency would be higher so your compressability should be higher, including video streams potentially?
@@texasfossilguy LoRa is best
In the world of drones and RC, DSM/DSM2 is practically ancient these days! ExpressLRS is more or less the modern "budget" standard - and radios that support it can be had for very cheap. Building your own radio is cool in itself, but I feel like it's being held back from its full potential by the tech inside it.
Also I think any RC plane/drone pilot will agree that DSM/DSM2 isn't exactly great for range and interference stability - I know I've almost lost models previously due to lost signal - but I guess if you're coming from bluetooth anything is hundreds of times more stable - and I guess a driving robot rarely goes as far as a model airplane.
I remember the days of having transmitter/receiver crystals to change the radio frequency.. Simpler times 😂😂
@@Matty.Hill_87 still have many of those... far simpler and no interference as today everyone is on wifi :P
I agree, DSM2 has a really bad name in the R/C industry for having lots of failsafe and brownout issues.
DSMX is a lot better in that regard.
ELRS will still have way better range, features, reliability and hackability (it's an open source project, DSM is very propietary) tho
Yeah elrs is where it's at
+1 for eLRS support. You may also want to check the 3dconnexion 6D Spacemouse serial module, to allow you to map everything onto 2 joysticks.
I've read the stuff on ELRS but I'm pretty happy I have a solution better than the NRFs for now that's off the shelf. Future upgrades though
@@jamesbruton Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
Remote controlled Hulkbuster confirmed!
@@jamesbruton have you ever tested the nrf24l01+pa+lna modules?
James, an idea for encoding your switches/buttons/binary. Use the bits! ie you can think of an int32 number as 32 binary numbers (referenced by their index). It's pretty simple maths to encode and decode and you can use 1 channel for all the buttons you could ever want :)
yeah, was thinking the same, using a bitwise operator to see the value of every bit in the number.
@@MrJimmySegers We used to call it bit twiddling 🙂 Just make sure you thoroughly document what each bit controls in its two states.
Isn’t he still using PPM on the input side? I don’t think he’ll get 32bit accuracy there.
@@Mike-oz4cv yes - i also think it is too much, but 4-8 bits should be possible. Perhaps 6 bits with 2 for crc
@@Mike-oz4cv PPM channels are analogue as the value for each channel depends on the width which represents an analogue value. The PPM is then being fed through a DSM/DSM2/DSMX modulator which is digital. so I'm pretty sure that PPM can represent as many bits as you would want but the limitation would be the modulator.
Coming from the drone space, I suggest you check out Express LRS. The TX modules are the same form factor as yours (and there are also smaller ones). The RX modules are much smaller. Everything is open source (hardware + software). The range is much better thanks to LoRa (reception works below noise floor, this is dark magic to me). Supports up to 16ch (10 bit) at 333Hz or 10ch (10 bit x4 + 1 bit + 7 bits x5) at 1kHz (though that's using FLRC and not LoRa). Transmitter modules are available up to 2W as of right now. Receivers up to 100mW for telemetry (around 2 cm² of PCB + antenna). And yes, they use basic UART for communication.
Using an ESP32 you could dedicate a core to reading the incoming values, and another core to run your code.
Edit: The RTM of the esp32 is a better choice than an ordinary ISR. Thanks @michaelmiller5705
How would you do that with an ESP32? I am working on a project and am still trying to figure how to separate receiving data and processing data separately. would be nice to just keep them entirely indpendent.
@@a154james in the receiving data callback function just copy the received data in a ring buffer (do nothing else). In the main loop, check for data in the ring buffer, and if there is any, pop it from the ring buffer and process it. After you have done that, process other input in the main loop, like button presses etc. If you want to be safe, use a thread safe ring buffer library.
@@a154james Use the RMT peripheral to read the pulses (doesn't use a core) and then you can read the values encoded for you from the RMT receive buffer.
@@mattack12 This is probably the best way you could do it. I‘ll change my previous comment.
Every time I watch your videos James I'm in speechless with your technical skills
just fantastic
Reminds me of my early forays into arduino stuff. I actually had more success range-wise with the nRF24 modules than with the (kinda junk) orange RC stuff, although they are quite finicky about antenna and power supply. Your idea for sending different sets of data in alternating packets works well with nRF24, I used that method on my high altitude balloon. Having two radio transmitters right next to each other might not be ideal for range.
I'd be tempted to look into the Express LRS project (Express Long Range System or ELRS). Its the current thing in the world of FPV quadcopters. Its all open source and cheap, and the transmitter modules and receivers interface over a UART serial port. It's a modern system that has incredible range and reliability, people are flying model planes more than 40 Km.
true hobbyist at work here innovating and proving 20 plus channels can be achieved on a DIY build i will be sharing this on my community tab
I was musing to myself last night 'I wish I knew how to make my own transmitter, because none of these ones on the market have QUITE the combination I need and they're all really expensive'. Then you go and do this! Cheers James, I'm sure I'll be using this as a reference at some point!
Great video! I love how simple and elegant your solution is. Thanks James
Wow. Amazing. Great workarounds to get what you want.... Maybe accelerometer that's available to use on some channels, or a second slave remote for use by another person.
I love the telemetry and screen idea for the future!
You make it look so easy!
James, I'd love to see a video covering your design process, for example the controller parts...
Amazing Video. This has always been one of my biggest questions from watching your videos !
i apprieciate the stable camera position :) also very good project!
ESPNow is a surprisingly good, long-range capable w/ built-in optional ACK/retransmission baked in communication protocol. ESPs are also cheap as chips, and code is easy to write for it.
Fantastic idea !!!! A touch pad in the middle would be a good addition . Another one would be a screen with a macro recorder.
…always good to see diy builds and love it…thanks…i have about a hundred of dsm receivers…almost everyone in nano sub 20 gram mylar planes…i love em n keep them forever…never lost a signal…short range ones but fly them sometimes outdoors and better than frsky which i gave up a couple of years ago…will transfer all my about eighty big planes and some quads to open source protocol express lrs…sold all jeti and frsky radios and radiomaster tx12, tx16…two radiomaster zorro for everything…
Not sure if this would be right for your use case, but esp-now is extremely fast and reliable. I use it to control my electric skateboard from a custom remote that I have built (about 2ms for a 4 way trip). You can also turn the esp into long-range mode which allows about 30 m of transmission distance through brick and building, some people have even tested up to a kilometre line of sight.
Not only that, you also get a microcontroller which is far superior to arduino, boasting infinitly faster speed, far larger storage and many extremely high speed pins
I was wondering how esp-now would compare. Thanks for the data!
Have you looked at ELRS? It's a fully open source project Radio Link based on the ESP32. DSM really isn't used as much in RC anymore(aside from Horizon Hobby/ Spektrum off shoot companies)because of it's reliability issues and since it's closed source if you run into limitations there really isn't much you can do. With ELRS on the other hand not only is it fully open source, but rolling your own module is really easy and really well documented.
Great job James! I definitely vote on adding a touch screen in the center!
If you want more range, at the cost of having to work out the settings to keep it within the law, the RFD868 radios support a PPM/SBUS uplink and a UART telemetry downlink. They do however use 868MHz instead of 2.4GHz. They boast a range of several kilometers however I think in the UK we're limited by power levels.
Without buying any additional hardware, I was planning to just use ESP-NOW from the ESP line.
On LR mode you should be able to get 200kbps, which should give plenty for a few signals. You could get 16-bit for 12 channels and a few 1-bit switches in there at 1000Hz.
The main appeal was that it could also get info from the robot, as it's effectively two-way.
I love your videos, they help me with my electronic things that I make. Keep up with the amazing work James.
Thanks! I just grabbed a few😊. My solution has been to use a wifi router modified with OpenWRT, and UDP. And that is very resistant to large amounts of interference. But I will try playing with these.
Awesome project. I am on a really tight budget and this would be a way to save a few bucks. Thanks for doing that range test as well. Very cool!
You should definitely look into ELRS. All of the hardware from all manufacturers works together, it's open source, cheap, and uses WiFi. You can even make your own modules using an ESP8*** (I forget, but it's documented everywhere.)
I'd say this is your best bet. Excellent range (miles possible), up to 24 channels, and fully open. It's also bi-dorectional, so you send things back like telemetry.
Have you heard about the HC-12 UART module? The DIY Tech Bros did a great video series about this transmitter-receiver set. It has a lower data rate than the NRF-24, but everything else is better.
Hey James, clever setup interfacing with the DSM2 transmitter directly! I was afraid to try this, so instead I've had good luck creating an even simpler _40_ channel tx/rx. I used 2 bog-standard esp32s + ESPNOW protocol. I went this route as it doesn't require bit bashing, and supports {n} channels, and was easily expandable to basically infinite range using a wifi->LTE dongle.
You can use a single channel for all of the switches with the help of a bit mask and some boolean opeations.
OK, This is really cool. However, I wish you had chosen a TX unit that is at least obtainable.
This is an awesome project. Thank you much for sharing. I will probably make something like this but with my own cad. I can’t code well yet so this is so cool. Cheers
You know you could assign all your switches to bits.. packing all of them into one channel :)
I don't really need another TX/RX right now, but I ordered these anyway. Too cheap to pass up! Thanks for the tip!
When he said "perfectly balanced" during the Huel ad I immediately thought of Spiffing Brit.
You could also read the PPM receiver signal using the Capture peripheral of a MCU in combination with DMA to free up the processor.
The arduino / atmega328 doesn't have DMA. It does have hardware to capture when an input changed, good for reading a PPM signal.
For buttons you can do what car dasboards do on CAN. Binary decoding. Sending 00 = all switch off sending FF = all 8switch on and 04 = third swich on. 06 = second and third on
This is brilliant! I'm working on my entirely custom drone build and stuck with exactly that fly sky remote, as I don't see spending more on a remote then on all other parts together. Tried bluetooth as well, but the range is simply not enough. Guess I'll build a similar remote
Have you looked into ExpressLRS? Its open source and cheap.
@@haaspaas2 not yet, but their page looks promising, thanks!
@@tjorbim ELRS is the new standard basically it is amazing multiple miles of range on 2.4ghz with the lowest latency of any link and you can build it yourself.
THANKYOU! I have been wanting to do a project just like this for some time. It's like you read my mind... weird
Mentioned by a lot of others but you should really check out Express LRS! super low latency and really long range (tens of kilometers) serial connections on both ends, and its open source as well, great stuff. you can get better range with better antennas as well
The attempt to multiplex the channels failed because the receiver is decoding the channels asynchronously from the ibus reporting. So you get some values from the current frame and some from the previous frame.
Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
reliable and DSM rarely gets used in the same sentence, should of gone for ELRS!!
I've had over 1.5km out of the cheapest 10mm receiver
Well it's DSM2/DSMX depending on the receiver, it's better than the NRFs though - I'll look at ELRS
The primary reason I upgraded all my RCs from Frsky/XM+ is because of dropouts. ELRS has been rock solid and cheap. Love your videos, keep it up!
Frsky has been rock solid here to
For what James is doing FRsky is probably fine (and dang cheap) since he can code around dropouts since it sounds like he already has had to before. I’ve lost signal on an XM+ at 75’ LOS so I moved on personally.
One thing a newer protocol would have helped with is serial in/out from the start rather than the PPM code, but it works now so why change.
For sending multiple switches over a single channel, I suggest using a bitmask.
As many people have already mentioned, ExpressLRS is a far superior transimisstion protocol as compared to DSM2, but Id like to add that those liner polarized antennas are junk.
Great project, love it!
ExpressLRS would be a solution, best paired with an EdgeTX compatible radio.
Another awesome project, and as always thanks for sharing your work.
Very impress on the content of all your video. I just cant imagine how you keep searching a problem to be solve in everyday routine. Yet came with the great solutions and share with others. Thank you for the most priceless contribution that you make. May god bless you with more incredible knowledge and ideas. 🇲🇾
ELRS (extreme long range system) open source, cheapest, one of the best links available. 12 channel. the module was 6 bucks because Dsm in FPV is pretty much extinct.
I also implemented a decoder for an Arduino and DSMX, I loved Spektrum and all my drones worked with it but... I was always disapointed by the range of this technology.
Now my drones uses CrossFire modules from TBS, and my next bots will probably use it too.
That DSM hardware is 5+ years out of date. Check out Express LRS. Its an open source project being actively developed with 40km+ of range. Because its open source, the Rx and Tx are very inexpensive. And the devs are so enthusiastic about it, if its missing a feature, I'm sure you could work with them to develop it.
I think ExpressLRS is best radiolink for today, one driven by community , and not crap covered by copyright.
You should look into the LoRa based open source project expressLRS, best latency with an unreal range that seemingly defies physics, bidirectional telemetry and it's all quite cheap too. Just have to communicate with a serial protocol instead PPM
Another fantastic video, thanks James!
Cool that you talked about the hovercraft
I'm relieved to hear that it isn't just me that can't get NRF modules to work reliably
@James Bruton: you can find all over internet radio modules on any band (433/868/915Mhz/2.4Ghz) that just provide a transparent UART. And they are cheap. Having a digital UART makes things easier, you can send any data you want. And they do provide reliability and range (hundreds of meters, kilometers). Using analog PPM signals or IBus or any RC protocol is not the way to go for your projects. Just a transparent radio UART is the best approach. Being full digital, you can add checksums, error correction and whatever you want to your digital packets.
links?
@@jamesbruton Not sure I can post links here,but if you search your preferred online shop for: "3dr radio modules" or "LORA 433Mhz radio module" (or other frequency band or any radio module with SXnnnn chipsets) you can find a ton of modules. They are just transparent radio UARTs, and you configure the datarate/ec/etc using AT commands. They expose just a RX/TX UART pins or USB to connect to your microcontroller or PC or PI. They usually support up to 56kb air rate, some do support more, but it's enough for remote controlling and sending commands and configuration data and whatever data you want back and forth. All these modules are just plug and play. You just configure the serial speed and the channel using AT commands (most are already set with default values, so 2 identical modules will just
I have used XBee radios with my controls. They work pretty well.
impressive work mate ... just impressive !
Ah so cool finally something like ive done at home! You should try out more opentx stuff perhaps! Explore Express LRS maybe and other open hobby radio protocols?
Missed a perfect opportunity to build a Gemini ELRS link.
Wow you always say a bunch of things that I don't understand but for some reason I find it entertaining. 😄
The hard part will be grafting on a second pair of arms so you can use all the channels.
I don’t understand 90% of what you’re talking about, but your still entertaining
RC idea: have the remote robot do "land/park safely, shutdown motors, and beep for rescue" when signal is lost.
Would something like ELRS work?
I was just gonna mention ExpressLRS lol
If not I bet the devs would help him out :D
Great project
Thanks for sharing your experiences 🙂
Take a look at ELRS. It’s a modern, open source version of this tech, with kilometers of range, and bidirectional comms for telemtry.
I know this is an old video but you could consider using the HC-12 wireless module gives you 1km @433.4-473.0 MHz for Arduino to Arduino communications. They have hit 2km in some situations.
The frsky remote can be added to. I wouldn't give my enemies flysky trash
very impressive
A pistol girp style controller would be awesome from you. I bet you could get ten channels in one
oh wow this is exactly what I neeed OMG THANK YOU SO MUCH
This is really inspiring im buying very soon a 3D printer (ender s1 pro) and for sure i will try to design a remote battle bot !
I don't want to drink Huel. He was a kind man.
You can likely get more switches into a single channel if you coerce you signal values into a binary number. Essentially, take your channel value, subtract the minimum possible value, and then integer divide the result by a fraction of the maximum possible value range. the number you would divide by is (Maximum Possible Value Range / A Power of two, the more the better). You would have to fine-tune that power of two so you get reliable reconstruction on the receiving end (your channel value will likely fluctuate by some small amount even when the input is consistent).
Then you can use each bit of the resultant number (your number of bits will be equal to the power you raised the 2 in the denominator by) as a flag for whether that switch is on or not. With the variance I was seeing, I imagine 4 to 6 bits of precision may be possible, meaning you can encode 4 to 6 switches per channel. If you can get closer to 16bits of precision (doubtful but maybe), you can use a similar trick to encode two seperate 8bit data streams into a single channel. This type of multiplexing can go a long way.
It is unfortunate that you weren't able to get the nieve time-based multiplexing working, as there are really robust time-signal schemes that can power seriously over-the-top multiplexing. Those are the same methods used by cell phone towers to service hundreds to thousands of clients per network cell.
Just for safety of your transmitter you should add a lanyard loop, as someone that's dropped my Taranis multiple times its worth it
Im surprised you didnt go with an ELRS radio. You can build your own transmitter/receiver with up to 250hz packet rates and miles of penetration.
Someone at HobbyKing is about to be really confused as to why they are suddenly selling tons of these devices.
look into expresslrs if you want reliabilty and range at a low cost, but might be simpler to use lora modules directly for custom integrations and dataset lora might be helpful but relatively slow compared to wifi, it should not be very different speed wise compared to the nrf24 depending on selected data speed, there are many modules with varying tx power for arduino some with more functions built into the chip directly like interference mitigation and error checking and correction... elrs uses lora and it gets very low latency, high refresh rate and very long range, it's also open source so you can also probably adapt it to your needs.
I love your videos and actually kind of got what you were doing on the coding in this one. Beautiful code btw! Also, you always choose really good music too. I'm curious what track you used on the Filament ad section? I'm a DJ always looking for good tracks and while that type of EDM typically isn't what I use I did like how it was brought in. Thanks for sparking my curiosity into coding!
I remember when you could make an 8-channel PWM link with 4000-series CMOS 1-of-10 counter chips and a few capacitors and stuff. :) And these, of course, won't try to be clever by mixing up different frames. (I hate systems which do that; hardware or software.) I've still got the book with the circuit diagrams somewhere. 4 quite simple circuits: encoder, decoder, 27 MHz transmitter and receiver. Having a quick search, it looks like you can even still get the adjustable inductors; Toko branding and all, though I haven't checked the values. The book is Mastering Electronics; I'd post author & ISBN but I've just moved and don't want to go raiding boxes just now.
Oof! 3km? I don't think those 27MHz circuits had that kind of range. :D
You might want to have a look at ExpressLRS - it's an open source high-performance control link, supporting telemetry.
As usual, an awesome video! You should try and help out the hacksmith and his hydraulic spider, I bet you could make it work better than they did!
Dunno... think the biggest issue they had with that thing was the sheer effort/time involved in each test run and that every error caused damage. The other issue was that they were working with imprecise actuators (and sensors? or at least not enough of them). It was a good try (an excellent try even) but not sure any more minds on the job would have helped.
TDS PP has an industrial version of the 6-DoF thumb joystick (aka Space Mouse) module with UART or USB interface.
I think some of your applications would really benefit from having that.
That would be cool, but what a learning curve to control! Now I wanna make a space mouse quad controller and try it.
@@skylar7320 I use it for CAD, 3D, I programmed a plug-in for Cities Skylines to manipulate the camera, and with many other games it can be configured as a joystick, for example in Elite Dangerous.
Not sure whether the small dynamic range is good for a drone. And yes there is a bit of a learning curve. Although in both ways, as I really struggled with CAD with just a mouse.
@@graealex yeah, I’ve used in CAD too. Takes a bit to get used to
You get a lot more configurability and control with something like the nrf24 since each packet is 32 bytes and you can send whatever you want, that could be 32 separate 8 bit channels. You can also do what you tried to do which is to make the first byte an identification byte and then send packets containing different data. Where did you get your nrf24 modules? There are a lot of fake ones out there that have rubbish range or don’t work properly.
maybe use the blank in the middle of the rc remote for a screen either simple liquid crystal or even a touch one with lvgl, for telemetry and battery percentage ... in addition to switches and buttons if necessary..
Your mixing problem is due to out of order packet transmission on a digital buss/radio interface. Same problem as UDP packet transmission. You aren't guaranteed the order. You would have to tag the data with orders for packets. Then encode and decode your data in the chain of data.
You can try esp-now on Esp32, I got over 300 meter with ext antenna
I use SBUS for my Radiolink T8S and R8EF for my R/C robot I am building right now... but waiting for a new 4S AA holder.
You could probably also read the PPM using a RP2040 microcontroller and PIO. Though that also means writing assembly, so spending an extra tenbux on the better receiver is probably the right way to go.
You can buy any TX module and do this. There are many out there in fact they have LRS and multi protocol ones. This is an old one that's why it's so cheap I have used a rangerx to do the same it's a multi protocol. Connect to dsm2 plus many more.
What about using a esp8266? You can link two together also have external antenna for range.
Hello from South Qazaqstan!
6:20 The "best" solution imo would be to use a microcontroller with DMA (the atmega2560 doesn't), set the PPM output as DMA trigger, leave a timer running in the background, and use the DMA to save the timer count value at each PPM trigger, and reset/stop the timer if overflow
That way, you use exactly 0 processor cycles and get full data acquisition
Yes I love DMAs
The atmega328, used by the baseline arduino, has input capture hardware to record the time when an input changes. This should work for capturing the PPM signal without resort to interrupts. It would require reading the status more often than the input changes.
you should check out ELRS protocol, it's fully open source, and 40+ km range
For all the sofa-'makers' in the comments posting "why didn't he use ELRS" -- Do you think James, who puts together more working robots in a weekend than most of you have completed in a lifetime, didn't consider ELRS? Really?
Guess what dumbdumbs- there are _no_ reasonable working implementations of interfacing an Arduino with an off-the-shelf cheap ELRS transmitter.
None.
Zero.
Zilch.
You'd know this if you tried it, so we all know you haven't and just spouting BS. (there is a single example of an amazing one-off custom Arudino->>ELRS transmitter on YT, it uses a custom PCB, and a complex custom toolchain that doesn't even run on the Arudino IDE, so no, this doesn't count) Prove me wrong.
This is just amazing. Love it :D