Linux Format

Interview

The original version actually had the motors glued onto the circuit board itself! The Crazyflie team discuss open source nanocopter­s

-

Do you like the idea of an open source developmen­t platform that flies? Tobias Antonsson, Marcus Eliasson and Arnaud Taffanel do, and they've been perfecting the formula since 2009. After scoring a hit with their first palm-sized nano quadcopter, the trio – collective­ly known as Bitcraze – left their day jobs to develop the 92x92x29mm Crazyflie 2.0 full time. We caught up with them to see why we should give a flying FLOSS about their $180 device.

Linux Format: Where did the idea of making a tiny open source quadcopter come from?

Tobias Antonsson: Really boring day jobs [laughs]. We were all working as consultant­s and we happened to be employed by the same customer at the time. The company we were working for had a system in place where you could pitch a project idea and they would help you by sponsoring it. They would buy hardware, that kind of thing. Unlike most set-ups where any ideas you have automatica­lly become the property of the employer, with this system you were able to keep the intellectu­al property. We started our first design towards the end of 2009 by doing the developmen­t in the evenings and we got our first prototype off the ground within six months.

Marcus Eliasson: This was right back at the start of the quadcopter era. At that time there were no small quadcopter­s. To start with we actually planned just to build a normal-sized model, because we wanted to try out the technology. But we ultimately decided to try and do something that nobody had done before, so we decided to make it as small as we possibly could and Crazyflie 1.0 was born.

Arnaud Taffanel: All our expertise is in the field of electronic­s, so we tried to make it as simple as possible. The original version had the motors glued onto the PCB itself – we've basically been trying to make a PCB fly.

LXF: Having the PCB act as the chassis for the quadcopter – motor arms and all – is a really clever design. What challenges were involved in getting it off the ground?

TA: In hindsight, I think one of the things that slowed us down with the original Crazyflie was that it was designed and built before 3D printers

were widely available. Since we were having to do things like glueing the motors to the PCB itself, every time it crashed we had to replace and re-glue the motors. Debugging in those conditions isn't easy. In the very beginning, Crazyflie didn't fly very well at all, so it took forever to find simple bugs because it would crash, then you would have to spend ages repairing it and then it would just crash again. It took a while, but we eventually settled on a technique that worked: we glued on a drinking straw so we could keep [the device] in the air long enough to spot the bugs. LXF: If building one of the first nano quadcopter­s wasn't hard enough, you wanted to do it entirely with open source tools. Why was that so important to you? TA: I think part of us just wanted to see if it was possible to make an advanced device like this using only open source tools. When we started in 2009 the applicatio­ns that we used to create the circuit board diagrams, like KiCad ( www. kicad-pcb.org) were nowhere near as well developed as they are now. There was definitely some struggling involved as we worked around bugs and so on. ME: We've always been fans of open source [so] ultimately, the goal was to create an open source project. Since it's also an open source developmen­t platform, it's really important that our users have access to the same tools that we used to create it. If we used proprietar­y tools to design it, there's nothing to say that everyone in the community would have access to them. Using software like KiCad means that everyone that wants to can look at and play with our design files. AT: It also allowed us to make a virtual machine of our entire developmen­t environmen­t. Embedded system developmen­t can be really complicate­d at the best of times: you have to install all the tools, the compilers and the cross compilers. With everything being open source we were able to make an Ubuntu virtual machine with all the developmen­t tools and the Crazyflie software pre-installed. It's quick and easy to download and use on just about any computer too: something that would be completely impossible with a proprietar­y toolset. LXF: You're currently in the process of releasing the second iteration of your quadcopter. Is 2.0 all about fixing faults with the original design, or have you built it with specific new features in mind? TA: Some parts of the new model are about correcting things from the original design, but we've mainly tried to create a more versatile flying platform that can handle a lot of different use cases. There's growing interest in developing drones and what they'll be able to do in the future, so all-round versatilit­y has been really important to us. ME: One of the first things we wanted to do was add an expansion port. All of the unused capability of the processor on the original Crazyflie was routed to an expansion port and we told people to attach whatever they wanted. Our users added lots of things like new devices and sensors, but it was really hard. You had to solder [the hardware] and make the drivers yourself – it wasn't an easy process.

With Crazyflie 2.0 we've made a much better expansion port – much more plug-andplay. We're planning to sell expansion boards too, the idea being that users can expand the capabiliti­es of their platform really easily, just by clipping them in. Users can also make their own expansion boards and we're trying to lower the barrier to entry by making them easy to develop.

ON Crazyflie 1.0 “The original version actually had the motors glued onto the PCB itself.”

LXF: The Crazyflie 2.0 fits in the palm of your hand. How much weight can it carry before it falls out of the sky? TA: One of the areas of improvemen­t in Crazyflie 2.0 is that it can carry much more weight. We went from 5 grams from the original model to 15 grams for 2.0. It's not a huge amount, but more than enough to carry a small

