## 2016/12/04

### Resistor blackjack – the ultimate party game for nerds

Resistor blackjack is like regular blackjack but better! Your goal is to assemble a single resistance from several resistors that is as close to 21k while not being over.
Unlike regular blackjack, the resistors can be combined in series and in parallel, giving the game a whole new dimension. Plus, resistors have tolerances so achieving a mathematical 21k doesn't guarantee a win.

### The deck

The deck resembles card deck except for the ace which has to be a fixed 11k.
For 4 players, you will need the following values:
2× 2k2
2× 3k3
2× 4k7
2× 5k6
2× 6k8
2× 7k5
2× 8k2
2× 9k1
8× 10k
2× 11k
Put all the resistors in a box and shuffle.

### Player's equipment

Each player should be given an empty breadboard, resistor color code chart (maybe, if you want to be nice) and access to jumper wires.
Decide whether to allow calculators. Computing reciprocal values when resistors are combined in parallel can be tedious.

### Dealer's equipment

Box with the deck.
Ohmmeter (multimeter).
Another box with: 5× 100k, 5×330k, 5×470k.
A separate larger breadboard as the scoreboard.

### Rules

Start the round by giving each player two random resistors. During the round, each player can ask for up to 4 more resistors (total of 6) but they have to use all of them and assemble them so they form a single resistance. Shorting a resistor is not allowed.

At the end of the round, dealer measures each player's assembled resistance. Who is the closest to 21k without being over wins and draws one resistor from the second box. The resistors which players win are connected in series on a separate breadboard (scoreboard) and who is the first to have over one million ohms wins the entire game!

### Rule extension: 20k trimmer.

Before a round begins, dealer can ask a trivia question. The player who has a correct answer (is first or is the closest if the answer is a number) is given a 20k trimmer which he/she can but does not have to use in the following round. The trimmer is returned to the dealer after the round ends.

## 2016/07/22

### Hameg HM8118 LCR bridge

tl;dr: I made a control program for Hameg HM8118 LCR bridge. You can get it here: https://github.com/kaktus85/Hameg8118

## Controlling Rohde & Schwarz Hameg 8118 LCR Bridge/Meter from PC

### Introduction

There's a lot of LCR bridges on the market from simple fixed-frequency el cheapo meters made in country where pandas kiss good night to high end thousands of dollars meters made in… well, the very same place.

Somewhere in the middle lies Hameg HM8118 LCR bridge from Rohde & Schwarz for about 2300 USD. While the less advanced models only have a couple of frequencies at best, this baby has 69 of them. That makes it suitable for measuring a frequency sweep and then fitting the data to a more complicated equivalent circuit than the two-component model you can use for a single frequency. The frequency range is 20 Hz to 200 kHz and the device has specified accuracy to 100 kHz so the frequencies between 100 kHz and 200 kHz are more of a "bonus". But that does not mean they are completely useless. Just that you can't expect them to be super-accurate.

 Hameg HM8118

### Operating principle

So, how does it work? Normally, the bridge measures the voltage and current through the device under test (DUT), which is typically a resistor, capacitor or inductor. Besides amplitudes, it also measures the phase and from the ratio of amplitudes of voltage and current and the phase difference, it then calculates the impedance. Either as magnitude-phase or resistance-reactance. It is just a different representation of the same quantity. Then, it can apply the knowledge of impedance together with the frequency on a simple two-component model such as a combination of resistor and capacitor or resistor and inductor. Plus, these components can be connected in series or in parallel. That is all math. The device calculates what would be the values of the resistor and capacitor/inductor if they've been connected in series or in parallel and the whole ciruit had the measured impedance at the set frequency.

But as you only measure two quantities (voltage and current), you can only calculate two unknowns. If the circuit is more complicated, you need measurements at more frequencies. Preferably, you measure all the 69 available frequencies and then fit the experimental data to the equivalent circuit. Not a trivial task to do but possible.

This is the basic operating principle of this LCR bridge. It is a nice unit that, sadly, does not come with a desktop software so you have to rely on the front panel display and buttons which make complicated measurements tedious. Yet, you can connect the device via USB and switch it to a virtual COM (serial) port. Then send commands and read measured values.

### Controlling from PC

I have used the serial port feature to create a simple control program in C# (.NET 4.6). It should work on any computer running Vista or higher. It is open source and released under GPL v.3. The project, which also contains the only executable file you need (Hameg8118.exe) is available on my GitHub account.

## 2016/06/07

### Push it to the limit – measure the true junction temperature to get the most out of MightyWatt

Spoilers!

