# [AmpeROSE] Current Measurement

Hello Everyone !!

This week the whole team was focusing on the measurement part of the project. We studied existing architectures, proposed new ideas based on our specs and read a lot of datasheets to get – finally – a first version of the circuit we are going to use.

The measurement part will consist of the following components:

• Current Voltage Conversion (using shunt resistors)
• Amplification
• Anti-Aliasing Filtering
• Analog to Digital Conversion
• Shunt Selector (Continuous Calibration)
• Calibration Current Generator (Initial Calibration)

This can be summed up in the following figure:(Click for larger image) In addition to the components present in this figure, we will have a battery power supply and an on-board recharging circuit. But we will discuss the power supply in upcoming weeks.

In the following sections, we will go into the details of each part and discuss its circuitry and its components choice.

Here we go 🙂

#### Current – Voltage Conversion

The first step of current measurement is to convert current into voltage. As discussed in previous weeks, this can be done using either shunt resistors or feedback ammeters. In our application, we will be using shunt resistors.

The input for this level can come from either the Device Under Test (DUT) or the internal current generator used to calibrate the device.

The current will flow into 4 parallel resistors (R1, R2, R3, R4). The resistor R4 is always connected and it is the only one connected when we are using the fourth range. Each time we want to use a lower range (toward range 1), we switch on the corresponding transistor to use one more resistor and when we want to use a higher range we switch it off.

Recall that the ranges are given as:

 Current range Active resistors 1 739 µA   →    303 mA R1+R2+R3+R4 2 7.39 µA   →    3,03 mA R2+R3+R4 3 73.9 nA   →    30,3 µA R3+R4 4 1 nA   →    303 nA R4

Recall that these calculations were based on:

• Maximum burden voltage directly on shunt resistors of 50 mV in order to reduce the effect of the measurements as much as possible.
• Minimal voltage at the output of the amplifiers of 10 mV, because smaller values will be more prone to noise errors.

In order to choose the right measurement interval, each resistor will be controlled by an automatic switch manipulated in the calibration circuitry.

A potential problem arises: the ON impedance of these switches is not always negligible and thus must be taken into account (in measurement interval calculations AND in the calibration process).

Finally, we get the following circuit for this stage: Regarding the switches, the main criterion is the ON resistance. Another useful criterion is switching time. Given these criteria, we have compiled a list of possible switches to use:

 Reference ON Resistance (mΩ) Switching Time (ns) ADG 801 / 802 (CMOS SPST Switches) 400 55 FDC606P (P-Channel MOSFET) 35 250 SI2333DDS (P-Channel MOSFET) 28 115 DMP2035U (P-Channel MOSFET) 35 135 DMG3415U (P-Channel MOSFET) 42.5 1150

From the list above, we have chosen the SI2333DDS MOSFET as our best switch candidate.

We get that the values of resistors in the above figure are as follow:

R1 = 145 mΩ , R2 = 16.5 Ω, R3 = 1.65 kΩ, R4 = 165 kΩ.

Note that the value of the equivalent resistor is based on the datasheet and is not necessarily the value in the real case. That’s why the initial calibration is crucial to take all these effects into consideration.

#### Amplification

The output of the current – voltage conversion stage is a small voltage signal. The Amplification stage will then amplify the signal in order to adapt it to the ADC input.

The main specifications for this stage are as follows:

• A Gain of 82 with a Bandwidth of 100 kHz.
• A circuit that blocks any current flowing from the measurement stage

Note that the only current flowing into this stage are bias currents of the operational amplifiers if the shunt output are connected to the operational amplifiers inputs.

Amplification will be done using the following feedback circuit: The choice of the Op-Amps is critical. They must satisfy the following criteria:

• Ultra Low Bias Currents
• Gain Bandwidth Product >= 8 MHz
• Ultra Low Noise
• High CMRR (High Side Configuration)
• Low Offset Voltage

Given these criteria, a possible list of op-amps is given as follows:

 Reference GBW (MHz) Noise (nV/√Hz) Offset Max (µV) Bias Current Max (pA) CMRR Min (dB) AD8618 24 8 60 1 80 AD8067 54 6.6 1000 5 106 ADA4500 10 14.5 120 2 95 AD8655 28 2.7 250 10 85 MAX44251 10 5.9 6 1300 130 MAX44242 10 5 600 10 90 MAX4488 42 4.5 750 150 90

Clearly our criteria specifications will result in a trade-off. It is somehow difficult to find an op-amp that satisfies all the criteria perfectly.

#### Anti Aliasing Filter

