2015/12/05

Current accuracy of MightyWatt

People sometimes ask me how accurate is MightyWatt. I made a lot of tests during the development stage but how does a production unit (revision 2.5) perform? When I got my new Keysight 34461A, I thought it is about time to find out…

If you want raw data, click here to get the full report (Excel)

MightyWatt with Arduino Uno


While MightyWatt has its own 12-bit DAC, it relies on the ADC of the control board, which is typically Arduino Uno. The ATmega 328P in Uno has a 10-bit ADC. The sketch oversamples it to 12 bits.

The setup was:
  • One standard MightyWatt 30V/10A/70W with standard terminals
  • Original Arduino Uno running firmware (sketch) 2.5.1
  • Linear laboratory power supply PSD30/3C, 30V/3A
  • Keysight 34461A multimeter on autorange, current measured in 3A terminals, 10 PLC integration

First, MightyWatt was calibrated according to the manual from 0.1 to 3A with 5 calibration points. Since I only had 3A power supply, the calibration range was up to that current.

Calibration constants let us calculate the current resolution offered by DAC and ADC. DAC and oversampled ADC had one LSB equal to 2.56 mA. Physically, the ADC LSB was 10.23 mA before oversampling.

Then, I set a specific current via the Windows control program and noted the current that was measured by ADC and the true current from 34461A.

MightyWatt set I, A MightyWatt measured I, A External ammeter I, A
0.1 0.101 0.0982
0.25 0.255 0.2494
0.5 0.500 0.4980
1 1.001 1.0001
1.5 1.498 1.4997
2 1.994 1.9992
2.5 2.495 2.4985
3 2.997 3.0080

So, what these numbers tell us? Let's calculate the relative errors from the true value in percents and absolute errors in LSBs. Because the ADC was oversampled, there are both physical (p) and oversampled (o) LSBs in the table.

Set I (DAC) error Measured I (ADC) error
1.83 % / 0.70 LSB 2.85 % / 0.27 LSBp / 1.09 LSBo
0.24 % / 0.23 LSB 2.25 % / 0.55 LSBp / 2.19 LSBo
0.40 % / 0.78 LSB 0.40 % / 0.20 LSBp / 0.78 LSBo
-0.01 % / -0.04 LSB 0.09 % / 0.09 LSBp / 0.35 LSBo
0.02 % / 0.12 LSB -0.11 % / -0.17 LSBp / -0.66 LSBo
0.04 % / 0.31 LSB -0.26 % / -0.51 LSBp / -2.03 LSBo
0.06 % / 0.59 LSB -0.14 % / -0.34 LSBp / -1.37 LSBo
0.08 % / 0.98 LSB -0.02 % / -0.05 LSBp / -0.20 LSBo

One thing is immediately obvious, the DAC performed better than the ADC. This is, however, no surprise. The DAC is a standalone chip of good quality with 12 bits of resolution while the ADC is integrated in a microprocessor with 10 bits of resolution. It was an unfair match to begin with.

However, the overall accuracy was pretty good, DAC did not exceed 1 LSB error and ADC too if you count the physical LSB as the LSB. It is also worth recommending not to operate the load below 1 % of the range. The relative error there was almost 2 % of set current and 3 % of measured current. Above this threshold, the accuracy quickly improved.

The root mean square of absolute error was 0.57 LSB for DAC and 1.29 LSB for oversampled ADC. That means the DAC was about 2.3 times more accurate than the oversampled ADC.

If you recalculate the relative accuracy to the full scale (10.5 A in real), the worst error was 0.024 % of full range for set current and 0.053 % of full range for measured current.

So, would it improve if we used Arduino Due?


MightyWatt with Arduino Due


Due has 12bit ADC already and with some averaging, we can get even better accuracy from it.

Besides the Due itself, the setup was the same as with Uno.

Again, MightyWatt was calibrated according to the manual from 0.1 to 3A with 5 calibration points. Since I only had 3A power supply, the calibration range was up to that current.

The LSB for ADC was 2.55 mA while for the ADC 2.56 mA, practically the same.

