[AmpeROSE] Simulation of initial calibration

Hello everyone!

This time, we are going to talk about the simulation, especially, some simulation that helps to see how we will do the initial calibration.

First, the full simulated circuit is the following one:

On the top left, there is the current mirror, then in the centre to the right there is the part of the circuit that allows to do the current-to-voltage conversion and a model of the DUT (device under test composed by a battery of 5V and a resistive charge associated to a decoupling capacitor). At the bottom, there is on the left the amplification and then the filter in the middle.  The last element on the right is the simulation of the signals that allows to control the shunts.

Here are some interesting measurements done on this circuit:

At the bottom there is the current generated by the current mirror in the measurement stage. As you can see, it as the form of a pulse, the on level is 2mA. Just above, there are the command signals of the shunts.

Here, we will focus on two times, each being represented by the vertical dotted lines. The first one correspond to the case where the second shunt is activated, so we have current flowing through the shunt 2 and 3. And the second case correspond to all shunts being used.

On the plot above, the signal represented is the output signal on which some computation where done. The formula is the following one: (VFILTER – Voffset) / (100 * 2m). So the first step is the subtraction, we remove the offsets introduced by the amplifiers. It is not represented here but we can measure it, we just have to measure VFILTER when there is no current flowing into the shunts. Then there is a division by 100 which is the amplification and 2m which is the value of the current at our points of interests here. As you may have guessed, this curve allows us to deduce the real resistances of the shunts including the values of the resistances of the transistors. At the first cursor, we can observe that the resistance is 10.002891 Ω and the second give us the value of 176.87423 mΩ.

Then, we can use these values while measuring that what was done on the first plot. We use the following formula: (VFILTER – Voffset) / (100 * Res). So here again, there is the correction of the offset and then the division by the amplification and the value of the resistance, 10. 002891 Ω at the first cursor and 176.87423 mΩ at the second cursor. And as you can see on the plot, the value deduced back is 2mA in both cases which is the actual current flowing.

As you saw here, we have a good faith in our system, now, it will be harder to do exactly the same thing as here. The main reason is that the measurement will be done through an ADC. The results is that the offset may be less precise for example. There is also the fact that resistors will have errors on theirs values, so we may need to verify the value of the amplification. We also may have an error on the current generated. So even though these results are promising, we will have a lot to do in our software to do a good initial calibration.

[AmpeROSE] Current generation for the initial calibration


As you saw in a previous post, we are going to do some measurements on the AmpeROSE to do an initial calibration, to correct eventual imprecisions. To do that we need to be able to put a current that we know and control precisely. In order to achieve our goal, we decided to use a current mirror, the one we are going to use was built by Analog Devices and has the reference ADL5315. The following figure shows you how we will use it.

Since it is a current mirror there is some current being copied from somewhere to somewhere. Here it is the current flowing through INPT that is copied to IOUT. Then this current is injected in our measurement system : MIR+ and MIR- are connected to the shunts.

To generate a current on INPT, we used a resistor to force the current which depends on the voltage on the INPT pin. So, we also need to control the voltage on this pin. That is simple here because we have the same voltage on INPT and VSET, so we only need to force one voltage on the VSET pin to have the same on INPT. Then we know the voltage and the resistor so we can deduce the current. In our application, we want to have some precise current, so we chose the current and then we compute and apply the voltage  we need of VSET.  As you can see, we have 2 resistors, so depending the current we need to generate, we use one or both (which is almost equivalent as saying the other here).

To control the voltage on VSET, we are using a voltage divider. This voltage divider is built upon a digital potentiometer. So, we can use it to vary  the VSET voltage to generate multiple values of currents.

Here are the equations that allow us to know how to generate a current :

  • VSET= Rpot /(Rpot + 100K)
  • Iout=Iin= VSET/Rinpt

According to these equation these are the values of current we can generate : from 100nA to 500nA and from 500uA to 2.5mA.