DIY Drone RC control

v0idmp3

New Member
Hello,

I'm building a custom drone with my own configuration and one of the biggest features that I want is to have a custom RC where I want to use a joystick (Logitech 3D Pro) and my PC to control a drone. Basically, what I'm planning is to create a custom ground station with custom software running on a laptop.

What I already did is to create a stable connection between two Arduinos with NRF24L01+ modules on both sides. I tested with 150m meters on open field and connection was 10/10. Also, I created a python script that reads my inputs from the joystick (1 byte for throttle and yaw, 2 bytes for pitch and roll), sends them over the serial port to Arduino which send them to Rx side. Rx side as a acknowledge payload sends back some hardcoded values like lat, lon, altitude, etc.

I researched a little and I found that maybe the easiest solution is to use QGroundStation as software and MavLink for communication between a ground station and drone (planning to use Pixhawk flight controller). But I have a feeling that MavLink protocol is a little "bulky" for my taste. And I'm pretty much sure that popular RC kits are not based on MavLink protocol (or am I completely wrong? xD)

What I want to achieve and for what I need your help is how to remove MavLink protocol from the solution and communicate with the flight controller directly from Arduino on the Rx side? I want to go with PPM connection, but if PPM is complicated maybe I can use PWM (one wire for each channel) and after some time upgrade it with PPM? But I'm not sure how to send signals to Pixhawk and in which format? How to map my custom order of signals (bytes) that I receive from GS into something that I can put through PPM wire to Pixhawk? I read a lot and I didn't figure it out... :(

Also, I want to make clear that I did some research but after a few days I didn't found anything "usable" for me...I found a few youtube videos where guys managed to control drones with Joystick+PC but with re-wiring and connecting some commercial RC controls (Flysky and similar) which I don't want to do. So If you have some good resources for which you think that can help me, please share :) And of course, I will really glad to hear if any of you had similar experience or project or maybe some piece of advice? :)

Cheers
 
Awesome! I'm a fan of the nrf modules and Arduino I used them to make my own esk8 transmitter/receiver that works with a standard ESC pwm signal. Essentially you can use the Servo library to generate the pulsed signal for you and use the writeMicroseconds call to set the pulse width. I believe generally the standard range is 1000-2000 ms pulses.

I've looked into using DSHOT or some other more advanced protocols on the Arduino but it does seem to be asking a bit much of the Arduino hardware that said you should have plenty of pwm capable pins that can be used with the servo library to send all the channels you need individually.

 
Hey, thanks for the reply :)

Yep, I found that info about 1000-2000ms pulses but in which order? As I understand in PPM signal I have to put all my "channels"/data that I received from the ground station in one signal, and what I don't understand is in which order I should put those signals. I researched a little more and I found some OpenTX framework which is used by those commercial RC controls...but I'm not sure about it. And it looks like that I'll have to use Arduino Mega but that version is really big (in dimensions) and I'm entering a filed of Raspberry Pi where I can easily generate a MavLink payload, but if I choose raspberry pi I will need two units (one for ground station and another one for the drone) and with the price of boards I'm entering a level of 100$ RC stations which can be hacked and used as Rx/Tx from my custom software and joystick...I feel really desperate and confused at the same time...what to do :)
 
Hey yup I think opentx is probably the way to go really if you want something already close to "pro grade". FrSky helped to develop opentx and it's used on their transmitters also the new T16 like "jumper t16" already run this firmware and have 4 in 1 transmitter modules that include nrf communication along with FrSky protocol and DSM and Futaba I think but anyway nrf is in there already.

For custom receiver you may still have to do like you say get some sort of arm processor based thing, it sounds like you're heading in the right direction you might want to look into STM32 chips since pretty good power to processing and think used in a lot of the transmitters escs and other things. The atmel avr chips are ultra low power but only run at 8MHz or 16MHz clock speeds whereas the STM arm processors are in the hundreds of MHz like 100-500mHz so lots more clock cycles per second to get things done. Also various STM32 chips like the F7 have lots of hardware supported UARTs so can do lots of serial communication without slowing down the main MCU.
 
Back
Top