Gary, I'd second some of the ideas already mentioned - flyback diodes are number 1 potential problem, tie your grounds together at a single point with a ferrite bead, separate ground for power components, separate for digital compontnts, all running back to a single point at your heavy power supply, and make sure no ground loops can inflict induced power into your digital circuitry. You could even justify separate supplies, keep that nasty noisy 12V completely away from your PIC. Consider using a mosfet driver. A 22K pulldown resistor isn't going to turn off your mosfets very fast at all. A 220 ohm series resistor isn't going to turn them on very fast either (although better than 22K!) You can cook up a mosfet driver out of discrete transistors, or get one already built in a chip from International Rectifier, ST, and many others. You need to turn these mosfets on and off very fast to minimize power dissipation, and every time I've tried to get away without a mosfet driver I've met problems. --Lawrence > ----- Original Message ----- > From: Gary Neal > To: > Sent: 08 October 2001 14:21 > Subject: [PIC]: Mosfet speed control of 12V DC motor > > > > Guys, > > > > I've been trying forever to get a speed control circuit to work > for > > driving a 12V DC motor from a battery using MOSFETS. So far all I've > > managed to do is blow stuff up. Here's what I'm trying. > > Using single 12V battery to try to drive DC motor with ~30A max > current > > using 3 IRLZ44N mosfets in parallel and controlling them with a > > PIC16F870. Have mosfets on huge heat sink (even though they haven't run > > long enough yet to get hot). > > Using an LM7805 to get +5V for the PIC. Have caps on both input > and > > output of 7805. Source of mosfets is tied directly to ground. Drain goes > > through motor then to +12v. PIC outputs PWM signal to gate of > > mosfets. Have 220 ohm resistor in series with this PWM signal and have a > > 22kohm pulldown resistor to ground on this line. > > Everything works fine with motor disconnected. Get good switching > of > > mosfets. But, when the motor is connected things get all screwed up. > When > > I try to adjust the duty cycle, it basically shuts down the PIC. Have to > > disconnect power and reconnect before it will start again. > > I put oscope on the +5v bus. It swings quite a bit when the > mosfets > > switch on/off. I'm guessing the PIC is going into brownout or something > > like that. > > Does anyone have a simple solution to this problem? Or, a fairly > simple > > drive circuit that will accomplish what I want. I've searched the net and > > can't find a good example. > > > > TIA, > > > > Gary Neal > > > ######################## > > Try : > > 1:Check motor actually works ( straight across batt) > 2: Put Schottky across motor, cathode to Positive. This should clamp voltage > to rail. > > Regards > Jonathan > > > > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu