Skip to content

Commit

Permalink
new dw-link probe V3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Sep 20, 2023
1 parent 7c75dca commit e64be54
Show file tree
Hide file tree
Showing 11 changed files with 2,580 additions and 1,738 deletions.
Binary file added docs/SMD-soldering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 7 additions & 10 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,15 +626,13 @@ The basic adapter is quite limited. It can only supply 20 mA to the target board
* unidirectional (conditional) level-shifters on the ISP lines, and
* high-impedance status for the two output signals MOSI and SCK when ISP is inactive.

Such a board does not need to be very complex. The electronic design is minimalistic. It uses just two MOS-FETs, one LED, one voltage regulator, and some passive components. We need to (conditionally) level-shift the RESET line in a bidirectional manner and the SPI lines unidirectionally. One needs to shift the MISO line from 3.3-5 V up to 5 V, and the MOSI and SCK lines from 5 V down to 3.3-5 V. For the former case, no level shifting is done at all, relying on the fact that the input pins of the hardware debugger recognize a logical one already at 3.0 V. For the RESET line, which is open drain, we rely on the same fact. This means that this hardware debugger cannot deal with systems that use a supply voltage with less than 3 V, though.
Such a board does not need to be very complex. The electronic design is minimalistic. It uses just three MOS-FETs, one LED, one voltage regulator, and some passive components. We need to (conditionally) level-shift the RESET line in a bidirectional manner and the SPI lines unidirectionally. One needs to shift the MISO line from 3.3-5 V up to 5 V, and the MOSI and SCK lines from 5 V down to 3.3-5 V. For the former case, no level shifting is done at all, relying on the fact that the input pins of the hardware debugger recognize a logical one already at 3.0 V. For the RESET line, which is open drain, we rely on the same fact. This means that this hardware debugger cannot deal with systems that use a supply voltage with less than 3 V, though.

For down shifting, we use the output pins of the hardware debugger in an open drain configuration and have pull-up resistors connected to the target supply voltage. These have to be particularly strong because a number of possible target boards, e.g., the Arduino UNO, use the SCK line for driving an LED with a series resistor of 1kΩ. For this reason, we use 680Ω pull-up resistors which guarantee that the signal level is above 3V on the SCK line, when we supply the board with 5V. These pull-ups will be disabled when no ISP programming is active, giving full control of the two lines to the target system. The schematic looks as follows.

![KiCad-Schematic](pics/dw-link-probe-V3.0-sch.png)
![KiCad-Schematic](pics/dw-link-probe-V3.1-sch.png)

The pin mapping is a bit different from the basic design described above. It is controlled by pin D5, which is tight to ground in order to signal that the more complex pin mapping is used. The additional pins are all in italics.


The pin mapping is a bit different from the basic design described above. It is controlled by pin D5, which is tied to ground in order to signal that the more complex pin mapping is used. The additional pins are all in italics.

| Arduino pin | ISP pin | Function |
| ----------- | -------- | ------------------------------------------------------------ |
Expand All @@ -660,15 +658,13 @@ And here is the breadboard prototype, which works beautifully.

