|
|
|
|
|
|
Vista, CA
Joined Feb 2008
1,062 Posts
|
AR drone control with RC transmitter, yet another Wifi-less mod
Features
o precise control of drone o cheap off the shelf hardware (Arduino Pro Mini or Nano, AR6100) o started with firmware versions 1.4.6, 1.4.7, 1.5.1, 1.6.6, 1.7.4, 1.7.6 these versions can not be tested any more due to lack of existence in my lab o tested with drone firmware version 1.7.11, 1.10.10 and 2.1.18 o true 'plug&play', disconnect HW and drone can be operated by iDev + no BEC needed + uses drone's serial port + no surgery of system files on drone + no need to make custom kernel for drone + prevents iDev highjacking of command port when in use + allows access to NAVDATA port for remote monitoring + allows access to video port for remote viewing + four different 'hot' selectable drone configurations + visual low battery alert (VLBA) + supports Mode 1, 2, 3 and 4 transmitters Hardware 1) Drone 2) 5+ channel RC TX/RX, 4 channels for sticks, 1+ switche(s) for land/flightmode1/flightmode2 3) Arduino Pro Mini or Nano 16Mhz/5V 4) Please look at the wiring diagrams to find the parts needed Software From what I gather from the net, most people doing this have access to a Windows box (I have XP) and can download the Arduino IDE (arduino-1.0.zip). The implementation uses a pair of programs, one running on the Arduino, the other running on the drone. The drone program is transfered and started by the Arduino program. rx2atp - receiver signal sampling and conversion to drone commands Installation on Arduino Pro Mini, Arduino Nano 'rx2atp' is the program for the Arduino. It does not make use of any Arduino environment library functions, exept the startup file and the standard compiler support library, I hope they have not tinkered with... This project has been tested with arduino-0022/3 and arduino-1.0-win. Start the Arduino IDE, it comes up with an empty 'sketch', and select <Sketch><Add File...>. Add the file 'rx2atp.c' from this package and 'Upload' it to the board. at2so - forwarding drone commands from serial interface to socket This program is uploaded and started on the drone by 'rx2atp'. It is loaded into '/tmp' on the drone and does not survive a reboot of the drone. Modifications to this program are not for the faint of heart. You need a toolchain for the ARM processor that can generate programs for Linux on the drone. At this point I use: arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.tar on a Linux box. miru This thread has become fairly long and it is difficult to find the 'essentials', Pawelsky made a nice webpage that gets you the releveant information fast! Check out: http://mirumod.tk Arduino Pro Mini wiring by Lorenzo29: http://www.rcgroups.com/forums/showp...5&postcount=48 Arduino Nano wiring: http://www.rcgroups.com/forums/showp...&postcount=484 REV 0.13 wiring: http://www.rcgroups.com/forums/showp...postcount=1417 Drone 2 wiring: http://www.rcgroups.com/forums/showp...postcount=2061 Latest revision REV 0.19 (consult README in .zip file for answers to some questions): 0.19 http://www.rcgroups.com/forums/showp...postcount=3027 0.18 http://www.rcgroups.com/forums/showp...postcount=2487 Proper terminal emulator in case you are on Windows 7: http://digitizor.com/2009/08/29/how-...indows-7-free/ |
|
|
|
|
||
|
Vista, CA
Joined Feb 2008
1,062 Posts
|
Quote:
miru |
|
|
||
|
|
|
|
United States, FL, Daytona Beach
Joined Apr 2011
11 Posts
|
Is anyone familiar with the Arduino Nano? Thats what I have and I think my connection to the drone will be slightly different...
I'm having difficulty following the instructions in the README. could someone help me figure out what goes where between the drone and arduino? I have only ever used the nano's usb port for serial before... Like, what is "drone 7" etc. here's a link to info about the nano: http://www.arduino.cc/en/Main/ArduinoBoardNano I was using the other wifi-less mod using usb before, but I am really excited try this one! Great work! EDIT: upon closer inspection of the port on the drone, the pins seem to be labeled 1-8 I guess that's what "drone 7" means hahaI'm still unsure about what goes where on the arduino side though... |
|
|
|
|
||
|
France - Brest
Joined Oct 2007
55 Posts
|
Hello,
Quote:
The nosaari cable is different since for the USB mod we pick up +5V (pin 1), Data- (pin 3) and Data+ (pin 5). Pin 7 for GND is used on both USB and serial cables For the Miru Mod, we need +12V (pin 2), RX (pin 4) and TX (pin 6) and GND (Pin 7). Drone connector pin assignment : http://code.google.com/p/ardudrone/w...eModifications On the arduino nano, there are TX and RX pins on upper left (see picture below) that i suppose you could use. ![]() To power your board... i would send the 12V of the drone connector (pin2 and 7) to the VIN and GND pins of the nano. To power you receiver with 5volts, i'm not sure, but you should get 5volts available on pin 27 (5V pin) of the nanoboard... someone can confirm that when the nano is powered by VIN pin in 12V, there is 5V available on the 5V pin ? Regards. LD |
|
|
||
|
|
|
|
France - Brest
Joined Oct 2007
55 Posts
|
Hello,
dear Miru, may i ask you three small questions ? For your information, I read every readme file and notes from your zip package and even tried to guess the answers by exploring your source code. Unfortunately, i didn't manage it ![]() 1) Switch assignment The GEAR switch is for Land/TakeOff and The AUX1 switch is for emergency crashing ?2) Did you implement the auto hovering function when the roll/pitch stick (mode 2) is on neutral position ? This function was implemented on MHeeli (wifi) mod. To my point of view, it was quite convenient but not fully satisfactory. Very often during flight, when by no chance the roll/pitch stick passed thru this neutral position, for a brief, the drone was trying to hoover... To solve this, i did a modification to the MHeeli code to take advantage of the three positions switch on my Spektrum DX7 radio. - Lower position : Land - Mid position : Take-off and Fly with auto-hovering (when roll/pitch stick is in neutral function) enabled. - Upper position : Fly with auto-hovering function disabled This modification is very convenient when you begin to be used to fly with the drone and if the pilot doesn't dare to switch to the No Hoovering flight, he can stay on the mid position and stay safe... ![]() I went through you code, pfuuuuu, not easily understandable for me... ![]() So, if you could help me to understand if auto-hoovering is implemented when roll/pitch stick is on neutral it would give me some clue if i need to study a modification to implement the three position switch trick. 3) Drone setup and starting procedure. 3.1 Do we need to place both radio stick to neutral in order to start ? I suppose, the response is Yes ! 3.2 Do we need to set the "travel adjust" values of radio channels in order to get the correct AT values to be sent to the drone (-1, 0 and +1) ? Well, thank's for this mod Miru, it sounds good. Laurent D |
|
|
||
|
United States, FL, Daytona Beach
Joined Apr 2011
11 Posts
|
Quote:
Thanks Lorenzo29 for the clarification! I got it set up now... Now I just have to figure out how to get it working with my 5ch transmitter. With my previous mod (nosaari mod) I was able to just have channel 5 connected to both takeoff/land pin and emergency pin. This actually worked surprisingly well. I would flip the switch... the drone lights would go red = user emergency and would not take off. Then I just did it again and it would reset emergency and take off at the same time. Then in flight i had the choice of either putting the switch down to land, or go down, up quickly for emergency. Kind of a weird work around, but it worked! ![]() Anyone have any idea how I can use my 5 ch with this mod? I think emergency works differently because when I try do what I did before ^ it just blinks orange 4 times. cant get it to take off
|
|
|
|
|
|
Vista, CA
Joined Feb 2008
1,062 Posts
|
Lorenzo29 thank you for answering the nano question.
Genie360 I looked at the Arduino nano a couple of days ago and was not quite sure how the FTDI chip is connected and what he bootloader does with it. The drone is somewhat finicky about what's on it's serial port during powerup. Let me know if you get it working, would be less research for me! miru |
|
|
|
|
|
|
United States, FL, Daytona Beach
Joined Apr 2011
11 Posts
|
Just took off!! Just as a test I doubled up on the rudder channel... so rudder on my transmitter now does rudder and emergency... I reset the emergency with the rudder stick, flipped gear switch and up it went!
![]() Obviously this is no good to fly the thing but it's good to know the drone is actually getting the signal. Now just have to figure out a better way to deal with emergency. I'm thinking maybe adding a push button on the arduino for now |
|
|
|
|
||
|
United States, FL, Daytona Beach
Joined Apr 2011
11 Posts
|
Quote:
PS thanks a lot for this mod, I'm loving it already.
|
|
|
||
|
|
||
|
Vista, CA
Joined Feb 2008
1,062 Posts
|
Quote:
1) yes the gear switch is the land/launch and the AUX1 (3 position) switch is for the other functions. Center is normal -> GEAR switch land/launch. Down sends FTRIM/COMWDG/LED once, center if afterwards for launch. Up causes an EMERGENCY, which does different things on the drone depending on if you are in the air or on the ground. In the air, it kills the motors, on ground it resets the last EMERGENCY in the drone (in case you flipped over or ran into something and the motors cutout). 2) This implementation always 'hovers' if you let go of the AILE/ELEV stick. Check at_prgr() it is only told to send PCMDs when the drone is in the air (that's different from FreeFlight). at_prgr() checks if the AILE/ELEV stick is in the center and will reset the 'enable' in the PCMD if so. I like your use of the AUX1 channel, it's almost like a heli. But what about FTRIM, EMERGENCY? 3.1) I only make sure on boot that the throttle stick is centered, AUX1 is centered and GEAR is down. Centering the sticks before launch is a good idea, but I ran out of ideas how to signal the user that I am not launching because.... 3.2) Please read the attached pdf file about the setup. It is for the next revision but applies to the current as well. miru |
|
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mini-HowTo RC Controlled AR.Drone w/o WiFi! | nosaari | Multirotor Talk | 113 | May 13, 2011 02:26 PM |
| For Sale Parrot AR Drone w/TX/RX mod *Flies Nice* | Z06 Tony | Aircraft - Electric - Helis (FS/W) | 4 | Apr 16, 2011 09:42 PM |
| Discussion Wifi Boosted AR.Drone | Fallengod | Multirotor Talk | 7 | Feb 12, 2011 10:52 AM |
| Discussion And yet another AR drone Arial Video project | taudronis | Multirotor Talk | 17 | Dec 07, 2010 11:04 AM |
| Sold Parrot AR.Drone Four rotor platform control with your iPodTouch/iPhone/iPad | Hoverup | Aircraft - Electric - Helis (FS/W) | 0 | Oct 12, 2010 03:54 PM |