I did not want to design any optical components, reflector, window, enclosure...
So, I used a common oval-shaped flashlight you can probably find easily out there. I found mine at Walmart & Harbor Freight (in the USA). *** Update: The COB version of these flashlights are MUCH nicer than the standard T1-3/4-LED version. (thank you DAN!) ***
While the stock flashlight is powered by 4.5V (3x AAA cells), I'm driving those LEDs a lot harder... there's a bank of electrolytic caps charged to 24VDC. A power N-FET releases some of that pent up energy into those poor little LEDs.
How about lifetime? Well, this scheme works well, and the duty cycle is low. The LEDs seems to be OK. Besides - even if you eventually find that your $3 flashlight is worn out - just get another one! At Harbor Freight - you can often get one for free with a coupon!
Primarily intended to be driven by an external strobe-trigger signal. However, I've added a bunch of options to help cover all my particular needs. Presumably you will have similar requirements.
The 3x AAA batteries are removed. Power is supplied (via the new PCB) by an external source, generally something in the 12-24VDC range.
Trigger signal options:
Digital: Discrete signal, something in the 0-5VDC, and safely up to 24VDC.
Software (future): There's an on-board PIC12F1572 microcontroller. I was planning to use this for serial (character-triggered) more, and possibly for auto-strobe (adjustable strobe rate via 2 pushbuttons). I have yet to write any software.
External signal polarity: Jumper selectable.
Strobe width (2 options):
a) Direct mode: The external signal will activate the LEDs for as long as the external signal is high (or low). This would be useful if you know you have a nice short-ish (0.1 to 5mS wide) strobe signal somewhere in your system.
b) One-shot mode: The external signal will trigger an on-board one-shot, which will give you a fixed 1mSec LED strobe time (or you can change the R/C timing values).
This is the mode I use most of the time - because it easily ties an event in firmware to the real world.
My industrial control board (LPC1769-based) has an unused RS485 serial port. To add very low (almost zero) overhead "debug strobe" to my firmware - I program that spare UART for 19,200/8 BAUD (roughly a 0.5mSec strobe), or 9600/8 BAUD (roughly a 1mSec strobe).
Then, in the firmware (even within an interrupt routine), simply add a single "write to UART transmit register" with a value of 0x00. You don't need to check any status bits or use serial-interrupts.
The UART hardware automatically transmits 1 start bit plus 8 data bits (all 0's)... this in turn enables the LED-strobe for that amount of time. When you're done debugging - you COULD leave that debug-strobe code in place - since it should be very low impact.
This will require some firmware to be written for the on-board PIC12F1572 micro. I plan to do this at some point. The concept is that the PIC could just listen to the serial link, and look for 1 particular byte to come along. You could get fancier and look for a special string or sequence too. When that event happens - the PIC can turn on the LED strobe for a short time (also F/W controlled).
Almost everything is externally jumper selectable. When the F/W for the PIC12F1572 is written, a couple of tact-buttons and an LED will serve as a rudimentary I/F. Could possibly use the RS485 link to serially command the PIC to different modes, strobe-rates, baud-rates, etc., whatever you can imagine.
RJ-45 connector pinout:
This pinout is compatible with all the RS485 serial-controlled widgets I make. Whenever possible, I try to use the same pinout on a product/project. Therefore - a lot of my various projects become "interoperable" to a degree, for possible link-ups in future designs.
RJ45 Pin 1 = Serial Data + (RS485...Read more »