The LeapCopter ! (Leap Motion to Control Quad Copter )

37,450

328

47

Posted in TechnologyRemote-control

Introduction: The LeapCopter ! (Leap Motion to Control Quad Copter )

Hello everyone!
This is my first instructable hope you'll enjoy it.
 
What I did in this project was taking the Leap Motion platform and used it to control a quad copter with nothing but hand gestures!
 
Using digital to analog converters and the arduino uno we made the Syma X1 quad copter's remote control to recieve its commands from the leap motion sensor.
 
Parts you will need:
 
1. Leap Motion - 80$
2. Syma X1 - 40$
3. Arduino Uno - 30$
4. 3x D2A mcp4725 - 5$
5. BS170 Transistor - 2$
6. R10K Resistor - 1$
7. 2x R2.5K Resistor - 1$

Leap Motion you can get over here:
http://www.anrdoezrs.net/click-7389900-11514579
--------------------------------------------------
 
Tools you will need:
 
1. Soldering iron and some solder
2. Desoldering wick
3. Wires
4. Screwdriver
5. Magnifying glass
6. Dremel
 
You can see the result over here:
http://www.youtube.com/watch?v=RyIa_Ef23Bw
 
and here:
 
I would like to thank my friends Moshe and Tomer that helped me a lot in this project
 
 
 

Step 1: Step 1 Syma X1 Remote Control:

1. Disassemble the remote control and take off all the plastic parts leaving only the remote's board with the small LCD still attached. I left the same battery holder box and just extended the wires and cut all the excess plastic with a dremel.
 
2. With a soldering iron and a solder wick, carefully take out the two potentiometers, you can also desolder and take out the annoying buzzer.
 
3. Once you take out the left potentiometer there are 2 things you need to do -

First you have to add two 2.5K resistors as shown in the circuit picture.

Next thing you have to do is to short three points as shown in the picture.
 
4. On the left potentiometer, once you remove it you need to short four points as shown in the picture.
 

Step 2: Step 2 Digital to Analog Cards:

1. Connect the VCC output from each of the 3 A/Ds (analog-to-digital converter) together to the arduino's 3V3 input (The RED wires on the circuit picture)

2. Connect the SDA output from each of the 3 A/Ds together to the arduino's analog 4 input (The GREEN wires on the circuit picture)
 
3. Connect the CSL output from each of the 3 A/Ds together to the arduino's analog 5 input (The BLUE wires on the circuit picture)
 
4. Connect the ANALOG output from each of the 3 A/Ds and choose one for the throttle, one for the roll, and one for
        the pitch. (The light blue wires on the circuit picture)
 
5. Connect the GND output from each of the 3 A/Ds together to the arduino's GND input (The BLACK wires on the circuit picture)
 
6. Connect a wire to the lower left pin in each of the main chips in the 3 A/Ds and using a magnifying glass:
 
        in the throttle A/D connect the wire to the arduino's digital 8 (The brown wires on the circuit picture)
        in the roll A/D connect the wire to the arduino's digital 10 (The brown wires on the circuit picture)
        in the pitch A/D connect the wire to the arduino's digital 12 (The brown wires on the circuit picture)

Step 3: Step 3 Flip Button:

1. Connect the BS170's Source pin to the arduino's GND (The black wire on the circuit picture)
 
2. Connect the BS170's Drain pin to the push button's upper left pin (The yellow wire on the circuit picture)
 
3. Connect the BS170's Grille pin to the arduino's DIGITAL 5 (The orange wire on the circuit picture)
 
4. Connect the 10K resistor to short the GND wire and the grille wire.

Step 4: The Code (C# + Ardunio)

You can find all necessary code files in this link:
 
https://drive.google.com/folderview?id=0Bw0DWKT9vijdbm9aUG00Y0pRQWs&usp=sharing

(I used google drive to upload it).
 
If you don't care about the code and want to use it as is just download the file "LeapDino.exe"
 
Please make sure you've got all your Leap motion drivers properly installed and it will work!

For more deep understanding I used 123D to make the circuit in this link you can find the project
I made alone the schematic for the remote control and the MCP4725 D2A, 123D GUI is very simple and very helpful !
if you have any questions or problems you are more than welcome to leave me a comment so I can help

GOOD LUCK!

Share

    Recommendations

    • Spotless Contest

      Spotless Contest
    • Space Challenge

      Space Challenge
    • Science of Cooking

      Science of Cooking
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    47 Comments

    @the_ice_man the tutorial is amazing. I would like to interface the leap motion controller with the arduino using Java. Could you help please!

    Hello.

    I'm trying to connect a OEM Syma X1 controller (w/A7105) with an arduino w/NRF24L01+ but none of the libraries that I get, works. It's because A7105 can´t connect with NRF24L01? Can you help me?

    Thanks.

    RC

    hi, i'm in final year, so i choose this project to be my final assignment, all i want to ask, did u or anybody here have any suggestion on using other than MCP4725 converter. please...,

    Hi I am going to make this but with a custom built tricopter and with a turnigy 9x controller will this still work and could you show me how to set it up for my controller and for my tricopter.

    Great tutorial! Are you soldering a wire to the bottom left pin of the DAC chips to allow the Arduino to control multiple DACs? I was just wondering since I wanted to make this project using an Adafruit mcp4725 breakout board which already has an ADDR pin out. Can I just use that instead?

    Hi, I am getting an error when running the program. An unhandled exception of type 'System.TypeInitializationException' occurred in LeapCSharp.NET4.0.dll. Any hint in how to fix it?

    Hi, I'll be doing this project in the coming days. Are you still around?

    How did you change the address on the A0 pin on the DAC? We are trying to write those pins high to change the address, but the pin seems to be linked to ground, which keeps the pin low. Thanks!

    2 replies

    Were you able to resolve this issue? I'm having the same problem, all of the DACs are enabled all the time because of hardwiring to ground on the breakout board. I'm not sure how to fix this other than cutting the ground line on the pcb itself

    We didn't really find a better solution than cutting the ground line. It looks like this is an new model of that DAC and they changed that one part for some reason. Our group ended up simply creating our own low pass filters to change the arduino PWM to a constant voltage.

    Hi there, So I am about to get started with this project but I just had a little confusion on how the Leap device interfaces with the Arduino. I understand that the Leap connects straight to the computer but how does it communicate with the Arduino? If you can just clarify this that would be great thanks and great project BTW.

    1 reply

    Leap connects straight to the computer and the arduino two connects straight to the computer. your welcome and have fun

    After troubleshooting for sometime, I found out that the arduino controller is getting the correct commands from the leap motion. I narrowed down the cause of the fault to that between the PWM outputs to the MCP4725 DAC. I probed the analog output from the DAC and it has a constant value of about 1.65V regardless of commands from the leap motion device.

    Hihi Ice Man, I'm almost done, but I've some questions that I hope you can help enlighten me. The resistance across my potentiometer is similar to yours (5kohm), and the voltage across is 3.3V. When I connect everything together and test, my quad is not reacting to my commands so I decided to probe the analog output of the DAC (which is the output sent to the RC controller). The output is constantly at 0.5V regardless of my gesture commands which is obviously incorrect. Please help, Thanks a Million

    Hello Ice Man, your project looks AWESOME! and therefore I'm gonna try it out on my cheap $30 quadrotor too! But my transmitter looks different from yours. From the attached image, did I wired it correctly? I am getting the same problem as the other guys when I run the Leap Dino.exe, I had also downloaded the source codes too. I'm unfamiliar with C# programming, do I need to configure anything in the codes and recompile before it can work? Thanks, awesome guy!

    IMG_3904.JPG
    3 replies

    Hi Remy, for start thank you for your compliments I really appreciate it, now for the technical part, your board is different and this can make a lot of problems I don't know if your potentiometers give the same values like mine I don't know if it has the same circuit you might need more grounding your might need different resistors if your good with electronics take a scope and start exploring and reading the values that the potentiometers gives you when you play with them. You must have the same values as the board I use for the all thing to work what we did was taking the digital values from the leap motion and with mathematic formula translate them in to analog values.

    Thanks Bro :) I will try to figure that out. But I also encountered some problem when I compile and run the C# codes. I had changed the COM port to COM4 which I am using to communicate with my Arduino Uno. However the following error appears when compile and build. Do you know how to solve this? I wanted to see whether the Leap motion sensor talk to the Arduino and display the outputs on the serial monitor.

    prob.jpg

    It looks like you need to add a reference to the dlls that are in the LIB folder LeapCsharp.dll and leapCsharp.NET4.0.dll

    try this it will guid you how to add:

    http://msdn.microsoft.com/en-us/library/7314433t(v...

    hello, thanks for this tutorial, when you say to connect a wire to the
    lower left pin, which pin is it? I wanna know whats the name of the pin
    because my DAC does not look as yours

    1 reply

    read the all line its the lower left pin ***in each of the main chips of the mcp4725*** if you look with a magnifying glass you will see there are 6 legs so the lowest left leg is the one you need just follow the schema =)