HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Nov 08, 2010, 08:46 AM
Registered User
Mheeli's Avatar
Bangkok, Thailand
Joined Jul 2002
220 Posts
Discussion
RC Controlled AR.Drone

Please go to post #2 for the latest version of the Sketch

There's nothing wrong with V2.0 , just no video downlink and still require iDevice to set Drone's sensitivity.
___________________________________________


Here's a very initial test flight of the Ar.Drone controlled from an RC radio. Arduino UNO and WiShield is used to interface the RX to the Drone.

Ar.Drone controlled by RC Radio (2 min 10 sec)


If you do not mind the weight of the Arduino and RX, you can put them on the Drone and break free from the WIFI range limitation.

I flew around for a bit, it's certainly a lot more fun than using the iPod Touch to control it.

Still need a bit more work to make it smooth.

Next, need to get a GPS module to make this thing UAV

[9Nov10]
The code is now relatively smooth and very much flyable. Still a lot of work to do. But just in case someone is interested I attached the Arduino Sketch.

Hardware
- Arduino UNO
- Aynclabs WiShield

I have ordered the YellowJacket. If it works, this will be better than the 2 separate components above


- RX, I've tested Assan X8R7, but I'm sure most RX will work.

Please note that my Ar.Drone is still on the 1.1.3 firmware. I started this project before the new firmware was released.

I'm using Arduino 0020 IDE.

This is my first Arduino project, so don't laugh too much at my programming skill

Please please please , test this in-door so you don't get fly away when you assign a wrong value to a variable


[24Nov10] Full instructions

The Yellow Jacket is perfect. The size and weight is good. The Drone now flies very smooth and proportional to the stick.





Here's a quick write up, will add more when have a chance

1) Hardware

You will need

1.1) Yellow Jacket An Arduino mini clone with WiFi on-board.


1.2) FTDI USB Basic Breakout - 5V Required for downloading the sketch into the Yellow Jacket


1.3) Receiver. I'm using this one from Hobbycity But I'm sure most receivers will work.



The following RX also tested to be working
- Spektrum AR6200
- JR790UL spcm Rx (72 Mhz)

1.4) 5V power for your Rx. I'm using a small Switching BEC connectted to the balance plug of the Drone LiPo battery. A linear voltage regulator , such as 7805, would be better as it should have low noise.

2) Wiring

We will be using the Digital pins, 3,4,5,6 and 7 on the Yellow jacket to connect to the Signal pin of the Rx. The YJ will get its power from the Rx. Similar to servo getting the power from the Rx.









3) Software

3.1) Arduino IDE. I'm using the 0020 version. This will be used to modify and download the code to the Yellow Jacket.

3.2 The latest sketch. Attached. When unzipped, there should be 3 files under the "RC_AR_Drone_V2_YJ" folder. Do not change the folder or the filenames. Arduino IDe requires the filename and folder name to be the same. And do not place this folder inside the Arduino IDE folder.

3.3 Yellow Jacket WiFi driver. Attached. Unzip into the libraries folder of the Arduino IDE folder. You should have something similar to ....\libraries\WiShield

4) Upload Sketch.

4.1) Plug the breakout board to the YJ. Make sure the GND pin on the breakout board and GND pin on the YJ matches.
4.2) Plug a mini USB cable to the breakout board and to a USB port on your computer
4.3) Wait for Windows to detect the new device. It should be detected as a COM port. If required, the driver is located at ...drivers\FTDI USB Drivers under the Arduino IDE folder
4.4) Open the Arduino IDE and load the Sketch RC_AR_Drone_V2_YJ.pde
4.5) Under Tools->Serial Port, choose the new COM port that has just been added.
4.6) Under Tools->Board , choose "Arduino Pro or Pro Mini (5V, 16MHz) w/ATmega328"
4.7) Now upload the sketch to YJ
4.8) Once uploaded, open the Serial port monitor under Tools. Set the speed to 38400.
4.9) You should now see some messages complaining about Moving the stick to middle.

... Need some sleep now, to be continued......


5) Radio setup

5.1) With Tx sticks in the middle and your CH5 (Gear) switch in low position. You should see the "Aux:9xx" value close to the 900 value. If your "Aux" value is near 2000 then you need to reverse your AUX channel


Aux : 950 Throttle : 1477 Yaw : 1503 Roll : 1497 Pitch : 1503 Please move stick to middle positionon...


Adjust your Aux "End point" so that when the switch at low postion the "Aux:value" is about 950
Adjust your Aux "End point" so that when the switch at high postion the "Aux:value" is about 2000


You should now get the following message. (With Aux at low position)

Aux:949 Yaw:1502 Yaw Move : 0.00 Throttle:1476 Throttle Move : 0.00 Roll:1496 Roll Move : 0.00 Pitch:1503 Pitch Move : 0.00 Drone Status : 1 Grounded

6) Verify each radio channel.

6.1) CH5: (Gear)

With CH5 switch at low position (land) the value should be around 9xx

Aux:949

With CH5 switch at high postion (take off and fly) the value should be around 2xxx

Aux:2050

Adjust your "end points" accordingly so that the values are close to 950 (low position) and 2000 (high position)

6.2) Throttle:

With Throttle stick at low position, the value should be around 10xx. And the "Throttle move" value should be negative around -1.0. If the value is positive, you will need to reverse the Throttle channel.

Throttle:1090 Throttle Move : -0.90

Adjust your "End point" so that the value of the "Throttle Move" is just under -1.0. -0.9 will do.

With Throttle stick at high position, the value should be around 19xx. And the "Throttle move" value should be positive around 1.0.

Throttle:1909 Throttle Move : 0.9

Adjust your "End point" so that the value of the "Throttle Move" is just under 1.0. 0.9 will do.


6.3) Yaw:

With Yaw stick at right most position, the value should be around 19xx. And the "Yaw move" value should be positive around 1.0 If the value is negative, you will need to reverse the Yaw channel.

Yaw:1910 Yaw Move : 0.9

Adjust your "End point" so that the value of the "Yaw Move" is just under 1.0. 0.9 will do.


With Yaw stick at left most position, the value should be around 10xx. And the "Yaw move" value should be negative around -1.0

Yaw:1090 Yaw Move : -0.9

Adjust your "End point" so that the value of the "Yaw Move" is just under -1.0. -0.9 will do.

6.4) Pitch:

With Pitch stick at low position, the value should be around 19xx. And the "Pitch move" value should be positive around 1.0 If the value is negative, you will need to reverse the Pitch channel.

Pitch:1909 Pitch Move : 0.9

Adjust your "End point" so that the value of the "Pitch Move" is just under 1.0. 0.9 will do.


With Pitch stick at high position, the value should be around 10xx. And the "Pitch move" value should be negative around -1.0

Pitch:1091 Pitch Move : -0.9

Adjust your "End point" so that the value of the "Pitch Move" is just under -1.0. -0.9 will do.

6.5) Roll:

With Roll stick at right most position, the value should be around 19xx. And the "Roll move" value should be positive around 1.0 If the value is negative, you will need to reverse the Roll channel.

Roll:1912 Roll Move : 0.9

Adjust your "End point" so that the value of the "Roll Move" is just under 1.0. 0.9 will do.

With Roll stick at left most position, the value should be around 10xx. And the "Roll move" value should be negative around -1.0

Roll:1090 Roll Move : -0.9

Adjust your "End point" so that the value of the "Roll Move" is just under -1.0. -0.9 will do.

7) Verify stick actions

7.1) On the ground (not armed)
With CH5 in low (land) position you should get the below.

Drone Status : 1 Grounded

If you move any of the sticks , the Drone status should remain "Grounded"

7.2) Take off and fly (armed)
With CH5 flicked to high position. You should see the following sequence of drone status

Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 7 Resetting watchdog
Drone Status : 7 Resetting watchdog
Drone Status : 7 Resetting watchdog
Drone Status : 6 Flat triming
Drone Status : 6 Flat triming
Drone Status : 6 Flat triming
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering


All the move values should be zero during Hovering status.

Yaw:1502 Yaw Move : 0.00 Throttle:1498 Throttle Move : 0.00 Roll:1497 Roll Move : 0.00 Pitch:1503 Pitch Move : 0.00


When you move the Roll/Pitch around, the drone status should now changed to.

Drone Status : 4 Flying

The move values of the Pitch and Roll should change between -1.0 and 1

When you only move the Yaw or the Throttle. The status should remain "Hovering"

7.3) Land

When you flick the CH5 to low, the drone status should now changed to "Grounded"

Drone Status : 1 Grounded

8) Setup Ar.Drone to accept WiFi connection from Yellow Jacket

By default Ar.Drone only allow WiFi connection of at least 11M to be established. But the Yellow Jacket can only transmit at 2M. So we need to edit the Wifi configuration of the Drone to accept WiFi connection from YJ. The modification is very minor. You can still connect to the drone from your iPhone/iTouch/iPad and fly as normal.

WARNING Follow the following steps to the letter or you will not be able to connect to your Drone again.

The actual command to be typed is in Red
The output on the screen is in Blue
[Enter] is the [Enter] Key on your laptop
[Space Bar] is the [Space Bar] key on your laptop.
[Esc] is the [Esc] on your laptop.
Do not use cut and paste. Type it in.

8.1) Read the warning above...
8.2) Disconnect the power and USB cable from your YJ and Rx
8.3) Make sure your iPhone/iPod/iPad devices is NOT connected to your drone
8.4) Connect battery to your Drone
8.5) Wait for the lights to go Green
8.6) Press "Un Pair" button at the bottom of your Drone
8.7) The lights should flash
8.8) Connect your labtop to your drone via WiFi. Just browse for your Drone name from your Laptop WiFI manager
8.9) Run "cmd" from your windows and make sure you can ping the drone ip 192.168.1.1.
8.10) Telnet to your drone

telnet 192.168.1.1
[Enter]

You should now be presented with the below



BusyBox v1.14.0 (2010-07-02 15:17:06 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#




8.11) Edit Wifi script

cp /bin/wifi_setup.sh /bin/wifi_setup.sh.ori then press [Enter Key]
vi /bin/wifi_setup.sh then press [Enter Key]

The screen should display something similar to



#!/bin/sh
#
# Script to see if an IP adress is already used or not
#
# Getting SSID from config.ini file.
.
.
.
.
.



Use your Down Arrow key (do not use Page Down) to move to the line that says. (around half a page down)


.
.
.
wmiconfig -i ath0 --setfixrates 3 8 11
.
.
.


Use your Right Arrow key to move the cursor to the number 3
Now type exactly as shown in Red

i
1
[Space Bar]
[Esc]

The line should now displays


.
.
.
wmiconfig -i ath0 --setfixrates 1 3 8 11
.
.
.



Now we need to save the file. Type the following.

: ( Shift and ; )
wq
[Enter]

You should now be return to the command prompt


#


Now make sure the file is saved to flash. Type the following

sync
[Enter]

Wait a minute or so.

Lets make sure the script is still working. Type the following

/bin/wifi_setup.sh
[Enter]

It should now display.



# /bin/wifi_setup.sh
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
sh: 0x0: unknown operand
BMI Write Memory (address: 0x502070, filename: /lib/firmware/AR6002/eeprom.data)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x513950, filename: /lib/firmware/AR6002/eeprom.bin)
bmiloader: ath0: Operation not permitted
BMI Execute (address: 0x913950, param: 0x0)
bmiloader: ath0: Operation not permitted
BMI Set App Start (address: 0x913950)
bmiloader: ath0: Operation not permitted
Updating MAC address
eeprom.AR6002: ath0: Operation not permitted
Failed to load Board Data from file.
/usr/sbin/loadAR6k.sh: line 100: exit_value: not found
BMI Write compressed Memory (address: 0x502070, filename: /lib/firmware/AR6002/athwlan.bin.z77)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x52d6c8, filename: /lib/firmware/AR6002/data.patch.hw2_0.bin)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x500418, value: 0x52d6c8)
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
BMI Done
bmiloader: ath0: Input/output error
argc = 8
wmiconfig:fixRateMask=2
wmiconfig:fixRateMask=10
wmiconfig:fixRateMask=266
wmiconfig:fixRateMask=2314
SSID= drone
Segmentation fault
Creating/Joining Network drone
Error for wireless request "Set Frequency" (8B04) :
too few arguments.
Using address 192.168.1.1
Owner's MAC address is: 00:00:00:00:00:00
Clearing pairing rule

#




If you do not get the display above. Do not unplug your drone. Restore the original file by typing below.

cp /bin/wifi_setup.sh.ori /bin/wifi_setup.sh then press [Enter Key]

Then repeat step 8.11


You can now unplug the Drone battery. The drone is now ready.

9) Config YJ to talk to Ar.Drone

Back to the Arduino IDE. We need to edit the "user_config.h" file. Do not touch the other 2 files.

Click on the "user_config.h" tab and change the following from





#define PRINT_DEBUG 1 // En/Disable debug
#define PRINT_DEBUG2 1 // En/Disable debug
#define WIFI_DISABLE 1 // En/Disable WiFI to test radio



to




#define PRINT_DEBUG 0 // En/Disable debug
#define PRINT_DEBUG2 0 // En/Disable debug
#define WIFI_DISABLE 0 // En/Disable WiFI to test radio




And replace the "drone" with your drone name as seen from your WiFi Manager.


#define DRONE_NAME "drone" // Name of your drone, case sensitive


Save and upload to your YJ.


10) Flight procedure, in the following sequence

First connect to your Drone from an iDevice and start with the following values. These values effect how sensitive your drone is.



10.1) Plug in Ar.Drone battery and wait for all lights to go green. If you have been flying your drone with iDevice, you need to press the "unpair" button before carry on. Or with the latest Ar.Freeflight , press the "unpair" in the config screen.
10.2) Move all stick to mid position and CH5 (Gear) switch to low postion. Switch on your Tx.
10.3) Connect power to your RX
10.4) In a few seconds your YJ should now display a solid Green led. Which means the YJ is now connected to the Drone.
10.5) Flick the CH5 to high, your drone should now take off and hover.
10.6) Flick the CH5 to low, your drone should now land.

