Author Topic: Programmable Electronic Load, 0-5A  (Read 9228 times)

0 Members and 1 Guest are viewing this topic.

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Programmable Electronic Load, 0-5A
« on: February 21, 2019, 11:29:12 pm »
Hi,

This is my first post here although I've been reading a LOT of topics along the years.
A few months ago I needed an electronic load to characterize a CR123A battery used in some temp/humidity sensors with a very low duty cycle. I needed an accurate discharge curve to estimate the battery life more accurately.

Since I was also discovering opamps at the time and how magical they are, I decided to have a go at designing an electronic load.
This is what I ended up with 2 months later.

Specs & features:
0-5A (depends on the heatsink and mosfet really)
1mA resolution
0-30V, can measure also down to -30V
1mV resolution
Reverse polarity protection
4 wire measurements
Autoranging for both V&A using the ADS1115 PGA to get the max resolution/accuracy I can get from that part
Temperature sensing
Fan control
Energy counting
Fully programmable: it can execute a programmed sequence of operations and output the data through serial
CSV data output on the serial port

The schematic of the analog part is here:
https://easyeda.com/jeanleflambeur/electronic-load

The digital part is not on easy-eda yet but I will put it there. It's pretty simple and it involves an ESP32, a OLED screen, a rotary encoder and momentary switch.

I have a 3d printed case as well and the final produce looks like in the attachment pic.


The schematic has several blocks:
  • The voltmeter, using a TL071 in as a differential amplifier outputs a 0 - 3.3V for a voltage range of -30 - 30V.
  • The ammeter, using another TL071 in as a non-inverting amplifier with ~5x gain.
  • PWM vref which takes a 0-3.3V PWM signal and low-pass filters it into oblivion for an analog 0-1V. There is an off signal as well here.
  • The load control using the last TL071 with voltage offset trimming so I can get down to 0mA. This takes the shunt and VREF as inputs.
  • The Load section: this is just a mosfet (or 2 but with really basic/non-existent balancing). For now I'm using a IRFB3006 because I had it laying around but I have a pair of IXTP80N075L2-ND on the way from Digikey for proper linear MOSFETs
  • ADC: an ADS1115 16 bit adc reads a differential voltage from the voltmeter and a single ended voltage from the ammeter. Nothing special here, just the datasheet filtering

There is some regulation as well as the board needs +/- 12V which I generate from an ebay module from the 3.3V of the ESP32 and that's it.
the rest is software which is on github: https://github.com/jeanleflambeur/electronic-load

I know that I don't have any lead inductance protection - I found about that from this forum too late and I'm sure I made many mistakes.
This is my first use of op-amps and my 3rd electronics project overall, with the other 2 being fully digital.

Right now the load is characterizing my battery running this little program:
S0.05 L1 D500 L0 D5000 R1000000
Which translates to this:
1. Set target current to 0.05A
2. Load on
3. Delay 0.5s
4. Load off
5. Delay 5s
6. Repeat 1000000 times

The software supports up to 10 stored programs (completely arbitrary limit) that can call each other.
The programming is done from the serial console by just typing the program string directly.

There is a calibration menu as well for the voltmeter, the ammeter and the PWM voltage. Unfortunately calibrating it requires access to an bench power supply to generate some test voltages and currents. I think this can be worked around by reworking  the calibration section.

There are some issues as well:
1. The reverse polarity protection MOSFET gets hot when the load voltage drops below 4V and the currents are significant (>1A). I believe this is due to the MOSFET getting down to the linear region and becomes a resistor.
2. The max current at low voltages is limited: with the current mosfets, at 1V I can only get 1.4A.
3. The 3.3V regulator on the ESP32 I have is not a LDO and when powering the load from USB (the intended way) it doesn't really regulate: there is a drop of around 400mV in a schottky diode on the board, and the AMS1117 doesn't have enough headroom for a stable 3.3V. Since the PWM reference is powered from this regulator, it's unstable. I have some pin compatible LDOs on the way to replace the AMS1117 and solve this.



I will appreciate any comments/suggestions/improvements etc regarding the schematic, PCB and software.

[Edit]
REV3 topic here: https://www.eevblog.com/forum/projects/jlm-electronic-load-0-30v-0-4a-1ma1ma-resolution/
« Last Edit: May 01, 2019, 10:00:04 pm by JeanLeMotan »
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #1 on: February 23, 2019, 09:33:29 am »
Well, I guess there's either not a lot of interest in dummy loads, or the topic has already been discussed too much already :)
 

Offline Mazo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: bg
Re: Programmable Electronic Load, 0-5A
« Reply #2 on: February 23, 2019, 10:26:33 am »
I didn't see accuracy specs or resistor tolerance shown so your diff amp might have a pretty bad CMRR if using 5% ones
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Programmable Electronic Load, 0-5A
« Reply #3 on: February 23, 2019, 12:34:54 pm »
1. The reverse polarity protection MOSFET gets hot when the load voltage drops below 4V and the currents are significant (>1A). I believe this is due to the MOSFET getting down to the linear region and becomes a resistor.

You are correct about linear region. Either drop idea of reverse polarity protection or redesign it. In short: add opamp as polarity sense and mosfet drive device :)

Quote
2. The max current at low voltages is limited: with the current mosfets, at 1V I can only get 1.4A.

You have 0.1R sense resistor, right? It means that at 5A burden voltage is 0.5V.  Do not see any problem. Reverse polarity protection at work here? While you have no good reverse protection - short it while you work on other parts of the design.

Quote
3. The 3.3V regulator on the ESP32 I have is not a LDO and when powering the load from USB (the intended way) it doesn't really regulate

Just add proper voltage reference and analog switch or CMOS buffer, powered from it.

Quote
I will appreciate any comments/suggestions/improvements etc regarding the schematic, PCB and software.

You have no current balancing resistors. It could be so that one mosfet never opens while other have to dissipate all the load. You maybe got ideal pair, others that follow your design may not be so lucky. Other option : you don't know (yet) how your mosfets balance current.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #4 on: February 24, 2019, 09:08:27 am »
You are correct about linear region. Either drop idea of reverse polarity protection or redesign it. In short: add opamp as polarity sense and mosfet drive device :)

It makes sense, like this the mosfet is always fully switched on/off by the opamp and never in the linear region.

You have 0.1R sense resistor, right? It means that at 5A burden voltage is 0.5V.  Do not see any problem. Reverse polarity protection at work here? While you have no good reverse protection - short it while you work on other parts of the design.

What's even weirder is that this max current at low voltage is influenced by the mosfets used. With other mosfets I got lower current.
Isn't this caused by the Id <-> Vds curves in the datasheet?
In any case, I remove the reverse polarity protection and see if it's fixed.

What would happen to the load mosfets if I apply reverse polarity without any protection?


Just add proper voltage reference and analog switch or CMOS buffer, powered from it.

Analog switch or cmos buffer? Gotta look up these ones.

You have no current balancing resistors. It could be so that one mosfet never opens while other have to dissipate all the load. You maybe got ideal pair, others that follow your design may not be so lucky. Other option : you don't know (yet) how your mosfets balance current.

So just adding a low value resistor in the source of the MOSFET?
I also saw this design that uses a BJT transistor: https://youtu.be/9auu8hH4IPM?list=PLUMG8JNssPPzbr4LydbTcBrhoPlemu5Dt&t=457

Thanks a lot for the advice.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Programmable Electronic Load, 0-5A
« Reply #5 on: February 24, 2019, 09:48:13 am »
What would happen to the load mosfets if I apply reverse polarity without any protection?

Fuse or shunt resistor(s) will blow or wires will melt or just nothing. Mosfets will stand because their body diode is specced at 270A, continuous, each. I would rely on fuse and careful use.

Quote
Analog switch or cmos buffer? Gotta look up these ones.

Cmos buffer: SN74LV1T34
Analog switch: SN74LVC1G3157
More here: http://www.ti.com/switches-multiplexers/analog/overview.html

Quote
So just adding a low value resistor in the source of the MOSFET?
I also saw this design that uses a BJT transistor:

Right, exactly.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14203
  • Country: de
Re: Programmable Electronic Load, 0-5A
« Reply #6 on: February 24, 2019, 11:16:52 am »
For current sharing it might be better to have a separate OP to drive each MOSFET and thus a separate current regulating loop. Just a source resistor may have to be relatively large if the FETs are not well matched. The separate OPs also have it easier to drive the gate capacity.

The TO220 FETs are only useful for low power - there rating is absolutely theoretical. I would not count on more than about 40 W from a TO220 case. The FET given is likely also not good at higher voltage, like more than 12 V - there is a chance of thermal runaway inside the chip.

For a low voltage version with a low value shunt, the TL071 is not really a useful choice: it's rather high drift and quite some low frequency noise. The OP27 is much better - as a cheaper alternative an OP07 (slow) or even NE5534 (with offset adjustment and cap for compensation) should be Ok. With offset adjusted at the NE5534 (and most other BJT based OPs) the drift also gets better.
 

Offline exe

  • Supporter
  • ****
  • Posts: 2562
  • Country: nl
  • self-educated hobbyist
Re: Programmable Electronic Load, 0-5A
« Reply #7 on: February 24, 2019, 04:10:55 pm »
Looks awesome! Can you please share STL files? I'd like to see how panels are connected as I'm designing enclosure for my PSU.
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Programmable Electronic Load, 0-5A
« Reply #8 on: February 24, 2019, 08:10:26 pm »
Someday I would like to build my electronic load, I think I will start off with constant current dummy load though.

Here are couple of comments:
- What is the reason for wanting 1mA/1mV resolution? By the way, I might be nitpicking but I think you meant accuracy, not resolution. :)
- At 30V/5A your looking at 150W., your going to be dissipating a lot of heat. Assuming 2.5A load on each FET, looking at the Safe Operating Area of the IRFB3006, its only spec'ed for 0.2A for DC operation at 30V. While it is probably okay, just keep it in mind. I don't know if these are any better but I have been looking at ON Semi FDP075N15A or Nexperia BUK755R4-100E. I only have limited knowledge of MOSFET's, so maybe someone else here can here help if I made any mistake. The Nexperia part is not a logic level FET though.
- Typically I don't like to use 1Meg Ohm resistors due to noise issues with this high value. Considering lowering these to less than 150k Ohm or put couple in series.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #9 on: February 24, 2019, 09:31:32 pm »
I didn't see accuracy specs or resistor tolerance shown so your diff amp might have a pretty bad CMRR if using 5% ones
I used 0.1% resistors. Not sure if overkill but they were super cheap.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #10 on: February 24, 2019, 09:35:56 pm »
For current sharing it might be better to have a separate OP to drive each MOSFET and thus a separate current regulating loop. Just a source resistor may have to be relatively large if the FETs are not well matched. The separate OPs also have it easier to drive the gate capacity.

The TO220 FETs are only useful for low power - there rating is absolutely theoretical. I would not count on more than about 40 W from a TO220 case. The FET given is likely also not good at higher voltage, like more than 12 V - there is a chance of thermal runaway inside the chip.
I confirm, I went through a few FETs when stressing the load with >20V and 1-2A. They kept failing short until I learnt what the SOA is.
For this reason I ordered the IXTP80N075L2-ND which seem way more appropriate for a load.

For a low voltage version with a low value shunt, the TL071 is not really a useful choice: it's rather high drift and quite some low frequency noise. The OP27 is much better - as a cheaper alternative an OP07 (slow) or even NE5534 (with offset adjustment and cap for compensation) should be Ok. With offset adjusted at the NE5534 (and most other BJT based OPs) the drift also gets better.
I agree, I went for the TL071 because I could get them fast from Amazon (next day delivery) and they were the only ones available with offset trimming.
The OP27 since it's almost pin compatible except for the offset trimming - and the schematic/PCB allows it. I will try it once it arrives.

Thanks for the advice.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #11 on: February 24, 2019, 09:36:58 pm »
Looks awesome! Can you please share STL files? I'd like to see how panels are connected as I'm designing enclosure for my PSU.

Sure. I'll actually post the STL source as well in case you want to modify it. I use DesignSpark (free) for modelling.
I'll upload it in the next 30 min on github.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #12 on: February 24, 2019, 09:43:36 pm »
Someday I would like to build my electronic load, I think I will start off with constant current dummy load though.

Here are couple of comments:
- What is the reason for wanting 1mA/1mV resolution? By the way, I might be nitpicking but I think you meant accuracy, not resolution. :)
I wanted to stay away from saying 1mV/mA accuracy as I don't have enough equipment to calibrate for that. With my switching, cheap bench supply and UNI-T multi-meter I'm not sure I can reach that. Factor in the temp coefficients, PWM filtering, lack of ref voltage and everything else I'm probably missing - it seemed unfair to claim that accuracy.
But the load can definitely distinguish each individual mV/mA, actually better than that since it has auto ranging and the ADS1115 is 16 bit.