Since we are sampling at 100 kHz, high frequency noises will be aliased into the desired frequency range. To prevent this problem, we must use a low pass anti aliasing filter whose cutoff frequency is equal to the maximal frequency of the signal (50 kHz).

A simple passive RC filter will do the job. Recall that the cut-off frequency of a RC filter is Fc = 1/(2*Pi*R*C).

Given these specifications we get R = 1.45 KΩ and C = 2.2nF.

The anti-aliasing filter will then be as follow: #### Analog to Digital Conversion

The amplified and filtered voltage representing the current flowing into the DUT will be placed at the input of an ADC in order to send the current measurement to the microcontroller.

The main criteria for the ADC are:

• Resolution = 24 Bits
• Sampling Rate >= 100 kHz

Other criteria include signal to noise ratio, distortion, linear and nonlinear errors…

Given these specifications, the following ADCs may be used:

 Reference Number of Bits Output Data Rate Output Format Number of Channels AD7176-2 24 250 KSPS Serial 2 – 4 AD7760 24 2.5 MSPS Parallel 1 AD7764 24 312 KSPS Serial 1 AD7766 24 128 KSPS Serial 1 AD7768-4 24 256 KSPS Serial 4 ADS127L01 24 512 KSPS Serial 1 ADS1274 24 128 KSPS Serial 4 ADS1672 24 625 KSPS Serial 1 ADS131A02 24 128 KSPS Serial 2

We are considering for now AD7176-2. This ADC guarantees > 17 noise free bits when we are sampling at 250 kHz.

This will require a reference voltage of 4.1V. We will then use an adjustable voltage regulator.

#### Shunt Selection & Calibration

Now for the tricky part. Our first approach was to use a microcontroller to do the calibration. However this approach will result in latency and potentially – for high variations – disastrous effects on the measurement.

Our second approach was to use the fast (2.4 MSPS) but not so accurate internal ADC of the microcontroller as a comparator and performing the calibration in the associated interrupt routine.

This approach is somewhat appealing, however it is not the best. The problem with this approach is that calibration time may take up to 3 us each period (Note that this value is calculated as the sum of a conversion time of a 500 ns and the time taken for each instruction in the ISR, as well as the latency for interrupt handling)

The most efficient approach, it seems, is to use hardware logic for the calibration. We are currently discussing and finalizing the calibration logic. We are thinking of two different ways to approach the hardware logic. The first one is to use a circuit similar to the one used in Nordic PPK. The second approach is to use RS latches.

That’s why we will discuss the calibration logic in detail in next week’s post.

#### Current Generation & Initial Calibration

Another problem that must be taken into consideration is drifts, offsets and all other errors in the used electronic components. That’s why we must generate a precise current, measure the output measurement of our circuit, and then correct the “correctable errors” in the software.

To generate a current we will use a current mirror. Reference voltage applied to a numeric potentiometer (we will go through the complete range of values) will generate a reference current.

This current will be copied using a current mirror (We can use for example wilson current mirror with 3 transistors or even improved wilson mirror with 4 transistors). This current – with controlled value – will be the input of the measurement stage, during the calibration phase.

By comparing the received and expected values, we can partially correct subsequent measurements. The current generation circuit will be as shown in this figure: For the digital potentiometer, a possible component is MCP 4351. For the NPN transistors a lot of choices are possible. We can also use MOSFET transistors in Wilson current mirror.

At the beginning of the measurement process, the DUT selector will place our calibration current as input, and then the DUT will be placed as input when this phase is complete. Note that the switches placed in these figures have been discussed in the current voltage conversion part.

#### That’s All !!

That concludes our current measurement stage. Since this is a primary design, it is always subject to modifications and improvements.

This week we will finalize the calibration logic and we will have a primary idea on the measurement stage PCB.

Please feel free to give suggestions 🙂

Until next week.

AmpeROSE Team ### 5 comments to [AmpeROSE] Current Measurement

• Phh

Hello,

Could you post higher resolution versions of your schemes?

• AbdelHadi

Hello,
Sorry for the inconvenience. I updated the post, the figures should be better now.
However I was not able to get the first figure better than that so I uploaded it here: https://drive.google.com/file/d/1eq0JhPnH1gWT0U9QZA3TxTw7jmCHL0VO/view?usp=sharing

• Phh

Thanks!

• Alexis

The image is now clickable to get a bigger version.

• Alexis

Have you looked at the drain-source leakage current for the switches? Most of your MOSFETs have a 1µA leakage, which means that even if they are closed, there’s still 1µA flowing through them and biasing the measure.

This site uses Akismet to reduce spam. Learn how your comment data is processed.