Parts & Tools
To disassemble and program the Dash you'll need at least the following parts and tools:
- T5 Torx (star-shaped) driver.
- Small and large flat-head screwdrivers or a jimmy for prying.
- Soldering iron/station with a fine tip.
- Thin solder (~0.02" or less thick) and thin wires (26-30 AWG).
- STLink V2 programmer and female jumper wires for accessing its pins.
- Vice, helping hands, or other board holding tools.
- Magnification and light for inspecting small connections.
- Solder wick and/or sucker in case you make a mistake.
It will also help, but isn't required, to have a 3.3 volt serial to USB cable so you can output debug information from the Dash CPU and read it on your computer.
Disassembly
You'll need to start by disassembling the Dash so you can access programming test pads on the circuit board.
Start by prying the sticker off the top of the dash using a thin screwdriver.
I found it was easiest to start from a long edge like the top or bottom and wedge the screwdriver inbetween the case and sticker, then pry up the sticker to get started. Don't let the screwdriver slip and hurt you!
Then unscrew the 3 screws that hold the top of the case to the Dash. You will need a T5 size Torx (star-shaped head) driver to remove these screws.
After removing the screws you will need to pry the top cover off the bottom of the Dash as it is glued firmly in place.
I found sticking a large flat screwdriver into the groove between the two case halves and twisting it slowly while pushing in was the quickest way to separate the halves of the case. Note that unless you are very careful you will probably mar the plastic of the case (it's just a beauty scar to show the world you've hacked your Dash!).
Pull the Dash circuit board out of the case. You will notice on the back of the Dash board a AAA lithium battery is connected. Unfortunately the battery is welded to tabs on the circuit board so it is not a simple process to remove or replace the battery.
To remove the battery I found it was easiest to use flush cutters and snip the metal tabs that hold it to the circuit board. Remove the ground / negative side of the battery first, then remove the positive side and pull the battery from the board (it is glued in place lightly). Don't try to remove the positive side first as you will likely short the battery against the grounded metal shield of the microphone near it.
Under normal use the Dash will spend most of its time in a low power sleep mode where it consumes extremely small amounts of power. When the button is pressed the Dash's processor wakes up, connects to the WiFi network, and sends a signal to Amazon's servers. This means the tiny battery of the Dash can last for a very long time, even years, because it is rarely ever awake.
However for your own projects unless you are careful to sleep and use the processor as little as possible you will likely exhaust the Dash's battery in a short amount of time (hours). Since the battery can't easily be replaced the best option is to completely remove the battery from the Dash and power it from an external power source.
After removing the battery your Dash is completely disassembled. Now follow the steps below to solder to the programming test pads of the Dash's circuit board.
Soldering
Once you have access to the circuit board first check the revision number printed on the board. Be aware this guide was written with a Dash revision 01 (notice the REV01 printed on the board). Different revisions might not have the same test pads exposed so be careful to check before you solder any connections.
Below is a diagram of the Dash circuit board with the important test pads labeled. Much of this Dash reverse engineering comes from Matthew Petroff's excellent Dash teardown blog post and dekuNukem's Exploring Amazon Dash button project (in particular check out his more complete test pad diagram).
Note that some of the highlighted test pads above are silver colored because they have solder left on them from previous connections that were made. An untouched board will have shiny copper pads everywhere.
To connect to the Dash's CPU you can use its single-wire debug interface by soldering wires to at least the following connections:
- PA14 SWCLK in the upper left corner.
- PA13 SWDIO immediately below SWCLK.
- 3.3V power in the bottom left of the board.
- RESET in the bottom middle of the board.
- GROUND on either of the large battery holder solder joints on the far right of the board.
Although the test pads are somewhat small it's actually pretty easy to solder to them if you follow this advice:
- Use thin wires like 26-30 AWG thickness.
- Use a fine point soldering iron tip. There aren't a lot of obstructions near the test pads so a larger iron tip might work, but you'll have a much easier time with a good quality soldering station and fine tip.
- Use thin solder like 0.02" or smaller diameter.
- Tin each test pad and wire separately by heating them with the iron and melting a bit of solder on them. Then hold the tinned wire to the tinned pad and touch them with the iron to flow the solder and make a connection.
- Use light and magnification to inspect each joint to make sure there aren't shorts with other solder pads or parts.
- After a joint cools gently tug on the connection to ensure the joint holds firm and doesn't break. If a connection isn't solid touch it with the iron to flow the solder again, or even remove the wire completely and start over.
- Before you solder anything think through where each wire will go and how you'll hold the iron. You don't want to solder a wire in the way of where you need to move the iron to reach another test pad.
- If you make mistakes don't worry, just flow the solder with the iron and pull off the wire. Use a solder wick or sucker to pull off excess solder and start over. Just be careful not to use too hot a temperature or hold the iron too long on the board to prevent lifting the pad or burning the board.
In addition to the required test pads above for programming you might also solder wires to these pads:
- PC6 USART6 TX in the upper left. You can use this pin as a serial output to print debug messages from the CPU, or just as a GPIO pin.
- PC7 USART6 RX immediately below USART6 TX. This can be used as a serial input (not currently used in the example code), or as a GPIO pin.
Below you'll see a picture of a board with wires soldered to all the programming test pads, and the PC6 & PC7 connections:
After you've followed this guide and have written code to the Dash you might consider putting it back in its case to keep it protected. If you drill a small hole in the cover of the Dash on the opposite end of the button you can pull the wires through like below:
Unfortunately the case itself needs to be glued or taped shut since it's not designed to be securely closed again by itself.
Programmer Connections
To connect the Dash to the STLink V2 programmer make the following connections between the wires and programmer:
- Dash PA14 SWCLK to STLink V2 SWCLK.
- Dash PA13 SWDIO to STLink V2 SWDIO.
- Dash RESET to STLink V2 RST.
- Dash GROUND to STLink V2 GND.
- Dash 3.3V power to STLink V2 3.3V power. Don't try to send 3.3V power into the positive battery terminal! The Dash uses a small boost converter to take the ~1.7V battery voltage up to 3.3V and will be damaged if you send in a higher voltage. Instead send 3.3V power into the test pad noted in this guide. If you can't use the test pad you can instead power the Dash with a single AA or AAA battery (i.e. a ~1.5-1.7V source) connected to the positive and negative battery connections.
Once you've connected the Dash to the programmer continue on to learn how to setup a toolchain that can compile and upload code to the board.
Text editor powered by tinymce.