Ground Unit

In addition to the device attached to the drone, there is a device on the ground that relays GPS data to the drone. The device on the ground serves as the object being tracked by the drone, providing information to where the drone should move.  The drone will follow the ground device by interpreting the data and determining which movements are necessary to follow the ground unit.

The ground unit is made of an Arduino UNO, a GPS sensor, and an Xbee module. The data will be periodically broadcast by the ground unit. The data will be the GPS sensor data, and it will be received by the device on the drone. The Xbee sensor has a range of about three hundred feet. The ground unit must be able to have a clear line of sight of the drone because the Xbee stops receiving data when there isn’t a clear line of sight too the transmitting device.

 

 

-Renner

Posted in Uncategorized | Leave a comment

The New System

With Dirk Herrendoerfer’s code found, we had to redo the hardware setup to allow us to use it. The most difficult part was hard-wiring the arduino into the drone. We followed the instructions of a very common ARDrone mod called MiruMod which allows the use of an Arduino and radio controller. Obviously, we just ignored the radio controller part. The instructions can be found here.

As per this diagram, we connected the serial pins (TX and RX) on the Arduino board (we used the Arduino Uno, not the Nano) to the serial pins on the drone through a voltage level converter since the board is in 5V and the drone is in 3.3V. Naturally connecting to this serial port voids the drone warranty. The drone powers the Arduino via its 12V output in the board connector. Right now the board is connected purely by loose wires, but we will make a solid board once we get everything working.

With the board connected, we then must load a control application onto the drone that will receive the commands we send from the Arduino and parse them as flight instructions for the drone. This is done by a software called ARPilot, which is loaded onto the drone by the Arduino board each time the drone starts up, and is deleted every reset, allowing us to control the drone without doing surgery on its file system. The software is loaded from a USB Flash Drive connected to the Arduino.

Once we get the ARPilot control application working, we will be able to send over custom flight commands from the Arduino.

Posted in Uncategorized | Leave a comment

Frying Things

Yesterday, we were finally able to break our drone. However, it was not in the way we thought it would happen. Instead of it breaking in two by crashing into something, we fried the main board by accidentally turning on the drone while two wires were touching that shouldn’t have been. The wires were loose because we unplugged the Arduino from the drone. Now the drone’s lights will blink red once and then turn off. We have tried unplugging everything and pressing the reset button, but nothing has worked.

To fix the drone, we have ordered a new main board and hope that it will work if we just replace it. In the future, we have to be extra careful when there are loose wires. Before turning anything on, we must make sure that everything is in its right spot and nothing will damage the hardware. Also, eggers needs to stop frying things.

-Michael

Posted in Uncategorized | Leave a comment

Iphone App

Due to problems with the PcDuino, we started to explore alternate approaches to the project. One of which was to use the AR drone sdk with either android or iphone. Because two of our member already had iphones, we decided to go with the iphone application option for the drone control. We planned to make an app which would control the drone over wifi. We could use the phone’s cellular connection to communicate between the two phones, one of which would serve as the device being tracked by the drone.

 

The problems started with the compiler. The open source app provided by the AR Drone sdk was built on an older compiler which the current version of Xcode did not support. Rather than rewrite the app, we decided to abandon this approach because we were already running out of time.

-Renner

Posted in Uncategorized | Leave a comment

Scrapping it all and Starting Over

While writing my computer science end-of-quarter evaluation late on a Sunday night, I had a bit of a revelation. Inspired by sleep deprivation and delirium, I thought, “Since the PCDuino thing isn’t working, why don’t we just try something totally different?”

I proposed the idea of instead using a normal Arduino board, which wouldn’t have any software compatibility issues since we would be writing all the code on the official Arduino IDE on our own computers. We would either hard wire the board into the drone or connect using WiFi via the WiFi Shield made by Arduino. It would also be able to easily connect to the GPS sensor and retrieve data, since the sensor was built with Arduino in mind. The only difficult part would be finding a software library to communicate with the drone, or to build our own.

After researching the idea further, I found a few Arduino libraries for AR.Drones, but most were outdated and designed around the AR.Drone V1, not the V2 that we have. Then, with a YouTube search, I found our savior, Dirk Herrendoerfer. The German YouTuber has videos showing testing of his system which navigates an AR.Drone V2 to preset GPS waypoints using an Arduino hard wired into the drone and a GPS sensor very similar to ours. In addition, he has uploaded his code to GitHub for anyone to use.

We purchased an Arduino Uno board, and I downloaded the code and began looking through it. Though I still haven’t figured out exactly how it works and how the different files interact, I found the section that handles GPS input and slightly modified it to work with our module (I changed the baud rate that it was reading at and I changed the input pin). I also added a line that printed GPS coordinates over the board’s Serial communications, meaning that it would get sent to the computer for me to read.

I compiled and uploaded the code to the Arduino board with no problems, connected the GPS sensor, and went outside. The computer began showing empty GPS coordinates, which meant that the sensor was working and communicating with the Arduino succesfully, but it hadn’t acquired a satellite lock. Finally, the sensor locked on, and the Serial monitor on my computer began printing out flight commands for the drone. This was because the code talks to the drone over Serial communications, but the computer was reading them since it was connected by USB to the board.

