I am building a high-speed LED flash. The LED's will be powered for a very short time (1 - 5 microseconds) by capacitors. The forward voltage is significantly higher than the LED's rated voltage, so driving them for more than 5 microseconds could damage them. MOSFETs control the current.
I'm going to use an ATMega328P to generate the pulse. My concern is that the ATMega will, at some point, generate a pulse that is too long. Maybe it will crash during a pulse or boot up with the pin held high? That could damage the LED's ($$$). I couldn't find any dedicated IC's which could generate a single pulse.
Am I being paranoid? Is the ATMega a good solution for generating the pulse reliably, or is there a more robust method of generating a pulse? Thanks!
What you are looking for is called a "monostable multivibrator" or "one-shot".
You can build a one-shot with an [u]LM/NE555 timer chip[/u] (see fig 11 of the datasheet) but I'm not sure how short of a pulse the 555 can make.
I'm going to use an ATMega328P to generate the pulse. My concern is that the ATMega will, at some point, generate a pulse that is too long.
The ATmega chip is very reliable if your software is reliable. But, a 1uS pulse might be "tricky" with the normal C++ library and you might have to use assembly language... I'm just not sure...
MOSFETs control the current.
I assume you mean on/off control? You'll need something else (maybe just a resistor) to control the amount of current.
P.S.
Do you have an oscilloscope, or some way to measure the pulse width and validate your design?
Thanks Doug, having the correct terminology is very helpful! I'll look into the 555, maybe other timers if it can't do a 1 microsecond pulse.
My experience with the ATMega and PWM control of larger motors is that it might lock up occasionally at higher frequencies. I don't know enough to understand why, but maybe a single pulse won't cause a freeze like continuous PWM would.
OH, regarding the oscilloscope - Yes I have access to one, I've successfully made the 1 - 5 microsecond pulses with an Arduino and the response at the LED is delayed by about 100 nanoseconds on both rising and falling edges.
The NE555 is rated at 100 kHz, suggesting a shortest pulse of about 5 µs (astable mode mode - monostable may able to give a shorter pulse). Rise and fall times are 100 ns
Maybe you have to go for a TS555 (2.6 MHz, I've used mine at frequencies of 1.1-1.3 MHz with 50% duty cycle so pulses of <0.5 µs) or LMC555 (rated 3 MHz).
Tyguy:
My concern is that the ATMega will, at some point, generate a pulse that is too long. Maybe it will crash during a pulse or boot up with the pin held high?
wvmarle:
The NE555 is rated at 100 kHz, suggesting a shortest pulse of about 5 µs (astable mode mode - monostable may able to give a shorter pulse). Rise and fall times are 100 ns
Maybe you have to go for a TS555 (2.6 MHz, I've used mine at frequencies of 1.1-1.3 MHz with 50% duty cycle so pulses of <0.5 µs) or LMC555 (rated 3 MHz).
The NE555 is ancient and flawed (it need huge amounts of decoupling for instance due to shoot-through
currents).
The CMOS versions of the 555, such as the ICM7555 (and TS555) are much better behaved and faster.
There's almost never a reason to use an NE555 these days, the replacements are superior.
Just wanted to say thank you for all your feedback. The ATMega has worked beautifully for generating pulses, as I've tested it over 100,000 times without fail.