PDA

View Full Version : Discussion PIC PWM and FETs as constant-current discharger?


meteor
May 06, 2006, 02:16 PM
After playing around with PIC's it looks like it would be pretty easy to use a PIC with PWM and FETs as constant-current discharger.

I've got a bunch of IRF1010N fets, and a 16F876A floating around...


Putting aside the current sense side and PIC programming, what would the circuit look like for the load side?

Do you just have a dead short as the "load" and vary the PWM output to the gate to get the required current?

Does the gate voltage matter?


Thanks!

Chippie
May 06, 2006, 02:47 PM
After playing around with PIC's it looks like it would be pretty easy to use a PIC with PWM and FETs as constant-current discharger.

I've got a bunch of IRF1010N fets, and a 16F876A floating around...


Putting aside the current sense side and PIC programming, what would the circuit look like for the load side?

Do you just have a dead short as the "load" and vary the PWM output to the gate to get the required current?

Does the gate voltage matter?


Thanks!

The basics are, a FET and a wire wound resistor.
The resistor is placed in series with the Source and then the whole lot across the battery, pwm'ing the gate determines the on/off time of the electronic load, sampling the battery voltage during the off time to determine the point at which to stop discharging.

I'm sure the more experienced gurus will have some 'elegancies' to offer :)

AndyOne
May 06, 2006, 03:15 PM
After playing around with PIC's it looks like it would be pretty easy to use a PIC with PWM and FETs as constant-current discharger.

I've got a bunch of IRF1010N fets, and a 16F876A floating around...


Putting aside the current sense side and PIC programming, what would the circuit look like for the load side?

Do you just have a dead short as the "load" and vary the PWM output to the gate to get the required current?

Does the gate voltage matter?


Thanks!


Meteor,

If the program ever crashes or some other thing goes wrong and the PWM gets set to 100% you will end up with a short through the MOSFET. The simplest solution is to connect a resistor in the drain circuit. Choose a value that will limit the current to a safe level.

Andy.

meteor
May 06, 2006, 04:57 PM
Meteor,

If the program ever crashes or some other thing goes wrong and the PWM gets set to 100% you will end up with a short through the MOSFET. The simplest solution is to connect a resistor in the drain circuit. Choose a value that will limit the current to a safe level.

Andy.

I assume that a fuse a bit above your highest anticipated current would alleviate any issues like that.

The Victor IQ series seems to use two sections of wire that have been squeezed with side cutters at various points. Not sure why, perhaps to come up with some arbitrary resistance?


Mostly, looking for info on the load side circuit.


Thanks.

alexcmag
May 06, 2006, 06:02 PM
My choice is a resistor in series with FET, a car's headlight bulb must work fine too.

But to make it constant current, you will need to measure the current, maybe with a shunt and a amplifier to measure voltage drop on shunt.

meteor
May 06, 2006, 07:18 PM
My choice is a resistor in series with FET, a car's headlight bulb must work fine too.

But to make it constant current, you will need to measure the current, maybe with a shunt and a amplifier to measure voltage drop on shunt.

Yup, I've got a few Panasonic precision current sense resistors and a Max4173 Current-Sense Amplifier on the way, so that side of the circuit is pretty trivial.

I've never worked with high current FETs, so I'm wondering how they are wired in parallel (requirement for high current), and what is the most efficient way to operate them, such as:

- PWM frequency
- gate voltage relative to source/drain (can they be driven by Vcc on the PIC, versus pack voltage, even if it's less?)
- etc...


Ideas?


Thanks.

GlowFly
May 07, 2006, 06:00 AM
I've never worked with high current FETs, so I'm wondering how they are wired in parallel (requirement for high current),If you're thinking of wiring them in parallel you must be considering substantial load current. Remember that any discharge circuit has to deal with the energy you are extracting from the battery under test. Unless you use the energy to charge a much larger battery, you will have to dissipate it as heat. Say you are considering 50A load and say a modest count of 3S LiPo/approx 11v. That equates to 550W or half an electric fire element!
PWM frequency?High hundred Hz or a few kHz minimses the gate drive current requirement, and minimises switching losses. Much higher frequencies are possible in exchange for beefier gate drive circuits and greater RF emission. The more FETs you parallel, the stronger the gate drive requirement.
gate voltage relative to source/drain (can they be driven by Vcc on the PIC, versus pack voltage, even if it's less?)There are low gate turn-on MOSFETs available, but if you want to switch faster than a PIC direct drive allows you will need an additional gate drive circuit. There are ICs available to provide both the enhanced gate drive current and voltage level translation.
It's perfectly possible to switch higher voltages than the PIC supply voltage.
--
Steve

AndyOne
May 07, 2006, 08:45 AM
I assume that a fuse a bit above your highest anticipated current would alleviate any issues like that.

The Victor IQ series seems to use two sections of wire that have been squeezed with side cutters at various points. Not sure why, perhaps to come up with some arbitrary resistance?


Mostly, looking for info on the load side circuit.


Thanks.

Meteor,

You could use a fuse for safety but a resistor has two advantages, it limits the current so it can never exceed a certain level (with a given voltage) and it can also dissipate some of the power, relieving the MOSFET. Resistors can be driven to higher temperatures than semiconductors thus allowing them to dissipate more power.

The wire squezed with side cutters may be come kind of current measurement shunt and the notches in it are probably some method of trimming the resistance to the exact value.

Relatively small MOSFETs are rated quite high power dissipations provided they are on a big enough heat sink, you probably won't need to put MOSFETs in parallel even at 500W if you choose the right one.

I have made analogue constant current loads before with a small shunt resistance in the source lead on an NMOSFET which gives a ground referenced current measurement.

The shunt voltage signal can be taken to any kind of feedback circuit to control the gate drive of the load MOSFET.

Remember that the stability of the current load is only as good as the shunt. I use Welwyn wire wound power resistors for this purpose. One that is well over speced for the power it is required to dissipate won't get even get warm and therefore will remain at a stable resistance.

If you are using a switched mode PWM system, the current monitoring circuit will need to integrate the current measurement in order to filter out the switching.

Andy.

meteor
May 07, 2006, 12:50 PM
Resistors can be driven to higher temperatures than semiconductors thus allowing them to dissipate more power...

Andy.

Most of the powerful constant-current systems don't seem to use any kind of resistor, simply section of wire as a discharge load. What would the difference be? (they also have honkin' big heatsinks, probably about 2+ lbs. of aluminum!)



If you are using a switched mode PWM system, the current monitoring circuit will need to integrate the current measurement in order to filter out the switching.

Andy.

I'm not sure what the sampling frequency of the PIC is, and whether or not it is adjustable. I guess you could simply drop zero results, as it's going to be pretty much on/off.

I guess it's all up to the sampling duration and the PWM frequency. If the two are far enough apart (slow sample, fast PWM), it should appear as a constant current (voltage drop across the precision resistors).

As long as it's a predictable relationship, it should be pretty easy.



Thanks.

AndyOne
May 07, 2006, 04:15 PM
Meteor,

You don't need a resistor for dissipation or even safety but you do need something to sense the current through otherwise how are you going to create a control loop. A small stable resistance in the circuit or some magnetic/Hall effect device can generate the required feedback signal. Any method of integration of the current signal can be used. Doing it mathematically will require some know-how to avoid pit-falls like ailasing effects. I would think that setting the ADC to the longest sample time and taking several samples would be the best way of achieving this but if I was doing this I would still use an R/C filter.

Most PICs that have PWM modules also have a pre-scaler which can be selected to change the frequency.

Andy.