How to switch an LED at 1/1000 of a second at 30 times a second?

I am building a toy fan with an LED for fun. The LED spins and
should produce a blink instead of a streak of light when it moves
at high speed. I am having trouble switching a super bright LED
to stay on for 1/1000th of a second at 30 times a second. I'd tried
using a function generator to generate a VVVV wave to drive an
npn transistor which drives the LEDs but instead of turning the
LED on for 1/1000th of a second it doesn't. Instead, the transistor
is creating a square wave (with equal on time and off time) for the
LEDs. Can someone suggestion a practical way to switch a
super bright LED on at 1/1000th of a second at 30 times
a second?
Reply to
Tim Zeifer
Loading thread data ...
Hi Tim,
you could try and use a capacitor in series with the input (base) of the NPN, and a resistor from the base of the NPN to ground. This creates a high-pass filter that will shorten the pulse. By changing the value of the capacitor you can change the length of the pulse. To calculate the correct capacitor value you would have to know the input current of the transistor, which you can calculate from the LED current and the current gain of the transistor (or just measure).
However, if you want the on-time to be very accurate, driving it from the output of a microcontroller or digital counter would probably be better. Let me know if you need more help with either approach & good luck with your project!
Regards, Peter
Reply to
Peter Baltus
It's time for you to take a look at using microcontrollers. :-)
If you absolutely must do it the hard way, try driving the base of the transistor thru a capacitor to shorten the on time to the duration of the voltage "surge". Use a pulldown resistor after the cap.
Using a micro would allow you to take this project very far. CVS pharmacy was clearancing these cool waving wand type LED message clocks for $5 each:
formatting link
wife got me one the other day, I'm headed back to clean out the rest of their stock later. A really cool starting platform for stupid PIC tricks. ;-)
Reply to
Anthony Fremont
Reply to
John Fields
Set your function generator to produce a 1 mS pulse every 33 mS.
Sounds like you currently have the function generator producing a square wave (or triangle?).
Reply to
Peter Bennett
V+ | | a LED k | R2 | | d TTL-level sq wave----------C---+--------g 2N7000 or other mosfet | s | | R1 | | | | | | | gnd gnd
Time constant C*R1 sets the led on time. Try 0.1 uF and 15K. A healthy gate drive (5 volts min, maybe a bit more) would be good to turn a 2N7000 on hard.
You can do the same with an NPN, but you'll need a much bigger cap and the on time is less well defined.
Reply to
John Larkin
There is an attachment as a wordpad doc which I created that will get you close. It uses a 555 timer and a diode. Good Luck, Yag 1064
Reply to
Rick G
Groups without the word *binary* or *binaries* in their names do NOT support attachments.
Reply to
Keep in mind that the fan may not always spin at the same speed, in which case you'll still get movement in the position of the LED flash, unless you also have accurate speed control, or maybe have the fan trigger the LED once per revolution. Just a thought.
... Steve
Reply to
Steve Carroll
I mocked up a circuit in PSpice using a 555 timer. It seemed to satisfy your conditions. The circuit consists of 4 Resistors, 3 caps, 1 diode (gen. purpose), and a 555 8 pin timer IC. The output(pin3) produces a 1ms negitive transition every 33ms period. Connect the cathode of your LED to the output. I'll describe the schmatic using a net-list approach. Vx 1, 0 , {any voltage} R1 1, 4, 1K R2 4, 2, 18K C1 2, 0, 3.9uf C2 5, 0 0.01uf C3 1, 0, 0.01uf D1 7, 2, 1N4xxx series R3 1, 6 10K R4 6, 0 1K 555 Pin Node 1 0 2 2 3 6 4 1 5 5 6 2 7 7 8 1 Hope this will give you an easier starting point. Good Luck
Reply to
Rick G
Reply to
John Fields
Reply to
John Fields

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.