Sonsivri

Electronics => Projects => Topic started by: zed65 on August 15, 2013, 07:42:44 19:42



Title: Variable DC load with PIC18F4550
Post by: zed65 on August 15, 2013, 07:42:44 19:42
I'm planning on building a variable DC load capable of 30v 2amp.
Now i'm using a TIP35C to control the load via PWM-analog from the microcontroller.
Is there a better choice?

Anyone see any fatal mistakes?

(http://www.forumbilder.com/images/2013/08/15/dcLoad.th.jpg) (http://www.forumbilder.com/JVw)


Title: Re: Variable DC load with PIC18F4550
Post by: pickit2 on August 15, 2013, 10:14:50 22:14
how? and why are you using a TIP35C, a logic power fet would be better controlled.


Title: Re: Variable DC load with PIC18F4550
Post by: optikon on August 15, 2013, 11:32:02 23:32
I'm planning on building a variable DC load capable of 30v 2amp.
Now i'm using a TIP35C to control the load via PWM-analog from the microcontroller.
Is there a better choice?

Anyone see any fatal mistakes?

(http://www.forumbilder.com/images/2013/08/15/dcLoad.th.jpg) (http://www.forumbilder.com/JVw)

Agree with pickit, power fet better choice. The TIP35C has ~ 130 current gain which means your pic is required to supply about 15mA to the base. You should check that it can do that. Even if it can, thats pretty stressful for a logic output driver. Consider another buffer to drive the base.

If you use power mosfet, the drive requirements are easier.

Also if you stay with TIP35C, 30V@2A is at boundary of DC SOA and this assumes the TC=25C which means, you need to do an excellent job heatsinking and removing heat from the device. If you fall just shy of that, the part will go into thermal breakdown and destroy itself. This is another reason for the power mosfet. Pick one with good margin in the SOA, not near the boundary.


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 16, 2013, 02:48:32 02:48
I'd also do it with a MOSFET or an array of mosfets (if you are operating in the linear region you have to be VERY careful about safe operating area for the MOSFET.  They will handle MUCH less current when in linear mode.

I'd also wrap an opamp around the mosfet for control.  For instance, a current sense resistor on the output of the mosfet that is monitored by the opamp.  The PIC can send the analog to the non-inverting input of the opamp for a setpoint and then the opamp can drive the mosfet however is necessary to achieve the desired load current.  If you do this be careful as mosfets are hard to stabilize in the linear mode and oscillation is likely and a B*#CH.


Title: Re: Variable DC load with PIC18F4550
Post by: LithiumOverdosE on August 16, 2013, 03:05:49 03:05
Or you could use magnetic saturable reactor for current control.


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 16, 2013, 05:29:07 05:29
Or you could use magnetic saturable reactor for current control.

for shizzle? or are you joking


Title: Re: Variable DC load with PIC18F4550
Post by: LithiumOverdosE on August 16, 2013, 11:23:17 11:23
Shizzle?


Title: Re: Variable DC load with PIC18F4550
Post by: zed65 on August 16, 2013, 12:21:55 12:21
Thanks for the info, the TIP35C was the beefiest I had in my box at the moment.
I feed it from the PWM via a RC filter to create a 0-5v.
The more I read about transistor/mosfet/IGBT the more I realize that I have A LOT to learn ::)

Any suggestion of a mosfet?


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 16, 2013, 02:19:58 14:19
Shizzle?
http://onlineslangdictionary.com/meaning-definition-of/for-shizzle

simply translates to "For Real?" or "Are you serious"

i.e. saturable reactor would be frequency dependent and not much of a load for DC.  It would also require a significant drive to provide saturating flux on the order of (or a turns ratio of) the load current.  Unless I'm misunderstanding how it would be used, or the suggestion was tongue in cheek.

Posted on: August 16, 2013, 03:16:13 15:16 - Automerged

Thanks for the info, the TIP35C was the beefiest I had in my box at the moment.
I feed it from the PWM via a RC filter to create a 0-5v.
The more I read about transistor/mosfet/IGBT the more I realize that I have A LOT to learn ::)

Any suggestion of a mosfet?

Yes,

Pick one with a Logic level gate, Rdson doesn't matter so much for linear mode, find one with a set of SOA or Safe Operating Area curves.  Make sure all of your load scenarios fit into the safe operating area.  Make sure it can handle the power dissipation (related to safe operating area but not exactly). Off the cuff you might see 1/10th the usable current in linear mode vs rated max current.  The relationship between Vgs and Rdson is very non-linear and is very sensitive.  Don't expect to be able to set a voltage that corresponds to a load setting without a good feedback mechanism (like an opamp)


Title: Re: Variable DC load with PIC18F4550
Post by: LithiumOverdosE on August 16, 2013, 03:11:49 15:11
Thx for explanation of "shizzle".

You are correct on frequency dependent nature of saturable reactors. I simply suggested it because in the past I usually required adjustable loads for low frequency electromechanical generators. I'm currently interested in the topic of magnetic amplifiers so I simply suggested a general solution that would be consistent with my own past requirements.


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 16, 2013, 05:52:03 17:52
Thx for explanation of "shizzle".

You are correct on frequency dependent nature of saturable reactors. I simply suggested it because in the past I usually required adjustable loads for low frequency electromechanical generators. I'm currently interested in the topic of magnetic amplifiers so I simply suggested a general solution that would be consistent with my own past requirements.

Ah, got it.  Yeah it seems like it would be a good solution for low power RF control.  We use the technique for the opposite effect pretty often: to set the flux in the negative direction expanding the range of a pulsed current transformer measurement.


Title: Re: Variable DC load with PIC18F4550
Post by: bigtoy on August 22, 2013, 04:36:10 04:36
We have some small variable DC loads at work very similar to what you're wanting to build. I'm sorry I cannot post the circuit, but I can tell you this. Use an op-amp to handle driving the gate of the MOSFET. IE, have the processor generate a reference voltage (PWM output and filtered by a big R-C is fine) but then let the op-amp handle the feedback. MOSFETs in their linear region are quite unstable and you'll have a VERY hard time getting your processor to keep up with it (you'd need a very fast feedback control loop in your code). The processor can certainly monitor the voltage and current in the load to display those things, and power (V*I) etc, but let the op-amp do the heavy lifting. An LM358 will do the job and it's cheap. The MOSFET they use is an IRFB4110 (which is not a super-cheap part, but perhaps you can find a cheaper device with similar specs). Hope this helps.


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 22, 2013, 05:42:03 05:42
We have some small variable DC loads at work very similar to what you're wanting to build. I'm sorry I cannot post the circuit, but I can tell you this. Use an op-amp to handle driving the gate of the MOSFET. IE, have the processor generate a reference voltage (PWM output and filtered by a big R-C is fine) but then let the op-amp handle the feedback. MOSFETs in their linear region are quite unstable

Hmm, this sounds really familiar.


Title: Re: Variable DC load with PIC18F4550
Post by: Wizpic on August 22, 2013, 06:36:10 06:36
I would use an op-amp to control the load, because you can use the feed back to keep the current constant no matter what the voltage is, like said Fet's are not stable in linear mode but with such small current thy should be ok.
Here is a link for that use's a little tiny atmeg with a rotary encoder to control it. This should give you a good idea code and schematics are towards the bottom
http://blog.freesideatlanta.org/2012/08/constant-current-dummy-load-complete.html (http://blog.freesideatlanta.org/2012/08/constant-current-dummy-load-complete.html)

Here's another link that just uses an LM324 a fet and it has fine and coarse adjustment a video series if you wanted to watch how it was designed.
http://www.youtube.com/watch?v=afM1aujgAF8 (http://www.youtube.com/watch?v=afM1aujgAF8)
The forum where you can fins the schematics and all info,
http://mjlorton.com/forum/index.php?topic=106.30 (http://mjlorton.com/forum/index.php?topic=106.30)
I would go this way and just use to panel meters or a pic to display the load/voltage and may be add a data logger to it which all depends on you want to do with it



Title: Re: Variable DC load with PIC18F4550
Post by: zed65 on August 24, 2013, 07:37:53 19:37
Nice links! It gives me more to think about.
But I want to control the load via a microcontroller so I can discharge a battery down to a certain voltage.
Also I want to draw (say 0.5amps) for one minute then shut off.

The circuits I've found that involves a microcontroller just uses it to display volt/amp on a LCD.
Maybe I should go like the one with a attiny and a DAC.

I must say that my version with the TIP35 works relly well, but as mentioned the TIP get HOT!


Title: Re: Variable DC load with PIC18F4550
Post by: Wizpic on August 24, 2013, 11:03:47 23:03
I can understand what you want to do, Is the load always 0.5amps ?
You got me the bug now and just for the fun of it I'm going to have a play with a micro version  :D with shut of voltage and current monitor will let you know how it goes

