How to Control Your Drone From a Computer

After reading my post about how I used my computer to fly a Cheerson CX-10 drone, several people have asked me if it is possible to control other drones in a similar way.  It is in fact pretty straightforward, and in some cases you can re-use exactly the same hardware that I used to control the Cheerson CX-10 – the Arduino UNO and the Addicore nRF24L01+ Wireless Kit .

Component Description
Arduino Microcontroller Board Arduino UNO R3 Board Module With DIP ATmega328P(Blue)
Nordic Semiconductor 2.4GHz Wireless Card Addicore nRF24L01+ Wireless AddiKit with Socket Adapter Boards and Jumper Wires

It turns out that a large number of toy drones use the same nRF24L01+ compatible RF chips.  The word compatible is necessary because most of them seem to not use the Nordic Semiconductor chipset, but rather something like the XN297 from Panchip.In the original Arduino code, the author made it possible to select the protocol by various combinations of the flight joysticks.  For my version, I hard-coded it to always select the Cheerson CX-10 Blue protocol (see line 366 of nRF24_multipro.ino), but left the rest of the code intact so you can easily modify the code to select one of the other drones on this list.

Here is the list of drones that can be controlled by making this small modifications to the Arduino code (taken from nrf24_multipro).

Cheerson CX-10 (older red PCB)/CX11/CX205/CX30, JXD389/391/393, SH6057/6043/6044/6046/6047, FY326Q7, WLToys v252 Pro/v343, XinXun X28/X30/X33/X39/X40
WLToys V930/931/939/966/977/988
HiSky RXs, HFP80, HCP80/100, FBL70/80/90/100, FF120, HMX120, WLToys v933/944/955
Syma X5C (older model), X2 …
MJX X600
EAchine H8 mini 3D, JJRC H20/H22
Syma X5C-1/X11/X11C/X12
Attop YD-822/YD-829/YD-829C …
EAchine H8(C) mini, BayangToys X6/X7/X9, JJRC JJ850, Floureon H101 …
EAchine H7
WLToys V202/252/272, JXD 385/388, JJRC H6C, Yizhan Tarantula X6 …
EAchine CG023/CG031/3D X4
Cheerson CX-10 green pcb
Cheerson CX-10 blue pcb & some newer red pcb, CX-10A, CX-10C, CX11, CX12, Floureon FX10, JJRC DHD D1

Another set of very popular toy drones such as the Hubsan X4 and Estes Proto-X series use the A7105 / XL7105 wireless modules instead of the nRF24L01+.  These can also be controlled by an Arduino Uno, and instructions and code can be found here.

10 thoughts on “How to Control Your Drone From a Computer”

  1. i just bought a phenix drc-lsx10 drone from walmart. is there anyway to control this one with my comp.??
    thank you for your time
    Gerald Meares

  2. Hey, this project is really inspiring! I’m trying to get it up and running with an Arduino Uno and the NRF24l01+ module too for the JJRC/Eachine H8 mini but I’m stuck at the point of having initiated the communication with the quad, but the bind doesn’t complete. Might be using the wrong terms here. In terms of LEDs, @boot, the quad’s LEDs flash slowly (state 1). Normally when I switch on my remote control, they blink rapidly (state 2) and when pairing is successful, go solid (state 3 bind done).

    With modifications to the multipro code similar to yours, I am able to make the state 1 to 2 transition but stuck in state 2.
    Here’s my repo for reference. Any guidance would help 😀

  3. Hi, is this compatible with Cheerson CX-10WD or CX-10W ?
    What I want to do is use the PC to:

    1-capture the video streaming via wifi and use it with OpenCV, hoping that this code will give me a jumpstart on capturing the vídeo;
    2- control the copter using the method you presented.

    Basically i would use OpenCV on the PC to fly the copter but using the onboard camera of the Cheerson CX-10WD.

  4. There are many drone now which can be controlled from Android phone using wifi.
    Is there are way to control these drone from computer directly using wifi without Arduino

  5. This is a great project!

    I built up a version of the camera project using a Eachine E010 rather than the Cheerson drone. I am able to fly the Eachine via serial commands, can find the blobs,etc, but when I run the script, press ‘w’, the drone flies wildly and out of camera field and the script crashes.
    I suspect Eachine E010 is set up a bit differently than the Cheerson? What parameters would most likely need tweaking? Or, might it be the height of my webcam? Size of blobs? Distance between blobs?

    1. Hi John,

      Sounds like you’ve made it pretty far already, so congratulations!

      Most likely the issue is that the control gains between the E010 and the Cheerson CX-10 are different. I would start by reducing the absolute value of the gains Kx, Kz, and Kt in the file. Each of the 4 axes (x,y,z, and rotation) has its own PID loop. Reduce these three parameters until so that your control loop responds very slowly, and then gradually increase them. YOu should be able to edit this file and save it and have the new parameters take effect just by restarting the drone (press ‘s’ and then ‘w’). It reloads the parameters every time you press ‘w’.

    2. Am thinking about tinkering with an Eachine E013 and this. I’m wondering how you ended up going with the E010 in the end?

Leave a Reply

Your email address will not be published. Required fields are marked *