Hi All. I'm making a stepper motor controller to hopefully use on a set of automatic gates (will also have a RF remote, beam to detect when i've driven past, etc - sick of getting out in those rainy days!). I've got a 3V 6.7A unipolar stepper which i'm driving with a PWM'd 50V to increase torque. The 50V is turned on via the PIC (16F877) sending a set signal (pulse) to a flipflop (4043) which turns on a BDW47 PNP BJT to the common of each winding (seperate ckt for each winding). The current is measured through a 0R1 sense resistor and when a comparator (LM358) senses the current above 6A it resets the flipflop. This is repeated every 125uSec. The other terminals of the windings are switched in regular fashion with BDW42 NPN BJT's and the rate at which these signals change adjusts the stepper speed. It all works well when i set the current limit for the resetting of the PWM at a low level but as soon as i go above an amp or two i start getting large oscillations which eventually destroy the transistors. I have flybacks from the NPNs to ground. Placing them also from the PNP's to +50V seems to kill the whole thing. Is there some fundamental flaw i'm making here? Does anyone have any experience with this kind of stuff? Any help would be greatly appreciated. Regards, Kresho. Sydney, Aust. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu