Finishing the Voltage Shifter for Mixed Scale DRO

Sunday, November 17, 2013

A few weeks ago I posted the build instructions for an adapter board that can be used for interfacing various digital scales to the MSP430 Launchpad DRO controller. Following those instructions you will end up with a base adapter board that still needs to be configured for your particular setup. This includes providing each scale with an appropriate power supply voltage, hooking them up to the corresponding “virtual ground”, and connecting the adapter to the MSP430 Launchpad. In this post I will use the DRO unit I built for my own mill as an example of a mixed-scale setup.

Scale Power Supplies

You might recall that the board can work with up to three different power supply voltages. One of them has to be 3.3V (even if you don’t use 3V scales), since the comparators need to have the same Vcc as the MSP430 microcontroller. The other two rails can be any voltage between 0 and about 18V.

A good first step is to connect the required voltages to the power rails. In my setup I needed all three voltages: 5V for two glass scales (X and Y axes), 3.3V for the iGaging scale and 1.5V for the standard quill DRO scale. The three power rails are connected to the three topmost copper stripes on the board (marked in red, yellow and white). To keep things somewhat organized I connected the voltages in the descending order as shown in the picture below.

Power rails and their corresponding virtual grounds
are marked in the same colors.

MSP430 Launchpad offers readily available 3.3V and 5V supplies: the former is available from the Vcc header at the bottom of the Launchpad board; the later can be sourced from TP1 located next to the USB connector.

MSP430 Launchpad Detail
TP1 on the MSP430 Launchpad board is connected to 5V 

The 1.5V power supply will require some additional components and can be provided in a few different ways. First of all, you can simply leave the cell batteries in the scales and replace them every once in a while. Alternatively, you can get low dropout DC-to-DC power supply to step down 3.3V to 1.5V. Finally, you can get a battery holder and use a single “C” or “D” cell to power all three scales. For my setup I chose the single “C” cell approach: the scales and the adapter draw very small current, so a single cell will last for years.

5V, 3.3V and 1.5V power supplies connected to the adapter board.

Now that the voltages are sorted out we can proceed to hooking up each scales Vcc lines to the appropriate rail. I intentionally left four columns on the left side of the board free, so you can connect a jumper to each scale’s Vcc line as shown below. Alternatively, you can simply run a wire directly to each scale’s connector.

Virtual Grounds for Comparators

The three shorter stripes close to the middle of the board mark the corresponding “virtual grounds” for each power rail and provide voltages that are approximately half of the rails voltage. For the adapter to work property these need to be connected to the negative inputs of the appropriate comparators, marked with four numbered white dots in the second picture.

Side note: This setup will work for most, of not all, digital scales. Unfortunately not all rotary encoders output digital signal. If the output signal is somewhat symmetric about the 1/2 of the input voltage, the board will work just fine. Otherwise you will need to replace the fixed resistors in the voltage divider with a 10K trim potentiometer, so the virtual ground can be set to the appropriate value.

Power supplies and virtual grounds connected to
their corresponding inputs

Please note, I used colored wires for illustration purposes; you can use the same bare wire you did for the rest of the jumpers.

Putting It All Together

The only thing left to do now is to connect the adapter board to the appropriate pins on the MSP430 Launchpad. The comparator outputs are brought out to the header in the lower right corner of the board in the same order as their inputs. On my setup that means that the outputs are: X clock, X data, Y clock, Y data, Z clock, Z data, W clock, and finally W data. On the launchpads the clock lines are connected to pins P2.0, P2.1, P2.2, and XOUT/P2.7; data lines are connected to P2.5, P2.4, P2.3 and XIN/P2.6 for X, Y, Z, and W axes respectively.

Clock lines connected to the Launchpad
Data line connections

Side note: unlike the capacitive scales, quadrature encoders don’t have “Clock” and “Data” lines. Instead you will likely see the output labeled “A” and “B” that provide pulses offset by 90 degrees. On mine I connected output A to Clock line and B to Data line, but in practice it doesn’t matter. Sometimes there is a third output but it’s not needed for the DRO.

Conclusion

The pictures below show my completed “bench” setup. Although it’s starting to look a bit like “rats nest”, it should be fairly straightforward to put together. For the “production” version I would skip the headers and simply solder the wires directly into the adapter board (and the Launchpad).

This is how my "bench" setup looks like with all required connections
Finished setup with the breakout board and glass scale connectors