I really like the idea of the large cap. Because I need the vibrator to continue to work even when trying to draw more then 5A the current limiter would be the best answer I think. The whole thing is being supplied by a switching 12VDC 5A powersupply. If I were to allow the vibrator to draw more than 5A it would cause the switching supply to shut down. That would cause the F877a to also shutdown. I can work around it but it would just be more convienient to make it so that everything continues chugging along even in an overload state. Thanks, James ----- Original Message ----- From: "Russell McMahon" To: "Microcontroller discussion list - Public." Sent: Tuesday, March 08, 2005 4:02 AM Subject: Re: [EE] Best method of current-limiting a PWM circuit? > > I'm driving a logic-level N-EMOS with the PWM output of an F877a at > > 20kHz to controll a mechanical vibrator. I want to limit the current > > the load can draw to 5A and I can't think of a good way of doing it > > other than a big-fat resistor in series. One complication is that > > the coil resistance can vary. Can anybody point me in the right > > direction? > > If you feed the vibrator with a 5 amp current source it can draw LESS > than 5 amps under PWM control but never more. If you want you can put > a suitably large capacitor on the output of the current source so that > you can source peaks greater than 5 amps but not more than 5A mean > once the capacitor discharges and the current source starts supplying > the full load. > > A current source can be as simple as a power transistor, a zener and a > few resistors. > > The main problem is that it will dissipate significant power if the > solenoid goes short circuit so some form of monitoring is desirable. > If this is 12V then 5A = 60 watts. 2 x LM350 will also do this with > thermal protection, depending on the voltage involved. Heat sinking > may be necessary depending on how you want it to behave under > overload. > > Simple but probably adequate transistor current source. > Q1 PNP suitably rated. > Emitter V+ via Rsense > Base to V+ via zener > Base to ground via resistor Rbias suitably dimensioned. > Current limit =~~~ (Vzener-0.6)/Rsense. > No thermal limiting. > > Keep Vzener low enough that power in Rsense is not excessive. > Vzener CAN be two forward biased silicon diodes in series. > Ilimit then become =~~ 0.6/Rsense. > 5A Rsense = 0.6v/5A = 0.12R > At 5A, power in Rsense is about 3 watts. > Power in Q1 will depend on how much "excess" voltage there is > > You COULD arrange instead for a PWM cycle to be tripped off early in > each PWM cycle whenever current exceeds 5 amps. This way there is > minimal dissipation in the control circuitry. > The trip off could be processor instigated OR use external hardware. > This may not achieve what you want as current then drops to zero for > remainder of that PWM on cycle whereas you MAY want it to limit at a > steady zero. Depend son what you are trying to achieve. > > Tell us more and we'll tell you more :-) > What voltage? > Why do you want to current limit? > Trip or maintain? > ... ? > > > > RM > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist