PDA

View Full Version : MOSFET control using PWM & 16C711?



droptail
- 21st June 2005, 16:38
My requirements require using 16C711 that doesn't have PWM hardware. Can I effectively use the PWM command to control a logic level MOSFET directly without incorporating RC to condition signal output?

When driving high loads of say 25A, how would you deal with the heat of say 30W [(25)^2 * 0.05] off a TO 220 MOSFET? Seems heat sinks are limited to 5W?

penelopepug
- 23rd June 2005, 21:17
You can control a mosfet or hextfet directly with a HWPWM or PWM output from a PIC but there are some things that you need to do to limit heat disipation; 1) Select a hexfet (of mosfet) with the lowest RDSon you can find or afford. 2) Select one which is logic level controlled. 3) Select one with minimal gate capacitance. 4) Limit the frquency of the PWM signal to as low as you can in your PWM or HWPWM command string. The PWM signal will produce fewer pulses per cycle at a lower frequency. The fewer pulses per cycle results in less rising and falling edges which accounts for much of the heat a hexfet will generate. These are linear states where the hexfet will be highly resistive. 5) You can use a hexfet gate driver to drive the gate hard and fast AND, you can drive it at a higher voltage too with a driiver IC.

I have built many PIC based PWM circuits that serve as motor speed controllers and light dimmers that run cool using these techniques.

Another note (or two); PIC based PWM has always posed a problem for me because it is generated in spurts. So your loop timing will make the spurts (or burts if that is a better term) of PWM more or less noticable. HWPWM is continuous and much better. Lastly, I am not sure why you would want to condition the sigal using an RC network. This will result in a linear state and cause the hexfet to be resistive and thus, dissipate lots of heat.

mister_e
- 24th June 2005, 03:46
Depending on everyone skills, PBP PWM command is a really bad way to do an efficient PWM. The best way is to use internal timer interrupts and play with.

As always avoid statements that est precious Usec or Msec like pause, PWM, SOUND etc etc.

Threre's no assembler lines to write, only register to be set and read.l

BUT some can also feel a bit much lazy and read the ADC and send the result in parralell to a PORT. then do a 50 cent D/A converter with resistors and OP-AMP. OR send the results to DAC something like MAX517.

Once they have the voltage reading, send this to a kind of VCO wich will produce the PWM.

Tons of different way... i still stick to the first idea :internal timer OR better change PIC for one who have a built-in PWM module. Better, easier, faster... even cheaper

Look for 12F683 if you don't need many i/o, 16F628 is also good.

sougata
- 26th June 2005, 06:57
Hi there,

Using the HWPWM is not a big issue at all. All you have to do is set the correct registers and check for overflows through interrupt. To make your life easier there is a freeware by Doug McDonale called PIC HWPWM Calculator (I cannot remember the link now).
PBP makes your life easy and lets you concentrate on the program flow but it is always a good idea to keep yourself updated with the MPASM routines. Read your manual thoroughly.

Regards

Sougata

NavMicroSystems
- 27th June 2005, 01:52
If you have followed the hints penelopepug has given
and if you are wondering why your FET is dissipating that much heat
when using PBP's PWM instead of HPWM:
scope the output and the aswer will be on your scopes screen.

mister_e
- 27th June 2005, 02:17
I feel it's the way PBP produce the PWM. I feel they switch the pin direction from output, input and then output... i didn't check the PWM assembler source but i remember few user PMs about problem at the end of a PWM execution. With a LED(s) attach to the PWM pin(s),In some case the output state was set to high, sometimes low, sometimes XYZ=> wich looks more than a pin set to input.

Problem was fix when setting the PIN to output and LOW after the execution of PWM.

I prefer to stick with timer interrupt or HPWM(if i don't need many channels)

NavMicroSystems
- 27th June 2005, 02:24
Hi Steve,

your findings match my findings which results in: "DON'T USE PWM" (in terms of PBP's Software PWM)