AR drone control with RC transmitter, yet another Wifi-less mod
o precise control of drone
o cheap off the shelf hardware (Arduino Pro Mini or Nano, AR6100)
o started with firmware version 1.4.6, these versions can not be tested any more due to lack of existence in my lab
o tested with latest drone firmware versions 1.11.5 and 2.4.8
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
2) 5+ channel RC TX/RX, 4 channels for sticks, 1+ switche(s) for land/flightmode1/flightmode2
3) Arduino Pro Mini, Nano 16Mhz/5V or MiruPCB
4) Please look at the wiring diagrams to find the parts needed
From what I gather from the net, most people doing this have access to a
Windows box (I have W7) and can download the Arduino IDE (arduino-1.0.5-r2.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:
on a Linux box.
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:
Arduino Nano wiring:
REV 0.13 wiring:
Drone 2 wiring:
Latest revision REV 0.22 (consult README in .zip file for answers to some questions):
Proper terminal emulator in case you are on Windows 7:
Whaou, sounds good...
I will look into this in detail soon.
Nice solution, miru!
Looking into the source code, you are the super programmer!
Especially with high performance coding style, very impressive.
Just got my Arduino in yesterday. Can't wait to try it out.
If you have made previous mods to the drone, will updating to the firmware reverse these (previous wifiless mod)? Will you be writing a step by step guide for us dummies?
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:
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 :D I guess that's what "drone 7" means haha
I'm still unsure about what goes where on the arduino side though...
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 :
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 ?
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 :rolleyes:
1) Switch assignment
The GEAR switch is for Land/TakeOff
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... :confused:
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.
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 :confused:
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!
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! :D
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
PS thanks a lot for this mod, I'm loving it already. :)
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.
|All times are GMT -5. The time now is 04:59 PM.|