ADMM-CP (VOM): Attenuated Mode

What it does

The attenuated mode takes a real input voltage in the range of around +/- 14VDC and divides it down by about a factor of 10 so that it fits within the on-board ADC’s measurable voltage range of about +/- 1.4VDC. This is nominally and roughly. In a more detailed look, you might find your working range to be narrower, and even find that it depends on conditions. Your calibration and validation work would address this more concretely. It has a relationship with the components that are selected for board assembly/population.

[Quick draft mode here – please let me know if you see any typos or what is unclear or plain wrong, etc. Also, you’ll probably want to share these types of notes with anyone on your development team who works with any part of the system, generally, since these are often, if not always, system level considerations.]

Simple circuit model concept

Simple voltage divider. Here we call Z1 the “high” side and Z2 the “low” side. [Image: Wikipedia Source by Velociostrich licensed under CC by-sa 3.0]

You can think of the attenuation as a simple 2-resistor voltage divider circuit, where the attenuated value is taken at the point between the 2 resistors. We can call one resistor the high side: where higher voltage connects on one side of the resistor, and the measurement is taken at the other side of that resistor (the middle resistor-resistor junction point), and the other resistor the low side: where that same measurement point (the same middle resistor-resistor junction point) is taken at one side of it because it’s connected to the high side resistor too (that is what makes it the resistor-resistor junction point) and the other end of the low side resistor connects to the incoming signal’s (or the general system ground reference) common or ground or negative voltage.

Mapping the board components to the model concept

In our case, the high side resistor actually comprises two actual physical resistors on the board, R15 and R21. They add up as R15 + R21 to make the conceptual high side resistor. And, the low side resistor actually comprises two physical resistors, R26 and R43. And they add as R26 + R43 to make the conceptual low side resistor.

These components are all relatively clearly silkscreened (meaning, they’re there and you can read them) on the board, and they are all clustered together.

The actual values and tolerances of the resistors in the divider circuit depend on how you choose to populate the board assembly. Typical values are: 5Meg + 5Meg = 10Meg for the conceptual high side resistor, and then 680k + 430k = 1110k = 1.11Meg for the conceptual low side resistor. Typical tolerances might be 0.1%, but again that depends on how you populate the board. The choice to use two resistors for each leg of the voltage divider was intentional.

Calculation

To arrive at the attenuation value, we can use the voltage divider calculation:

Vout = Rlow / (Rhigh + Rlow) * Vin where Vout is what is measured (the attenuated value) and Vin is the larger voltage range input.

Thus, for our example (ignoring tolerances and true usable precision for a moment):

Vout = 1.11Meg / ( 10Meg + 1.11Meg) * Vin => 1.11 Meg / 11.11 Meg * Vin => 0.09991 * Vin

Thus:

Vin = Vout * 1 / 0.09991 => Vout * 10.0090

Since Vout is the value measured by the ADC, you thus multiply the measured voltage by 10.0090 or so to reconstruct the input voltage.

Theoretically.

Tolerance/variability estimation

Let’s say you’re using 0.2% tolerance parts. We can imagine a worst case scenario where the high side components add up and create 0.2% under value, while the low side components add up and create a 0.2% over value. Now our calculation is:

Vout = 1.11 * 1.002 / ( 10 * 0.998 + 1.11 * 1.002) * Vin => 0.10027 * Vin

This is a factor of 9.97394 to reconstruct the input voltage. That’s a difference of 0.036 in the factor. So here, our tolerance propagation out to the multiplication factor for incoming voltage reconstruction is really 10.009 +/- 0.036.

Whether or not you care about this is up to you. But it’s one of the reasons why the concept of calibration comes up generally.

Scaling and calibration

The “Calculation” topic above is generally about what we could just “scaling”. That is, given the component values used to populate the board and circuit design, how do we convert what the board’s ADC measures back into that actual input voltage? So, the general idea for this board was about 10x nominal scaling. Meaning, when attenuated mode is selected, the ADC sees and measures the input voltage as roughly divided by 10. In reality, maybe the current revision actually has a scaling factor that it not 10X but something (very?) roughly close. Either way, this value is roughly, a scaling factor.

From there, we could say that the word calibration then applies to fine tuning this scale factor, maybe checking to see how much that factor varies over the working range of input voltage, or across different boards. Calibration could also be used to validate that the hardware design, if the board is assembled/populated with components as per design or expectation, operates as intended, and to see if other hardware inclusions like protection circuits substantially effect the scale factor. Maybe the scale factor is larger or smaller and validation for confirmed PCB assembly/population shows what it really is.

A simple method to calibrate in this case is take some known accurate and precise enough variable voltage source, or a few constant voltage sources that span the desired range. Or you could use an accurate and precise enough bench voltage measurement tool to measure the output of a variable but precise-enough (well controlled output for a particular setting) voltage source. Those values are the “real” values. Then at each point where the “real” value is noted, measure what this hardware says the voltage is. We’ll call those second values the uncalibrated of “uncal” values, assuming they make sense at all. You’ll probably be making these measurements using your software most likely, so please see the “System and Software…” section below too for important considerations.

Then plot “real” versus “uncal” on a graph, or just set up your data as such for statistical analysis. The “real” could be on the Y-axis and the “uncal” on the X-axis. If looks like a straight line enough, you can probably get away with a simple linear regression or trend line. Or you can at least start this way.

Look at the equation of an applied trend (or linear regression) line. You now have a function where Y = slope * X + offset such that, if you input the “uncal” value as X into the equation, your output from the equation, “Y” is your calibrated or “real” value.

You can make it as complex from there as you like, depending on a lot of things. Examples of complexity are higher order fits, fixing coefficients to particular values, creating a piece-wise trend line (segments of lines or curves).

Spreadsheet and stats programs, even basic code libraries, all have statistics (“stats”) modules that can do this on your data sets without having to graph.

You can get much more info from these types of analyses as well, like maximum deviation, average deviations etc.

You can even write some basic code to automate this process, and store the results, if you find that variability is large enough between boards to warrant calibrating each one, or if you find that you would benefit from a quality control type system to validate each unit’s values.

System and software effects

Most off-the-shelf (OTS) digital multimeters (DMMs) probably have a microchip (or equivalent analog circuitry) that toggles between different scalings (attenuations) automatically, and applies a scale factor to convert what the ADC inside is seeingback into real world volts (or current, etc.). They may even be factory calibrated on top of the nominal scale factor application.

This means that even in OTS DMMs, there are likely firmware (software) factors that make the difference between nominal values making sense or even being calibrated to higher accuracy.

So, for this hardware, you may or may not have scaling factors set up in your firmware, or potentially even functionality that does auto-toggling enabled between “regular” and attenuated measurements.

Ff you’re taking measurements straight out of your system software interface and the scaling only happens there (not in firmware), in order for those measurements to make sense, the baseline scaling factor in the software or its configuration file needs to match how the hardware is built, ie how the PCB is assembled/populated with components to build the voltage divider.

PCB assembly/population

Effects

If the scale factor is off, it’s probably useful to double-check the build components. For example, if some component values, especially and firstly in the voltage divider section, were not readily available and were substituted with alternates (or if there were assembly errors), if the values are different or don’t add up to be the same total voltage (please see the “Calculations” and “Mapping the board components…” sections above), then even the nominal scale factor will not apply correctly, yet consistently so, across all boards that are built this way.

There are indeed some additional board population considerations with smaller impacts, elsewhere on the board. Like components for tuning or zeroing voltages under particular conditions, or filter components that limit bandwidth of the response. Population or non-population of these components may have an impact effect.

Options

If everything matches up to an intended BOM, as far as what is actually populated on the board, and the intended component values, and you would otherwise like to change the nominal scale factor of the board, you can adjust the component values to whatever you like. Please see the sections above regarding calculations and mapping board components to the resistor divider model. There are a few detailed considerations, so you might like to discuss first. They mostly apply to trying to maintain a high input impedance to the board. This general notion is however a perfectly valid option.

“When to call your doctor” (or whatever)

If you’re see very different values than expected, like far outside of the tolerance range based on your component selection, then something else is going on. And, saying “eh, calibration/tolerance issues” probably makes less sense.

Several other things be going on, large or small. And, it would probably be good to get it sorted out.

The attenuation mode assumes a few things about the source voltage, including it output impedance (please see board specifications compiled elsewhere). And there are also other small resistances here and there as well as other effects. More detail than sensible here to get into. But worth it if there are questions arising.

And, really helpful to know as much as possible about your use case, including electrical and interconnection details to help troubleshoot. The details could get very interesting.