Browsed by
Tag: Devo7e

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: 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!

 

DeviationTX: Build environment and tools

DeviationTX: Build environment and tools

This is a short post of the build environment and tools that I have been using to experiment with and hack the Devo7e. With these tools, we can recover from permanently bricking the transmitter (most of the time).

A quick list to make everything easy to find:

Everything above except Docker and Deviation Uploader requires a Microsoft Windows environment. In my case I run a Windows 10 Virtual Machine on OS X.

Ultimate7e: Upgrade the Devo7e processor

Ultimate7e: Upgrade the Devo7e processor

STM32F103RET6 processor installed in a Devo7e.
STM32F103RET6 processor installed in a Devo7e.

I took the plunge and decided to upgrade the processor in my Devo7e transmitter to a STM32F103RET6. This upgrade is not yet officially supported by the DeviationTX team yet, but I figured it was doable as the upgrade doesn’t really affect the code much and I’m fairly comfortable with compiling from source code. In this post, we’ll look at the hardware end of the upgrade.

Desoldering and resoldering a SMD processor isn’t really that hard and the potential for damaging your board can be minimised if you take a few precautions that I’ll be outlining here.

You can choose to upgrade to either a STM32F103RCT6 (256kb Flash/48kb SRAM) or a STM32F103RET6 (512kb Flash/64kb SRAM). In my case I went for the STM32F103RET6 as I had a spare lying around on a development board from another project.

Hardware needed

Some tools you’ll need for this:

  • Hot air gun
  • Soldering iron
  • Solder
  • Solder Paste
  • Soldering Flux (liquid no clean type works best)
  • Soldering Wick/Braid
  • Kapton Tape
  • Aluminium Foil
  • Aluminium Tape (optional but recommended)
  • Isopropyl Alcohol
  • Toothbrush
  • Magnifying Loupe
  • Tweezers

Protecting the main board

Since you are here and thinking of attempting the processor change, I’ll not go through the steps involved to remove the main board from the transmitter chassis. Suffice to say, it must be removed or you could seriously damage the chassis.

Taping down the surrounding components with Kapton tape.
Taping down the surrounding components with Kapton tape.

The first thing that we do is to tape a few pieces of Kapton tape to hold down and protect the other SMD components that are near to the processor that we want to desolder. This prevents us from accidentally knocking off an adjacent component during removal and installation of the processor.

It is important to only use Kapton tape and not some other tape as the area will be under high heat. You really don’t want a molten plastic mess on your board.

Aluminium tape to act as a heat shield for the other components.
Aluminium tape to act as a heat shield for the other components.
Aluminium foil shields the rest of the board.
Aluminium foil shields the rest of the board.

Next we use pieces of aluminium tape to shield the immediate surrounding area around the processor followed by aluminium foil to shield the rest of the board. At the end of all this, you only want the processor and it’s pins visible and exposed.

Removing the processor

Now we are ready to use the hot air gun to remove the processor (this can also be done with a solder rework station, but if you have a rework station, you really don’t need to be reading this).

Turn on your hot air gun to the lower setting and hold it about 10cm or so above the exposed processor. After about 1 minute, use your tweezers to try to gently lift the processor. It may come off or may take longer. This step takes patience, constant checking and a bit of gentleness so that you don’t accidentally damage anything. Eventually the solder will melt and you can easily lift off the processor. If for some reason, it still won’t budge after 3 minutes, you may not have a hot air gun that can get to the required temperature (about 280 degrees celsius). If that’s the case, find another hot air gun.

Pads after some cleaning with soldering wick.
Pads after some cleaning with soldering wick and flux.

After you remove the processor, use the soldering wick/braid and your soldering iron to clean up the pads. Applying some flux at this stage makes the cleaning process go a lot smoother. Don’t do it for too long as you run the risk of burning the board, just clean it up of any bumps that the previous solder left so that it is easier to position and align the new processor.

Diluted solder paste applied to the pads.
Diluted solder paste applied to the pads.

Solder on the new processor

Let things cool down a bit before you start this part. We basically want to apply a small amount of solder paste to the pads. We don’t need much so I generally dilute my paste with a bit of liquid flux to make it easier to spread over the pads. The extra flux also makes the solder flow better during heating. Don’t go crazy with the paste here cause too much paste can create a mess of solder bridges that then needs to be cleaned up.

New processor carefully aligned on the pads.
New processor carefully aligned on the pads.

With the paste on the pads, gently place the processor directly from the top with your tweezers. This will minimise the paste getting pushed around to unwanted areas. Check that the big dot on the processor is in the corner that is diagonally cut off on the board. This is pin 1. After it is down, gently nudge it around with your tweezers to get all the pins properly aligned. Use your magnifying loupe to check and recheck until you are sure that every pin is aligned. This step is very important so do not rush this.

If you find that the soldering paste has obscured your view, use a toothpick to scrape some away so that you can see the pads aligning with the pins.

New STM32F103RET6 processor after cleaning with isopropyl alcohol.
New STM32F103RET6 processor after cleaning with isopropyl alcohol.

After making sure all the pins are aligned, we will again use the hot air gun. Hold the hot air gun (on low setting cause we don’t want to blow the processor off the board) about 10cm above the processor. Watch the solder paste and look for it to start melting. As it melts it will start to draw itself onto the pads and pins. Look to make sure that this has happened for all 4 sides then remove your gun.

Check & clean up

Let things cool down again and inspect all the pins with your magnifying loupe to check again for pin alignment and solder bridges (2 or more pins shorted together by excess solder). If you find any, try applying some flux and dragging your soldering iron over those pins. This can help to clear it up. If there is just too much solder, then apply some flux and gently use your soldering wick/braid to wick the excess solder away. Check and recheck this, cause any shorted pins can damage both the new processor and other components when power is applied.

Once you are happy with your work, remove the aluminium foil and Kapton tape. Apply some isopropyl alcohol to the processor area and use your soft brush to clean the area up. Check in the corners under the processor to make sure no solder paste was left behind there. Once this is done, you can get ready to flash the Walkera bootloader onto the new processor.

Read this post for instructions on flashing the bootloader.