Bitcraze did a great job when they implemented the Crazyflie system. With a Crazyflie and Crazyradio, a PC, and a game controller, anyone can get a mini-quadcopter flying. It’s an extensible system made of ubiquitous pieces. For what it’s worth, flying with a game controller is pretty good. Control is comfortable and easy to learn and the fidelity is high. But… What does a Crazyflier do when she wants more control or less system overhead or both? The answer is the Devo7e remote transmitter from Walkera! If you want to know more about the Devo7e and modability, check out the primer thread at the RC Groups forum. The following is a journal, if you’re just looking for the steps needed to mod your Devo 7e for use with the Crazyflie, check out my project on Hackster.io. If you’d rather have more color, read on….
The Walkera Devo 7e is probably the cheapest Walkera radio available but it’s also extremely hackable. So hackable that a firmware replacement and hardware modification can make it a Pro controller for a Crazyflie! The Crazyradio uses a 2.4GHz NRF24L01+PA/LNA radio and you can find those modules online in various form factors for relatively cheap ($5 – $10 USD). The DeviationTX project has reverse engineered a few Walkera radios (STM32 based) and created custom firmware to control a more radio modules, the NRF24L01 being one of them. This is a good thing for us Crazyfliers as it opens up the possibility of using a nice Walkera radio with our beloved Crazyflies!
The write-up at HacksMods.com is an exceptional for a guide to modding the hardware. It’s what I used to mod my own Devo 7e. The NRF24L01 module I ended up using though is one with a ceramic antenna. I was concerned the onboard antenna wouldn’t have very good reception but so far, both indoors and outdoors, it’s been excellent. There are a number of pinout diagrams for one format of the NRF24L01 board (the one that’s often used with Arduino) but the format I ended up with was a little different. I had trouble finding a diagram for that one but a Crazyflie forum post by user KaR[V]aN had a photo of his installation so I created a pinout diagram based on that.
I had originally installed a different NRF module (one of the other form factors) and it had some problems. I should have tested it before soldering it in… The output kept surging and caused the Crazyflie motors to ramp up and down, up and down, over and over again. It took me a little while to narrow it down to a bad NRF module and once I did, I decided to put a different one in. I also figured it would be a good idea not to “permanently” solder it in the radio, so I elected to put a connector in the wiring. I couldn’t find the precise connector I wanted (a mix of my laziness and there being way too many connectors available on the market), and I didn’t want to wait any longer since I’d been sitting on this project for a while. I decided to make my own from male and female PCB headers and some heat-shrink tubing. The connectors turned out pretty well and are slim enough to fit in the limited space of the radio housing. The nice thing is that I’m free to easily swap out other modules if I want, thus giving me the power to try out different antenna configurations.
Once the hardware mod was done, I re-flashed the radio to get the deviationTX firmware on there. Knowledge of how to do that was a littler harder won than the hardware mod. Even with all the resources on the deviationTX website, I still had a bit of trouble understanding the exact steps. Even after I did learn what to do (see below), I used a nightly build off their website and it turns out that their Crazyflie implementation has a specific setup that I didn’t want. First, it’s for the Crazyflie Nano (1.0). Secondly, it starts out with a ramped up thrust (not 0). And finally, it is set up for “plus” mode (M1 motor forward) rather than the default “X” configuration the Crazyflie 2 flies in. The non-zero starting thrust also runs afoul of the current Crazyflie firmware and it’s “zero thrust” safety lock so I had to disable that check and reflash my Crazyflie 2 firmware before I could even try out the transmitter. Fortunately, Tobias had written about this in a blog post on the Bitcraze site so it didn’t catch me off guard. Still, the configuration didn’t work well and it was hard to fly the Crazyflie 2.
I remembered a forum post Tobias had made shortly after his blog post wherein he mentioned he’d fixed those firmware issues in a fork of the deviationTX repository. I grabbed the binary he’d posted and ran with that. It certainly did make flying easier and I could re-enable the zero thrust safety check in the Crazyflie firmware so I wouldn’t need a modified Crazyflie firmware to use the Devo 7e transmitter. Another cool side-effect is that it works fine with Crazyflie Nano (1.0) as well!
Since I was already up in the guts of the radio, I decided to do all the transmitter hacks. Following the guides on the HacksMods site, I installed an A7105 module for Hubsan (et al.) support and I modded the stock CYRF6936 module to increase the range by enabling the power amplifier. I’m not sure how much use I’ll get out of these two mods but I figured, since I was already inside the radio, and since it will increase resale value if ever want to sell it, I’d just make the extra effort.
Finally, I noticed one of the cost cutters Walkera used with the Devo 7e was removing the LEDs in the translucent bar near the top of the transmitter’s face. I like LEDs and I figured having one makes it easier to know if the radio is still on (especially if you set it the display backlight turn off after a specified interval), so I decided I’d try to mod an LED back in myself.
I happened to have a few loose, single NeoPixel (WS2812) LEDs lying around and a Trinket Mini that I wasn’t using for anything. So, I coded up a color fade routine, flashed it to the Trinket and wired the Trinket up to the LED. Then, it was simply a matter of drilling a hole in the backing plate where the LEDs sit in the Devo 7e and hot-melt gluing the NeoPixel there. Finally, I wired the power into the Trinket from the spare positive through-hole on the Devo 7e board. Now, when I turn on my Devo 7e, the Trinket Mini powers up and I have a color-fading LED on the front panel of my controller so I always know if I’ve left it on. Plus it gives any onlookers a distraction when I’m in the midst of crashing my Crazyflie 2 yet again!
1) Download the Java uploader built by the deviationTX folks. It’s available from their DFU tools downloads page. With this, I didn’t need to use the Walkera OEM software in windows and could instead do the flash purely on my Mac. T
2) Download the deviationTX build created by Tobias. Then unzip it.
3) Hold down the “EXT” button on the transmitter (top left of button interface) while turning it on. A screen on the transmitter with show “Program Update …..” (and similar in Chinese as well). This puts the Devo 7e into DFU mode.
4) Plug the Devo 7e transmitter into my Mac using a USB mini B to USB A cable.
5) Launch the DeviationUpload-0.8.0.jar app. It’s a GUI app so it’s sufficient to simply double click it. You might get a warning if you don’t have Java runtime installed so then you’ll have to go get it and install it (just one of the many reasons Java is annoying!) The application window should show up and you should see “Devo 7e” in the top field next to “Transmitter.”
6) Click the “DFU” tab. Then click the “…” button next to the “File” field. Select the DFU file (deviation-devo7e-v4.0.1-cf2-6464c82.dfu) in the archive Tobias created that you downloaded in step 2 above.
7) Click the “Send” button at the bottom of the window. The progress bar should move as it uploads and finally a “Copy Complete” message should appear once it’s done. Click “OK” to clear that message. Quite the “DeviationUploader” application. That’s it for the DFU upload but there’s still some more work to get deviatonTX on the transmitter.
8) We need to get the deviationTX file system on the transmitter so first, turn it off. Then, while holding the “ENT” button (top right of button interface) turn it on again. The screen should show a big USB symbol and you’ll find a volume titled “NO NAME” mounted on your computer.
9) Trash all the files on the “NO NAME” volume. We’ll not be needing them. Next, copy all the files from Tobias’ archive except for the DFU file (deviation-devo7e-v4.0.1-cf2-6464c82.dfu) and the “Updating.MD” file to the “NO NAME” volume.
10) Once the files have copied over, we need to enable the NRF24L01 module and it’s power amplifier. To do that, open the file “hardware.ini” and find the following lines:
; enable-nrf24l01 = A14 ; has_pa-nrf24l01 = 1
…and delete the leading semicolons and spaces, then change the “A14” to “A13” so you have this:
enable-nrf24l01 = A13 has_pa-nrf24l01 = 1
Now save the file and your NRF24L01 module should be active.
11) Finally, eject (unmount) the “NO NAME” volume and immediately pull the USB cable out of your computer or the volume will remount itself. Turn off the transmitter. Now the Devo 7e transmitter is running the deviationTX firmware and file system and has the the NRF24L01 module (with power amplifier) enabled. If you turn the transmitter on again, you should see the dviationTX start-up screen and display the firmaware version at the bottom of the display. If you don’t, you’ll need to do some troubleshooting.
The last thing to do is to setup a Crazyflie model on the transmitter. You can do this through the interface and it is a good way to learn how to use the deviationTX interface. The fastest way to accomplish this however, is to simply download my Crazyflie 2 model file and copy it to the “models” directory on the Devo 7e file system. Then you can change whatever settings you don’t like. The important thing here is to set your address correctly using the “fixed_id” field. The special sauce for this (as detailed in Tobias’ blog post) is:
The data rate and channel are combined in the fixed id using channel as lowest two decimal digits and the rate the first where 0, 1, and 2 for 250kbit/s, 1Mbit/s, and 2Mbit/s respectively. So channel 80 on 2Mbit/s is encoded as 280 and channel 80 on 250kbit/s as 80.
If you decide to get a Walkera Devo 7e and mod it for your Crazyflie 2, I think you’ll be quite impressed. Flying with this transmitter is smooth and my precision has increased substantially since I started using it. Of course, there will always be times when I need to use my laptop, the Crazyradio PA, Crazyflie client software, and a gamepad but when I don’t, the Devo 7e is the first thing I grab!
There’s a ton of good info at Daryoon’s Devo 7e thread on the RCGroups forum. I used information there when doing my mods.