A teensy controlled adjustable load

Edward

Well-known member
Here's a picture of V1!
IMG_20210309_122330 (2).jpg

I've been working on a ~1kW adjustable load for work, because I'm doing a lot of PSU design, and it's getting awkward testing them. You can buy a big high power resistor, but they're ~£100 a time and absolutely terrifying. Having a 40cm resistor on the desk sitting at 175degC is just not fun! That with a pretty decent fan on it. Plus you can never get the exact resistance value you need.
Ergo, I figured I'd have a stab at the above. It's effectively just a big current-controlled load. The teensy reads the voltage coming in, is given power from serial, and calculates an appropriate current per load.

The headline is, it works but just. I've had a lot of problems with the MOSFETs I'm using. First among them, was actually a learning curve about the difference between a rated value, and a value you can actually get out of a device. These parts can be rated at 300W for 25 degrees, but they have a power derating of 2.5W/deg, and a thermal resistance to the heatsink of 0.9deg/W. What that means is, even if the heatsink stays at 25degC solid the numbers still work out

power = 300W - 2.5*tRise
tRise = 0.95*Power
therefore power = 300 - 2.5*0.9*power
power = 300 / (1-2.5*0.9) = 92.3W

This really bit me in the ass, and I've a number of burnt components to show how thoroughly! With 8 Mosfets, I was able to get to around 7/800W before something burnt.

The second spot of bother was in how I decided to control the MOSFETs. I was doing my feedback with a 10mohm sense resistor in series with the FET, and this was a reasonable approach. I did, however, get a few mV difference in ground voltages between the teensy and the sense resistors, even though the wire grounding the teensy was beefy, and only a little current was passing through it. I had originally intended to use the heatsink as a ground, but I realised all FETs seemed to have their tab as a drain connection. This mV offset was fine individually, but unfortunately, it was proportional to the total current. That meant for a given channel running at X amps, the reading would change if other channels were on. I ended up having to add a variable that accounted for this. The current sensing did work out well, and I could keep within a few 100mA on 9A which is as high as my ammeter will go.

I chose to smooth PWM from analogWrite(), basically as it was the quickest option. I didn't want to fuss around with a bunch of DACs the get a bunch of output voltages, and because FETs are quite variable in their gate voltage, they do all need to be independantly controllable. The smoothing proved to be a dream, but the control did not. Adding two RC filters was did a good job of producing a good signal, but unfortunately created a time delay between writing the output voltage, and seeing it in action. I did my maths on 5RC to shoot for a 1ms rise time, but of course, that's only for 99.3% of the final value. When coupled with a FET transfer function, which is deeply non-linear, this produced a pretty consistent overshoot that also cost me a few FETs. Particularly as my starting control function was a pretty simple increase until you hit the value you want. I also made this worse by sampling and averaging to reduce the noise.
I didn't want to scrap it and write a proper PID control loop, so I swapped to a three-stage approach, with basically decreasing "slew" rates. You can see below the control in yellow, and the response in purple (Ignore the noise, the ground isn't connected). It still overshoots, but by less than 1.5A which I considered close enough.


IMG_20210311_162902.jpg

Finally, I also forgot completely to decouple the system properly, which is embarrassing. Normally I throw decoupling/smoothing caps pretty much everywhere but it just didn't happen here. I managed to get a pretty big oscillation occurring when the MOSFETs where just switching on/off. An 18MHz oscillation occurred when crossing the knee voltage, which I think was a function of the switching time and the sense resistor. Normally, the sense resistor also adds a bit of negative feedback - increasing the gate-source voltage, increase the current, increases the voltage drop across the resistor, which decreases the gate-source voltage. However, there is a delay on turning the FET on and off.
Hence, as the gate-source voltage crosses the knee, there's a moment when the voltage is opening the channel, but the resistor hasn't developed a voltage. Then subsequently, once the resistor voltage has increased, decreasing the gate-source voltage so the channel should close, but it hasn't yet. If there's enough coupling between the gate and the source, or perhaps between the wires caring the relative signal, the signals can positively feedback and hence the oscillation.
I adding decoupling caps across the power rail, and some filtering caps across the sense resistor which fixed the problem.

V2 is on the cards as I'd like to get to 2kW. For this I think I'm going to need to move to TO-264 packages, as these have a much better (lower) thermal resistance from junction to case, and I'll probably need to add a few more elements in. I'm considering using Teensy's built-in DAC as a global set signal and then using op-amps in a current pump style to individually set the currents per channel. I'll get much better control this way, and I'll just have to add a few trimmers to adjust each channel individually. I may consider using a "sense" wire to be able to adjust for the ground voltage difference but I'm not sure yet. Finally, I'm also thinking of how I can use the MOSFETs in series to further spread the power out. If I can ensure the power is balanced between the two, then I can use only one control signal and one feedback signal. This would be an advantage, because at 8 sets of wires the system is already a bit fiddly, and I dont want to make it worse!

thanks for reading, suggestions welcome!
Edward
 
Shunt resistors need to be used with a 4-wire connection and differential amp to reject the common-mode signal.

Modern power MOSFETs are not really designed for linear duty, so there can be issues using them this way (secondary
breakdown is a worry for instance - you need the SOA graph to be given in the datasheet to evaluate this.)

The way this would be done commercially is a switch-mode circuit, using as inductor to smooth the current into a
fixed load resistor. This is pretty universal in motor controllers for instance, to dump active-braking energy into a
resistor bank.

Even better there are test beds where the dummy load is effectively an con/inverter putting
power back into the circuit or the mains, offseting the power used for driving the DUT. However
this gets much more complicated, but for instance is well worth it for automated soak-testing of
power supplies, due to the large power savings.
 
Back
Top