wizpic


Title: Re: Variable DC load with PIC18F4550
Post by: Gallymimu on August 25, 2013, 01:54:09 01:54
Nice links! It gives me more to think about.
But I want to control the load via a microcontroller so I can discharge a battery down to a certain voltage.
Also I want to draw (say 0.5amps) for one minute then shut off.

The circuits I've found that involves a microcontroller just uses it to display volt/amp on a LCD.
Maybe I should go like the one with a attiny and a DAC.

I must say that my version with the TIP35 works relly well, but as mentioned the TIP get HOT!


If the TIP35 works you are better off staying with it,  a MOSFET would dissipate the same power.  A BJT will be easier to control but the voltage output range will be limited by the Vce saturation voltage.  Glad it's working well for you.


Title: Re: Variable DC load with PIC18F4550
Post by: LithiumOverdosE on August 30, 2013, 10:26:56 10:26
I was looking for something else and stumbled on article you might find of interest.

http://m.eet.com/media/1130553/13338-31705di.pdf


Title: Re: Variable DC load with PIC18F4550
Post by: ritkostar on August 30, 2013, 12:06:12 12:06
Complete system:

http://www.techome.de/manuals/43606_EL9000_KM.pdf


Title: Re: Variable DC load with PIC18F4550
Post by: Jean de la Rose on August 30, 2013, 01:34:15 13:34
Open source system by Itead Studio, Overload :
 Features
    3A – 12V adjustable electronic dummy load, 10mA and 10mV resolution
    ±30V Voltmeter, 10mV resolution
    ±3A Ammeter, 30mV resolution
    Base on Arduino (ATMega328P) , hardware and software open source
Shematic & Software on their site :
http://blog.iteadstudio.com/overload-source-code-release/

Jean


Title: Re: Variable DC load with PIC18F4550
Post by: zed65 on January 06, 2015, 02:29:30 14:29
Hi, long time since last update.

Now I use a TLV274 op-amp as feedback. Also there is a MCP4822 DAC.
I still use the TIP-35 on a heatsink with a PWM controlled fan.

The specs are: 0-30v / 0-2 amps.
I have a software controlled way to discharge Li-Po battery to storage volt and some other features.

(http://s24.postimg.org/sl27n4myp/dc_Load1.jpg) (http://postimg.org/image/sl27n4myp/)

(http://s8.postimg.org/qz5zag1tt/dc_Load.jpg) (http://postimg.org/image/qz5zag1tt/)


Title: Re: Variable DC load with PIC18F4550
Post by: Vineyards on January 08, 2015, 01:54:40 01:54
I guess you want to keep it simple and avoid things like DAC's etc. Then you can trim down the system suggested by zed65. Replace the DAC with a second grade sallen key low pass filter, use an opamp to drive the output stage featured in his post. That should solve the problem.


Title: Re: Variable DC load with PIC18F4550
Post by: Wizpic on January 08, 2015, 06:33:47 06:33
I've had a quick look at it, not downloaded the files yet but will do later when on PC. There is one little thing I noticed which would cause me concern and that is your 4w resistor at 2amps say at 24v the heat would be 48w even at 12v is 24w at 2amps a lot of heat. Not sure what your max voltage is or load but if you are designing something to be universal then the parts need to be able to take it
I will have a closer look a bit later


Title: Re: Variable DC load with PIC18F4550
Post by: zed65 on January 10, 2015, 05:00:26 17:00
Vineyards: I have a MCP4822 DAC.

Wizpic: Ooops sorry, I forgot to mention that I use a 100w 0.5ohm resitor. I only put the 4w resistor there to get the solderpads.

By the way, the design isn't bulletproof, 30v and 2amp through the 0.5ohm resistor is way to much!
Maybe a software maximum watt could do the trick.
Another thing is that I haven't got the 1-wire temp sensor to work properly, so for now I use a separate board to control the fan.


Title: Re: Variable DC load with PIC18F4550
Post by: Vineyards on January 10, 2015, 08:29:05 20:29
What seems to be the problem with OW sensor?
Can you post the code?


Title: Re: Variable DC load with PIC18F4550
Post by: dogipic on January 17, 2015, 03:18:47 15:18
Hi.
Here is another electronic load article which was published in Elektor in the year 2002. It's an 0-20A analog design using an mosfet transistor. Hope this helps.