Skip to main content
Topic: Simple programmable load (Read 17241 times) previous topic - next topic

Simple programmable load

Here's a link to a *really* simple linear constant current sink i put together:
http://http://twilightrobotics.com/prototyping/constantcurrentsource

This design is about as simple as it gets. . .multi-turn pot controlled and readout done by a voltmeter:)  The good news is that it works quite well for moderate loads. It was put together to regulate current flowing through a copper electroplating tank.  Due to the monstrous Pentium II (or maybe III?) heat sink, it isn't noticeably warm when eating 9A of current.

Here's a shot of the important part of the schematic:
[attachment=1]

Here's a pic of the milled PCBA:


As well as one with the ridiculous heat sink mounted:):


Component selection is discussed a bit on the web page - as it is, the components should handle up to at least 15A without issue (I can't remember off-hand what the traces are sized to handle)

Eagle SCH are BRD files:
[attachment=1]

Hopefully someone can get some use out of it - it's served me well so far:)

Re: Itead overload v1.1 unboxing

Reply #1
hmmm...just realized this probably should have been included over here...sorry about that - feel free to move it. . .

Re: Simple programmable load

Reply #2
Nice, thank you for sharing. I made a new thread and will post it on the blog too.

This, and studying the overload, makes the current sink seem really easy. I want to whip one up like yours now :)
Got a question? Please ask in the forum for the fastest answers.

Re: Simple programmable load

Reply #3
[quote author="ian"]Nice, thank you for sharing. I made a new thread and will post it on the blog too.

This, and studying the overload, makes the current sink seem really easy. I want to whip one up like yours now :)[/quote]

Thanks Ian!  I started out thinking I was going to do full MCU control, etc - then realized that for a simple (purely resistive) load that an op-amp could probably control it directly, so I just fed the voltage on the current sense resistor back to the op-amp - DONE :)

This whole thing can be bread-boarded in a matter of minutes as a low-current proof of concept - and of course components can be reselected for any current range you'd like.  Another simple improvement would be to use the extra op-amp to put some gain on the feedback signal - that way you'd have the entire 0-5V range translated to whatever current range you'd like, while still having the convenience of simple math (multiply by 10) for voltage-current conversion (when reading the voltage across the 0.1 ohm load resistor).

Re: Simple programmable load

Reply #4
I just wrote my review for a TI power experimentation board. One of the guys wanted me to test it out under load so I guess I'll go ahead and build this once I get the parts.

Also it is pretty easy to control it by PWM I guess. Dave made a power supply where he uses PWM to set the voltage. I guess I can add that stuff later once I built the manual one. :)

Re: Simple programmable load

Reply #5
[quote author="tayken"]I just wrote my review for a TI power experimentation board. One of the guys wanted me to test it out under load so I guess I'll go ahead and build this once I get the parts.[/quote]
Interesting - I wonder if  this a result of TI's acquisition of National.

I took a quick look at the dev kit and noticed it stated that it had an active load on board:
Quote
The kit contains a 2-rail DC-DC evaluation board using TI PowerTrain™ modules, on-board digital multi-meter and active load for transient response tuning.
I guess the on-board load is for transients only and can't sustain a load for long periods?  If you're planning on using this as a spring board for something a bit more dynamic, you should just be able to replace the POT with a DAC (or PWM channel with an RC circuit - or just straight PWM if you don't care about the transients (kind of defeats the point of having a linear load though;-)). 

If you're planning on logging actual current, there is an unused op-amp on-board already - it would be a good idea to re-purpose the channel as a non-inverting input, scaled to whatever current you plan on sinking.  Currently, the output is 0-1V for 0-10A (which looks to be the range of the C2000).  If you were planning on running between 0 and 10 amps and you ADC reference voltage is say, 3.3V, you'd want to configure the unused op-amp to scale the feedback voltage by 3.3 before it goes into the ADC - to maximize the scale.  My apologies if all this is obvious to you already, tayken:)

Also, kind of ironic you were having power problems with a board for demoing power supply circuitry. . .

Re: Simple programmable load

