Build Instructions for Voltage Shifter Circuit

Sunday, October 13, 2013

Last post covered the design considerations for the Voltage Shifter required for the Mixed Scale DRO Controller. As promised, in this post I will provide detailed build instructions for this circuit. The board is designed to work with up to four scales and has three power rails. One provide 3.3V power supply to the comparators and [potentially] iGaging scales; the other two can be set to any voltage between 1V and about 18V. Although the firmware doesn’t [yet] support glass scales or tachometer input, this board is ready for them.

3"x4" 1200 hole stripboard
with a track cutting tool

Note: iGaging scales don’t require level shifting, and can be connected directly to the Launchpad. If you’re planning to use only one or two 1.5V scales, only half of this circuit is needed.

Parts List

While designing the DRO controllers I try to stick with commonly available parts [as much as possible] that can be found at a Radio Shack. This time, though, I opted for a stripboard rather than the standard proto board. Unlike the standard proto board, stripboard has copper strips that run the whole length of the board. Although it’s a bit to find locally, the trouble of getting it online is more than offset by the ease of assembly.

Unlike the standard prototyping board,
a stripboard has strips of copper running for the whole width of the board

The table below list the required parts with links to online suppliers that sell them. The first three items are likely unavailable locally but the rest can be found at a Radio Shack.

Required Parts
Component Quantity Source
MSP430 LaunchPad with MSP430G2553 1 TI Store
Bluetooth Transceiver 1 Amazon
3”x4” 1200 Hole Stripboard 1 Amazon
LM339 Comparator 2 Radio Shack or Amazon
10 Kohm resistor 4 Radio Shack or Amazon*
20 Kohm resistor 4 Radio Shack
4.7 Kohm resistor 8 Radio Shack
Battery Holder** 1 Radio Shack
Battery** 1 Radio Shack

*Sparkfun Resistor Kit (sold by Amazon) covers all of the required values and then some.
**Any size between AA and D will do, so chose one that is common around your house.

Optional Parts
Component Quantity Source
0.1 uF ceramic capacitor 3 Radio Shack
1000 uF or larger electrolytic capacitor* 1 Radio Shack

* This is needed only for the 5V rail; if you don’t plan to use this with glass scales, it can be skipped

In addition to the parts listed above you will need some solid wire for the jumpers, such as this 24 AWG Pretinned Bus Wire.

Spool of solid wire, good pair of cutters and needle-nose pliers
make the job a bit easier.

Build Instructions

Before you start the build lightly sand the copper side of the strip board with 400 grit sandpaper and wipe with alcohol. This will make soldering much easier and the solder will stick better.

The 1200 hole stripboard is just large enough to accommodate the circuit, without much wiggle room left. When installing the parts and jumper wires, please make sure they are in the locations shown in the pictures. I notched the upper-left corner of the board so its easier to see which way it’s oriented in the picture.

I notched the upper-left corner
so it's easier to see which way the board is turner

Step 1: Cut the traces as shown in the picture.

All of the necessary cuts are done

The easiest way to do so is to either use a special “circuit cutter” tool [as shown in the first picture of this post], or an old drill bit that is slightly larger than the trace. Simply insert it into the hole and twist until the trace is completely cut. Alternatively, you can use a sharp hobby knife to cut out a sliver of copper.

Using an old drill bit or a specialized circuit cutter
makes cutting traces much easier

Step 2: Install the ICs and Resistors

ICs and resistors help locate the rest of the features
Different angle should help see the locations better

Having the parts inserted will create “landmark” for jumper wires. The following three pictures show the locations of the parts. To keep the parts from falling out, bend the leads outward before cutting them. That way you can insert all of the components first and then solder them one swoop.

Bend the lead outwards before cutting them, so the parts/wires wont fall out

Please note, 10 Kohm resistors look like 100 Ohm, since the orange strip is almost brown on this batch. The resistor values in the picture above are as follows:

Closer look at the pull-up and voltage splitter resistors
  • Three resistors in the upper left corner should be 20 Kohm (I used 22 Kohm since that’s what Radio Shack carries).
  • Three resistors just below are 10 Kohm
  • Eight resistors on the right are all 4.7 Kohm (5 Kohm will work just fine as well)

The three ceramic 0.1 uF bypass capacitors should help remove noise from the virtual ground lines. They are entirely optional, though.

Optional bypass capacitors help to remove glitches on the virtual grounds

Once the parts are inserted (and locations double-checked) they can be soldered. The bottom of the board should look like the picture below

The bottom of the board will look similar to this
once the components are soldered 

Please note: on this particular board I’m using 4-pin Molex connectors for inputs and male/female 0.1” headers for power rails and outputs respectively. Those are completely optional, so you can use whatever connection scheme suits your needs.

Step 3: Install the Jumper Wires

The next step is to solder the jump wires

The easiest way to deal with the jumpers is to thread some wire through the holes (without cutting it off the spool), bend one end and then firmly pull on the other end. It will straighten out the jumper, reducing the risk of touching the neighboring jumpers. Once the jumper looks straight, bend the end and cut off the excess wire. The jumpers won’t fall off, so you can do all of them first, double check the result and then solder the whole thing at once.

Gently pulling on the end of the jumper wire will straighten it out


At this point the board is mostly done, except scales’ power supplies, virtual ground for the comparators and [optionally] clock for the iGaging scales. The board is designed to work with three different power supply voltages: the 3.3V required for the comparators can be shared with 3V scales; the other two rails can be any value between 1V and about 18V. Depending on your particular setup those connections will be different, so in the next post I will try to cover most common scenarios.


  1. Hate to ask a dumb question, but will this work with the Arduino??


    1. Dick,
      I haven't tried, but in theory it could. The main problem with Arduino is that small board (Uno, etc.) have only 2 pins with external interrupts. ATMega chip, obviously, can have external interrupts on most pins, so one would need to bypass Arduino's abstraction and write "native" ISRs.
      In theory the MCU should be able to handle the load, but it might mean replacing UART code (so it uses hardware UART) etc. At the end, it would negate the benefits of using Arduino, though.

      Thank you

      PS. Arduino Mega has enough interrupt pins, but it's much more expensive...

    2. Thanks for the reply. Do not want to reinvent the wheel so will purchase the Launchpad.

      Thanks again


  2. Hi Yuriy
    Thank you for your work so far.
    Can you please clarify the requirements for the resistors please,The write up states "
    Three resistors in the upper left corner should be 20 Kohm (I used 22 Kohm since that’s what Radio Shack carries).
    Three resistors just below are 10 Kohm
    Six resistors on the right are all 4.7 Kohm (5 Kohm will work just fine as well)" but the photo shows two others on the right hand side.
    Would be grateful for your help

    1. Sorry, my bad... It was supposed to say "Eight resistors on the right". These are pull up resistors, and it takes two per axis, so for four axes it will take eight resistors.

      Thank you for catching that

    2. It could be just the photo but it actually looks like 6 of those resistors have an orange instead of a red band. Is it just the pictures that is making the six top right 4.7komh resistors look like 47Kohm resistors?

    3. They are supposed to be 4.7 Kohm. These are "eBay special" and the marking colors vary a bit. I measured them and they all were 4.7 K.

  3. after cutting the traces and starting to solder I found an oops.. the grids are not all equal.. you have the 5 holes on the right and I had them on the left.. glad they come in packs of 5 :)

  4. Thanks Yuriy!
    Where does the electrolytic capacitor go? I also did a search for 1000 uF electrolytic capacitor and they seem to come in at least couple different voltages. Which is the right one?

  5. Hi Yuriy-
    Has anyone showed interest in making a PCB for the voltage shifter part of the project?
    Do you have a schematic on the finished voltage shifter "glass scale" interface?

  6. Stupid question perhaps, but is there a spec of the pinout for the four connectors leading to the scales?
    I plan on using three cheap chinese calipers, so which pin on the DRO controller goes to ground, data, clock and vcc on the caliper?

    1. PJ,
      This should help:
      Thank you

    2. Yeah, I've seen that one and well...
      Electronics isn't my strong side, I can follow instructions well enough, i.e solder lead A to terminal B. But my limited understanding of this particular circuit just isn't enough to make heads or tales of the thing.

      To avoid confusion, second picture, white 4-pin connectors on the left:
      I'm looking for the pinout of these, which of the four pins goes to clock data ground and vcc on the caliper?


  7. Question if i'm using only Chinese scales , Do i still need the additional board ?

    1. Chinese calipers use 1.5V power supply. If you can find some that use 3V, you don't need to the board, otherwise you do.

  8. Yuriy,
    Your DRO design is awesome, I'm a student taking a machinist class and the DRO helping out a lot. I put together one of your design using a glass scale, the TI micro controller and the two resistor voltage divider. I would like to build your voltage shifter design and would be a huge help if you could e-mail me a schematic ( .

    Thanks for the help,


    1. Yuriy,

      Just checking to see if you got the chance to look over my request to see if was possibly took get a schematic of your voltage shifter design? I have some scales on the way and want to etch out the board before the scales come in.

      Thanks again,


    2. Steve,
      I don't have a schematic other than what's shown in this post:

      Thank you

  9. Is there any order to the LM339 comparator pinouts. I noticed that in the photos the upper comparators output is not in the same order as the lower?

    1. You can find the ordering in the datasheet. The idea is to connect the + side to the input and - side to the "virtual ground".

    2. I meant that there are 4 comparators in each dip, they are numbered 1 thru 4. Did you just use whichever or is there some order, ie comparators 1 and 3 are clock and 2 ,4 are data for each channel. Also I don't see any connection on the stripboard between the 10K/20K ohm voltage divider and the negative side of the inputs shown in the schematic.

      Steve in AZ

    3. Steve,
      Got it. No, the order doesn't matter. They are all the same. I probably chose the ones I did for ease of wiring.
      The board is definitely wired correctly. I still use it for testing and it work as expected. I will try to take more pictures when I get a chance.

    4. My bad, I found my answers on the next page.
      Steve in AZ