help needed in detecting presence of pwm

Status
Not open for further replies.

weiin

New Member
i have a motor control circuit producing PWM signals at 2.5kHz. The duty cycle can be controlled. I need to connect an LED to show presence of the PWM signal (when duty cycle is not zero), but I need the LED to be of constant brightness, so connecting directly to the PWM output is not the way.

Anyone has any idea how this can be done?
I'm thinking of using D flip flop with the PWM as the clock and data fixed at '1'. But I won't be able to detect 100% and 0% duty cycle
 
What are you trying to do, show that the servo is in balance? I have connected a bi-color (Red-Green) LED across the output of an H-Bridge; Red shows output one way, Dim or Amber shows balance, and Green shows output the other way...
 


If you are already using a micro controller to control the motor, why are you searching for another option? You can directly drive the LED from the one of the I/o through a transistor. Setting the logic can be done in the firmware....

I wonder...what are you trying to do.......!!!!!
 
If you connect a pulse-extender to the PWM signal, its output will be on for duty >0% and will give your LED a constant brightness.
 
**broken link removed**

You would not see 2.5 kHz (highest human flicker measured is about 110 Hz), but the circuit above would clean up the 2.5 kHz if you really feel the need to do so.
 
Last edited:
The control circuit I am using is actually the UC3524. Its output is a PWM which will be connected to MOSFET chopper switch - basically a DC-DC converter to control the motor with 10V supply.

The idea is to use the LED to show that the motor is in operation. But it must not light up when say, I activate the SHUTDOWN on the IC, or when I reduce the duty cycle to 0.

The problem with using the RC filter is that I may change the chopper frequency. 2.5kHz is just the current freq I'm using.

The FF idea is so that the PWM isn't actually the supply for the LED.

I wonder if this is logical?
 
Last edited:
I'm thinking of using D flip flop with the PWM as the clock and data fixed at '1'.
The FF idea won't do anything but output a '1', _always_.

As I suggested, a pulse extender will do the trick. A suitable pulse extender would be basically what Dick Cappels posted (actually a diode feeding an RC to ground), but with a digital buffer (e.g. a schmitt trigger) to drive the LED. A time constant of e.g. 50ms provides constant lighting for any PWM frequency down to 20Hz (which you wouldn't use for a motor driver), and has fast response time.
 
Thanks! I finally got it! And yes, the schmitt trigger was the key. Without it, the LED brightness changes with the duty cycle.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…