Author: Tobias

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.

We are glad to announce that we got a reinforcement to our team. His name is Miguel Piteira Gomes and just got out of school where he studied mechanics. Now we can finally do other stuff then electronics and software! Miguel comes from Portugal and will help us out during the summer. We wish him a big welcome!

Miguel

A while ago I started working on a brushless motor control driver for the Crazyflie. I implemented most of it but did not really have time to test it. Recently we have gotten some request and questions about it so we took some time to do some further testing.

Implementing a brushless motor control driver can be done in many ways. If you have brushlesss motor controllers that can be controlled over I2C that could have been one way but usually the brushless motor controller (BLMC) take a PWM input. This is most commonly a square wave with a period of 20ms and a pulse width of 1-2 ms high, were 1 ms is 0%, and 2 ms is 100%. A period of 20 ms means a frequency of 50Hz. This is most often a high enough update rate for R/C electronics like servos etc. but when it comes to BLMC that is not the case. Therefore many new BLMC can read a much higher update rate of up to 400 Hz were the pulse still is 1-2 ms high. That way you can match the BLMC input to the update rate of the stabilization control loop and increase stability. In the code we added a define BLMC_PERIOD where this can be set.

To test this we wanted a frame which was quick to setup and found this. It is based of a PCB just like the Crazyflie and has the four motor controllers with it, perfect! The built in BLMC are based on an the Atmel MCU Atmega8 which is very commonly used in the R/C BLMC which means it is possible to re-flash them with the SimonK firmware. This is know to be a great firmware and enables fast PWM update rate etc. So we built and flashed the firmware configured for the tgy6a which is compatible and it worked right away, yay!

Now we only had to connect the Crazyflie to the BLMC:s on the frame. The BLMC electrical interface for the PWM signal is often a 5V interface but the Crazyflie runs on 2.8V. 2.8V would in most cases be treated as an high input and can probably be used directly but there is no simple way to connect this signal on the Crazyflie. Instead one way is to use the existing motor connectors and the pull-down capability that is already there. Then it is also possible to pull this signal to 5V with a resistor to get a 5V interface so this is what we did. To power the Crazyflie we took the connector of an old battery and soldered it the 5V output of the frame.CF to BL Frame connections

Now it was just a matter of testing it! However as size increases so does the potential damage it can make. We therefore took some precaution and tied it down. First we tested the stability on each axis using the stock values and it worked really well so we decided to not tune it further. The only issue was that suddenly one of the BLMC mosfets burnt. We replaced it and it worked again but don’t know why it burnt. Later when we flew it something was still strange so we have to investigate this.

We will upload the code as soon as it has been cleaned up. Please enjoy a short video of the journey :)

Last week was a hectic but exiting week for me. First I visited Embedded World in Nürnberg and then made a visit to TUM university in München.

I was actually visiting Embedded World because ST Microelectronics contacted us and wondered if we could do a Crazyflie version with the more powerful STM32F3 and use ST MEMS sensors. So during the winter we did some prototypes where we fitted the pin compatible STM32F303CB and a LSM9DS0 9-axis MEMS module. Porting the code was pretty straight forward and took about a week. It was manly the drivers that needed porting but getting the FPU running also took some time. Our quick bench-marking test showed an ~35% increase of the floating point intense code and by using further speed boosters like the core coupled memory (CCM) it could probably be increased a lot more. Right now these extra CPU cycles aren’t really needed but for the future when more complex sensor fusion algorithms might be used they will be valuable. Therefore the STM32F3 series it very interesting as it packs plenty of processing power in a small package.

Having the ST-prototype on display in the ST booth at embedded world was quite a strange feeling. Something that started out as a fun thing to do on our free time is now sitting on a wall at big cenvenstion as EW, kind of hard to grasp. Unfortunately we where not allowed to fly around and play with it due to restrictions but I had a great time there anyway. I also participated in a short interview which ST arranged, really strange seeing yourself like that. I should probably focus on my engineering career instead… :-)

After the EW I went to visit the Techische Universität München TUM, as one of our most active users Oliver is studying there. Oliver made an awesome HUD and also contributed with most of the altitude hold code, and since München only is an hour away by train it was a great opportunity to go visit him. Oliver arranged so that Jacob from the computer vision group invited me to their department where they demonstrated some of their work, especially their work done with computer vision and quadcopters. Amazing stuff! I really hope we can do something together in the future and make this technology widespread.

For a while Invensense’s gyros has been the MEMS sensors to use in multirotor  applications due to their good performance and vibration rejection. ST Microelectronics are also big when it comes to MEMS sensors but their gyros has not been that good when it comes to handle vibrations. In the beginning if 2013 they released the 3-axis gyro L3GD20 which are advertised to improve this and we thought we finally would do an investigation. So we bought a Pololu  AltIMU-10 board which has ST sensors and also the iNEMO module, LSM9DS0, which is a very sweet 9-axis 4x4x1mm chip. After a bit of a soldering exercise we got them both attach to an accompanying Crazyflie. The AltIMU-10 board we glued to the bottom and connected to the expansion I2C buss. The LSM9DS0 was a bit trickier and we removed the MPU6050 and used some of its components for the LSM9DS0 so we could glue it up-side down to the board. I think the picture speaks for itself. After some quick and dirty coding we managed to get them both working and flying. The flying capability is very similar to the MPU6050 and we can’t really tell the performance apart. We will have to investigate it in more detail and for that we are adding a SD Card breakout to write raw data from all sensors at full speed. That will be the exercise for next week so stay tuned!

 

[pe2-gallery album=”http://picasaweb.google.com/data/feed/base/user/115721472821530986219/albumid/5941229033309217905?alt=rss&hl=en_US&kind=photo” ]

Our products at the Seeedstudio Bazaar are almost out of stock. Currently there are still some 10-DOF bundles in the Seeedstudio US warehouse, but the 6-DOF is old out. Below is the estimations for when things are back in stock. If you are eager to get any of the products that are out of stock, then you can always check with our distributors. If the bundles go out of stock it is also possible to buy the 10-DOF kit and Crazyradio separately.

  • 10/6-DOF bundles and kits will be restocked mid November
  • Spare motors will be back in stock mid October

The new motors have a little neat update, the top bearing is concealed inside the motor housing. This will make it much more crash resistant from forces to the top since there is no bearing to depress. The small downside is that it might be little bit more difficult to remove hard sitting propellers.

Bitcraze bazzar stock

This Monday post we are devoting to the community development and we will try to give a short summary of what is going on there. We recently haven’t our selves had that much time to help out with this development, something we intend to change, so all credit goes to the community!

  • A port of the OpenPilot CC3D firmware to the Crazyflie done by webbn. Still under development but video already shows promising results.
  • Altitude hold functionality which is being developed in parallel by many, omwdunkley, phiamo, et. al. We hope we soon can contribute to this as well.
  • Improved thrust control which is being discussed a lot and hopefully we will soon see some ideas realized.
  • A Ruby cfclient written by hsanjuan.
  • The Android client with a lot of work from derf and sebastian.
  • The FPV implementation driven mainly by omwdunkley and SuperRoach. Omwdunkley has made an awesome HUD (Heads Up Display) which we hopefully sometime will see integrated into the cfclient. Check out the video!
We have probably forgotten some of the great development that has been going on recently and if that is the case please write a comment about it and we will update the post with it.

We finally got the time to clean-up the Crazyflie kicad project enough to make it publicly available.  It is not in a perfect shape but should be good enough to use and learn from. It’s a 4 layer board with signal layers on bottom and top and power planes in the middle. We have also uploaded the custom kicad-libs parts which should be placed in the same directory level as the kicad projects in order to make use of them, it also includes Crazyradio kicad parts.

It is released under CC BY-NC-SA license so you are able to use if for personal use, and please respect that. Please also give us feedback if you have some comments or find something that could be improved!

Crazyflie kicad snapshot

 

Development is starting to accelerate and we are really having a hard time catching up on pull-requests and forum activity.  It’s like an avalanche, once it is started, it is impossible to stop :-).  We are also doing our best on the support side and we want to send out a big thank you to all the users that help out with all the support as well. Just to name a few: foosel, alex, skube, TheFrog4u, DesTinY, atimicdog, etc. The list will be too long to list all but you know who you are, many thanks!

We will soon be releasing a new cf-client that will close some bugs and especially the OSX bug which could make your Crazyflie go full throttle if the controller is accidentally disconnected during flight.

Our to do list is currently huge but this is a subset of what’s on the list right now.

  • Implementing GUI in the cf-client  for updating the Crazyradio.
  • Updating the wiki and especially the trouble shooting page.
  • Fixing bugs
  • Implementing brushless controller driver.
  • Support
  • Accepting pull-requests
  • Administration
  • Cleaning up in the forum
  • Planing JavaForum presentation
  • Crazyradio PPM input

As you can imagine we have our free time pretty much planned out :-).

It’s been an incredible week seeing people from all over the world getting their Crazyflies into the air!! We have seen videos of people doing crazy stuff we never thought of, 3D models of cases and frames on Thingiverse and of course a lot of images of people unpacking and assembling their Crazyflies. The wiki is receiving some well needed updates and everyone is helping out answering questions in the forum. It’s really great for us to see this project come to life after such a long time and as far as we can tell we have a lot of happy users, even though there’s still a few people struggling with issues.

Like we said last week, this is the first time we distribute the software/firmware/hardware widely and there’s a few bugs that has been found. We are currently correcting the most important ones and will post updates for the firmware and software once we fix enough of them. If you want to follow the progress drop by the bug tracker on Bitbucket for the PC-client, Crazyflie and Crazyradio.

We are doing our best to answer questions and give support in the forum, but there’s a couple of issues that we would like to highlight to make the assembly and usage easier for everyone. Please be careful with your new Crazyflies, they are not unbreakable.

  • Check for shorts after solderingAfter the motor wires has been soldered make sure to inspect for shorts and especially to the resistors, red highlighted area, in the picture as it can damage the digital voltage regulator. This will show up as that the blue LEDs wont light up and the other LEDs will be dim. To fix this the regulator U9 will have to be exchanged. It is the SOT23-6 package in the picture.

 

 

  •  The Crazyradio doesn’t work on USB3 ports but a fix is on the way. Until then the work-around is to use USB2 ports.
  • If the Crazyflie crashes upside down there is a chance the motor bearing gets depressed. There is a protection for this and that is to carefully glue a spacer between the motor and the propeller, similar to what we have done in the picture. That will prevent the propeller from pushing on the bearing but will instead be pushing on the spacer which will absorb the force much better. The spacer needs to be higher then the motor bearing else it will not work that well.

 

  • Loading an already existing input-device configuration in the PC-client does not work, the best is to start from scratch (see this issue). Also when configuring the input-device you will have to map all the axis and buttons before you can save the configuration (see this issue). For more information on device-input configuration see this page on the wiki.

Unfortunately the production of the new motor-mounts has been delayed and they will not be available for order until next week. But the kits that are currently in stock still contains a spare motor-mount.

Happy flying!!