Monday, October 28, 2013

Building and flying an incredibly tiny quadrotor drone

At the National Science Foundation grant where I work, EnLiST, we've been tinkering with various different drone platforms which could be easily deployed in classrooms for valuable STEM (Science Technology Engineering and Mathematics) lessons.

Although we're focused on STEM education, it's not hard to see how some of these drones can be used in a variety of other fields. The quadrotors we develop one day could be deployed for research in environmental science, geology, city planning, and even "evidence-based" journalism.

Drones are useful like that. At the end of they day, they're simply a means of getting a sensor from one place to another. What you use that sensor for, is entirely up to the teacher, scientist, or journalist.

We needed a drone that was small enough to fly in a classroom, easy enough for children to fly (not saying much as kids tend to pilot drones with relative ease), and hackable enough that we could mold it to fit our science curriculum.

Enter the Crazyflie nano, a tiny, open-source drone developed by Swedish hackers at At 19 grams, and measuring 9 cm from motor to motor, it's one of the smallest quadrotor drones on the market today.

Operation is fairly straightforward. The Crazyflie uses a 2.4 Ghz "Crazradio," which is plugged into a computer USB port for communication. Control is provided via USB game pad (not included), with the Xbox and Playstation-type controllers having preference by the development community.

Bitcraze has published a client for the Crazyflie, available here.


Assembly is required. Most of the assembly is straightforward: pop the clear plastic motor adapters on the Crazyflie, twist the motor leads, install the motors. But things get tricky when trying to solder the tiny motor wires onto the circuit board.

Bitcraze's assembly instructions suggest threading the bare wire through the holes and then soldering them. I had better luck with applying solder to the backside of the soldering pads (the opposite side of where the micro USB is mounted), and with tweezers in one hand and a soldering iron in the other, re-heating the solder and pushing the wire through at the same time.

Tweezers, a stand with grippers, and a soldering iron with a fine point is highly recommended.

Flying the Crazyflie

You won't need much room to fly a Crazyflie, once you are experienced. A 2 m x 2 m area is really all that you need, although more space lets you practice more acrobatics.

There are quadrotors on the market that are a little larger and offer more stability, but the Crazyflie is fairly predictable and can be mastered with a bit of practice. This device is in continual development, and new releases could provide more stability.

If the Crazyflie continues to be a challenge, try adjusting the max and min thrust values in the Crazyflie client (75% and 35% are a good alternatives to the stock values). This will keep the speed of your motors in a smaller band, which can reduce jerky, twitchy behavior.

If things do go south (and they likely will for the first 2-5 flights), the Crazyflie is quite robust. It doesn't really have enough weight to put tremendous stress on the motor arms, and I don't think a person is likely to break anything unless they fly this quadrotor at the limits of speed and altitude.

Having said that, I suggest flying over carpeted surfaces whenever possible.

Hacks, mods, and nano FPV

You don't buy a Crazyflie for stability, though. You buy this flying circuit board because it is controlled through the Python programming language. In other words, it's built to be hacked.

What machinations have the masterminds of the Crazyflie developer community come up with? For one, they've hacked a system using the Xbox Kinect to hold the position of the Crazyflie in space.

What's better than a nano drone with four rotors? A nano drone with eight motors. Hackers also have experimented with turning this tiny quadrotor into an X8 multicopter, which would increase the payload capacity for sensors or video equipment.

The factory spec Crazyflie is claimed to lift 5 - 10 grams of payload, with a penalty in the form of reduced flight time (down to 3-4 minutes from 7-10 minutes). It's claimed this tiny X8 copter can lift 5 extra grams (50% increase) with similar flight time.

X8s suffer from a 10% efficiency penalty compared to their quadrotored brethren. But the extra stability granted through eight spinning propellers can trump the reduced flight time in applications where steady shots are valued over endurance.

As I've written, this device is in constant development, so new features and improvements pop up from time to time. One of the most recent firmware revisions makes use of the Crazyflie's embedded barometric pressure sensor to hold altitude with the press of a button.

We know these can be powerful tools for STEM education. But how could researchers use them? Perhaps they could map the interior of buildings to find chemical leaks and injured people.

And what about journalists? Perhaps they could use nano drones like the researchers, but with a mind to informing the public.

Whichever application is chosen, a smaller drone ultimately is a safer drone.