Simple programmable load

Hardware incubation. See also our in development projects wiki.

Simple programmable load

Postby bearmos » Sun Jan 08, 2012 11:13 pm

Here's a link to a *really* simple linear constant current sink i put together:
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:
constCurrentSch.jpg
constant current schematic
constCurrentSch.jpg (9.59 KiB) Viewed 14534 times


Here's a pic of the milled PCBA:
Image

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

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:
constCurrentSch.jpg
constant current schematic
constCurrentSch.jpg (9.59 KiB) Viewed 14534 times


Hopefully someone can get some use out of it - it's served me well so far:)
Attachments
constCurrent.zip
eagle schematic and board layout
(61.58 KiB) Downloaded 589 times
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Itead overload v1.1 unboxing

Postby bearmos » Sun Jan 08, 2012 11:16 pm

hmmm...just realized this probably should have been included over here...sorry about that - feel free to move it. . .
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby ian » Mon Jan 09, 2012 5:53 am

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 :)
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Simple programmable load

Postby bearmos » Mon Jan 09, 2012 10:21 am

ian wrote: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 :)


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).
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby tayken » Mon Jan 09, 2012 12:56 pm

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. :)
User avatar
tayken
Developer
Developer
 
Posts: 1522
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Simple programmable load

Postby bearmos » Mon Jan 09, 2012 11:06 pm

tayken wrote: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.

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:
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. . .
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby tayken » Tue Jan 10, 2012 10:58 am

bearmos wrote: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;-)).

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.

bearmos wrote: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:)

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.

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

It was frustrating. I was furiously probing every connection to find the problem. I still don't know it yet.
User avatar
tayken
Developer
Developer
 
Posts: 1522
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Simple programmable load

Postby bearmos » Tue Jan 10, 2012 11:44 am

tayken wrote:I was not aware that there is another op-amp available on there, that can help

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.

tayken wrote:Why did you put a 0 ohm resistor between op-amp and FET?

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.

tayken wrote:And I thought you had to include a resistor between gate and ground while using FETs, I guess you can do without it.

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:)

tayken wrote:Did you check out EEVblog? Dave was making a voltage-current source.

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. . .
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby tayken » Tue Jan 10, 2012 12:14 pm

bearmos wrote: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.

Oh, now checking the actual schematic, I see it. That is really nice.

bearmos wrote: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:)

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.
User avatar
tayken
Developer
Developer
 
Posts: 1522
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Simple programmable load

Postby bearmos » Tue Jan 10, 2012 12:25 pm

tayken wrote: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.


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.
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby bearmos » Thu Jan 12, 2012 11:27 pm

tayken wrote:Why did you put a 0 ohm resistor between op-amp and FET?

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:
MCP6292_capacitive_load.jpg
MCP6292 recommended output resistors for capacitive loads


The input capacitance of the IRLB873 MOSFET is given on page 2 of it's datasheet as 5110pF:
IRLB8743_inputCapacitance.jpg
IRLB873 input capacitance


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://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://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://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. . .)
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby Zuph » Wed Jan 18, 2012 7:55 am

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.
Zuph
Newbie
Newbie
 
Posts: 11
Joined: Thu Nov 03, 2011 8:53 am

Re: Simple programmable load

Postby bearmos » Wed Jan 18, 2012 8:15 am

Hi Zuph, welcome to DP!

Zuph wrote: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.

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:)
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Re: Simple programmable load

Postby ian » Wed Jan 18, 2012 9:18 am

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.
Attachments
programmable_dummy_load_20120117.png
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Simple programmable load

Postby bearmos » Wed Jan 18, 2012 9:35 am

ian wrote: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.

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. . .
bearmos
Hero Member
Hero Member
 
Posts: 748
Joined: Tue Nov 02, 2010 10:02 pm

Next

Return to Project development, ideas, and suggestions