If you just want to know if you can overload your MightyWatt, the answer is yes. You can run it at 75 W constantly and at about 85 W for short periods.

End of spoilers

 Fig. 1: Experimental setup for measuring forward voltage drop of a FET body diode.

## Introduction

If you want to run a FET at high temperature, which is typical in electronic load applications, it is important not to exceed the maximum junction temperature. In my MightyWatt electronic load, I use IXTH75N10L2 as the main transistor and its maximum allowed junction temperature is 150 °C.

It is not easy to measure the junction temperature without actually having a sensor at the junction. Thermal camera, thermistors and other sensors will always measure less because there will be a temperature gradient betwen the case and the junction. At 70 W, the temperature of the copper tab directly attached to the die can be 20 °C less than the silicon temperature!

Luckily, there is a way of measuring the junction temperature. Sadly, it cannot be done while the load is operating… Because the temperature sensor is the intrinsic body diode of the FET itself. Its temperature coefficient can be measured in laboratory conditions and then its temperature can be correlated to some other temperature sensor, attached to the body of the transistor. In case of MightyWatt, that is a tiny 0402 thermistor placed beneath the transistor.

## Experimental setup, results and discussion (don't mix this in a paper)

### Measurement of the diode temperature coefficient

I have first measured the intrinsic body diode forward drop (VSD) of 10 samples of IXTH75N10L2 at room temperature (about 24 °C) at 1 mA using Keysight 34461A bench-top digital multimeter. Interestingly, they were all the same, at 522 mV. That's good! Seems like the process variation is not very high.

Then, one sample from these 10 was randomly selected and fitted with silicone elastomer insulated cables to the drain and source.

The transistor was then immersed in an oil bath (edible rapeseed oil actually) in a borosilicate beaker with a magnetic stir bar and put on a heated magnetic stirrer (IKA C-MAG HS7) (Fig. 1, 2). The temperature sensor from the stirrer was Kapton-taped to the metal tab of the transistor.

 Fig. 2: Transistor in an oil bath with two temperature probes: One from the magnetic stirrer/hotplate and a second, external one for verification.

Then, the bath was heated to 60, 70, 80, 90, 100, 110, 120 and 130 °C and when the temperature stabilized, a few seconds worth of experimental values were averaged to get the VSD. The multimeter sampled at about 1000 samples per second.

