Browsed by
Category: Crazyflie Nano

Flying on a Mac

Flying on a Mac

I’ve been out of the Crazyflie scene for a few months due to newfound (overwhelming) responsibilities as a dad and homeowner, but recently I came back because I had a few moments to spare. I’ve almost finished setting up my “workshop” in my new house and once I get my shop stool and soldering station put together, I’ll have more entries to make. But for now, I thought I should just get up and flying again.

Read More Read More

Unified Firmware Source Code

Unified Firmware Source Code

In my last post on compiling Crazyflie firmware on Mac OS X, I mentioned that the band at Bitcraze had plans to eventually merge the Crazyflie 2.0 firmware source with the Crazyflie Nano (1.0) source on the master branch and now they have done it! Crazyflie Nano (1.0) and Crazyflie 2.0 firmware source code is now unified in the Bitcraze crazyflie-firmware GitHub repository on the “master” branch. This is really great news because it makes building for either (or both) targets even easier now! Read on for updated instructions on building Crazyflie firmware on Mac OS X given the new unified firmware source…

Read More Read More

NeoPixel Ring Mod – Part 4

NeoPixel Ring Mod – Part 4

My last entry on the NeoPixel ring modification detailed how I “permanently” mounted the ring and the post before that was about how I got the firmware working like I wanted it. Prior to that, my first entry explained what I wanted to do and elaborated on some testing I conducted prior to deciding on what ring to use. This entry wraps my NeoPixel Ring mod up by exposing how I hacked in some controller support.

The controller support was a little tougher than the rest of the modification because I didn’t have any examples to base my changes on. Furthermore, I had to learn the architecture of the Python client but fortunately it’s in Python which is both fun and pretty accessible!

What I’d hoped to do was make it possible to cycle through the various LED “effects” with a controller button (this is what the Bitcraze video demonstrated and it seemed like a good interface). I also wanted everything to be runtime discoverable so there were little or no “hardcoded” dependencies. I wanted the client to work the same whether or not the firmware running supported the NeoPixel ring mod.

I believe I was able to accomplish all of this.

Read More Read More

Broken, Then Fixed, On/Off Button…

Broken, Then Fixed, On/Off Button…

I’m man enough to admit it. I broke the on/off switch on my first Crazyflie. There, I said it. In my defense though, it didn’t seem to be that easy to push in the first place. It was sticky and didn’t move smoothly. I probably applied too much pressure and finally, the little plastic bit broke off. I denied it for a while. I was able to dismantle the button enough that I could simply use a straight pin to turn it on and off. Eventually, that bit broke off as well so I decided to clean it up and desoldered the rest of the button leaving only the two pads intact. I used my propeller fork for turning it on and off for a long time. It fit the width of the solder pads perfectly. It wasn’t as easy as I would have liked it to be but it worked. Well, mostly it worked. Sometimes I couldn’t get it to turn on before the cold-boot timed out when I was trying to refresh firmware.

Eventually I decided I wanted to replace the button.

Read More Read More

NeoPixel Ring Mod – Part 3

NeoPixel Ring Mod – Part 3

In my last installment I explained how I got the firmware working for a 12x LED NeoPixel Ring. In the first installment, I explained my experiments and how I determined what NeoPixel Ring to use. In this entry, I’ll explain how I mounted the ring to the Crazyflie. I thought the mount would be hard but, using simple double-stick mounting tape (like the kind used to mount the battery), it was extremely easy. After many flights (and a few crashes on hardwood floors), the mount is still holding very tightly. This is how I did it.

Read More Read More

NeoPixel Ring Mod – Part 2

NeoPixel Ring Mod – Part 2

