Bitcraze did an awesome job with their flight controller and a standard game pad for flying the Crazyflie 2 but, if you want the best flight experience possible, a dedicated transmitter is unsurpassed. Fortunately, with a Walkera Devo7e transmitter, an NRF24L01+ module, and the deviationTX firmware you can quickly hack up your own dedicated, handheld flight controller for the Crazyflie 2! I certainly didn't create this hack - that was done by people much smarter than me - but I took advantage of their work and I'm here to write about how to do it.
Step 1: Open the Devo 7e transmitter.
***WARNING: This will void the warranty on your transmitter***
On the bottom of the transmitter, cut the "Original Cover Label".
Next, pull the grip pads off the sides and back of the transmitter to expose the screws and permit separation of the two halves of the transmitter case. Use the slots and pull gently to remove the pads.
Then, using your screwdriver with a 2mm hex head, remove the five screws holding the two halves of the transmitter case together on the back side of the transmitter.
After removing the screws, carefully pull the two halves of the transmitter case apart. Pull the halves slowly because there are two wires that need to be disconnected before the case will completely come apart.
Step 2: Connect the NRF24L01+ module to the Devo 7e.
Refer to the following pin-out image and use your soldering iron and solder to attach leads to the NRF24L01+ module. You do not have to use the exact wire colors shown in the image but it is easiest to use different colors for each pin so as not to get confused when wiring to the Devo 7e. Keep the leads around 8 or 9cm long. Also, the VCC and CE pins both wire to the same spot on the controller so you can simply bridge the VCC and CE pins on the NRF24L01+ if you like.
Refer to the following image and solder the wires from the NRF24L01+ to the corresponding point on the Devo 7e circuit board. Note that both the VCC (red) and CE (pink) pins are wired to the same spot on the controller (you can simply bridge the VCC and CE pins on the NRF24L01+ if you wish).
Use a piece of double-sided foam tape to mount the NRF24L01+ module on the flat panel inside the Devo 7e case near the base of the existing antenna. For some added protection, you can wrap the module in electrician's tape, heat shrink tubing, or Kapton tape. For good measure, leave the ceramic antenna exposed.
With the module soldered and mounted, reverse the actions in Step 1 to re-assemble the Devo 7e case. Just use one or two screws to close the two halves of the case and don't put the grips back on yet. We'll check that the module is recognized before completely reassembling the transmitter in the last step.
Step 3: Flash the deviation firmware and install the necessary files.
Now we need to put the deviation firmware on the Devo 7e, install the filesystem, and copy over the hardware.ini, and model1.ini files. Documention on installing deviation is available in the DeviationTX user manual.
Download the v0.8.0 Deviation Uploader from the DeviationTX website.
Install four AA batteries (alkaline, NiCad, or NiMH) in the Devo 7e transmitter. Then, put it into DFU mode by holding down the EXT button while turning the transmitter on. A special screen that reads: "Program Update ....." will show on the display.
Plug the USB cable that came with the Devo 7e into the USB socket on the side of the transmitter. Then plug the other end of the cable into your computer. Download and unzip a deviation-devo7e-v5.x.x-nnnnnnn.zip file from the deviationTX nightly builds (where 'x' are version numbers and 'nnnnnnn' is a GitHub hash). Run the Deviation Uploader tool by double-clicking the JAR file. "Devo 7e" should show up in the field at the top of the Deviation Uploader tool window.
Click the "DFU" tab, then click the "..." button next to the "File" field. Select the deviation-devo7e-v5.x.x-nnnnnnn.dfu file from the deviation-devo7e-v5.x.x-nnnnnnn.zip and click the "Open" button. Click the "Send" button and wait for the "Copy Complete" dialog to show. Finally, click the "OK" button. Your Devo 7e has been flashed with deviation firmware (with Crazyflie 2 modifications).
Now we have to copy the file system to the Devo 7e. Turn off the transmitter and put it into USB mode by holding the "ENT" buttton while turning the transmitter back on. A large USB symbol should show on the display and a volume will mount on your computer.
In the newly mounted volume, delete all of the existing files. Then, copy the following files from the deviation-devo7e-v5.x.x-nnnnnnn.zip to the mounted volume (basically everything except for deviation-devo7e-v5.x.x-nnnnnnn.dfu, debug-devo7e-v5.x.x-nnnnnnn.zip, and UPDATING.md).
- datalog.bin
- errors.txt
- hardware.ini
- layout
- media
- modelico
- models
- protocol
- template
Replace the hardware.ini file on the volume with the one from the "Code" section of this project. Then replace the model1.ini file inside the models folder on the volume with the one also from the "Code" section of this project.
Unmount (eject) the volume, and quickly turn off the transmitter or disconnect the USB cable. The volume will remount if you do not turn off the transmitter or remove the USB cable quickly enough. Remove the USB cable from the Devo 7e.
Make sure the thrust (the left stick on a Mode 2 Devo 7e) is at it's lowest position (0% thrust), then turn on the Devo 7e. The NRF24L01+ module you installed is active in the hardware.ini file you copied to the Devo 7e file system. If the module is recognized correctly, the deviation start-up screen should appear on the Devo 7e display. If you get an error message about a missing module, go back and check your soldering, wiring, and module. If the there are no errors, the start-up display will change to the Crazyflie 2 model display.
To "pair" the Devo 7e with your Crazyflie 2, the Crazyflie's radio channel and bit rate must be set as the "Fixed ID" on the transmitter in the "Model setup" screen. To get to the "Model setup" screen, we'll need to go through a few other screens.
Press the "ENT" button to enter the "Main menu." Press the "ENT" button again to enter the "Model menu" and then press the "ENT" button once more to enter the "Model setup" screen.
At the "Model setup" screen, press the "DN-" button eight times until the "Fixed ID" field is highlighted. Then, press the "ENT" button to change the "Fixed ID" value.
The "Fixed ID" value is the combined values of data rate and channel where 0 is 250kbit/s, 1 is 1Mbit/s and 2 is 2Mbit/s. The data rate is the first digit and the channel is the second two digits. Therefore, in my photos, the datarate is 2Mbit/s (2) and the channel is 6 (06) resulting in 206. The data rate and channel here must match what is set in your Crazyflie's firmware configuration.
Step 4: Test connectivity and control.
At this point, your Devo 7e is fully capable of controlling your Crazyflie 2. Turn off the transmitter, make sure the thrust (left stick on a Mode 2 Devo 7e) is all the way down (0% thrust), then turn the transmitter on again. It should be broadcasting on your specified channel at your specified data rate. Make sure your Crazyflie 2 is fully charged, then turn it on. Shortly, the M4 LED should start flashing green as the Crazyflie 2 is connecting to the Devo 7e. If you slowly push the throttle up, you should see the Crazyflie 2's propellers rotating faster. Give it some thrust and it should take off. In this default configuration, with a Mode 2 Devo 7e, the left stick controls thrust and yaw, and the right stick controls pitch and roll. Make sure these inputs are acting correctly. Turn the Crazyflie 2 off, then turn off the transmitter.
Step 5: Reassemble the Devo 7e and fly the flie!
If all is working as it should, replace the remaining screws and press the grip pads back on to the transmitter case. Your Devo 7e is ready for action. Turn on the transmitter then turn on the Crazyflie 2 (always best to power on in that order - transmitter first and Crazyflie second). Confirm connectivity and go fly!
You'll find the Devo 7e an exceptional controller for the Crazyflie 2. The deviation firmware you installed makes the transmitter exceedingly configurable. You can change the sensitivity of the sticks, rearrange controls, and even create new models. Now, the sky, as they say, is the limit!
Comments