camera or a GPS device. We've got bigger motors and a bigger battery to thank for that, which means better flight performanc­e too.

LXF: What other new features does Crazyflie 2.0 have?

ME: We've added a sleep mode meaning the new model can stay asleep for up to a year before the battery drains. While that's probably of little interest to people who just want to use the Crazyflie as a toy, you could spread lots of quadcopter­s around an area and have them wake up at different intervals to carry out various tasks. We've tried to pack as much functional­ity into the hardware as possible, so there's plenty of scope for innovation.

ME: We’ve also got [support for] Bluetooth low energy. With Bluetooth LE you can essentiall­y control the Crazyflie 2.0 from your Android device or iPhone.

AT: Bluetooth LE is mostly about lowering the barrier to entry for people that just want to have fun with Crazflie. We already have prototypes of Android and iOS Crazyflie control applicatio­ns working and we’ll publish for both platforms on their correspond­ing markets.

ME: We also have a new Crazyradio. Crazyradio PA is a PC USB dongle that allows you to control the Crazyflie from your PC using an Xbox or PlayStatio­n controller. This has a range of up to one kilometre with line of sight and good conditions. The old Crazyradio is still compatible too, though.

LXF: Aside from enabling you to control Crazyflie from a PC, what other benefits does the Crazyradio PA have?

ME: It's also a brilliant low-latency way of gaining low-level access to the Crazyflie itself. The protocol for the USB dongle and the radio protocol are fully documented on our wiki.

Using the Crazyflie from your computer gives you access to adjustable flight software and a lot of developmen­t APIs too. We use Python, but there are APIs for C, C++, Java, JavaScript, Ruby and so on. It all works with Mac, Windows and Linux.

LXF: What sort of people are you expecting to buy the Crazyflie 2.0?

ME: One of the key issues we have is that the potential market is incredibly wide: from people using it as a toy to people using it as either a developmen­t platform or a research tool.

Straight out of the box there's loads of scope to have fun with it as a toy. You can unpack it and assemble it within a couple of minutes and then start flying it with your iPhone or Android device. Unlike the original Crazyflie, there's no soldering needed, which is going to be great news for a lot of more casual users. It's really fun to fly and the performanc­e is insane.

Once the novelty of flying it around your house has worn off there are endless design and developmen­t possibilit­ies, which you can learn step by step. It's essentiall­y a flying developmen­t platform.

At the other end of the spectrum we have researcher­s using Crazyflie. They're not particular­ly interested in controllin­g it from their iPhone with Bluetooth LE … they are more interested in what open source libraries we support.

As an open source developmen­t platform, Crazyflie has a really staggering reach. You can do iPhone developmen­t, Android developmen­t, embedded C, Python … you can even create your own APIs for the PC version. For anyone who wants to experiment with flying robotics, it's a brilliant platform that allows you to do whatever interests you.

LXF: What is it like to fly? The first one took a bit of getting used to.

TA: I know this is going to sound cocky, but it's really hard to explain how much fun it is to fly or how good it feels when you get the hang of flying it. It's incredibly fast and precise, and a side effect of [the increased] carrying weight is that it's much more aggressive in the air. It can lean 40 degrees in its direction of travel and before you know it it's almost out of sight.

ME: It takes four of five flights to really get the hang of it, but [that figure] depends who you're talking to. If you give the controller to anyone under the age of 20 and you start explaining what each button on the controller is for they've already hit the ceiling, but older users are much more careful. Despite all our practice we've still been put to shame by 15-year-olds that play a lot of PlayStatio­n games [laughs].

AT: In the software on the PC you can tune all of the control parameters. When someone flies it for the first time they are not flying with the same aggressive settings as we would, for instance. We tune down the thrust, how fast it rotates and how far you can angle it.

One of the things about the original Crazyflie was that you were really quite afraid to crash it. The Crazyflie 2.0 is a lot more robust and you're much less afraid. The new motor mounts give it lots of protection – it actually bounces now.

LXF: How does the expansion port work? Are users going to be able to buy add-on boards separately?

TA: We spent a lot of time on the expansion port at the beginning of the developmen­t cycle. We wanted to be able to mount expansion boards underneath and on top of the Crazyflie 2.0. We needed some kind of system that effectivel­y allowed us to mount an infinite number of boards, though, of course, weight and balance come into play quite quickly.

We looked at a lot of different systems and connectors and we came up with a solution that raises the expansion boards above the battery. It's one of the key features of the new model – the fact you can really quickly and easily adapt the Crazyflie to your needs.

Of the add-ons we have planned, right now we have a wireless charger that uses the same technology as a lot of modern smartphone­s and an LED ring with lots of RGB LED lights that connects to the bottom of the Crazyflie and faces downwards. It creates amazing effects in low light.

LXF: What if you want to develop your own expansion boards?

TA: We also have a breakout expansion that will allow you to mount your Crazyflie on a

prototypin­g breadboard to plan out add-on ideas. And we have a prototypin­g expansion board that you can solder your own hardware to and get your idea straight into the air.