The VSD turned out to be linearly dependent on the temperature with a slope of -2.454 mV/K (Fig. 3).

 Fig. 3: Temperature dependence of VSD and ideality factor n (which is only discussed in the "extra math" section so pretend you can't see it).

### Measurement of the diode VSD in MightyWatt

First, I soldered wires to the drain and source of one standard MightyWatt's main transistor. The source was at the common ground potential. Because measuring VSD means connecting the polarity in opposite, the drain was connected to a SPDT relay. The normally closed lead was connected to multimeter negative terminal (diode cathode) via a 0.15-Ohm current sense resistor while the normally open lead was connected to power supply positive terminal.

Triggering of the measurement was done using a comparator circuit, which was driving one transistor that switched the relay and another transistor which triggered the multimeter. When there was current flowing through the load, the comparator would switch the relay to connect the power supply. When the current was interrupted, the relay switched to measure the VSD (Fig. 4). The propagation delay between the current interrupt and the actual trigger signal was measured using an oscilloscope (Rigol DS1052E).

 Fig. 4: Schematic of the connections for the in-system measurement of VSD.

The load was let to dissipate 75.9 W at 3.004 A and I waited until the temperature reported by a thermistor placed beneath the transistor was stable. This took about 10 minutes from ambient temperature. Then, the current was interrupted by physically removing USB cable that powered MightyWatt, immediately interrupting current flow. At that point, the relay switched and multimeter began to measure 2000 samples at about 1000 samples per second. I am only showing the first 500 ms, since the rest was a monotonic increase.

The VSD quickly increased upon interrupting the current. The trigger propagation delay was about 0.2 ms and thus negligible. There was an 80-ms delay starting from the current interrupt before the sampled data stabilized. The VSD had to be extrapolated from the recorded data to the point where the current was actually interrupted. I used only a phenomenological 5th order polynomial to extrapolate to the beginning (Fig. 5). Thermal fluxes are complicated in such setup…

 Fig. 5: VSD development with time right after the current was interrupted. First 80 ms had to be extrapolated.

So the VSD was about 260 mV when the current was interrupted, which means the junction temperature was about 132 °C, well below the maximum. By the way, the thermistor reported 101 °C temperature. The ambient temperature was 26 °C.

We can calculate the thermal resistance of the system now: (132 - 26) / 75.9 = 1.4 K/W. While the thermistor thinks it is (101 - 26) / 75.9 = 1 K/W. We should therefore calculate the junction temperature (Tj) from thermistor temperature (Tth) and ambient temperature (Tamb) as Tj = (Tth - Tamb) / 1 × 1.4 + Tamb.

Assuming Tamb = 25 °C and Tj = 150 °C, the thermistor will be reporting about 114 °C at this maximum. MightyWatt will report overheat above 110 °C, which seems to be a correct threshold to allow some leeway.

The maximum dissipated power is then (150 - 25) / 1.4 = 89 W. And at rated 70 W, the junction temperature is about 70 × 1.4 + 25 = 123 °C. But there is one catch: The Arctic Silver AS5 thermal paste (which I use) is rated 130 °C continuously (180 °C for short periods of time). The temperature at the thermal paste is unknown because datasheet only quotes maximum junction-to-case thermal resistance. Using the maximum value, the case temperature at Tj = 150 °C will not be less than 122 °C. But probably it will be higher, possibly exceeding the long-term rating of the thermal paste. So to be perfectly safe, let's assume the Tj to be 130 °C maximum. At this temperature (and 25 °C ambient), the maximum continuous power dissipation is (130 - 25) / 1.4 = 75 W

We should leave some safety margin because the extrapolation might not have been very precise and the Tj could have been higher. But advertising MightyWatt as a 70 W load seems to be honest, if a little conservative. And don't worry overloading it for extra 15 W for short experiments. You will have to change the maximum power in the sketch though.

That's all folks! But if you're interested in some more math, then please, continue reading…

## Digging deeper

### Calculation of VSD

Besides direct measurement, the VSD can be calculated using Shockley diode equation (1), where I is the diode current (1 mA in this case), IS is the reverse bias saturation current, n is the ideality factor, typically between 1 and 2, and VT is the thermal voltage equal to kT/q, where k is the Boltzmann constant, T is the thermodynamic temperature and q is the elementary charge.

(1)     I = IS[exp(VSD/n/VT) - 1]

IS is temperature dependent and is approximately equal to (2), where Eg is the bandgap energy.

(2)     IS = T3exp(-Eg/k/T)

The bandgap energy also depends on temperature and can be calculated from (3), with experimentally determined parameters Eg(0) = 1.166 eV, α = 4.77·10-4 eV/K and β = 636 K.

(3)     Eg(T) = Eg(0) - αT2 / (T + β)

Combining equations 1, 2 and 3 with the experimental data permits the calculation of the only remaining unknown – the ideality factor n – which was calculated to be between 1.061 and 1.175 for the temperature from 60 to 130 °C (Fig. 3).
The value of n indicates that the current was limited mainly by the recombination of minority carriers in the neutral region.

Thermal fluxes in systems like transistors on an active heatsink are complicated. The heat emerges from a relatively small region made of silicon and is then preferentially conducted via copper tab to the back of the transistor case where a heatsink is attached. The silicon content is very low compared to the lead frame and encapsulant, which contribute to almost the entire heat capacity of the device.

IXYS does not publish information about the material composition of the transistor but a similarity can be assumed with other parts in the same package. International Rectifier publishes Bill of Materials for TO-247 packaged transistors. The main mass (66.2 %) of the transistor is the copper lead frame. The other significant contribution is the epoxy resin, that is composed mainly of a filler – SiO2. These two materials account for over 90 % of the overall mass. The silicon content is a meager 0.6 %. The total weight of the transistor, as reported by International Rectifier, is 5.6 g. The IXYS IXTH75N10L2 was somewhat heavier at 6.4 g.

This permits us to calculate the approximate heat capacity of such transistor. The specific heat capacity at 127 °C of Cu, SiO2 and Si is 398.6, 889.2 and 788.3 J/kg/K respectively. Assuming the balance to 100 % has the same average heat capacity as the two main components, the overall heat capacity of the International Rectifier transistor is approximately (398.6 × 0.003719 + 889.2 × 0.001411)/0.913 = 3.00 J. Scaling this to the IXYS transistor, the heat capacity could be about 3.00 × 6.4/5.6 = 3.43 J.

Assuming the transistor is evenly heated and thermally conductive, the 80 ms delay at 75.9 W of cooled power would cool it by 1.8 K. However, such assumption is never true because the materials have different thermal conductivity and the heat distribution is uneven, with the maximum at the junction. Besides that, the silicon part has very low heat capacity because it is very small and the thermal path is mainly through the copper to the heatsink. There is a large temperature gradient from the junction to case at 75.9 W. According to the datasheet, the junction-to-case thermal resistance is up to 0.31 K/W, which creates a gradient of 23.5 K at 75.9 W. The extrapolation of junction temperature, even to a time only 80 ms before experimental points, is not trivial and in this study was done by simply fitting the VSD vs. temperature curve with a 5th order polynomial that accurately tracked the experimental data (Fig. 5).

Well, if you read all of this, you really pushed it to the limit. Go ahead, you deserve it!

## Introduction

Bipolar is not only a disorder but also a requirement for power supply for some devices. While most electronics is OK with a simple plus and minus, some will also require a mid-point, often called ground. It does not have to be connected to a real Earth ground and sometimes that is not even possible (think satellites).

The problem is that many laboratory power supplies do not have this midpoint, though they frequently offer ground connection. But that can only be tied to plus or minus, no real midpoint is typically available on them. That's where a virtual ground comes to save the day. Virtual ground, also called "rail-splitter", is a device that creates a midpoint, whose voltage is (plus + minus)/2 and is capable of both sinking and sourcing current. There are two basic approaches to get virtual ground: Either from a switching regulator or from a linear one. The former is more efficient and the latter is easier to build and offers less noise, albeit at the cost of wasting half the power.

For projects that do not require high power, a linear virtual ground is appropriate. I am presenting a circuit and a board that I use personally. It is a third iteration of my original design using a power op-amp and a simple resistor divider.

## The construction

My virtual ground is not cheap, it uses quality components and you may find a cheaper alternative. But this design is robust, simple and powerful. The printed circuit board itself is around 20 USD at OSH Park.

 Top of the PCB

 Bottom of the PCB

The unipolar power enters through an universal screw clamp terminal (CON1), the positive rail passes through a 3A resettable fuse F1 (PTC). Voltage spikes are quelled by a bipolar (can be unipolar too) transient suppressor diode D1. The positive rail then passes through reversed P-FET transistor Q1 that protects the circuit from reverse polarity. A suitable part for Q1 would be Vishay SUD50P06-15, a cheaper alternative Infineon SPD18P06P G might work too. Gate voltage is regulated by Zener diode D2 and current-limiting resistor R1. The gate voltage must stay below what is in the datasheet (typically 20 V) so choose the Zener voltage few volts below the FET's maximum (see my earlier blogpost about reverse polarity protection). The rail then continues from Q1 to three bypass capacitors for the main op-amp. C1 is an aluminium electrolytic capacitor, C2 a large ceramic capacitor and C4 is not shown because it is supposed to be soldered directly between pin 4 and 5 of the op-amp. Use 0603 package and 100nF/100V with X7R dielectric.

 Schematic of the virtual ground (click for full resolution)

The voltage from the input terminals is divided by two thin-film precision resistors. Use at least 56k because if the polarity is reversed, some current will go through these resistors and the ESD diodes of the op-amp. Its value should be small (like 1 mA). The output of the resistor divider is one half of the input voltage, this, after being buffered, will be the virtual ground voltage. The output from this resistor divider is stabilized using capacitor C3.

The heart of the virtual ground is OPA548 – a high-end power operational amplifier from Texas Instruments (IC1). It is capable of continuously outputting 3 A. Its input voltage must be between 8 and 60 V so the virtual ground will be 4 to 30 V above the negative power supply. Since this is a linear virtual ground, the op-amp must be attached to a heatsink. With Fischer Elektronik SK 129 63,5 STS, the thermal resistance of the system should be around 5 K/W so the virtual ground will be capable of dissipating approximately 20 W. But I haven't tested it at this power dissipation.

The output of IC1 is buffered by two identical aluminium electrolytic capacitors – C6 and C7 – before entering the output banana receptacle. A snubber circuit aimed against oscillations is formed from a series combination of resistor R4 and capacitor C5. Two reverse-biased silicon diodes (D3, D4) protect the output of the IC1 against voltage spikes that often occur from inductive loads. A suitable diodes are MUR410 from ON Semiconductor. Fast recovery is a key factor here.

Finally, there is a green LED (LED1) with series resistor R5 indicating that the output is on.

### How to calculate power dissipation

It is simple: the virtual ground must drop one half of the input voltage, so the power dissipation is the input voltage, divided by two and multiplied by the current. Or – the output voltage in respect to the negative input voltage, multiplied by the current.

## Conclusion

The idea is simple, the execution likewise. Input protection, resistor divider and a unity-gain power amplifier with output protection. If you're going to build this, don't forget a good thermal grease between the heatsink and op-amp and maybe add some rubber feet to the bottom of the board.

You may want to consider thicker copper layer, such as 2 oz/sqft instead of the standard 1 oz/sqft.

Eagle project can be found on my Google Drive here and on GitHub.

## 2016/03/18

### USBuddy

Do you sometimes develop with USB? I do. So I need to access data lines, bus voltage and I'd like to easily monitor the current too. I made myself a small companion (43.5 mm × 22.5 mm, 9.5 g) to do that. Just a simple breakout board with one connector in and one out. And a little extra to make things easier. I call it USBuddy.

 USBuddy between host and device.

It has one pin header to break out all the lines plus one LED to indicate that the USB is on. And the current measurement system: It is a very simple system, just a current shunt resistor and a current shunt amplifier. I chose INA199B1 with 50 gain which consumes less than 100 µA. This allowed me to use a very small current shunt, just 20 mΩ. This means that at 0.5 A, I will be losing only 10 mV. And it also means that the output will be a convenient ratio of 1 mV = 1 mA. The current shunt has 4-wire (Kelvin) connection for more precise measurement.

But why stop here? Often, USB is used for charging at larger currents. The design allows for up to 4 A and 24 V. While putting more than 5 V on USB is typically not a good idea, the USBuddy is designed to handle that just well.

 USBuddy schematic
If you think this project can help you, you will find all the design files on my Google Drive and on GitHub.

## 2015/12/11

### MightyWatt: How to increase the maximum power dissipation

Sometimes, you just need a bit more power than MightyWatt can dissipate. There is one trick that can easily increase the maximum dissipation. If you test batteries, they aren't typically discharged to zero voltage. This can be exploited: If you put a power resistor in series with the load, it will take over some of the heat that will be dissipated during testing, leaving a smaller portion to the load.

Let's make an example: Suppose you have a lead-acid battery that you want to discharge at 8 A. The battery goes from 14 V to 9.5 V. That would mean 112 to 76 W, well beyond the maximum for standard MightyWatt. However, if you put a 1 Ohm power resistor (properly rated) in series with the battery, it will dissipate 64 W while producing an 8 V drop in voltage. The load will only have to dissipate the rest: 48 to 12 W. Thanks to the differential voltmeter, you will always have the accurate battery voltage when using 4-wire mode as well as the total power of the device under test.

 Schematic of connection with power resistor

A suitable power resistor would be for example this one from Vishay: HL10006Z1R000JJ or this one from Multicomp: MC14668. The first one is 7 USD on Mouser, the second one 9 USD on Farnell/Newark. That's a pretty cheap extension of the power dissipation!

 Typical shape of a suitable power resistor

• Because the power dissipation is calculated simply as the product of voltage and current, you will have to tell MightyWatt that you are using a series resistance so it won't show overload. In the Windows control program, select Advanced => Series resistance and type the value of the external power resistor in the pop-up window. The load will automatically keep track of the true dissipated power in 4-wire mode. This value only affects the thermal management, nothing else. But be careful, if you put wrong value or you remove the power resistor later, it may lead to a damage of the load.
• This only works as long as the power difference between charged and discharged state (start - end) is not higher than the MightyWatt rating. It is great for batteries but if you have to go all the way down to zero with the voltage, you will have to split the experiment (voltage ranges) into two or more parts.
• The temperature coefficient and precision of the power resistor do not matter much. The voltage is measured directly on the device under test and current measurement is not affected either. Don't waste money on high-end power resistors.
• There are power resistors in aluminium heatsinks that look like the one below. These have to be mounted on a large heatsink to dissipate the rated power. See their datasheet. These resistors cannot dissipate the rated power only with the small heatsink that is around them.
•
 Power resistor that has to be mounted on additional heatsink

## 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, A MightyWatt measured I, A External ammeter I, A 0.1 0.098 0.09818 0.25 0.249 0.2494 0.5 0.499 0.4979 1 1.001 1.00006 1.5 1.501 1.4997 2 2.001 1.9992 2.5 2.498 2.4986 3 2.998 2.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) error Measured 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 LSB 0.22 % / 0.43 LSB -0.01 % / -0.02 LSB 0.09 % / 0.37 LSB 0.02 % / 0.12 LSB 0.09 % / 0.51 LSB 0.04 % / 0.31 LSB 0.09 % / 0.71 LSB 0.06 % / 0.55 LSB -0.02 % / -0.24 LSB 0.09 % / 1.01 LSB 0.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 current 1.0003711 A Standard deviation 0.0000132 A Relative standard deviation 0.00132 % Minimum value 1.000331 A Maximum value 1.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, A AC RMS I, A AC/DC ratio 0.1 0.000235 0.24 % 0.5 0.00014 0.03 % 1 0.00063 0.06 % 3 0.00167 0.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.