Light up LED with PWM signal


I have a radio receiver which outputs PWM from 1ms to 2ms in a period of 20ms. How can I use this output to turn on and off an LED without using arduino?

I know I should use a transistor/mosfet but with the duty cycle of at most 10% (2/20) I am pretty sure the LED will not light up as strong as it could and also when my receiver gets 5% duty cycle (1/20) it will not light off, it will still light up with a small amount of brightness but I would like it to turn off completely.

Is there any simple circuit I can use to achive this of an special type of mosfet that accepts a range of 1-2ms in the base/gate and can output 0% to 100% the output voltage (in this case the LED stripe operates at 12v).

Google "pulse stretching"

Why are you posting here, if you don't want to use an Arduino?

(Your ban expires in 5 days - couldn't you wait?)

1-2mS every 20mS is a Servo control signal. Use pulseIn() to measure the pulsewidth and decide from there how to control your LEDs. Example, measure 1mS wide, turn off LED. 1.25mS wide, use analogWrite (pwmPin, 64); to turn on 1/4 brightness 1.5mS wide, use analogWrite (pwmPin, 128); to turn on 1/2 brightness 1.75mS wide, use analogWrite (pwmPin, 192); to turn on 3/4 brightness 2mS wide, turn on LED fully.

Just a thought.

@batata006 won't be around for a little while. In fact, batata004's ban will expire before batata006's does.

\o/ uhull I came back!!! :)

There is still no way to turn up an LED using only a specific transistor connected to my LED? Should I use arduino with pulseIn to control the MOSFET? I cant believe nobody still came up with this really nice idea of making a transistor that works in the range of 1000-2000u pulses. I already implemented @CrossRoads idea and it worked perfectly but it's too overkill cause I need to solder a wire to power up arduino (VIN), solder another wire to GND of arduino, solder another wire from the receiver to an analog pin of arduino and solder another wire to control de mosfet. 3 of these wires could easily be avoided if there is a mosfet that works in the 1000-2000 us range.

Isnt there such a thing, really?

You want to light it up with just the 1-2mS pulse? That's not really enough time to see it on. That's the problem.

@CrossRoads yes I understand what you said but I thought there could exist a chip/transistor that accepts a PWM pulse 1000-2000 us and output it as a voltage. I had an idea: if I take a servo and remove the motor from it and plug an LED I can turn that led on/off only sending pulses to the connector of the servo. I just need to spin the potentiometer of the servo to the middle position and after that when I send 1000-2000 us pulses it will turn on and off the led.

Do you know if I can buy the chip that comes inside the servo? What is the maximum current that chip outputs?

It's not voltage out, it's the length of time the LED is on for. You need a pulse stretcher. The LED needs a minimum voltage to turn on, like 2.2V for Red, 3.2 to 3.5V for Blue for example, and between 5 and 20mA of current flow. Less voltage and it won't turn on, or less current it won't be bright. Too short time on and you can't see it. Too much voltage lets too much current flow, too much current it overheats and pops like a fuse.

Google 555 pulse stretcher. Turn the 1-2mS pulse into a longer pulse. Shorter pulses will appear dimmer, longer pulses will appear brighter.

@CrossRoads yeap, I googled it and it looks like 555 chip is a good alternative :)

But could you please tell me if I can buy the servo chip? I think the alternative I said in my last comment was a little better cause it will work exactly as it should be. But I am afraid I dont know how can I search for that servo chip or if there is alterady a chip out there that I can buy.

The servo alternative is pretty good cause the servo chip already converts the 1000-2000 us pulse to a voltage between 0 and 5 v to the motor inside the servo. So if I remove the motor and put and LED it should work, right?

Don't forget the servo driver also produces negative voltages.

Yes but that could easily be solved with a diode.

batata004: I cant believe nobody still came up with this really nice idea of making a transistor that works in the range of 1000-2000u pulses.

What you need is more than a transistor, you need a bunch of transistors all arranged way that they know what the pulse width is, then program them to turn on and off a specific output when a certain range is detected, one alternative to spending 10 years building your own controller is Arduino

Also, the servo idea might work, a cheap servo could run you $8 on crapazon . Just remove the motor and set the potentiometer to the center, connect your output to the motor leads with a diode in series and when you command one direction the servo will never stop trying to turn the motor output because the potentiometer doesn't move. When you command the other direction the same thing will happen except positive and negative will be reversed, but the diode will make that problem go away.

@Sparkyman thank you! Actually I made this servo idea work without a diode, I did exactly what you said but instead of connecting both wires from the servo motor to my LED, I just connected ONE WIRE to my LED stripe and the other wire I didnt use. So in my LED stripe I would be left with one wire disconnected, so I connected it to ground. No need to use diode. It works perfectly. Do you know if in the long run this could damage the servo circuitry?

One more thing: I already tried to find in all the places in the internet and I couldnt discover the max current that the servo circuitry can deliver to the motor leads AND I could not find the voltage it produce in the motor leads (I dont have a multmeter).

(I dont have a multmeter).

Well before you come back with more problems, get yourself one, if you want to "learn" about electronics.

Even an elcheepo from ebay that has the basic, volts DC and AC, OHMs, DiodeTest, Current AC and DC.

Tom... :)