Close
0%
0%

Flashy-thingie!

or... cheap LED flashlight turns into multi-purpose strobe

Similar projects worth following
Many of my industrial projects involve some kind of motion-control. Mostly web-fed printing-press related projects, wherein some stepper/servo driven element needs to be carefully timed to the substrate flying by at 400ft/min.

Actually seeing exactly where the substrate is, at a critical moment, can be tricky. Optical sensors and scopes or logic analyzers often give me what I want, but then again - actually seeing that critical moment on a real printing press (in motion) can reveal subtle activity (slack material, wrinkles, misalignment, etc.).

That's where this little strobe project comes in. No doubt many (in the USA at least) have seen those cheap oval white-LED flashlights (see gallery). I've found these at Walmart and Harbor Freight. They are probably available elsewhere. By cracking open the case, inserting a custom PCB and wiring that into the battery contacts - you have yourself a quick & dirty strobe-light.

Flashlight:

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!

Strobe PCB:

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.

Power input:

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

RS485-direct:

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.

RS485-serial-cmd:

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

Configuration:

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 »

Strobe1_Rev-1_SCHEM.pdf

Schematic: Initial prototype.

Adobe Portable Document Format - 66.49 kB - 07/14/2020 at 19:46

Preview

  • On the road to flashy-goodness...

    Ed Caceres07/14/2020 at 20:06 0 comments

    Status 7/17/2020:

    Parts arrived! I just built up the first board. However, I somehow forgot to order a simple 3-terminal voltage regulator! Argh!!! So, that's on order now. The rest is together and everything fits - I just haven't powered it up yet.

    Status 7/14/2020:

    Blank PCB fab: I'd ordered these months ago - only just now do I have a little time to build one.

    Components: Just ordered enough parts to build 5 prototypes.

View project log

Enjoy this project?

Share

Discussions

Dan Maloney wrote 07/16/2020 at 16:40 point

I love those Harbor Freight flashlights! The newer ones with the COB LEDs rather than the discretes are so much better. I get one with the free coupon whenever I can and leave them all around the house - everyone has one on their nightstand for emergencies. Great to see them put to other uses. Nice job!

  Are you sure? yes | no

Ed Caceres wrote 07/16/2020 at 17:14 point

Hi Dan,

Thanks! Yes, I agree, the COB version is MUCH better, I forgot to mention that above.

Honestly - rarely do I walk through HF, Walmart, HD, Lowes, etc., looking to find something to use it as was originally intended! Like this example... sure, it *can* be used as a flashlight, if that's all you can muster!

Stay tuned! Parts are on the way, and I have a motion-control project sitting on the bench right now just aching to have a strobe attached.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates