Test Gear

Eurorack module prototyping and testing power supply thing: Part 3

In part 1 we decided I need a power supply and picked out a few basic components. In part 2 we looked at display and control.  And now we’re going to start looking at current measurement.

For the purposes of discussion I’m going to divide current measurement up into three parts: Analog to Digital Converter, Sensor, Amplifier. This is the approximate order I picked out components and design patterns; however there was a fair amount of iteration in each area before reaching the final configuration. The sections function pretty much as described. The analog to digital converter makes the analog measurement useable by the digital micro controller. The sensor converts the parameter we’re trying to measure into a voltage. And the amplifier matches the output range of the sensor to the input range of the converter. Since the amplifier is the most detailed it’s getting its own post.

Analog to Digital Converter

I’ve wanted to try a high bit external analog to digital converter (A/D) for a while and this seemed like a good opportunity. Additionally, while the Arduino does have an onboard A/D, it’s only 10 bits. Based on the target measurement range (1-400 mA) a 10 bit A/D means there’s two bits per mA making conversion the limiting factor in measurement resolution which is usually something you’d try to avoid. After looking at a couple of different options I picked out a NAU7802 24 bit A/D for three reasons: 24 bit is plenty of resolution for this project, it communicates via I2C which should be relatively easy to communicate with the Arduino, and it is very cost competitive.

Step one with the A/D is to have it talk to the microcontroller and take some readings to see how well behaved it is. I wired up the converter using the recommended circuit from the datasheet except I replaced the Wien bridge with my Heathkit variable output power supply to provide a range of voltages to the measurement pins. I quickly discovered that Vin1N pin needed to be connected to Vref/2 since the output was a signed 24 bit number, and to get negative numbers the voltage on Vin1P needed to be less than the voltage on Vin1N. I also noticed some other anomalies near the extremes of the input voltage range.

I didn’t dig too far into the source of these anomalies. They represent a range reduction of <10% and I was only planning on using 80% of the range anyway; so, I designed around the anomalies. This was accomplished in two parts first I would have the amplification stage linearly bias the measurement by ~100 mV so that operation was always in a region above the lower anomaly and then I’d set the sensor amplification so that 400 mA resulted in an input to the A/D of ~2.5 V.

The Sensor

Three common sensors for current measurement are a current sense transformer, a Hall effect sensor, and a current sense resistor. The goal hear is to measure the mA being consumed by the load attached to each output channel. It’s expected that the loads will be primarily DC so the current sense transformer won’t be useful. Since three sensors are required price is a concern and hall effect sensors tend to run few dollars each where as current sense resistors are $0.25-$0.50. So what is a current sense resistor? Well it’s a resistor it converts current to voltage using Ohm’s law. While any resistor can be used for current measurement typically to be classified as current sense a resistor three factors will be considered. low resistance (< 100 mΩ) so that minimal voltage drop out occurs between the source and the load, tight tolerance (< ±1%) so that measurements are consistent across circuits and relatively high power (> 0.5 W). Additionally if you’re measuring a wide current range you may look for one made using a low thermal coefficient of resistance material. A wide range of measured currents means the resistor will operate over a wider range of temperatures, and having a stable resistance over a range of temperatures means readings will be more stable. For this project I picked a 50 mΩ ±0.5% 0805 chip resistor.

Test Gear

Eurorack module prototyping and testing power supply thing: Part 2

Previously we decided I needed a better lab power supply for working synth modules; picked out a switch mode power supply to do most of the heavy lifting,, a case, and desirable output terminals. This time we’re going to look at the electrical design that will generate the three output voltages ±12 V and 5 V, and how current will be measured and displayed.

The Display

Let’s start with the easy stuff. I want the display to do two things let me know the system is on and display the output currents for each output voltage. To accomplish goal one I’ll pick an LCD with a back light which is nearly all of them.

Goal two is slightly more challenging. We need to pick the number of digits displayed and the display format. That is will all channels be displayed at the same time or will they be displayed one at a time? If they’re displayed one at a time how will we transition between which measurement is displayed. The number of digits displayed should be based on the current consumption for euro rack modules. From what I’ve seen this ranges from ~10 mA to ~200 mA. So we’ll want three characters for the measurement, two characters for units and an additional character to separate the measurements. For the overall format I wanted to see all of the measurements at the same time (Two other display options cycling between measurements using a switch or a timer seem fiddly). So with three channels and six characters per channel I need a display that’s at least 18 characters long; fortunately I have a 2×24 character display.

The final thing required for the display is a micro controller to take the output of the current sensor and write it to the display. I didn’t want to break any new ground here and just grabbed the nearest Arduino nano.

Circuit wise the display and controller look like this. the display has a typical 16 pin interface, and I’m using the four bit data transfer protocol.

Output voltage generation

For regulation I picked out a couple of classic regulators the LM317 and LM337. These are adjustable regulators so I picked out some 5 k multi turn pots to trim the output to the desired voltages. Finally, I followed the reference design in the datasheet for sizing and laying out the capacitors and diodes. For the 5 V output initially I duplicated the circuit configuration for the 12 V rail to minimize the part count on the BOM, and got all the way to ordering boards before realizing this would be a bad idea. Why is it terrible? glad you asked. On initial assembly the prior to tuning the output with the trim pot the regulator output could be anywhere between 0-14 V. The display and controller are powered from the 5 V rail and do not react well to voltages over about 6 V. Thus in the original configuration shown below a good portion of the project could be smoked just by turning it on for the first time. So I changed the 317 for the 5 V rail to a fixed output 5 V regulator for the first revision.

Next time in this series we’ll take a look at current measurement.

Test Gear

Eurorack module prototyping and testing power supply thing: Part 1

I was looking at my workbench not too long ago


And I thought if I had a ‘real’ power supply with banana jack connectors most of this rat’s nest would get cleaned up. In addition to the mess, the ATX supply + converter board has some other problems. Most notably that the 24 pin cable is fairly stiff which pushes the converter board into the work area and since the ground and power terminals are close to each other this makes it easy to short and I have blown a couple of fuses on it. Now if I was sane I would pick up a used HP3630. It’s a pretty typical triple output power supply perfect for prototyping a euro rack module. However I’m just a little crazy so I’ve decided to build my own.

Let’s see how far I get before I decide to go buy an HP3630.


The basic design is to output three voltages: +12 V, -12 V, and +5 V. Output connections will be made via banana jacks and a 16 pin IDC connector the same the would be used to power a euro rack module in the rack. The point of this project is to reduce the three intermediate steps I use now to a single step. So the power supply should plug directly into the wall with all of the associated fun stuff that implies.

Everything above can be handled with a ±12 V output switching supply and a regulator to get 5 V. So I decided to add current measurement and display for each of the output voltages.

Design – Switching supply

To start designing a switching supply is going to be way to complicated for this project so I decided to purchase one. Based on my previous experience with Meanwell supplies I picked a ±15 V dual output supply. Using 15 V instead of 12 V means that any opamps used as part of the the current measurement won’t have to run on the high rail; as well as, allowing any output irregularities to be trimmed out with regulators.

The Case

Now that the switching supply has been chosen and get a rough idea of how big of a case to use for the project. I picked a ~20x15x7 cm case and stared drilling.

Next time we’ll take a look at regulation and the display.