A beefy electronic load (#P4F2)

Hello again!

I’ve been asked: What do you do with this electronic load thing? Well, I‘ve been using it as a battery torture device, what else could you do with a variable resistance device…

For a crude first step in actually testing my unit and also classifying a newly harvested set of deeply discharged 18650 cells, I slapped together some minimalistic Arduino program and hooked the thing up in parallel to the battery under test. The electronic load was set to 2 Amps with another battery, which was monitored by the Uni-T 203A current clamp. Sure, one could put a multimeter in series, but the burden voltage and the ongoing thermal load…not a big fan. I have to test stability over time and also over the voltage variation with better equipment, but it is safe to say that the displayed current was rock stable from 4.2V to the 3.0V (under load) discharge cutoff.

While I’m reluctant to share this hacked-together piece of C code, I still need to describe the measurement principle: The electronic load cannot start and stop drawing current with the parts described in the two articles before – it’s always on once you apply power to the board. Hence, some kind of switch is needed to do that. An electronic switch would be ideal, so that it doesn’t need an human to flip it, especially when the end of the discharge cycle is a few hours down the road.

We’re already using a 15V supply and some beefy MOSFETs, why not use one as a switch as well? Sure…problem is, the Arduino won’t supply 15V – and run on TTL levels, the gate voltage cannot open the channel completely. There are much worse MOSFETs in this regard, but the chosen IRFP250 can do much better with the available voltage of 12V+. So – slap in a good old BC547B, give it a set of resistors for a minimum of current (we don’t need much, the gate leakage is 100nA at 20Vgs) and let the Arduino drive the MOSFET gate with the entire 15V supply voltage. That’ll do!
Another small logic level MOSFET would do the same without the need for current-setting resistors, but I have more BCs handy than I do TTL MOSFETs. And please, don’t waste a perfectly good IRFP250 for that!

I did, however, not use an IRFP250 for the switch. I’ve chosen the even beefier IRFP4668, which, according to the datasheet, is intended for “Hard Switched and High Frequency Circuits” – that’s what I want. It offers 200V Uds (which won’t limit our existing Uds rating), allows for 130A of current at 25°C and 10Vgs (92A at 100°C), and has a very sexy RDSon rating of 8.0mΩ typical and 9.7mΩ max at 10Vgs and Id of 81A. Downside: It costs as much as two IRFP250 – currently 5,70€ at Reichelt. Whatever, I’m not building thousands of these units!

Now, how does the Arduino know what’s happening? I’ve been using the China fakes of the Arduino Micro (the “Pro Micro”) for quite some time, and they are incredible value. Not sure if the Atmega 32U4 is a genuine one, though…

The 32U4 does offer a 10-bit ADC. That’s 1024 steps over the supply range (or less, if you have a separate reference), meaning 5000mV/1024=4.88mV resolution (yes, 2^10 = 1024, you “but it starts with 0!” 1023 fanboys out there). That’s more than enough for torturing some larger batteries, but I ran into a known problem: The absolute reading is dependent of the supply voltage of the Arduino, which isn’t anywhere near 5 volts when powered from a 2 meter USB cable. As this voltage isn’t even constant over time, the reading changes even though our DUT still has the same voltage. Now one could add an external 5V reference, but a) I don’t have any, and b) how do you supply that with less than 5V available on the Arduino?
So..I tried something in between. I had MCP1702 3002 regulator in my parts bin, which is an 3.0V LDO. It needs some load to be stable (read: a few 100Ω and 1µF), but then line regulation is specced at 0.4%. One could use this as a reference on the AREF pin, but then the ADC is limited to 3 volts…which doesn’t really help when testing lithium batteries. So I hooked it up to another ADC pin. I then take a reading of the “known” 3.0V reference voltage and use this as scaling factor for the voltage reading of the battery under test. Send the values via serial connection to your PC, and we’re good to go.

What does it look like?

Messy! (cutoff at 3.0V for all cells, in case you wonder about the different length/running time)

There’s stable readings all the way, and then, out of a sudden, there’s crap readings that average out to the correct values. Some traces like #6 start with it and then it stops mid-way. Some like #3 are totally fine. Some like #8 are total crap. Some have it in between, as #4 and #5. I’m a bit puzzled.

I know from the Arduino analogReference() help page that readings are unreliable for a short while once you switch references. I don’t do that. I use the same for both readings and map my results accordingly, praying for no change in supply voltage in the meantime. And I hope this doesn’t apply to the first readings when switching the ADC pin, as there are quite a lot of them, even on the small Arduino boards. Someone would have noticed and complained, eh?
Having some traces that are basically perfect doesn’t really support these concerns. Maybe the 32U4 chip is fake and unstable? Or is it the 1702 LDO that sometimes drops below ~4V, which is Vout(max) plus the Vdropout(max) of 0.975V? Not sure if a genuine Arduino will take some voltage drops THAT deep without problems either…

Looks like I need to test that again with a better (external) ADC. Luckily, I already ordered one quite a while back :mrgreen:

In the meantime, here’s four of the batteries again in one chart:

This is one of my reasons to build an electronic load: Dropping from fully-charged 4.2V till the 3.0V cutoff, one can clearly distinguish cells that aren’t good for high power applications anymore, and some that don’t care much about the 2 amps in this example. It’s not the nice S-shaped lines that I know from theory (or running a self-built lithium cell with ginormous single-digit mAh’s through a more professional characterization setup at university…), but one can clearly rate battery health and calculate performance figures from that data. Also, the cutoff works well and protects the batteries from damage due to further discharging when one isn’t around to stop the process. My Arduino code actually allows to automatically re-enable current draw, so that it’s also possible to safely discharge to a certain voltage. Well, unless you have huge currents set up and the time from enabling to the next ADC reading that cuts the circuit again will kill the battery to values way below your threshold. But 2 amps are fine for 18650 cells.

Guess the next step will be testing the very same batteries with a better ADC once again. Could be a hint for the upcoming review item… :bye:

Leave a Reply

Your email address will not be published. Required fields are marked *