So already, we’re way further than we ever were with the PCDuino, and once we get the hardware needed to connect the Arduino to the drone, we can begin testing Dirk’s flying code. Of course, his code isn’t exactly what we want, so we will likely be using it as a model or template to create our own.

The other important part is the tracking beacon, which will consist of another Arduino with a GPS sensor, and an XBee RF module that will communicate with an identical module on the drone’s Arduino.

It feels a bit wasteful to be completely starting over and buying a whole new set of electronics, but it feels great to finally be making progress once again.

-Alexander

Posted in Uncategorized | Leave a comment

Outdoor Flight

For the first time, we tested the flying ability of the drone outside in strong winds. It was able to fly well when the wind died down a little, but it struggled when the wind picked up. When we just had the drone hover, it was able to maintain its position by tilting into the wind. As we flew it into the wind, it would fly well until we told it to stop. It would not correct for the wind and would sometimes fly back a little ways until it regained control.

At one point, we tried to fly it into the 20+ mph wind and it was unable to move forward. It then turned suddenly and crashed into the fine arts building on campus. Once it slid off the roof and landed gracefully on the concrete, we discovered that it was just fine, but decided that was enough testing for the day. From now on, we will only fly it outside in calm winds to be safe.

-Michael

Posted in Uncategorized | Leave a comment

GCER

One of our requirements for this project was to write and present a paper at the Global Conference of Educational Robotics (GCER). The paper will be presented in front of other teachers, and other students interested in robotics. We will cover planning and  preparation for the project, as well as problems that we encountered and how we solved them. The presentation will also include our thoughts and suggestions for people who are intending to do a project similar to ours so that they may also learn from our mistakes. In addition to the problems which we encountered, we will talk about how we organized our team as well documentation tools such as our blog.

-Renner

Posted in Uncategorized | Leave a comment

Testing Android

With all of the problems that Alexander is having with the PCDuino, Renner and I have decided to research other ways that we could go about controlling the drone. I found this software, EZ-Robot, which has the ability to use the drone’s camera to track colored objects. However, we discovered that the software is not completely compatible with the V2 drone that we have. We were able to control the drone using the software, but it can’t fly autonomously because we can’t access the camera.

With this in mind, we are looking into whether or not we can use an Android phone running this software to control the drone. Renner set up Eclipse on his computer with an Android SDK. With that we can now start developing for Android and see just how much we can do with a phone.

Using a phone has a lot of potential advantages that the PCDuino doesn’t have. It can use cellular data, which gets rid of the limited range problem, and also has a built in GPS. Hopefully, we can get it to work the way we want it to.

-Michael

Posted in Uncategorized | Leave a comment

Node Problems

As we began re-installing libraries on our pcDuinos after frying them, we ran into some issues getting node.js and necarry node modules installed. As you may recall, node.js is the JavaScript runtime environment we are using, primarily because there is a node library that allows us to communicate with the ARDrone.

As we were installing node, we realized that there is a node library taht allows us to communicate with devices plugged into a serial port, which would allow us to get GPS coordinates without having to juggle information between multiple languages. While installing this library, called serialport, we got an error saying that it doesn’t support “pre” versions of node.

We checked our node.js version and discovered that it is v 0.11.11-pre, a pre-release version, meaning that it is unstable and not fully compatible with all software libraries. We tried multiple times to update and reinstall node, but even when we used the newer v0.10.24, it stayed on 0.11.11-pre. We also kept running out of space on the device and had to delete a lot of files to make room. Finally, we discovered a way to fully wipe node, and we created a backup of a system without any traces of node to allow us to try different installation methods.

-Alexander

Posted in Uncategorized | 1 Comment

GPS Navigation Algorithm

Once we get the drone parsing out GPS data and receiving data from an external sensor, we will have to create code to turn the data into usable flight commands. Assuming that beaconN and beaconW are the North and West coordinates of the GPS beacon, and droneN and droneW are the North and West coordinates of the drone (we probably won’t be using this outside of the US, much less the Northwestern Hemisphere), and droneHeading is the drone’s direction, the following is pseudocode for drone navigation.

  • //orient towards beacon
  • while droneHeading does not roughly equal to atan[(beaconW-droneW)/(beaconN-droneN)], turn toward correct heading
  • //approach correct following distance, fDist– achieved by setting forward speed relative to distance between beacon and drone by multiplying difference by a constant, k
  • forwardSpeed= ([sqrt[(beaconW-droneW)^2 + (beaconN-droneN)^2] – fDist)*k] + beaconSpeed)     or     maxSpeed, whichever is less

Obviously, we will have to do some testing and calculations to figure out ideal distance based on lat/long distances. Also, we will have to create an algorithm, most likely on the beacon where processing power is much more available, which will calculate and send over its current speed to allow the drone to follow accurately.

-Alexander

Posted in Uncategorized | Leave a comment