Browsed by
Tag: Ultimate7e

Ultimate7e: Adding 2 extra potentiometers

Ultimate7e: Adding 2 extra potentiometers

Ultimate Devo7E with 2 potentiometers.
Ultimate Devo7E with 2 potentiometers.

Having upgraded my 7E to 6 switches, the next thing I worked on was to add 2 potentiometers to it. These will show up as AUX4 and AUX5 inside the DeviationTX firmware.

It’s a slightly trickier process than the switch upgrade, as there are no convenient pins on the main board to use. As such, it requires soldering directly to the pins on the processor. This however, like the processor upgrade, can be done safely if you take the necessary precautions to prevent accidentally creating solder bridges on the processor. Here’s how to get it done.

Hardware needed

First off, here is the list of items you’ll want to have on hand to perform this modification.

  1. Soldering iron with a small size conical tip.
  2. Kapton tape.
  3. 30AWG or smaller wire to solder to processor pin (I used 36AWG teflon wire from Hobbyking).
  4. Some male and female pin headers (optional but highly recommended).
  5. Two 5K potentiometers.
  6. Some small gauge wire for general wiring.
  7. Hot glue (optional).

Isolate pin

Kapton tape is used to isolate the pin we want to solder to.
Kapton tape is used to isolate the pin we want to solder to.

The pins on the processor are small and spaced very closely together. In order to prevent solder bridges, it is better to use Kapton tape to cover and protect the pins that we do not want to get solder onto. In the picture above I used 2 small pieces of Kapton tape to cover all close by pins except pin 14 (PA 0). This pin will be used for AUX4.

Position the wire

36AWG wire taped into position.
36AWG wire taped into position.

Pre-tin and cut the tinned portion to size. After that bend it to the shape you need and tape it into position. I decided to position the wire on to the pad extending off the pin as opposed to having it sit on the pin itself. The wire butts up against the pin nearly flush.

Take your time with this to position it exactly. Make sure that when you hands are removed, the wire sits on the pad with out needing extra pressure.

Solder the wire

IMG_20160420_234227
Wire successfully soldered onto processor pin.

Once you are happy, clean off your solder tip, dip it quickly into some flux, and touch it briefly to the wire tip. The solder on the pre-tinned wire should melt and bond to both the pad and the edge of the pin.

Both pins after wires are soldered onto them.
Both pins after wires are soldered onto them.

Once done with the first pin, gently test the solder joint. If it is good, repeat the same process with pin 20 (PA 4).

Route the new wires

Wires routed to a convenient position on the board.
Wires routed to a convenient position on the board.

Once both wires are soldered to the pins, check for solder bridges. Clean them up is necessary, then route the wires so that you have easy access to them. In my case, I attached a 2 pin header to the wires and hot glued it to the main board. Left goes to pin 14 (PA 0 – AUX4) and right is pin 20 (PA 4 – AUX5).

Notice that I left lots of slack in the wire while routing and taped it down in multiple positions. This prevents the wire from accidentally getting caught and pulled. In the event that a small accident should occur, the extra slack allows for some pull before the wires pull the pads or pins.

One other thing I did (that may or may not help), was to try to ensure that the wires cross other signal/power traces on the board at 90°. This is something I do for car audio when dealing with analog signals and trying to reduce induced noise.

Wiring to the potentiometers (Front)

u7e-2pots_wiring1_Fotor
Wiring points to female header at top of case.

We only need to route 3 wires from the front of the case to the back of the case where the potentiometers are mounted. The 3 wires needed are 3v3, PA0/AUX4, and PA4/AUX5. I did this by way of having female pin headers hot glued to the top of the case, so that separation would still be relatively easy.

For the 3v3 supply, I tapped it off of the existing potentiometer. It is the red wire nearer to the bottom of the chassis. Make sure to connect this to the center pin of the connector. This will prevent any damages to your processor should you accidentally flip your connector around.

Wiring to the potentiometers (Back)

u7e-2pots_wiring2_Fotor
Wiring points to the potentiometers.

On the back routing is much easier due to the space available. I terminated everything to a 3 pin male header, again with 3v3 in the center. The ground connection on both potentiometers are connected to each other and to the ground pin available at the battery connector at the bottom of the chassis.