For your first flight I suggest you test it in-door over something soft. I do it in the bedroom (the flying I mean :-) ) and over a mattress.

One tip, if your drone hovers and cannot be command to land, just grab the drone firmly and tilt it 90 degrees. The motors will switch off.

And that's it..... enjoy



[29Nov10] - Video with the V2 sketch

Here's a video showing how smooth the V2 sketch fly. Thanks to Brian (buffythesaint) for sharing the video.

RC Parrot AR Drone (8 min 27 sec)
Mheeli is offline Find More Posts by Mheeli
Last edited by Mheeli; Dec 21, 2010 at 07:03 PM. Reason: V2.1 temporary removed due to bug.
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 08, 2010, 10:49 AM
Registered User
Mheeli's Avatar
Bangkok, Thailand
Joined Jul 2002
220 Posts
V2.1 Released

[18Dec10]


What's new with V2.1

- Ar.Drone sensitivity , Throttle, YAW, Roll and Pitch rate can be configured in the "user_config.h" file. iDevice no longer required to configure your Ar.Drone
- YJ will now pair with Ar.Drone to prevent others from connecting to your drone while you're flying
- Motor lights now flash alternately to indicate YJ is connected to Ar.Drone. And ready for take off
- Video downlink via WiFi to iDevice or PC running Ar.Drone Flight Controller software


Hardware

You will need

1.1) Yellow Jacket An Arduino mini clone with WiFi on-board.


1.2) FTDI USB Basic Breakout - 5V Required for downloading the sketch into the Yellow Jacket. Also being sold at Spark Fun


1.3) Receiver. I'm using this one from Hobbycity But I'm sure most receivers will work.



The following TX/RX also tested to be working
- Futaba 9CH with Assan module and X8R7
- Spektrum DX7 and AR6200
- JR790UL spcm Rx (72 Mhz)

1.4) 5V power supply for your Rx. I'm using a small Switching BEC connectted to the balance plug of the Drone LiPo battery. A linear voltage regulator , such as 7805, would be better as it should have low noise.

2) Wiring

We will be using the Digital pins, 3,4,5,6 and 7 on the Yellow jacket to connect to the Signal pin of the Rx. The YJ will get its power from the Rx. Similar to servo getting the power from the Rx.









3) Software

3.1) Arduino IDE. I'm using the 0020 version. This will be used to modify and download the code to the Yellow Jacket.

3.2 The latest sketch. Attached. When unzipped, there should be 3 files under the "RC_AR_Drone_V2_1_YJ" folder. Do not change the folder or the filenames. Arduino IDE requires the filename and folder name to be the same. And do not place this folder inside the Arduino IDE folder.

3.3 Yellow Jacket WiFi driver. Attached. Unzip into the libraries folder of the Arduino IDE folder. You should have something similar to ....\libraries\WiShield

4) Upload Sketch.

4.1) Plug the breakout board to the YJ. Make sure the GND pin on the breakout board and GND pin on the YJ matches.



4.2) Plug a mini USB cable to the breakout board and to a USB port on your computer
4.3) Wait for Windows to detect the new device. It should be detected as a COM port. If required, the driver is located at ...drivers\FTDI USB Drivers under the Arduino IDE folder
4.4) Open the Arduino IDE and load the Sketch RC_AR_Drone_V2_1_YJ.pde
4.5) Under Tools->Serial Port, choose the new COM port that has just been added.
4.6) Under Tools->Board , choose "Arduino Pro or Pro Mini (5V, 16MHz) w/ATmega328"
4.7) Now upload the sketch to YJ
4.8) Once uploaded, open the Serial port monitor under Tools. Set the speed to 38400.
4.9) You should now see some messages complaining about Moving the stick to middle.


5) Radio setup

5.1) With Tx sticks in the middle and your CH5 switch in low position. You should see the "Aux:9xx" value close to the 900 value. If your "Aux" value is near 2000 then you need to reverse your AUX channel


Aux : 950 Throttle : 1477 Yaw : 1503 Roll : 1497 Pitch : 1503 Please move stick to middle positionon...


Adjust your Aux "End point" so that when the switch at low postion the "Aux:value" is about 950
Adjust your Aux "End point" so that when the switch at high postion the "Aux:value" is about 2000


You should now get the following message. (With Aux at low position)

Aux:949 Yaw:1502 Yaw Move : 0.00 Throttle:1476 Throttle Move : 0.00 Roll:1496 Roll Move : 0.00 Pitch:1503 Pitch Move : 0.00 Drone Status : 1 Grounded

6) Verify each radio channel.

6.1) CH5: (Aux)

With CH5 switch at low position (land) the value should be around 9xx

Aux:949

With CH5 switch at high postion (take off and fly) the value should be around 2xxx

Aux:2050

Adjust your "end points" accordingly so that the values are close to 950 (low position) and 2000 (high position)

