Category: Crazyflie

A combination of Christmas preparation, overtime and water leakage took most of the time during the last week so not much progress was done :-(

So what’s the current status in the project? Well, we are still discussing with Seeedstudio on how to start up but most of the things are now in place. We are continuously working on the software/firmware and wiki when we have spare time. Also since we don’t really know how many kits we will sell we are aiming at having a two week pre-order phase before the production of the kits begin.

After one week of flying the new copters we have to say that they are preforming very well. We’ve done a lot of crashes but only had one incident with a bent axis on one of the motors which we fixed by replacing the motor.

We have noticed that using some radio channels in combination with some link speeds causes too much packet drops when the motors are powered. It’s almost certainly the PWM that causes ripples on the power supply and that effects the radio transmission. It was by chance we saw this and changing the channel or speed works around the problem.

Currently we are working with Seeedstudio to sort out the details for starting up but we don’t have an estimate for when it will happen yet. But one thing is for sure, we will go with the rapid-prototype mounts for the first DIY kit. We are still working on the details for the molded motor mounts but since there’s a lot of leadtimes for this it would delay the kit with months and we really don’t want that. Since after the summer we have been using the same design for the rapid-prototype motor mounts and we have only had 2 that has broken.

The plan is to package 1 spare motor, 1 spare motor mount and 4 spare propellers with the kit. There will also be extra spare parts available for purchase.

On Wednesday we assembled and tested all of the kits in the pre-series. We ran though the production tests, that will be used once the kits are produced, as verification. Since we can’t test that they really can fly the test isn’t covering everything but it checks most of the components. One of the units had a solder-bridge between two of the MPU-6050 pins and our tests showed that the unit was faulty. We are glad our tests caught the problem and removing the short fixed it.

The assembly doesn’t take too long and once you have done a few it’s fairly quick. We timed the last one we assembled and it was finished in just under 10 minutes (including fixing errors that were made :-) ). And that time was done by the worst solderer of us! As long as you are a bit steady on you hand it should be ok. It was a really great feeling unpacking, assembling, testing and then directly flying them! We numbered all the units and will track them if there’s any problems. So during the next weeks we will be flying a lot :-). We cross our fingers that they will hold up to what we expect.

The change we did where, connecting the motors directly to the battery and not through the power management chip, turned out great and we could feel the 8% increased power difference (it might have been some placebo effect but it just feels great).

To sum it all up it was a great night and we are really happy with the results! We remember in the beginning when we had to be in a pretty big room to be able to fly the Crazyflie at all and now it’s so stable you can (if you are brave enough) hover it 10 cm in front of your face and then push the throttle and it swishes away!

As for the project progress we are now discussing with Seeedstudio on how to carry on and we are trying to sort out the motor mount problem and some smaller issues.

We’ve also spent some time creating a new page on the wiki describing the hardware. It’s still a work in progress, but there’s a lot of information. We will continue updating the wiki whenever there is time.

Head over to our Picasa albums for more pictures.

 

Finally our yearning has come to an end, the Crazyflie kit pre-series did arrive from Seeedstudio today! We have not had time to do any extensive testing but so far so good, yay! We did however have time to program and assemble one and it flies really well. It feels like the change we did to route the motor supply directly to the battery and not trough the power management circuit made a difference. The acceleration punch when maxing out the throttle feels stronger. We have uploaded some pictures of the received package. What is still not included in this package are the motor mounts which we ordered separately from Shapeways. The motor mount is one of the last things to sort out before the kit can be ready. We are working on a moulded version which will be much cheaper in bigger quantities but it takes way more time then we expected. We might go with rapid prototyped mounts instead to make it available sooner.

The upcoming week is going to be very interesting as the testing will determine if we can go to the next step!

Since the very beginning of the project we have been maintaining a wiki. At first mostly for internal communication and documentation but more recently we have been focusing on making an easily accessible documentation for the Crazyflie kit.

We now think the wiki is good enough to be released. It is still a “work in progress” but most of the basics are there and it will be updated as we go along. On the wiki we plan to have all information regarding the Crazyflie and other projects. We also intend to complement the wiki with a forum which will be the next step.

The wiki is located at wiki.bitcraze.se and can also be accessed via the wiki link in the navigation bar.

Last week we received one of the new raspberry pi and we wanted to start doing something useful with it. One idea that came directly in mind was to control the copter with it. As it has 2 USB port it should be possible to use one for the gamepad and one for the Crazyradio dongle.

The Raspberry pi running Debian the operation ended up being surprisingly easy: Just apt-get install python, pygame and pyUSB and we where able to run our old script. By adding pyQT we where even able to run the GUI out of the box (it is still a bit heavy though as the GUI is not yet very optimized when receiving fast log informations). So we just made a “headless” version of the control software, launched it automatically with a udev rule when the radio is inserted and it was done!

We can power the Raspberry pi with a USB battery and we now have a small portable ground station for the Crazyflie. We have also proven that our PC software tools are easily portable to other architecture thanks to Python and all its libs. Currently the software is tested on Windows and Linux (x86 and ARM), but it should also work on MAC.

Raspberry PI controlling the Crazyflie

While we are waiting for the pre-series to arrive, which hopefully will be within 4-5 weeks, we have tested this idea we have had for a while. On the Crazyflie PCB we placed mounting holes in each corner for the possibility to add e.g. a landing gear, canopy or maybe a protective frame. The holes are about 0.9mm and plated so it is possible to solder something in it and a protective frame made of piano wire would be a good candidate.

We bought a couple of 0.8 mm thick 1m long piano wires at a nearby hobby store and got to work. On the first try we bend the wires into the shape solely by hand and it didn’t look or work well at all. We figured there must be some better way! And after searching the net we found this site explaining how to make your own DIY springs of different types. We however needed a circle with a much bigger diameter than normal springs use so it took us a while to find a tube with the right diameter to bend it around to get the right size. We found out that when bending the piano wire around a tube with the diameter of 20mm it ended up at about 55mm which was close enough to the 60mm we needed. Piano wire is a bit hard to solder but with plenty of solder flux it works well. We are pretty pleased with the result!

The piano wire frame itself weights about 3.5-4g so it is within the acceptable payload limit. The flight characteristics is changed a bit making it more controllable but less agile which is perfect for beginners. We have tested throwing it in the ground and crashing it several times and the Crazyflie just bounces so it works great. It might even be possible to go to a smaller piano wire diameter to save weight because now the frame is very stiff. Next step would be to come up with a design that could be attached/detached without soldering. It should also be cheap and easy to manufacture.

We discovered a new key-chain video camera which is called the 808#16. It had gotten a pretty good review so we decided to give the video camera add-on hack yet another try. A while ago we tried it with a 808#14 but it didn’t work that well when we where running it directly from the Crazyflie battery. It shut down as soon as we used to much throttle and using a separate battery made it to heavy. We didn’t have to high hopes for the 808#16 either and when we discovered that the bare camera weight, no battery nor case, was about 9g we knew it would be at the maximum of what the Crazyflie could carry.  With high hopes we connected the camera directly to the Crazyflie battery terminal and gave it a try.

It worked! The camera didn’t shut down but as you can see the stability is pretty bad during take-off. Once in the air it is controllable but only barely. We haven’t tested the full flight time but it probably wont be more then 2-3 minutes. We are thinking of doing a test where we add 4 more motors “mirrored” directly underneath the existing ones to increase the payload capability. Would be nice to have that option and it should be fairly simple to do.

We are pretty impressed with the video of the 808#16 which still is very cheap. We bought the 808#16 camera with the D-lens which is a wide angle lens and that’s why the video has a bit of a fish-eye.

We just finished the top level BOM, test plan, fabrication files, etc… which mean everything required to order the pre-series of the Crazyflie. The pre-series  is meant to be last version before the first real production batch and the idea of it is so that we can test the manufacturing and verify that it is manufactured with good quality.

One of the last minute changes we made for the pre-series has been to power the motors directly from the battery instead of through the power management chip. This should gives us up to 8% more power and efficiency due to power management mosfet on-resistance losses. It should also reducing the voltage drop which causes disturbances to the other circuits. The only drawback is that the Crazyflie consume a bit more power when OFF, because of the leakage current through the motor mosfets, but it is still within acceptable limits (a full battery will still take more than 2 years to be depleted by our electronics). Also the battery can now be swapped/disconnected for storage as we have added a connector.

Our target is to have the Crazyflie DIY kit availible for X-mas. It is very tight and it will be hard but what would life be without challenges :-)

One of the goals during this project has been to only use open-source tools for development. The main incentive for this is that we want everyone to be able to take part in the development and look at the all the parts of it once it has has been released. Also it was a great opportunity to see how far we could push open source free development software in a non-trivial embedded project.

Some of the tool has worked great and some has caused us some headaches since we have worked with the proprietary alternatives during the daytime. Our conclusion is that a project like this is definitely doable, but some parts does still require more work (and some frustration). The open-source tools for firmware development and PC client are state of the art and could be used instead of there proprietary counterpart (of course most of the time there is no GUI and some more setup or manual job might be required, but this comes with the benefits of a greater flexibility). However the hardware design tolls are still behind there (expensive!) proprietary counterparts and often requires a great deal of efforts to reach the wanted result.

Of course it’s great that these open-source alternative exists and that a lot of great developers puts time into making them. Without them this project would not have been possible!

The firmware – For firmware development we use a wide number of applications: gedit, Eclipse, Mercurial, gcc, make, openOCD and gdb. On Crazyflie we run  FreeRTOS. As we built the development environment with cross platform tools the development can be done seamlessly on Linux or Windows, on the console or with Eclipe. The radio dongle has been developed from scratch (ie, just from the datasheet) with the help of sdcc to compile for the 8051 contained in the nordic chip.

The client software – For the client side software we use Python, libusb, pyusb, QT/PyQt. Even though there was a lot of discussion within the group (Ruby vs Python, qt vs gtk) we landed on Python due to all the bindings that works out of the box on Linux and Windows. This enables you to quickly create applications. Combining this with QT/QTDesigner and you get a nice GUI application.

The hardware – Since the very first prototype we switched from Eagle CAD to Kicad to use a fully open source e-cad program. It does the job perfectly fine but the routing part requires a lot more time as many of the time reducing functions are still lacking compared to proprietary programs.  For complex boards, if time is an issue, Kicad is not the e-cad to use, but for simple board and typical DIY boards it does the job fine (ie. our experience of kicad is a lot smoother for the radio dongle than for the copter).

The mechanics – For the mechanics we have used freeCAD which is one of the few open-source 3D CADs tools that we have found. When we started out we had a lot of problems with this software because it keep crashing during the design. After the stable release of the 0.12 branch it’s gotten better but we’ve still had some problems with crashes. Over all we managed to design and 3D print many revision of the motors holder with freeCAD.

The website – On our server we are running WordPress, Mercurial and Redmine, all these on a Linux and Apache. We will probably also run phpBB later on.

 

Sensor poll

Waiting another week did not make things clearer whether to mount all sensors or not, but the quotation to buy and mount them did. The $20 we estimated was too low, depending on the amount of boards we make of course, but we would probably have to add another $10 to that which made the decision simple. It is mainly the barometer that is very expensive so we might still decide to mount the magnetometer. First we will do some tests though to find out how much “value” it really adds. For people that wants the barometer it will still be possible to manually mount it afterwards making it a win-win decision.