The potentiometers are wired such that 3v3 and ground are on pins 1 and 3 respectively for both potentiometers. This ensures that they will increase/decrease for the same direction of rotation. You may want to test this first with your specific potentiometers using a small battery and a multimeter.

Deviation software upgrade

With all that done, we now need to do 2 more things.

The first is to download and install a new DFU file for devo7e-256. Unfortunately this is still in testing, so a Pull Request has not been sent to the main deviationtx repository for inclusion in the Master branch.

It is available for cloning from my Git repository here. You’ll want to clone the “ultimate7e” branch. I’ll also put it up on the deviationtx.com site under the test build section here. Use the regular steps for flashing any new DFU file.

;switch_types: 3x4, 3x3, 3x2, 3x1, 2x2, 2x1, potx2, potx1
;May occur more than once if necessary.
extra-switches = 3x4
extra-switches = 2x2
extra-switches = potx2

The next thing to do is to edit the hardware.ini  file. You’ll want to uncomment and add extra-switches = potx2  in there. Note that the extra-switches  option stacks for Ultimate7E. One line is needed for each type of switch (3-way, 2-way and potentiometer).

Ultimate7e: Adding 4 extra 3-way switches

Ultimate7e: Adding 4 extra 3-way switches

IMG_20160505_000620
Ultimate Devo7e with 6 switches.

For me, my biggest gripe with the Devo7e transmitter is that it comes with only two 2-way switches, HOLD and FMOD. My second biggest gripe is that it has no potentiometers. I know that there are mods available to get 2 extra 3-way switches, but I wasn’t really satisfied with that, so I set about looking for someway to get more.

The stock Devo7e has already reached it’s limit for new code so it wasn’t really possible to do this until I had upgraded the processor. If you are interested to see how to do the processor upgrade, read this. With the extra memory space that I had after the processor upgrade, I got around to adding 4 extra 3-way switches to my 7e. Here’s how to do it.

Background

Like the existing 3×2 switch mod, we will be using the existing button matrix to add the 4 switches. But because the button matrix is already fully utilised (except for 2 positions in the stock setup, we need to extend the number of rows for the matrix by assigning 2 more I/Os. The 2 I/Os (PC10 and PC11) will be hijacked from our existing HOLD and FMOD switches. In doing this it also means that we no longer have these 2 switches.

Not really a problem, as by doing this we get a total of 10 positions in the button matrix, 8 new and 2 that were not used in the stock setup. This gives us the ability to have 4×3-way switches and 2x2way switches. We could also do other configurations, but we then become limited by the space to attach switches to in the 7e chassis.

Given that the Devo7e is the only transmitter with HOLD and a 2 position FMOD, I decided to do away with the traditional switch names. Instead we have SW A to D for the 3-way switches, and SW E to F for the 2-way switches, as you see in the videos above.

Hardware needed

You’ll need the following items for this mod:

  • Four 3-way SPST switches
  • Two 2-way SPST switches (These are already in the stock devo7e)
  • Ten 1N4148 diodes
  • Lots of fine gauge wire

Wiring and hookup

Ultimate7e wiring diagram for four 3-way and two 2-way switches
Ultimate7e wiring diagram for four 3-way and two 2-way switches.

Above is the wiring diagram. Looks a bit complicated, but I wasn’t sure how else to show it. Lines of the same colour are connected together. You’ll need to solder in 10 diodes (1N4148) as per the direction indicated in the diagram.

For more clarity, assignment in the code for the matrix looks like this:

Button map assignment in source code
Button map assignment in source code.

This really is a lot of wiring to solder to the main board and get into the transmitter. I wanted to minimise this so I soldered to alternate points for pins and also added in 2.54mm pin connectors so that I could easily dismantle the transmitter. The pictures below should make it clearer.

PB6 and PB8 are soldered to switches and terminated in a 2-pin header at the top of the board
PB6 and PB8 are soldered to switches and terminated in a 2-pin header at the top of the board.
PB7 and PC6 are soldered to the LHS (Throttle side in mode 2) trim switches. Blue is PB7 and Red is PC6.
PB7 and PC6 are soldered to the LHS (Throttle side in mode 2) trim switches. Blue is PB7 and Red is PC6.
PB5 is soldered to the RHS (Elevator side in mode 2) trim switch.
PB5 is soldered to the RHS (Elevator side in mode 2) trim switch.
IMG_20160425_143916
Four 3-way switches with diodes and wire leads waiting to be connected. Note the direction of the diodes, it is the same for all 10 diodes.
Two 2-way switches on rear cover connected via 3 pin connector.
Two 2-way switches on rear cover connected via 3 pin connector.
Finished wiring. PC10 and PC11 are from the original 2-pin connectors from the HOLD and FMOD switches. Top right 3 pin connector hooks up to switches on rear cover.
Finished wiring. PC10 and PC11 are from the original 2-pin connectors from the HOLD and FMOD switches.
Main board reinstalled. Wiring is still quite clean.
Main board reinstalled. Wiring is still quite clean.

Deviation software upgrade

With all that done, we now need to do 2 more things.

The first is to download and install a new DFU file for devo7e-256. Unfortunately this is still in testing, so a Pull Request has not been sent to the main deviationtx repository for inclusion in the Master branch.

It is available for cloning from my Git repository here. You’ll want to clone the “ultimate7e” branch. I’ll also put it up on the deviationtx.com site under the test build section here. Use the regular steps for flashing any new DFU file.

;switch_types: 3x4, 3x3, 3x2, 3x1, 2x2, 2x1, potx2, potx1
;May occur more than once if necessary.
extra-switches = 3x4
extra-switches = 2x2
extra-switches = potx2

The next thing to do is to edit the hardware.ini  file. You’ll want to uncomment and add extra-switches = 3×4  and extra-switches = 2×2  in there. Note that the extra-switches  option stacks for Ultimate7E. One line is needed for each type of switch (3-way, 2-way and potentiometer).

If you decided that you wanted less switches, such as three 3-way and one 2-way, just wire as above using SW A/B/C for the 3-ways and SW E for the 2-way. After that, update hardware.ini  correspondingly. If you want only two 3-way switches, please use the methods used for the regular Devo7E. This modification only works for three or more 3-way switches.

That’s it for now. In case you were wondering, the potentiometers that you see in my 7e do work. The tutorial is here.

Ultimate7e: Building from source

Ultimate7e: Building from source

[UPDATE: 17th May 2016] While the method below can still be used to build from source, PhracturedBlue has release a Docker container that contains the build environment with a GUI to ease the process. Find the wiki documentation about it here.

Alternatively, if you do not want to build from source yourself, compiled versions can be found on the Test Builds page on deviationtx.com.

Let’s walk through the process of building DeviationTX from source. You’ll need to do this if you have upgraded your Devo7e processor as outlined here. Again you will need to make sure you have installed the items that I listed here.

Setup and clone Git repository

First thing we need to do is to create an account on GitHub. From there we then have the choice to either Fork or Clone the Deviation code. Forking allows us to maintain a copy of the code that we can edit for our own preferences, but we will need to deal with having to do upstream pull requests and potential merge conflicts as the main codebase is updated by the DeviationTX team. In this post we’ll talk about cloning only, which assumes that you are happy to take the default options as setup by the team, or if you make changes, you will need to set those options again the next time you pull the latest commit from GitHub.

Adding the DeviationTX repository.
Adding the DeviationTX repository.

In SourceTree, click on the “New Repository” button and select “Clone from URL”. Fill in “Source URL” with https://github.com/DeviationTX/deviation.git. You can also choose to edit the paths and name or just accept the defaults. Once done, click on “Clone” and wait for everything to be copied to the path you specified.

Setup Docker build environment

Using Kitematic to setup the build environment.
Using Kitematic to setup the build environment.

When you installed Docker, it should have also installed their management tool “Kitematic”. Open this up and click on the “New” button then key in “deviation” into the search field. This will bring up the Docker container that Mike (a.k.a mwm) has nicely prepared for us. The one we want is “deviation”. He has other images, but I won’t be talking about them here. To find out more, go to his forum post here.

Click on the “Create” button for the “deviation” container and wait for the image to download and install. You will then have the “deviation” image available on the left hand side menu under “Containers”.

Setup deviation volume path.
Setup deviation volume path.

With the container installed we now need to configure the volume path to the source code that we cloned with Git earlier. Select the “deviation” container and click on “Settings -> Volumes -> Change”, then select the directory that you had cloned the source code into. Once done, hit the “RESTART” icon.

Compiling DeviationTX

Compiling the DeviationTX source code.
Compiling the DeviationTX source code.

After the container has restarted, click on the “DOCKER CLI” button. This will bring up a terminal window that will allow you to access the command line for the deviation container. Type in docker attach deviation and hit the “enter” key twice. You should now be inside the deviation container. Type in make TARGET=devo7e-256 or one of the other targets that you need.

2016-04-17 02.12.09 pm

Wait for it to complete and you will have the DFU file that you need sitting in the src directory ready to be flashed to your transmitter. Note that if you have upgraded your processor in the 7e, you must use the Walkera Dfuse Tool and not Deviation-Uploader.

Updating to the latest commit and recompiling

Pull latest commit of DeviationTX.
Pull latest commit of DeviationTX.

When you wan to update to the latest commits by the team, you will need to first do a pull and merge into your cloned copy. Do this by clicking on “Pull”, select “origin” and “master”. Also check on “Commit merged changes immediately”, then click on “OK”.

Go back into your deviation container on Docker following the previous steps. Run make clean and make distclean before make TARGET=devo7e-256.

Hope you’re having fun!

Ultimate7e: Flashing the bootloader

Ultimate7e: Flashing the bootloader

We’ve now got a nice new processor installed in our 7e and we need to flash a boot loader onto it. The bootloader we need is the 256K variant that PhracturedBlue has so nicely modified for us. It is based on the original stock Walkera bootloader, but allows for files larger than 128K to be uploaded. You can find it from the links that I put in the “DeviationTX: Build environment and tools” post. I’ll assume that you’ve also already acquired and installed the other items from the post. You’ll want to download the file named “devo7ebootloader_256.bin”.

IMG_20160417_030058

There are 3 sets of pads on the main board that we are interested in:

Programming Header: Connects to our ST-Link programmer. We’ll use the right 4 pins (ignore the RST pin) which are SDIO, CLK, GND, and VCC(VDD).

BOOT0: BOOT0 needs to be shorted together on power up.

Power Switch Bypass: If your ST-Link programmer does not provide power, you will need to have your battery hooked up and the bypass pins need to be shorted together to power up. Alternatively you can also reach around and turn on the power switch.

ST-LINKv2 Programmer (Clone)
ST-LINKv2 Programmer (Clone)

On our ST-Link programmer, we will want to use the SWD port and the pins that we will want to use are 3V3, CLK, GND, and IO(SDIO).

WARNING: DO NOT HOOKUP THE 5V PIN! YOU WILL KILL THE PROCESSOR!

ST-Link wired to the Devo7e main board
ST-Link wired to the Devo7e main board

Everything is wired up. Notice the jumper I put on the BOOT0 pin. Please check and recheck that pins are connected properly and in the right order. Especially the power (VCC/VDD/3V3) and ground. Most mistakes that kill the board happens because of wiring error. Don’t plug the USB end to your computer yet.

ST-Link Utility needs to be "Run as administrator"
ST-Link Utility needs to be “Run as administrator”

Start up the ST-Link Utility programme on your computer. You will need to right click on it and have it “Run as administrator”. When Windows prompts you for permission, remember to click on “Yes”.

ST-Link Utility running and connected to Devo7e
ST-Link Utility running and connected to Devo7e

Once the programme is running, go ahead and connect the ST-Link programmer to your computer. We will now try to connect by going to the menu and clicking on “Target -> Connect” or clicking on the 3rd icon from the left that looks like a power plug. Make sure that the connection is successful, if not recheck your wiring.

2016-04-17 04.13.08 am

Once you have successfully connected, do the following:

  1. Click on “Target -> Erase Chip” or the 5th icon from the left. Select “Yes” when it asks if you want to continue.
  2. Click on “File -> Open file” and select the “devo7ebootloader_256.bin” bootloader file that you should already have downloaded to a local drive.
  3. Click on “Target -> Program & Verify”.
  4. Make sure that “Start address” is set to “0x08000000” and select either of the verification modes (both work fine).
  5. Click “Start” button.

2016-04-17 04.15.47 am

Once it is done, check you status window to see that everything went well. If it did, select “Target -> Disconnect” or the 4th icon from the left. Disconnect the wiring, remove the BOOT0 jumper and reassemble your radio.

Congratulations! You have just successfully upgraded your processor and are now ready to install DeviationTX with the Walkera Dfuse tool!