ME: For example, we made a flying traffic light to demo the prototypin­g board. We soldered three coloured LEDs on in traffic light formation, one above the other, and we wrote some software to control them.

It's a very basic example, but you could do just about anything you like. You could easily make a small flying speaker by soldering a small piezo speaker to a prototypin­g board and fly around playing annoying noises at people. We're also working on different ready-to-use expansion board ideas. We have a board for GPS and a prototype for a camera. We're also working on boards with an SD card for logging large amounts of data.

LXF: Are you doing anything to facilitate community developmen­t of the boards?

TA: We're really hopeful the community will come up with lots of ideas. We've already made a template for creating your own expansion boards and that's going be added to the developmen­t platform virtual machine.

ME: If you open up the project in KiCad it already has the schematic components for the expansion connector so you can use KiCad's library to pick and place whatever hardware you want there. We've placed the expansion connectors so you only have to worry about wiring your own hardware.

We've also drawn in the Crazyflie 2.0 around it, so you can immediatel­y see what kind of clearance you need for the connectors and for the propellers. You'll get a really good idea of what [the board] would ultimately look like when it's finished.

LXF: Are there any plans to make Crazyflie 2.0 capable of autonomous flight?

AT: One of the biggest challenges with trying to fly something like the Crazyflie autonomous­ly is being fully aware of where you are in 3D space. By using things like Microsoft Kinect we developed a very simple solution and from that the community made some even better versions. Using Kinect you can certainly make Crazyflie run completely autonomous­ly, but obviously only within sensor range of the hardware.

We're also collaborat­ing with a company that builds simple optical flow sensors. Hopefully in the future we'll see an add-on board that might make it possible to direct a Crazyflie with scripted commands like 'go up one metre' or 'forward one metre'. LXF: What about GPS as a means to get reasonably accurate location data, as with bigger quadcopter­s? TA: It's obviously much simpler with GPS, but Crazyflie is focused on indoor applicatio­ns. It can fly outside quite happily, but it isn't designed to cope with harsh weather conditions. The fact that you use it inside is one of the key reasons why Crazyflie is proving so popular with researcher­s. When you're working modifying everything in the quadcopter. It should be as easy as adding one or two files – that's what we're working on.

We've been inspired by the way Linux and Android drivers work. We're essentiall­y trying to solve the same kind of problem. In Linux when you have a device driver, you're not modifying files all over the place; you're modifying one file that automagica­lly gets registered and can request access to different resources. We want a system where your file would declare that it is a driver for the LED ring expansion board, for example, and that it needs access to PWM [Pulse Width Modulation].

on The university of Bologna “They’re using our platform to research search and rescue algorithms for alpine rescue.”

with sensitive lab equipment you really need to be in a controlled environmen­t.

For example, a research lab at the University of Bologna has worked on getting the Crazyflie to work autonomous­ly with their very expensive tracking system. They're using our platform to research search and rescue algorithms for alpine rescue. LXF: What are you working on right now to prepare Crazyflie for its Christmas release? AT: The main thing right now is architectu­re. [We want] to make it as easy as possible for users to add their own software and to make use of the expansion ports.

Ultimately, we want someone to be able to have an idea in the morning, prototype it, and have written all the code and everything they need to make their idea actually fly by the end of the afternoon. That's the dream, but to make it that easy for the user requires a lot of work at our end.

The way we see it, adding code and drivers for a new expansion board should not involve LXF: Manufactur­ing is often the most difficult part of a hardware-based project. How are things working out for you with Crazyflie 2.0? TA: We're partnered with a Chinese company called Seeed Technology ( www. seeedstudi­o.com) that works on a lot of hardware projects like this one. At the moment we're spending a lot of time making sure they're buying the right components and making sure everything is the right quality.

After that, just making sure that every Crazyflie 2.0 quadcopter that leaves the factory works is a huge responsibi­lity. We actually all headed out to China so we could test the first units for ourselves.

Travelling out there to see everything firsthand has made things a lot easier … for one thing, communicat­ion is much more straightfo­rward in person. Working with Seeed has been great, though, because they're a company that’s already used to working with small western companies like us, so the process is a little easier than it could be.

 ??  ?? The Bitcraze team. Left to right: Tobias Antonsson, Marcus
Eliasson, Arnaud Taffanel
The Bitcraze team. Left to right: Tobias Antonsson, Marcus Eliasson, Arnaud Taffanel
 ??  ??
 ??  ?? An add-on LED ring turns the Crazyflie 2.0 into a flying saucer.
An add-on LED ring turns the Crazyflie 2.0 into a flying saucer.
 ??  ??
 ??  ??
 ??  ??
 ??  ?? Crazyflie’s prototypin­g board helps users create their own add-ons, like this flying traffic light.
Crazyflie’s prototypin­g board helps users create their own add-ons, like this flying traffic light.
 ??  ??

Newspapers in English

Newspapers from Australia