In my previous entry on the NeoPixel ring mod, I detailed my experimentation on finding a good mix between LED “bling” and Crazyflie performance. I’d arrived at Adafruit’s 12x LED NeoPixel Ring as the sweet spot. Before making the mount permanent with double-stick tape and solder, I wanted to make sure I could actually get the ring to light up! I figured that wouldn’t be too hard, since Bitcraze had already added the code to run it in a neopixel_dev branch in their crazyflie-firmware Github repository. The main thing I’d need to attend to was re-purposing the code for 12x LEDs (it was originally written for 16x LEDs) and then building and flashing custom firmware using the new code. Since I’d already set up a mini development environment for the firmware on my Mac, building and flashing should be easy. Retooling the NeoPixel firmware code hopefully would be as well, and then I could do a proper smoke test to see it light up (and hopefully not smoke)!

Read More Read More

NeoPixel Ring Mod – Part 1

NeoPixel Ring Mod – Part 1

On the bitcraze blog, Arnaud Taffanel posted an entry about a way to drive Adafruit’s NeoPixel Ring off the crazyflie’s STM32F103 ARM Cortex MCU. Obviously there were some technical hurdles to get over before they could implement support for driving the NeoPixel’s WS2812 LED chain. Adafruit’s well optimized drivers work great on Arduino but use the CPU for signal timing which doesn’t work so well on the more complicated crazyflie MCU. Not to mention the CPU can’t spare precious cycles on non-essential work like flashing LEDs when there’s critical duties (ie. flight performance) to attend to! Fortunately they found a solution using the STM32’s pulse-width modulation to create a signal the WS2812s understand and even more fortunately, they had a free timer output on the crazyflie expansion header to devote to the signal. Now, most of this is totally over my head (after all, I’m a layman with mostly software knowledge) but fortunately Arnaud detailed the solution quite well in the blog post and Marcus Eliasson posted a follow-up on it about a week later. Since the Bitcraze boys so graciously branched the crazyflie-firmware repository to implement the NeoPixel driver, I decided I could maybe accomplish this hack, so I set out to do it.

Read More Read More

Compiling Crazyflie Firmware on Mac OS X

Compiling Crazyflie Firmware on Mac OS X

UPDATE 2015-Aug-01: Bitcraze has recently merged the Crazyflie Nano (1.0) and Crazyflie 2.0 firmware source code. As a result, it is even easier to build firmware for either model on Mac OS X. See my article on the merge for more information on building the firmware.

Since I’m a Mac user, like I mentioned in my “Preparation” post, I naturally wanted to compile the Crazyflie firmware directly on a Mac. Of course, the Bitcraze boys provided a virtual machine that I can run on my Mac, but I don’t want to always use the virtual machine. Furthermore, if I can cross-compile on a Linux distro, obviously I can do it on Mac OS X as well. Since the STM32 MCU the Crazyflie uses is an ARM Cortex processor, I was worried it would be a nightmare setting up the toolchain build environment. I was pleasantly surprised to find out it wasn’t hard at all!

Read More Read More

Assembly: Battery Centering

Assembly: Battery Centering

The final step in the assembly of my Crazyflie was mounting the battery. It’s a simple thing, the battery mount, a square of double-sided mounting tape, a small 170mAh LiPo battery and a short two-wire connector. Easy as pie. But… The battery needs to be centered for a perfectly balanced airframe. The question is, how to go about achieving that quickly and simply? I thought I’d found an answer, but maybe it was just a pipe dream.

In my “vision” I pictured a device capable of allowing me to center the battery just right and achieve exceptional balance. In my reality I created a contraption that seemingly worked, but it may have just been dumb luck. Who was I to question results?

Read More Read More

Assembly: Soldering Leads

Assembly: Soldering Leads

The time had come for the moment of truth. This is where the rubber meats the road, as the old adage goes. It was time to solder the motor leads. Soldering is a skill I acquired in my youth. My father and grandfather both worked with electronics and as a result, I had many opportunities to solder as a child. The problem was, it has been at least 20 years since I last soldered. I was seriously out of practice and worse still, I’ve never had to work on such micro-electronics before. There’s so much packed onto that tiny crazyflie printed circuit board (PCB). I had only ever soldered things I could actually see with my naked eye!! This was going to be an adventure.

Read More Read More