6.2) Throttle:

With Throttle stick at low position, the value should be around 10xx. And the "Throttle move" value should be negative around -1.0. If the value is positive, you will need to reverse the Throttle channel.

Throttle:1090 Throttle Move : -0.90

Adjust your "End point" so that the value of the "Throttle Move" is just under -1.0. -0.9 will do.

With Throttle stick at high position, the value should be around 19xx. And the "Throttle move" value should be positive around 1.0.

Throttle:1909 Throttle Move : 0.9

Adjust your "End point" so that the value of the "Throttle Move" is just under 1.0. 0.9 will do.


6.3) Yaw:

With Yaw stick at right most position, the value should be around 19xx. And the "Yaw move" value should be positive around 1.0 If the value is negative, you will need to reverse the Yaw channel.

Yaw:1910 Yaw Move : 0.9

Adjust your "End point" so that the value of the "Yaw Move" is just under 1.0. 0.9 will do.


With Yaw stick at left most position, the value should be around 10xx. And the "Yaw move" value should be negative around -1.0

Yaw:1090 Yaw Move : -0.9

Adjust your "End point" so that the value of the "Yaw Move" is just under -1.0. -0.9 will do.

6.4) Pitch:

With Pitch stick at low position, the value should be around 19xx. And the "Pitch move" value should be positive around 1.0 If the value is negative, you will need to reverse the Pitch channel.

Pitch:1909 Pitch Move : 0.9

Adjust your "End point" so that the value of the "Pitch Move" is just under 1.0. 0.9 will do.


With Pitch stick at high position, the value should be around 10xx. And the "Pitch move" value should be negative around -1.0

Pitch:1091 Pitch Move : -0.9

Adjust your "End point" so that the value of the "Pitch Move" is just under -1.0. -0.9 will do.

6.5) Roll:

With Roll stick at right most position, the value should be around 19xx. And the "Roll move" value should be positive around 1.0 If the value is negative, you will need to reverse the Roll channel.

Roll:1912 Roll Move : 0.9

Adjust your "End point" so that the value of the "Roll Move" is just under 1.0. 0.9 will do.

With Roll stick at left most position, the value should be around 10xx. And the "Roll move" value should be negative around -1.0

Roll:1090 Roll Move : -0.9

Adjust your "End point" so that the value of the "Roll Move" is just under -1.0. -0.9 will do.

7) Verify stick actions

7.1) On the ground (not armed)
With CH5 in low (land) position you should get the below.

Drone Status : 1 Grounded

If you move any of the sticks , the Drone status should remain "Grounded"

7.2) Take off and fly (armed)
With CH5 flicked to high position. You should see the following sequence of drone status

Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 1 Grounded
Drone Status : 7 Resetting watchdog
Drone Status : 7 Resetting watchdog
Drone Status : 7 Resetting watchdog
Drone Status : 6 Flat triming
Drone Status : 6 Flat triming
Drone Status : 6 Flat triming
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 2 Taking off
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering
Drone Status : 3 Hovering


All the "move" values should be zero during Hovering status.

Yaw:1502 Yaw Move : 0.00 Throttle:1498 Throttle Move : 0.00 Roll:1497 Roll Move : 0.00 Pitch:1503 Pitch Move : 0.00


When you move the Roll/Pitch around, the drone status should now changed to.

Drone Status : 4 Flying

The move values of the Pitch and Roll should change between -1.0 and 1

When you only move the Yaw or the Throttle. The status should remain "Hovering"

7.3) Land

When you flick the CH5 to low, the drone status should now changed to "Grounded"

Drone Status : 1 Grounded

8) Setup Ar.Drone to accept WiFi connection from Yellow Jacket

By default Ar.Drone only allow WiFi connection of at least 11M to be established. But the Yellow Jacket can only transmit at 2M. So we need to edit the Wifi configuration of the Drone to accept WiFi connection from YJ. The modification is very minor. You can still connect to the drone from your iPhone/iTouch/iPad and fly as normal.

WARNING Follow the following steps to the letter or you will not be able to connect to your Drone again.

The actual command to be typed is in Red
The output on the screen is in Blue
[Enter] is the [Enter] Key on your laptop
[Space Bar] is the [Space Bar] key on your laptop.
[Esc] is the [Esc] on your laptop.
Do not use cut and paste. Type it in.

8.1) Read the warning above...
8.2) Disconnect the power and USB cable from your YJ and Rx
8.3) Make sure your iPhone/iPod/iPad devices is NOT connected to your drone
8.4) Connect battery to your Drone
8.5) Wait for the lights to go Green
8.6) Press "Un Pair" button at the bottom of your Drone
8.7) The lights should flash
8.8) Connect your labtop to your drone via WiFi. Just browse for your Drone name from your Laptop WiFI manager
8.9) Run "cmd" from your windows and make sure you can ping the drone ip 192.168.1.1.
8.10) Telnet to your drone