MightyWatt set I, AMightyWatt measured I, AExternal ammeter I, A
0.10.0980.09818
0.250.2490.2494
0.50.4990.4979
11.0011.00006
1.51.5011.4997
22.0011.9992
2.52.4982.4986
32.9982.9974

Comparing this with the Uno measurement, the true current was pretty much the same with the same set values. That was because the DAC did not change and it performed similar to the first experiment.

Set I (DAC) errorMeasured I (ADC) error
1.85 % / 0.71 LSB-0.18 % / -0.07 LSB
0.24 % / 0.23 LSB-0.16 % / -0.16 LSB
0.42 % / 0.82 LSB0.22 % / 0.43 LSB
-0.01 % / -0.02 LSB0.09 % / 0.37 LSB
0.02 % / 0.12 LSB0.09 % / 0.51 LSB
0.04 % / 0.31 LSB0.09 % / 0.71 LSB
0.06 % / 0.55 LSB-0.02 % / -0.24 LSB
0.09 % / 1.01 LSB0.02 % / 0.24 LSB

The ADC in Due is vastly superior to the one in Uno. With 16 sample averaging, as defined in the sketch, it is even better than the DAC. The root mean square error was 0.58 LSB for DAC and only 0.39 LSB for the averaged ADC. The choice for high precision measurements is Due.

The worst accuracy relative to full scale (10.5 A) was for both ADC and DAC 0.025 %.


Temperature coefficient

 

While the measurements were accurate at ambient temperature, things can change when they get hot. And electronic load is designed to be operated at high temperatures. I set 3 A and 23.3 V to get 70 watts of dissipated power, the maximum continous rating for the standard MightyWatt. The time constant for the whole load is about one minute so after 10 minutes, the load is in thermal equilibrium. The change in temperature was from 21 to 88 °C, as reported by the thermistor underneath the MOSFET.

At 21 °C, the current, as read by the 34461A, was 2.9975 A and at 88 °C it was 3.0080 A. Recalculating this to the temperature coefficient, its value was 50.0 ppm / W, or 52.3 ppm / °C. Interestingly, the temperature coefficient of the current sense resistor is 50 ppm / °C according to the datasheet.


Noise and stability

 

Not only one-shot accuracy is interesting, the noise in the measurement and its stability is important too. I tested the stability at 1 A set current and acquired 600 samples with the 34461A. The statistics is below:

Average current1.0003711 A
Standard deviation0.0000132 A
Relative standard deviation0.00132 %
Minimum value1.000331 A
Maximum value1.000416 A

MightyWatt was indeed exceptionally stable in the DC measurement. But what was the AC, or noise component of the signal? I set the load to measure AC current and the multimeter to acquire anything from 3 Hz to about 300 kHz, which is the upper range of the multimeter. The noise was then expressed as the AC/DC ratio.

MightyWatt set I, AAC RMS I, AAC/DC ratio
0.10.0002350.24 %
0.50.000140.03 %
10.000630.06 %
30.001670.06 %

Noise was low and again, the best measurement was when the current was above 1 % of the range. Just a note: a certain amount of noise helps the ADC on Uno with oversampling. A perfectly clean signal cannot be oversampled…


Conclusion or How to make accurate measurements with MightyWatt


  • Stay above 1 % of the current range.
  • MightyWatt performs very well with Uno but if you are looking for the very best accuracy that is possible, use Arduino Due or similar board with good ADC.
  • If you are making a lot of measurements at high power, consider calibrating the unit at the desired temperature. You can control voltage during current calibration and current during voltage calibration so it is possible to get a specific temperature. This will compensate for the temperature coefficient.
  • The calibration is only as good as your reference is. The ammeter and voltmeter should be, ideally, 10 times as precise as the precision you want from MightyWatt.
  • The internal reference voltage in the DAC can take some time to stabilize. It is a good practice to let the unit on for a couple of minutes before taking measurements. Most lab equipment accuracy is specified only after the unit has been turn on for a certain amount of time.

No comments:

Post a Comment