Reply #6
[quote author="bearmos"]I guess the on-board load is for transients only and can't sustain a load for long periods?  If you're planning on using this as a spring board for something a bit more dynamic, you should just be able to replace the POT with a DAC (or PWM channel with an RC circuit - or just straight PWM if you don't care about the transients (kind of defeats the point of having a linear load though;-)).  [/quote]
I guess so. I've never tried it with long periods, just some short trials (a few mins tops). Did you check out EEVblog? Dave was making a voltage-current source. I'm planning to use PWM+some filtering. Actually for starters I can just use it manually with a single turn pot to test transients. This is what I need initially.

[quote author="bearmos"]If you're planning on logging actual current, there is an unused op-amp on-board already - it would be a good idea to re-purpose the channel as a non-inverting input, scaled to whatever current you plan on sinking.  Currently, the output is 0-1V for 0-10A (which looks to be the range of the C2000).  If you were planning on running between 0 and 10 amps and you ADC reference voltage is say, 3.3V, you'd want to configure the unused op-amp to scale the feedback voltage by 3.3 before it goes into the ADC - to maximize the scale.  My apologies if all this is obvious to you already, tayken:)[/quote]
I can get the current from the buck converters, they have made that available on the GUI. I was planning to do a level conversion but thinking about 0-3 V for 0-10 A as it gives me some headroom if I accidentally go out of specs. I was not aware that there is another op-amp available on there, that can help. Just one question: Why did you put a 0 ohm resistor between op-amp and FET? And I thought you had to include a resistor between gate and ground while using FETs, I guess you can do without it.

[quote author="bearmos"]Also, kind of ironic you were having power problems with a board for demoing power supply circuitry. . .[/quote]
It was frustrating. I was furiously probing every connection to find the problem. I still don't know it yet.

Re: Simple programmable load

Reply #7
[quote author="tayken"]I was not aware that there is another op-amp available on there, that can help[/quote]
Yep - check out the lower left hand corner of the schematic, it's got  a bunch of resistors around it to bias the inputs, as well as a feedback resistor - you'll just need to populate the right ones with the correct values.  Also, there is no connection between the power resistor and the input of that op-amp - the extra amp is pretty much just floating in space, so you'll need to add routing for that signal when you modify the PCB, as well as a convenient place to grab the output.

[quote author="tayken"]Why did you put a 0 ohm resistor between op-amp and FET?[/quote]
Mainly in case I wanted to hack the board to be a PWM driven load (instead of linear), a resistor can be placed (instead of the shunt) to reduce ringing on the gate.

[quote author="tayken"]And I thought you had to include a resistor between gate and ground while using FETs, I guess you can do without it.[/quote]
I imagine this is just a pull-down resistor - probably included just to keep an n-channel FET from turning on during start-up if you have an MCU with pins initially configured as high-impedance in the mix - just a guess.  If this is something that is standard - I'd like to be corrected:)

[quote author="tayken"]Did you check out EEVblog? Dave was making a voltage-current source.[/quote]
I've seen EEVblog before and I like a lot of the projects Dave does - I think he did a similar load (originally based on a more complicated battery performance logger I think).  If I ever need something more flexible I'll have to check out his voltage/current source (I think MickM may have referenced this in the DP forum already).  Honestly, I don't really sit down and watch an entire episode too often (this isn't anything specific to EEVblog, it's very good) - I'd just rather read an article and scribble notes on it :).  I tend to absorb the useful bits a bit better if they're in writing.  I always mean to sit down and watch a couple of his episodes, I just never seem to get around to it. . .

Re: Simple programmable load

Reply #8
[quote author="bearmos"]Yep - check out the lower left hand corner of the schematic, it's got  a bunch of resistors around it to bias the inputs, as well as a feedback resistor - you'll just need to populate the right ones with the correct values.  Also, there is no connection between the power resistor and the input of that op-amp - the extra amp is pretty much just floating in space, so you'll need to add routing for that signal when you modify the PCB, as well as a convenient place to grab the output.[/quote]
Oh, now checking the actual schematic, I see it. That is really nice.

[quote author="bearmos"]I imagine this is just a pull-down resistor - probably included just to keep an n-channel FET from turning on during start-up if you have an MCU with pins initially configured as high-impedance in the mix - just a guess.  If this is something that is standard - I'd like to be corrected:)[/quote]
Just a 1M ohm pull down resistor. I guess you are right about high impedance, as I've just seen them with either microcontrollers or simple push buttons.

Re: Simple programmable load

Reply #9
[quote author="tayken"]Just a 1M ohm pull down resistor. I guess you are right about high impedance, as I've just seen them with either microcontrollers or simple push buttons.[/quote]

It might be worth while to note that I haven't watched the transient response of this circuit during power up - so no guarantees there.  I wouldn't expect there to by any issue since the voltage into the op-amp is always at a known state.  I power it on at 0A (POT counter-clock-wise), then increase it to whatever current I need.  The ATX supply I'm using gets concerned that it is shorted if it has too much of a load during power-on.

Re: Simple programmable load

Reply #10
[quote author="tayken"]Why did you put a 0 ohm resistor between op-amp and FET?[/quote]
There's also a bit of a potential issue here with gate capacitance and the stability of the op-amp.  The gate of the FET has some parasitic capacitance, op-amp's generally don't like driving capacitive loads.  To get around this, a resistor can be placed in series with the output.  If you take a look at page 13 of the MCP6292 datasheet you'll find this graph:[attachment=1]

The input capacitance of the IRLB873 MOSFET is given on page 2 of it's datasheet as 5110pF:[attachment=0]

From these two pieces of information, it actually looks like an 11.5 ohm resistor would be ideal (not my original 0 ohm resistor).  So, if you wind up using the same components, add in a bit of resistance and you might avoid some potential headaches with oscillations on the output of the op-amp.

If anyone with a better explanation of this is reading, please chime in, I haven't ever delved too deeply into MOSFET drive design (although I'd like/plan to eventually).  There could also be a really good conversation about op-amp phase margin and loop stability here, since that's what we're trying to maximize/guarantee (I'm, unfortunately, just more of a digital guy that has a deep respect for true analog design engineers:)).

Here are some related references:
* http://http://ww1.microchip.com/downloads/en/appnotes/00799b.pdfMIcrochip App note on choose gate drivers for MOSFETS (this talks a bit about resistors used to limit peak current, which reduces EMI (ringing on the gate) - page 5
*http://http://www.irf.com/technical-info/appnotes/mosfet.pdf Explanation on the "real" parameters of power MOSFET's. It gets into gate charge and capacitance on pages 9-11
*http://http://www.analog.com/static/imported-files/tutorials/MT-033.pdf App note that describes phase margin and stability (pg6)

So, any thoughts? (if anyone made it to here. . .that was a lot longer than I intended. . .)

Re: Simple programmable load

Reply #11
I'm working on a nearly identical, but more complicated programmable load. I intend to include voltage and current sensing, fed back into an AVR controlling the load. A teeny scripting engine on top will allow the user to program various loads and duty cycles.

Re: Simple programmable load

Reply #12
Hi Zuph, welcome to DP!

[quote author="Zuph"]I'm working on a nearly identical, but more complicated programmable load. I intend to include voltage and current sensing, fed back into an AVR controlling the load. A teeny scripting engine on top will allow the user to program various loads and duty cycles.[/quote]
Sounds like fun, there are quite a few discussions here on various programmable loads if you're interested.  Also, feel free to start a project log if you'd like - there are lots of people that will provide great feedback here!  This one was quickly whipped up to complete another project, which was part of another project, etc etc:)

Re: Simple programmable load

Reply #13
Yes, we happen to have a little one up our sleeves too :) This uses a 12bit DAC to set the current. The second opamp is for current sensing. Voltage measurement would be good too, but we are out of pins.
Got a question? Please ask in the forum for the fastest answers.

Re: Simple programmable load

Reply #14
[quote author="ian"]Yes, we happen to have a little one up our sleeves too :) This uses a 12bit DAC to set the current. The second opamp is for current sensing. Voltage measurement would be good too, but we are out of pins.[/quote]
nice.

Some comments/questions after a cursory look:
1 The thermistor is certainly a worth-while addition for a "user safe" version:)  Although the heat sink on mine is so over-sized it doesn't seem to be an issue for me.
2 Are those bananna plugs? - again, nice
3 Why no values on the components?
4 I assume R4 is of sufficient power rating for it's value?
5 May also want to double check thermal dissipation ratings for the resistor (this becomes an issue for my design up around 20A - yes I realize Q1 is rated at 5A).
6 If you had the I/O, I would probably add a line to control the FET with PWM in case your don't need a truly linear load and want to sync higher current with lower heat - not sure if this pic even has PWM though - and you don't have the I/O:)

weird, couldn't get the bullet-ed list markup to work properly. . .