telnet 192.168.1.1
[Enter]

You should now be presented with the below



BusyBox v1.14.0 (2010-07-02 15:17:06 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#




8.11) Edit Wifi script

cp /bin/wifi_setup.sh /bin/wifi_setup.sh.ori then press [Enter Key]
vi /bin/wifi_setup.sh then press [Enter Key]

The screen should display something similar to



#!/bin/sh
#
# Script to see if an IP adress is already used or not
#
# Getting SSID from config.ini file.
.
.
.
.
.



Use your Down Arrow key (do not use Page Down) to move to the line that says. (around half a page down)


.
.
.
wmiconfig -i ath0 --setfixrates 3 8 11
.
.
.


Use your Right Arrow key to move the cursor to the number 3
Now type exactly as shown in Red

i
1
[Space Bar]
[Esc]

The line should now displays


.
.
.
wmiconfig -i ath0 --setfixrates 1 3 8 11
.
.
.



Now we need to save the file. Type the following.

: ( Shift and ; )
wq
[Enter]

You should now be return to the command prompt


#


Now make sure the file is saved to flash. Type the following

sync
[Enter]

Wait a minute or so.

Lets make sure the script is still working. Type the following

/bin/wifi_setup.sh
[Enter]

It should now display something similar to.



# /bin/wifi_setup.sh
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
sh: 0x0: unknown operand
BMI Write Memory (address: 0x502070, filename: /lib/firmware/AR6002/eeprom.data)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x513950, filename: /lib/firmware/AR6002/eeprom.bin)
bmiloader: ath0: Operation not permitted
BMI Execute (address: 0x913950, param: 0x0)
bmiloader: ath0: Operation not permitted
BMI Set App Start (address: 0x913950)
bmiloader: ath0: Operation not permitted
Updating MAC address
eeprom.AR6002: ath0: Operation not permitted
Failed to load Board Data from file.
/usr/sbin/loadAR6k.sh: line 100: exit_value: not found
BMI Write compressed Memory (address: 0x502070, filename: /lib/firmware/AR6002/athwlan.bin.z77)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x52d6c8, filename: /lib/firmware/AR6002/data.patch.hw2_0.bin)
bmiloader: ath0: Operation not permitted
BMI Write Memory (address: 0x500418, value: 0x52d6c8)
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
bmiloader: ath0: Operation not permitted
BMI Done
bmiloader: ath0: Input/output error
argc = 8
wmiconfig:fixRateMask=2
wmiconfig:fixRateMask=10
wmiconfig:fixRateMask=266
wmiconfig:fixRateMask=2314
SSID= drone
Segmentation fault
Creating/Joining Network drone
Error for wireless request "Set Frequency" (8B04) :
too few arguments.
Using address 192.168.1.1
Owner's MAC address is: 00:00:00:00:00:00
Clearing pairing rule

#




If you do not get the display above. Do not unplug your drone. Restore the original file by typing below.

cp /bin/wifi_setup.sh.ori /bin/wifi_setup.sh then press [Enter Key]

Then repeat step 8.11


You can now unplug the Drone battery. The drone is now ready.

9) Config YJ to talk to Ar.Drone

Back to the Arduino IDE. We need to edit the "user_config.h" file. Do not touch the other 2 files.

Click on the "user_config.h" tab and change the following from





#define PRINT_DEBUG 1 // En/Disable debug
#define WIFI_DISABLE 1 // En/Disable WiFI to test radio



to




#define PRINT_DEBUG 0 // En/Disable debug
#define WIFI_DISABLE 0 // En/Disable WiFI to test radio




And replace the "drone" with your drone name as seen from your WiFi Manager.


#define DRONE_NAME "drone" // Name of your drone, case sensitive


Save and upload to your YJ.


10) Flight procedure, in the following sequence


10.1) Plug in Ar.Drone battery and wait for all lights to go green. If you have been flying your drone with iDevice, you need to press the "unpair" button at the bottom of the drone before carry on. Or with the latest Ar.Freeflight , press the "unpair" in the config screen.
10.2) Move all stick to mid position and CH5 (Aux) switch to low postion. Switch on your Tx.
10.3) Connect power to your RX
10.4) In a few seconds your YJ should now display a solid Green led. And the Motor LEDs should flash alternately. Which means the YJ is now connected to the Drone.
10.5) Flick the CH5 to high, your drone should now take off and hover.
10.6) Flick the CH5 to low, your drone should now land.

Video showing the "Take Off" procedure

RC Controlled Parrot Ar.Drone - Take off procedure (2 min 18 sec)


For your first flight I suggest you test it in-door over something soft. I do it in the bedroom (the flying I mean :-) ) and over a mattress.

One tip, if your drone hovers and cannot be command to land, just grab the drone firmly and tilt it 90 degrees. The motors will switch off.

11) Flight procedure with Video downlink, in the following sequence

- Power your drone and wait for the green lights. Do not power your YJ
- Push the un-pair button at the bottom of the drone. The green lights should flash
- Connect your iDevice to your drone
- In configuration page of the Freeflight, make sure the "pairing" is off
- exit the configuration page
- you should now see the video as per normal
- now power your YJ
- once YJ booted, the green lights should now stop flashing. The motors LEDs should now flash alternately.
- your drone is now ready for flight
- Note: do not touch any control on your iDevice while flying your drone from an RC Tx

Video showing the "Take Off" procedure with Video downlink

R/C Controlled Parrot Ar.Drone with Video downlink (3 min 39 sec)



You will need to follow the above sequence everytime you want to fly with the video downlink. Also, you will now need to push "unpair" button at the bottom of the drone if you want to fly your drone with iDevice.
Mheeli is offline Find More Posts by Mheeli
Last edited by Mheeli; Dec 17, 2010 at 11:44 PM.
Reply With Quote
Old Nov 08, 2010, 11:00 AM
Tri-Quad-Hexa-Octo-copters!!
United States, TX, San Antonio
Joined Feb 2007
14,465 Posts
Nice work! That certainly makes the ARDrone a bit more interesting to me...
Cheers,
Jim
Quadrocopter and Tricopter Mega Link Index
jesolins is offline Find More Posts by jesolins
Reply With Quote
Old Nov 08, 2010, 11:36 AM
Registered User
PeteSchug's Avatar
Elmhurst, NY (Queens in NYC)
Joined Apr 2004
7,038 Posts
Quote:
Originally Posted by Mheeli View Post
Here's a very initial test flight of the Ar.Drone controlled from an RC radio. Arduino UNO and WiShield is used to interface the RX to the Drone.

If you do not mind the weight of the Arduino and RX, you can put them on the Drone and break free from the WIFI range limitation.

I flew around for a bit, it's certainly a lot more fun than using the iPod Touch to control it.

Still need a bit more work to make it smooth.

Next, need to get a GPS module to make this thing UAV

http://www.youtube.com/watch?v=HQkjAxYOUqY
Nice Work!

Can you post a detailed description of how to do this for those of us who are not that familiar with the gear you are writing about.

I love the concept of flying with my iPod, but the execution is a little shaky at times and I've got lots of RC tx's to choose from.

What about the video from the on board cameras? Can you still capture it or are we going to wind up sticking Hero GoPros on as well?

Pete
PeteSchug is offline Find More Posts by PeteSchug
Reply With Quote
Old Nov 08, 2010, 12:02 PM
Z06 Tony's Avatar
United States, NY, Rochester
Joined Sep 2008
7,052 Posts
Quote:
Originally Posted by Mheeli View Post
Here's a very initial test flight of the Ar.Drone controlled from an RC radio. Arduino UNO and WiShield is used to interface the RX to the Drone.

If you do not mind the weight of the Arduino and RX, you can put them on the Drone and break free from the WIFI range limitation.

I flew around for a bit, it's certainly a lot more fun than using the iPod Touch to control it.

Still need a bit more work to make it smooth.

Next, need to get a GPS module to make this thing UAV

http://www.youtube.com/watch?v=HQkjAxYOUqY
You are "The Man". I have been waiting sooo long for this mod. Thanks again for the vid and taking the time to show us. Cant wait to get a detailed description on how to do the mod.
Z06 Tony is online now Find More Posts by Z06 Tony
Site Sponsor
Old Nov 08, 2010, 01:13 PM
Registered User
Clearwater, FLorida !
Joined Sep 2009
2,270 Posts
Wow. Great work!

Yes please ! please !

A parts list and diagrams would be awesome if possible.

The software feels like it would be the hardest part for us non programmers.

The is unreal if you can get it ironed out and share with us.

Thanks you .
witespy is offline Find More Posts by witespy
Reply With Quote
Old Nov 08, 2010, 03:28 PM
Redfox74
Joined Apr 2009
256 Posts
So I think that he are using a wifi protocol interfaced using PPM econder on arduino.
Change the PPM encode input 1000-2000 to wifi controll protocol ..
It's correct ? But you put an arduino with the wifi shield onboard of Ar.Drone ?
Regards
Roberto
redfox74 is offline Find More Posts by redfox74
Reply With Quote
Old Nov 08, 2010, 04:09 PM
Registered User
Joined Feb 2005
2,493 Posts
Great work!! Your way ahead of Parrot. I'm sure there will be lots of chatter on this. Parts are easily available too.
Buffythesaint is offline Find More Posts by Buffythesaint
Last edited by Buffythesaint; Nov 08, 2010 at 04:22 PM.
Reply With Quote
Old Nov 08, 2010, 04:24 PM
http://drone-pilot.blogspot.fr
lovegroove's Avatar
Rhone Alps, France
Joined Aug 2008
2,540 Posts
Wow, can't believe how stable that thing is. I've seen some of the really expensive multicopters that have height and position hold and they all seem to drift a bit, but that thing really does just stay where you put it. Next step has to be to use the ARdrone control board on a decent size quad.
lovegroove is offline Find More Posts by lovegroove
Reply With Quote
Old Nov 08, 2010, 04:42 PM
Registered User
Joined Feb 2005
2,493 Posts
Get rid of the hulls and make a tray for the gear and make it full range. What is the estimated weight of the gear to make it full range? I'm sure it's not that much and won't be hard for the Drone to handle.
Buffythesaint is offline Find More Posts by Buffythesaint
Reply With Quote
Old Nov 08, 2010, 04:47 PM
Registered User
Mheeli's Avatar
Bangkok, Thailand
Joined Jul 2002
220 Posts
Quote:
Originally Posted by lovegroove View Post
Wow, can't believe how stable that thing is. I've seen some of the really expensive multicopters that have height and position hold and they all seem to drift a bit, but that thing really does just stay where you put it. Next step has to be to use the ARdrone control board on a decent size quad.
That's on my list

I have a logic analyzer on the way to decode how the control board talks to the motor. Hopefully we can use Arduino as a translator and put bigger motors on the Drone. I also have Gaui 330x eagerly waiting to donate it's parts.

Ar.Drone is very stable at around 5 meters. I have not done much flying at higher heights due to it's WiFi range limitation. I like to fly low anyway.
Mheeli is offline Find More Posts by Mheeli
Reply With Quote
Old Nov 08, 2010, 04:50 PM
Tri-Quad-Hexa-Octo-copters!!
United States, TX, San Antonio
Joined Feb 2007
14,465 Posts
What is the position hold altitude limit on the ARDrone? About 10ft?? Will it hold over all surfaces?
Cheers,
Jim
Quote:
Originally Posted by lovegroove View Post
Wow, can't believe how stable that thing is. I've seen some of the really expensive multicopters that have height and position hold and they all seem to drift a bit, but that thing really does just stay where you put it. Next step has to be to use the ARdrone control board on a decent size quad.
jesolins is offline Find More Posts by jesolins
Reply With Quote
Old Nov 08, 2010, 04:54 PM
Registered User
Mheeli's Avatar
Bangkok, Thailand
Joined Jul 2002
220 Posts
Quote:
Originally Posted by Buffythesaint View Post
Get rid of the hulls and make a tray for the gear and make it full range. What is the estimated weight of the gear to make it full range? I'm sure it's not that much and won't be hard for the Drone to handle.
The weight of the Assan Rx, Arduino Uno and Wishield totals to 68g. The Arduino can be powered by the existing onboard battery.

We can save more weight if we could use an Arduino with Wi-Fi shield like http://asynclabs.com/store?page=shop...category_id=11

Unfortunately it's out of stock , so I could not try.
Mheeli is offline Find More Posts by Mheeli
Reply With Quote
Old Nov 08, 2010, 05:05 PM
Registered User
Joined Feb 2005
2,493 Posts
Found the Arduino uno at sparkfun.

http://www.sparkfun.com/commerce/pro...oducts_id=9950
Buffythesaint is offline Find More Posts by Buffythesaint
Reply With Quote
Old Nov 08, 2010, 05:06 PM
Z06 Tony's Avatar
United States, NY, Rochester
Joined Sep 2008
7,052 Posts
Quote:
Originally Posted by jesolins View Post
What is the position hold altitude limit on the ARDrone? About 10ft?? Will it hold over all surfaces?
Cheers,
Jim
I have flown mine 20 ft high and over all surfaces that I can think of except water. If you fly over a small bush or parked car or whatever it wuill raise the same height over that as the ground. So if someone flew over a rooftop it would raise super high but there is an altitude limit setting. Not sure if you would lose that feature with this super sweet setup.
Z06 Tony is online now Find More Posts by Z06 Tony
Site Sponsor
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Parrot AR.Drone range extension, need help from antenna gurus. g00bd0g FPV Talk 4 Jan 21, 2011 01:29 PM
Wanted Parrot ar drone ROCKY2 Aircraft - Electric - Helis (FS/W) 23 Nov 07, 2010 09:08 AM
Discussion Who’ s the Russian model in AR.DRONE vid? Naev Electric Heli Talk 8 Oct 12, 2010 02:32 PM
Discussion AR.Drone to carry camera gunnar-rc Aerial Photography 2 Sep 07, 2010 09:52 AM
Discussion Unboxing and First Impressions With the Parrot AR.Drone nikotttin Multirotor Talk 0 Aug 31, 2010 04:50 AM