- At 30V/5A your looking at 150W., your going to be dissipating a lot of heat. Assuming 2.5A load on each FET, looking at the Safe Operating Area of the IRFB3006, its only spec'ed for 0.2A for DC operation at 30V. While it is probably okay, just keep it in mind. I don't know if these are any better but I have been looking at ON Semi FDP075N15A or Nexperia BUK755R4-100E. I only have limited knowledge of MOSFET's, so maybe someone else here can here help if I made any mistake. The Nexperia part is not a logic level FET though.
I ordered some linear FETs to replace the IRFB3006. After killing a few of them, I started reading and got to the SOA part and finally understood what it stands for.

- Typically I don't like to use 1Meg Ohm resistors due to noise issues with this high value. Considering lowering these to less than 150k Ohm or put couple in series.
Do you think the noise will be that significant? There should be no current flowing through those resistors. What is the cause of the noise?

 

Offline exe

  • Supporter
  • ****
  • Posts: 2562
  • Country: nl
  • self-educated hobbyist
Re: Programmable Electronic Load, 0-5A
« Reply #13 on: February 24, 2019, 10:34:05 pm »
Do you think the noise will be that significant? There should be no current flowing through those resistors. What is the cause of the noise?

Afaik, mainly thermal noise (https://en.wikipedia.org/wiki/Johnson–Nyquist_noise) for metal film resistors. There are other types of noise, but I can't find a good article on them. So, I assume, if one doesn't use carbon resistors, thermal noise is dominating type of noise for thin-film resistors.
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Programmable Electronic Load, 0-5A
« Reply #14 on: February 25, 2019, 04:30:57 am »
I wanted to stay away from saying 1mV/mA accuracy as I don't have enough equipment to calibrate for that. With my switching, cheap bench supply and UNI-T multi-meter I'm not sure I can reach that. Factor in the temp coefficients, PWM filtering, lack of ref voltage and everything else I'm probably missing - it seemed unfair to claim that accuracy.
But the load can definitely distinguish each individual mV/mA, actually better than that since it has auto ranging and the ADS1115 is 16 bit.
Oh ok. Yeah I'm sure the load can distinguish it. For me electronic load doesn't need to be this precise, it does all depends on the application though.
I realized now your testing CR123A batteries, yeah you might want this kind of resolution.

Quote from: JeanLeMotan
I ordered some linear FETs to replace the IRFB3006. After killing a few of them, I started reading and got to the SOA part and finally understood what it stands for.
What part did you end up ordering?

Quote from: JeanLeMotan
Do you think the noise will be that significant? There should be no current flowing through those resistors. What is the cause of the noise?
Afaik, mainly thermal noise (https://en.wikipedia.org/wiki/Johnson–Nyquist_noise) for metal film resistors. There are other types of noise, but I can't find a good article on them. So, I assume, if one doesn't use carbon resistors, thermal noise is dominating type of noise for thin-film resistors.
I'm guessing no, however since your setting 1mV/1mA resolution I would say it could matter. My experience is based on the automotive and test equipment industry where this does matter.
« Last Edit: February 25, 2019, 04:38:36 am by aiq25 »
 

Online MasterT

  • Frequent Contributor
  • **
  • Posts: 785
  • Country: ca
Re: Programmable Electronic Load, 0-5A
« Reply #15 on: February 25, 2019, 04:52:54 am »
L2 1m - never put inductor in the grounding path.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #16 on: February 26, 2019, 05:58:33 pm »
L2 1m - never put inductor in the grounding path.
I copied this from an Adafruit breakout board, I imagined it helps with filtering but maybe I copied it wrong.
Not that you mention it it does ring a bell and I've heard/read a lot this phrase "low-inductance path to ground" - so adding an inductance in the ground path seems like the wrong thing to do. But why?

In the VCC path it's ok because if blocks high frequency noise from reaching the circuit, but in the ground path it would prevent high frequency noise from ... exiting the circuit?
 

Online MasterT

  • Frequent Contributor
  • **
  • Posts: 785
  • Country: ca
Re: Programmable Electronic Load, 0-5A
« Reply #17 on: February 26, 2019, 07:46:15 pm »
Any inductance or resistance in the ground path prevents interferencing AC/ RF noise to leave an IC/ crystal of Si. And this AC/ RF disturbance is gonna to intermodulate in-between with: DC signal at input pins, DC power supply, one couple/ pair of inputs to another and digital bus to analog inputs. I see you put a cap across Vdd and Vss, but there are many ways for interference to find a path inside ADC, including but not limited to capacitive coupling or direct RF injection, and data bus is certainly the most obvious.
   
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #18 on: February 26, 2019, 09:09:17 pm »
Any inductance or resistance in the ground path prevents interferencing AC/ RF noise to leave an IC/ crystal of Si. And this AC/ RF disturbance is gonna to intermodulate in-between with: DC signal at input pins, DC power supply, one couple/ pair of inputs to another and digital bus to analog inputs. I see you put a cap across Vdd and Vss, but there are many ways for interference to find a path inside ADC, including but not limited to capacitive coupling or direct RF injection, and data bus is certainly the most obvious.
 

That makes perfect sense. Thanks a lot!
I removed the ground inductor from the schematic and pcb.
« Last Edit: February 26, 2019, 09:11:49 pm by JeanLeMotan »
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Programmable Electronic Load, 0-5A
« Reply #19 on: February 27, 2019, 04:33:15 am »
I copied this from an Adafruit breakout board, I imagined it helps with filtering but maybe I copied it wrong.
Not that you mention it it does ring a bell and I've heard/read a lot this phrase "low-inductance path to ground" - so adding an inductance in the ground path seems like the wrong thing to do. But why?

In the VCC path it's ok because if blocks high frequency noise from reaching the circuit, but in the ground path it would prevent high frequency noise from ... exiting the circuit?
It's interesting Adafruit added it but the supply for the IC does not have it since it's directly connected to VDD and GND, not to the "filtered" pins (i.e. after the inductor). Also not sure if 1uF is needed for your circuit, depends on what the power supply rail looks like though and your layout but I would assume you would be fine with 1uF. I have always put 0.1uF for all IC's and add then in parallel with 1uF when needed. I'm curious, what does your power supply circuit look like? I might have missed it but I don't the schematic for it.
« Last Edit: February 27, 2019, 04:36:16 am by aiq25 »
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2591
  • Country: us
  • Not An Expert
Re: Programmable Electronic Load, 0-5A
« Reply #20 on: February 27, 2019, 04:46:13 am »
That looks like a fully baked product with complicated software features and everything.  Without having played with it to see how many UI bugs there are, I would say great job.  I may venture to guess you are a software developer based on the fact that most hardware guys get hung up on the software part and do a minimal job just to get it working.  It looks like you went all the way on the software features.  Nice.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #21 on: February 28, 2019, 12:24:26 am »
What part did you end up ordering?

I ordered the IXTP80N075L2-ND.
 

Offline JeanLeMotanTopic starter

  • Contributor
  • Posts: 40
  • Country: es
    • YouTube
Re: Programmable Electronic Load, 0-5A
« Reply #22 on: February 28, 2019, 12:31:55 am »
That looks like a fully baked product with complicated software features and everything.  Without having played with it to see how many UI bugs there are, I would say great job.  I may venture to guess you are a software developer based on the fact that most hardware guys get hung up on the software part and do a minimal job just to get it working.  It looks like you went all the way on the software features.  Nice.

Yep, software developer here. Wait till you see the menu transitions & animations in real-time :P
To be honest it's the hardware part that gets me all excited. Software lacks.. surprises.

Thanks for the kind words. It's a hobby after all, we're supposed to have fun
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2591
  • Country: us
  • Not An Expert
Re: Programmable Electronic Load, 0-5A
« Reply #23 on: February 28, 2019, 10:23:32 am »
That looks like a fully baked product with complicated software features and everything.  Without having played with it to see how many UI bugs there are, I would say great job.  I may venture to guess you are a software developer based on the fact that most hardware guys get hung up on the software part and do a minimal job just to get it working.  It looks like you went all the way on the software features.  Nice.

Yep, software developer here. Wait till you see the menu transitions & animations in real-time :P
To be honest it's the hardware part that gets me all excited. Software lacks.. surprises.

Thanks for the kind words. It's a hobby after all, we're supposed to have fun

The only difference between a hobbyist and a professional is having a product and selling it.  It sure looks like you are pretty close to a product here.  Take the next step, polish it up, and sell it! 
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Programmable Electronic Load, 0-5A
« Reply #24 on: March 02, 2019, 11:59:29 pm »
I ordered the IXTP80N075L2-ND.

That should work pretty well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf