Category: Electronic

First of all, thanks to everyone that helped us out during the pre-order. Today we are finishing the last details and tomorrow Seeedstudio will launch the production of the first Crazyflie 2.0 batch! It’s been a hectic couple of months here at Bitcraze and it feels great to finally have reached this point. For the first batch we will manufacture more units than were pre-ordered. So from now up until the units are ready we will continue the pre-order, but without the discounted prices. The first batch is planing to start shipping mid-December. We are prioritizing the discounted pre-order but will ship everything as soon as possible.

Last week we published the iOS prototype code for controlling the Crazyflie 2.0. This week we are publishing the Crazyflie 2.0 expansion board template project. The project is done using KiCad and includes the schematics, the footprint mapping and an initial layout with the connectors in the correct place. The license of the template project is CC-BY 4.0. In order for users to more easily see what their expansion board will look like and how it will fit, we have included the Crazyflie 2.0 board outline as well as some key components that might interfere.

We are really excited to see if any cool expansion board projects will come out of this template. So if you feel like giving it a try then head over to GitHub, clone the repository and add some cool stuff. Any ideas of what to do?

Crazyflie 2.0 exp template

Crazyflie 2.0 exp schematic

 

 

 

 

This weekend we spent at the Maker Faire in Rome and got to meet lots of fellow geeks and makers. Even though it was busy times at the Bitcraze booth, we got a chance to walk around a bit and see other projects. It’s really inspiring to see what people come up with! It was also the first time we got the chance to show off the new Crazyflie 2.0 to the public and the feedback was really positive. We have realized that we might be a bit wide in our description of the new platform. There’s lots of new features that we are very eager to talk about, but maybe we should focus a bit more on the biggest improvements. With two weeks left on the pre-order we have been trying really hard to get some extra attention for the new platform, but haven’t really succeeded yet. This might be one of the reasons.

So even though there’s lots of new features we would really like to highlight the new expansion port. It’s been something that we have been talking about internally for a while now and we are really excited that we managed to fit it in. Like we wrote in an earlier post we used some exotic use-cases to figure out what to include in the expansion header. For example this resulted in the ability to charge the battery from the expansion board, like we are doing with the Qi wireless charging expansion board. Since the Crazyflie 2.0 has the ability to connect multiple expansion boards (both on top and bottom) we also needed some way to determine what boards are added. So one of the pins in the port is used as a 1-wire memory buss. Each expansion board has a 1-wire memory that allows identification of the board, it’s revision and what resources it uses. This way we can adapt the features available from the computer client or mobile device when the platform is connected.

Below is an overview of what’s available in the expansion port:

Crazyflie 2.0 expansion connector

For the pre-order we have managed to include 4 expansion boards: the LED-expansion, the Qi wireless charging expansion, the breakout expansion and the prototyping expansion. Aside from these boards we also have some prototypes of more expansions. Before the pre-order we were working really hard on a GPS expansion board, but in the end we didn’t think the current prototype had enough precision to launch. We reached about 10-20 meters accuracy with locking times of about 2-3 minutes and didn’t have time to spin another prototype. During the fall we will work on perfecting the design so we reach a level of performance that we feel is good enough.

We also have a prototype for a distance sensor to be used for precision landing. After looking for a solution for a while we finally found the VL6180, a time of flight sensor from ST. The range is not very long, but combined with the high precision pressure sensor mounted on the Crazyflie 2.0 we think the result can be very good. We also have an uSD expansion that we are currently testing.

After getting feedback from the visitors we met at the Maker Faire we have also decided that we will be designing an Edison adapter expansion for the Crazyflie 2.0. The Edison board is fairly small and light, so it should be possible to design an expansion board that has the 70-pin expansion connector featured on the Edison. Our plan is to use some of the interfaces in our expansion board to connect to the Edison, like I2C, UART and SPI.

Last but not least we are also working on an analog FPV expansion board. It’s still just an early prototype, but we think it’s something that a lot of users might be interested in.

As we will continue making more and more boards we also hope the community will take the opportunity to do so as well. We will soon release templates for KiCad making it really quick to get started. What board would you like to make? Let us know what you think about the new expansion port. Do you have any ideas for boards or any comments about our planned ones? We would love to get some feedback!

We would also like to say congratulations to Mihir Garimella on being one of the winners of the Google Science Faire 2014 with his project the Flybot! He used the Crazyflie to work on escape maneuvers similar to those of fruit flies. Really great work!

 

As you might already know we have added a 20dBm RF amplifier to the Crazyflie 2.0 as well as to the Crazyradio PA. We have had high hopes of getting a more stable link and much better range with this. We have done a lot of tests in the building we are sitting in and already experienced a big improvement in range. However radio range is a tricky thing as it depends on so many things and when we have tested it outside of the office we could only get a stable link for about 80m. This is very different from the documents we read where we could expect up to a kilometer of range! Maybe the fifteen wifi networks that where present outside our office played an effect.

So this weekend I set out to do some test on the country side. I packed my bag and mounted the Crazyradio PA on a 1m stick which I put in my bag so it could reach higher than my head. Then I took the bike to get to the country side. I got a lot of strange looks while bicycling. It was first when I reached the country side, it came to me that bicycling around with an antenna sticking out your backpack might be interpreted the wrong way :-o. After a while I reached a good spot and decided to put the Crazyflie still somewhere and instead take the computer with me so I could see what was happening. As the nRF51822 can take RSSI measurements we made a simple python program where the computer pings the Crazyflie and the Crazyflie responds with the RSSI measurement. We save the data in a CVS file which can be plotted in real time. I hang the Crazyflie in a bush, started the Crazyflie 2.0 at channel 10 and 250k air data rate, fired up the plot and took the bicycle and started pedaling.

After 100m I still had a solid connection, very good sign. After 500m the RSSI had dropped to about -80dBm but still a stable connection. After 1300m it got really shaky, about -100dBm, as the line of sight was obstructed by some trees and the road turned as well, 1.3km, LOS, that’s a huge improvement from the 80m we got back at the office. We know these circumstances are very optimal but at least it shows us we are not way off and hopefully we can expect half of that range in a more real situation. We have still not tuned the matching network for the antenna, which we will do soon, so hopefully we can expect yet another improvement. I also did a test with a hacked Crazyflie 2.0 with a duck antenna. With this one I got about -70dBm at the same 1.3km spot. This could be a great hack for special applications that require long radio distance as it could probably go beyond 2km range LOS, both up- and downlink.

A while ago we did a hack where we attached a NeoPixel ring to a Crazyflie. It was just a quick hack to show the concept, but we really liked the results. So we added some more firmware to easily be able to create new effects for the ring and also made it controllable using the Leap Motion. When we started talking about what expansion boards to do for the Crazyflie 2.0, we instantly thought about this hack. It’s fun to play around with the patterns, but it’s also great for lighting up the ground below that Crazyflie. To be able to light up in front of the Crazyflie we also added two strong white LEDs facing forward. Imagine a Sci-Fi movie where an abandoned alien ship is found. To explore it they first send in a small autonomous flying vehicle for exploration that lights up the walls and floor while blinking with some patterns, that’s the look we were going for :-)

To accomplish this we have designed an expansion board with a ring of 12 W2812B RGB modules as well as two strong front facing LEDs (the kind that’s used for LCD backlight). The board is 3cm in diameter and weighs about 3,5g. To make sure the LEDs are lit correctly as the battery voltage changes (especially when it get’s low) we added a DC/DC step-up/down to the board.

Like always, we are looking forward to seeing what fun things our users will do with this board :-)

One of the boards that we have been working on is an inductive charging expansion for the Crazyflie 2.0. Some of you might remember way back when we did an inductive charging hack for the Crazyflie. It’s always been very compelling with wireless charging, we’re not sure why. Maybe it’s because it feels a bit magic :-) For our inductive charging expansion board we choose the Qi standard, which is used in many cellphones today and finding a cheap charger for it is pretty easy. The board is designed around the BQ51013B Qi chip from Texas Instruments. Our initial testing of the board shows that it’s operating at about 65% efficiency and manages to provide an output of around 1A at 5V. The board weights about 5g, but we might be able to improve that  a bit, and is 30x30mm. Now all we need is a dock that we can automatically land on :-)

Here are some images of our current prototype, the final version will look a bit sleeker. The jumper sticking out on the side is for current measurements. It won’t be mounted in the final version, but the pads will still be there. So if you would like to measure the current you can cut the track and solder a jumper for it.

As we said in previous post, with Crazyflie 2.0 one of the focus has been on enhancing the current Crazyflie platform. The radio range and power is one of these things that is good enough on the current Crazyflie but that could be made much better. So on Crazyflie 2.0 we added a +20dB power amplifier that increase the output power up to +20dBm.

The logical move was to add a similar amplifier on the Crazyradio dongle and that is what we did. We made Crazyradio PA (power amplifier) and we intend to release it with Crazyflie 2.0

The output power is now of 20dBm for Crazyradio PA, which will dramatically increase the control range. Even though Crazyflie was originally intended for indoor use, Crazyflie 2.0 is pretty capable outside, mostly with the expansion capability that could allow to add things like GPS, so the extra range could be put to use. But maybe the biggest advantage is indoor where Crazyradio is now playing equal with Wifi in term of TX power. This increases the link robustness and allows for flying in other rooms (could be useful with a powerful FPV for example).

Preliminary tests show much better performance compared to the first Crazyradio and Crazyflie both indoor and outdoor. So far, we mesured a stable link two floors down about 20m away indoor and about 150m outside range (the uplink has been tested up to 450m). Of course we are continuing to work on it and final specs will come later.

As for the radio dongle mechanic we have changed nothing: the connectors and LEDs are still at the same place. This was made possible by using smaller SMD components and so existing 3D-printed cases for Crazyradio still work for Crazyradio PA.

One feature of the new Crazyflie 2.0 that we are especially happy about is the new expansion port. We have attached a lot of hardware to the current Crazyflie and we have also seen lots of users attaching their hardware, but it’s not very easy. The current connector is small, you will need to solder and it’s not mechanically stable once you attach something. For the Crazyflie 2.0 we wanted to improve this, making it easier to attach new hardware and to expand the functionality of the platform. When we started looking at this we quickly realized that the small size of our platform limits what kind of interface we can have. We wanted something very small and light, but still it couldn’t be too expensive. While looking for a solution we found some of good alternatives, until you start measuring them and bringing them into our design in KiCad (again, it’s like parking a minivan in your bedroom). Something that didn’t make the selection easier was that we wanted lots of flexibility. We wanted users to be able to add multiple boards, both on the bottom and on the top of the platform. This might sound crazy for a small platform like the Crazyflie, but with the new motors we are able to carry more weight than before. Adding expansion boards will of course effect performance (like flight time) but to the extent that it’s possible, we want to give users the possibility to do as much crazy things as possible with their Crazyflies :-)

After months of searching (it’s pretty hard finding connectors…) we finally found a solutions that fulfilled all of our requirements. The connectors we found allows users to place multiple boards on the Crazyflie, both on the top and the bottom, and without pre-defined vertical spacing. We only place female connectors on the expansion boards, which means that if you crash and bend the male pins, you just have to exchange them and not any expansion boards. Below are some images showing the expansion connector, the pins and some examples on how you can connect boards. It also shows two of the expansion boards that we have designed, a prototype board and a breakout board for breadboards. In the images we use the breadboard and the breakout board to connect to a pressure sensor from ST and the prototype board to build a flying traffic light :-) The idea of the pattern for the prototype board is taken from ElecFreaks. It allows for easily using both though-hole components and SMD components.

All the boards and the Crazyflie 2.0 with the 3D printed motor mounts are still just prototypes.

Detecting boards

We think that being able to attach different boards is great, but how do we use them in the firmware/software? Well, there are two different use-cases for that. The first one is “pre-made” boards. Aside from the two boards above (prototype and breakout) we have a bunch of ideas and also a few working prototypes that we will write a bit more about later. Let’s use the GPS-expansion that we are working on as an example. When you attach this board you want extra functionality to be available without re-compiling and configuring things. You still want the possibility to hack around in the firmware/software, but you want the hardware to be initialized properly so you don’t have to worry about that. To accomplish this we needed some way to identify the different boards. Again, this needed to be done is a cost-efficient way and without using up too many of the pins in the expansion port. The solution we found is 1-wire memories. So what’s so great about them? Well, they have some nifty features. First of all each produced IC has an unique address, so placing multiple memories on the same buss is no issue. Using a search algorithm you are able to find and identify all the connected memories so that you can address them individually. Secondly they only use, like the name suggest, one wire for communication. This wire is also used for parasitically powering the memory. That means all you need to connect is the one wire and ground. Last, but not least, they are fairly small. The ones we use are in a SOT23 package.

So how are we using these memories? We are placing a memory on every board we design (except for boards like the prototype and breakout boards). The memory is very small, but it’s enough to contain some information about the board. So during production each memory will be programmed with things like what board it is, which revision and what resources (i.e what pins in the expansion port) the board uses. At start-up the 1-wire bus will be scanned and all the memories will be read to detect what boards are attached. Why store what pins the expansion boards use? Well, the nice thing is that the 1-wire bus is connected to the nRF51 (here’s some info on the system architecture). Since the nRF51 is responsible for power management (i.e switching on power for the STM32F4) it’s possible to scan all the memories and detect conflicts in resources before powering on the main system and the expansion boards. Let’s say you attach two boards that use the same UART. This will result in issues when the systems starts running. To protect against this the nRF51 will check if there are any conflicts and won’t power on the system if there is.

The second use-case for expansion boards are the ones you make yourself. Then you might not be interested in using the 1-wire to detect your board. Therefore it’s in no way mandatory to use that feature, it’s just something that we think will make working with our platform easier for our users. But in case you are interested in detecting your own boards, the firmware will support programming the memory and we will link to the correct parts at suppliers.

The pinout of the expansion port

The expansion connector consists of 2 rows of 10 pins each with the spacing of 2mm and has the following pinout:

Crazyflie 2.0 expansion port

Crazyflie 2.0 expansion port

P6

  • VCC – 3V0 regulated supply (max ~50 mA consumption). Only powered when the STM32F4 is powered.
  • STM32F4 UART 1 (RX/TX)
  • STM32F4 I2C bus (400kHz)
  • STM32F4 4xGPIO (can be used as chip select for SPI)
  • GND – platform signal ground

P7

  • STM32F4 UART 2 (RX/TX)
  • STM32F4 SPI (SCK, MISO, MOSI)
  • nRF51 2xGPIO that could be used for GPIO but will have the following reserved:
    • nRF51 wakeup – allows waking up from an expansion board
    • nRF51 external power indication – will indicate if an expansion board is powering the system or not
    • nRF51 1-wire memory access
  • VCOM – unregulated direct access to power after charger (max 1 A consumption). The voltage is VUSB if a charger is connected and VBAT otherwise. Currently this power supply is always on (even when the system is powered off) witch allow for making always-on expansion board. However we are looking at inserting a high-side switch which would allow also switching this supply off if needed, making prototyping and design of expansion boards a bit simpler.
  • VUSB – unregulated direct access to uUSB power. This can either be used to get uUSB power or to supply uUSB power to the platform (like an external charging board that powers and charges the system).

The pins that are connected to the STM32F4 can be used as GPIO or for other functionality that they are multiplexed with, like timers.

Making expansion boards

As many of you probably know, we strive after using open source tool for our development. So for electronics design we use KiCad, an open source EDA suite that works on Linux/Windows/Mac. To make it easier for users to design and make their own expansion boards we have created a template for the design. It contains the initial schematics as well as layout. The connectors are added in the correct positions and the memory is also in. To make things even easier, the layout contains drawings of the Crazyflie 2.0 board outline and connectors, to easily see how the board will fit. As with everything else this needs some cleanup when the final design is in place, but then it will be released under the CC-BY-SA 4.0 license. Looping back to the 1-wire memories, if you make your own board will it be possible to get in on the automatic detection? Sure, the more the merrier. But we still haven’t specified exactly how this will work technically, so we will have to get back on the specifics. If you are interested in hacking something together a great way to go is first to try out the design on a breadboard, then solder it together on the prototype board and finally do the layout in KiCad and order it at a batch-PCB service.

While designing the Crazyflie 2.0 one of our focuses has been enhancing the current Crazyflie functionality. As a flying development kit the current Crazyflie already has a JTAG debug port that allows to flash and debug the STM32F1 microcontroller. The design uses a standard ARM 10-pins cortex debug connector. The connector is shipped with the Crazyflie control board, but it is not soldered. So before doing any advanced debugging with the Crazyflie the user will have to solder the debug connector (it is always possible to flash new firmware using the radio bootloader).

With Crazyflie 2.0 we wanted to make it easier to debug it out-of-the-box, without needing to solder. But the issue is that standard debug-connectors tend to be fairly large, so to fit the connector on the board we used a different connector that connects to an adapter board.

Aside from having a reset button, the adapter board will have 3 JTAG/SWD connectors:

  • 20-Pins HE10 ARM JTAG with 2.54mm spacing: The most commonly used connector
  • 10-Pins ARM Cortex with 1.27mm spacing: Used in some modern ARM board, the same as the current Crazyflie
  • 6-Pins SWV with 2.54mm spacing: Compatible with the connector present on ST Discovery boards

The smaller 6-pin connector connects to the Crazyflie 2.0 for flashing and debugging of its 2 MCUs: The STM32F405 and nRF51822. The connector for debugging the STM32F4 is mounted on the Crazyflie 2.0. For the nRF51 we are still working to get a solder-free solution using the same cable/connector on the debug-adapter. Why not just put two connectors, or one big with all the signals on the Crazyflie? There’s just no more space on the board. The connector looks very small, but when you bring the footprint into KiCad it’s like parking a minivan in your bedroom :-)

Since all the connectors are wired together the board can also be used in a number of other combinations, like using it as a 20-pin to 10-pin Cortex JTAG adapter or any other combination of its connectors.

Like we mentioned a couple of weeks ago we went to Devoxx UK last week exhibiting the Crazyflie. We got a chance to do lots of fun things, like flying the FPV quad in the keynote and also over the exhibition floor. The image is a bit faded, but we had the luck of having a projector next to us that we hooked up the FPV receiver to so the video feed was projected on the wall behind our booth. Our booth was next to the NFC ring exhibition which had a nerf gun that was unlocked when wearing their NFC ring. We quickly came to the conclusion that trying to shoot the Crazyflie down with the nerf-gun was the way to go :-) It can actually take a couple of direct hits before going down!

On Thursday night we jointed the IoT hackathon hosted by IBM. We got an Arduino with lots of sensors that we were supposed to interface from Java. Unfortunately we didn’t do too well on the Java front, but we managed better with the Arduino. We decided to use on the thumb-joysticks for controlling roll/pitch and a light sensor for controlling the thrust. Our first plan was to use a microphone for controlling the trust with the sound-level, but we realized that might be a bit too tight with time. The joystick and light values are sent via the UART to the PC and picked up in the Crazyflie Python Client using a modified version of the joystick drivers. Instead of reading events from PyGame we read data from the serial port. This makes it alot easier to debug since we get feedback from the input-device directly in the UI. In the end we got it working (kind of..) so we could fly and actually won the hackaton! So now we have a box of sensors that we can  play around with. Below is an image of the sensors connected to the Arduino.

arduino_devoxx_uk

It’s been a while since we summed up things happening in the community so here’s some of the things that are happening. There’s lots of more things, so if you think we are missing something, then post it in the comments below.

Ralph has been doing some work on an semi-automatic flip feature in the client. There’s more info on the forum and video below.

Last week we tested some modifications made by otto for a headfree mode (i.e yaw only rotates the platform, not the referance direction). It’s a really nice feeling just rotating without taking care of the direction you are going in :-) There’s more information and links to code on the forum.

The SHERPA project have been working on swarm algorithms using a vision system and the Crazyflie.

Geof from Centeye have been working on optical flow stabilization using the Crazyflie. He has a prototype board working and there’s lots of information in the forum about this build. To see the results have a look at the video below.

Thanks to Victor the Deviation firmware for Devo-7e (custom firmware for Devo RC-controllers) now has support for the Crazyflie (needs hardware hack). If you would like to give it a try have a look at the code or grab one of the nightlies.

Researchers at the University of Tokyo have been testing a new concept for a HoverBall using the Crazyflie. Imagine throwing a ball into the air that doesn’t come down (well not right away at least..). Here’s some more info and a picture.

We have also seen some nice stand alone controllers for the Crazyflie, one by  MidLifeCrisis (more info here) and one by ivandevel (video below) . There’s also more info in the forum.

There also some updates on the work done by Oliver on the Kinect tracking of the Crazyflie. A demo video is shown below (it looks great!) and there’s more information on the forum.

And finally here’s a nice video we found on Youtube showing position control of the Crazyflie using a VICON system.