Maker Pro
Maker Pro

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

T

Tim Zeifer

Jan 1, 1970
0
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?

Thanks
 
P

Peter Baltus

Jan 1, 1970
0
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
 
A

Anthony Fremont

Jan 1, 1970
0
Tim said:
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?

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:
http://cgi.ebay.com/tde-PROGRAMMABLE-MESSAGE-CLOCK_W0QQitemZ190188550223QQcmdZViewItem
My 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.
;-)
 
J

John Fields

Jan 1, 1970
0
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?

---
View in Courier:


..VCC>--+---------------------------------+
.. | 555 |
.. [12K] +---------+ |
.. | |_ | |
.. +--------------7-O|D Vcc|-8---+
.. | | _| |
.. +---[470K]---+--6-|TH R|O-4--+
.. | | |__ | |
.. +-[1N4148>]--+-2-O|TR OUT|-3---|---[R]---+
.. | | GND | | |A
.. [C] +----+----+ [0.1µF] [LED]
.. | |1 | |
..GND>---------------+---------+----------+---------+
 
P

Peter Bennett

Jan 1, 1970
0
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?

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?).
 
J

John Larkin

Jan 1, 1970
0
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?

Thanks
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.

John
 
R

Rick G

Jan 1, 1970
0
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
 
J

JeffM

Jan 1, 1970
0
Rick said:
There is an attachment as a wordpad doc which I created

Groups without the word *binary* or *binaries* in their names
do NOT support attachments.
 
S

Steve Carroll

Jan 1, 1970
0
Tim Zeifer said:
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?

Thanks
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
 
R

Rick G

Jan 1, 1970
0
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

Yag1064
 
J

John Fields

Jan 1, 1970
0
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?

---
View in Courier:


.VCC>--+---------------------------------+
. | 555 |
. [12K] +---------+ |
. | |_ | |
. +--------------7-O|D Vcc|-8---+
. | | _| |
. +---[470K]---+--6-|TH R|O-4--+
. | | |__ | |
. +-[1N4148>]--+-2-O|TR OUT|-3---|---[R]---+
. | | GND | | |A
. [C] +----+----+ [0.1µF] [LED]
. | |1 | |
.GND>---------------+---------+----------+---------+


---
Oops...

..VCC>--+---------------------------------+
.. | 555 |
.. [12K] +---------+ |
.. | |_ | |
.. +--------------7-O|D Vcc|-8---+
.. | | _| |
.. +---[470K]---+--6-|TH R|O-4--+
.. | | |__ | |
.. +-[1N4148>]--+-2-O|TR OUT|-3---|---[R]---+
.. | | GND | | |A
.. [0.1µF] +----+----+ [0.1µF] [LED]
.. | |1 | |
..GND>---------------+---------+----------+---------+

and...
Version 4
SHEET 1 880 748
WIRE 224 192 -128 192
WIRE 544 192 448 192
WIRE -128 256 -128 192
WIRE -80 256 -128 256
WIRE 32 256 0 256
WIRE 224 256 32 256
WIRE 512 256 448 256
WIRE 32 320 32 256
WIRE 64 320 32 320
WIRE 176 320 144 320
WIRE 224 320 176 320
WIRE 608 320 448 320
WIRE 608 352 608 320
WIRE 480 384 448 384
WIRE 32 416 32 320
WIRE 80 416 32 416
WIRE 176 416 176 320
WIRE 176 416 144 416
WIRE 176 480 176 416
WIRE 512 480 512 256
WIRE 512 480 176 480
WIRE 608 480 608 432
WIRE -128 512 -128 256
WIRE 480 512 480 384
WIRE 480 512 -128 512
WIRE -128 528 -128 512
WIRE 176 544 176 480
WIRE -128 624 -128 608
WIRE 176 624 176 608
WIRE 176 624 -128 624
WIRE 544 624 544 192
WIRE 544 624 176 624
WIRE 608 624 608 544
WIRE 608 624 544 624
WIRE -128 688 -128 624
FLAG -128 688 0
SYMBOL Misc\\NE555 336 288 M0
SYMATTR InstName U1
SYMBOL voltage -128 512 M0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL res 48 304 M90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 58 VTop 0
SYMATTR InstName R1
SYMATTR Value 470K
SYMBOL res -96 240 M90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R2
SYMATTR Value 12K
SYMBOL res 624 336 M0
WINDOW 0 -45 40 Left 0
WINDOW 3 -59 71 Left 0
SYMATTR InstName R3
SYMATTR Value 150
SYMBOL cap 192 544 M0
WINDOW 0 -33 32 Left 0
WINDOW 3 -39 58 Left 0
SYMATTR InstName C1
SYMATTR Value 1E-7
SYMBOL diode 80 400 M90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL LED 592 480 R0
SYMATTR InstName D2
SYMATTR Value QTLP690C
TEXT 0 656 Right 0 !.tran .1 uic
 
J

John Fields

Jan 1, 1970
0
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
 
Top