I have turned that into a PCB, which you can buy [at Tindie](https://www.tindie.com/products/31798/).

![board](../pcb/board.png)

Before you start, you have to set three jumpers. Then you are all set and can start debugging.

Label | Left | Middle | Right
--- | --- | --- | ---
**Supply** | **5 V** are supplied to the target | **extern**: target needs its own supply and power cycling has to be done manually | **3.3 V** are supplied to the target
**Pullup** | There is **no** pull-up resistor connected |   | A **10kΩ** pull-up resistor is connected to the RESET line of the target
**Auto_DW** | Atomatic transitions to and from debugWIRE mode is **off** | | Atomatic transitions to and from debugWIRE mode is **on**
**Pullup** | There is **no** pull-up resistor connected to RESET |   | A **10 kΩ** pull-up resistor is connected to the RESET line of the target
**Auto_DW** | Atomatic transitions to and from debugWIRE mode is **off** | | Automatic transitions to and from debugWIRE mode is **on**

<a name="section8"></a>

Expand Down Expand Up @@ -1051,4 +1047,5 @@ Initial version
* Redesign of monitor commands; most of them now take an argument
* Disabling automatic mode switching (Section 2)
* Lowest frequency is now 4kHz (Section 8.7)
* Number of breakpoints reduced from 33 to 25 because of stability problems (when debugging was on)
* Number of breakpoints reduced from 33 to 25 because of stability problems (when debugging was on)
* New dw-link probe
48 changes: 24 additions & 24 deletions pcb/assembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,41 @@



The kit contains the following parts. They are all THT, except for Q1 and Q2.

| ID | Value | Number |
| ---------------------------- | ---------------------------------- | ------ |
| PCB | dw-link probe V3.0 | 1 |
| Q1, Q2 | IRLML6402 | 2 |
| R1 | 1 kΩ (brown, black, red) | 1 |
| R2, R5, R6 | 10 kΩ (brown, black, orange) | 3 |
| R3, R4 | 220 Ω (red, red, brown) | 2 |
| R7, R8 | 680 Ω (blue, grey, brown) | 2 |
| R9, R10 | 10 MΩ (brown, black, blue) | 2 |
| C1, C3 | 10 µF (polarity must be matched) | 2 |
| C2 | 100 nF | 1 |
| D1 | LED 3mm (polarity must be matched) | 1 |
| U1 | LD1117V33 | 1 |
| SW1 | Tactile push button | 1 |
| JP1 | ISP pin header (2x3) | 1 |
| PULLUP1, AUTO_DW1 | Pin header (1x3) | 2 |
| Supply1 | Pin header (1x4) | 1 |
| Jumper for the above headers | Jumper | 3 |
| IOH1, IOL1 | Pin Header (1x8) | 2 |
| POWER1, AD1 | Pin Header (1x6) | 2 |
The kit contains the following parts. They are all THT, except for Q1, Q2, and Q3.

| ID | Value | Number |
| ---------------------------- | ------------------------------------------------------ | ------ |
| PCB | dw-link probe V3.0 | 1 |
| Q1, Q2, Q3 | IRLML6402 (or any other logic-level P-Channel MOS-FET) | 3 |
| R1 | 1 kΩ (brown, black, red) | 1 |
| R2, R5, R6 | 10 kΩ (brown, black, orange) | 3 |
| R3, R4 | 220 Ω (red, red, brown) | 2 |
| R7, R8 | 680 Ω (blue, grey, brown) | 2 |
| R9, R10, R11 | 10 MΩ (brown, black, blue) | 3 |
| C1, C3 | 10 µF (polarity must be matched) | 2 |
| C2 | 100 nF | 1 |
| D1 | LED 3mm (polarity must be matched) | 1 |
| U1 | LD1117V33 | 1 |
| SW1 | Tactile push button | 1 |
| JP1 | ISP pin header (2x3) | 1 |
| PULLUP1, AUTO_DW1 | Pin header (1x3) | 2 |
| Supply1 | Pin header (1x4) | 1 |
| Jumper for the above headers | Jumper | 3 |
| IOH1, IOL1 | Pin Header (1x8) | 2 |
| POWER1, AD1 | Pin Header (1x6) | 2 |

When assembling the kit, just follow what is specified in the table. Start from the top and go down. In case, you do not know the color codes for resistors by heart, try this [online calculator](https://www.allaboutcircuits.com/tools/resistor-color-code-calculator/).

For the capacitors C1 and C3 and the LED, watch out for the polarity, which should be matched with the symbols on the PCB. Bipolar capacitors have the negative connection marked and the negative connection has usually a shorter lead. The other lead should go into the hole marked with '+'. Similarly, also LEDs have a long and a short lead, where the short one marks the cathode. This one should go into the hole marked with a square.

Q1, Q2, and U1 should all be soldered with the marking pointing upwards.
Q1, Q2, Q3, and U1 should all be soldered with the marking pointing upwards.

When soldering the shield connectors to the board, it is a good idea to do that when the plugs are inserted into the sockets of the Arduino UNO.

If you have never soldered SMD parts before: It is not rocket science. You need to put a blob of solder on one pad, take the SMD part with a pair of tweezers, and solder the part to the pad with a solder blob on it. Afterwards solder the remaining legs to the respective pads. Finally, check with a magnifying glass that all connections have been made. There are numerous tutorials about SMD hand-soldering out there. The [HowTo](https://josepheoff.github.io/posts/howtosolder-11soldersmdpassive) by JRE is very detailed and easy to follow. Here are three photos to illustrate how to solder the MOS-FETs step by step.

![SMD soldering](../docs/pics/SMD-soldering.png)

In order to test the basic functionality of the freshly assembled board, you'll find the sketch `testprobe.ino` in the repository. Set the `Pullup` jumper to `10K` and the `Supply` jumper to either `3V` or `5V` before you start to test the board.
In order to test the basic functionality of the freshly assembled board, you'll find the sketch `testprobe.ino` in the repository. Set the `Pullup` jumper to `10K` and the `Supply` jumper to either `3.3V` or `5V` before you start to test the board. When you send `t` to the UNO using the monitor, it will go through a set of plausibility tests. If at some point it stops with an error, you can use `?` to check the voltage levels on the different lines. Hopefully, this will give a hint what is wrong.‚

Note that the board disables the auto-reset capability of the UNO board. That is, when the shield is plugged in, you cannot upload any sketch to the UNO. Unplug the shield and try again!
17 changes: 0 additions & 17 deletions pcb/dw-probe-tht.csv

This file was deleted.

Loading

0 comments on commit e64be54

Please sign in to comment.