Introduction: Yet Another Harbor Freight Flashlight Mod/Hack
A couple months ago, I had the thought to take a look at learning some minor electronics and maybe a little digital circuitry. I've always saved light emitting diodes (LEDs) from junk equipment and have always wanted to make some kind of mood lighting thing or scrolling sign or something. Also, a friend gave me a "Basic Stamp" microcontroller and even though it is most likely 20 years old, I'd like to see it work.
Looking at several web pages about the Basic Stamp (BS2) and LEDs, I constructed a rudimentary grid with my LEDs and some salvaged resistors and transistors. Everything lit up, not as bright as I would have liked, but I could tell that the mixed LEDs had different voltage specs. The BS2 was a bit harder. I had to get the programming software and manual. I had to build a programming cable. I had to write a program. It had to be hooked up.
Surprisingly, I was able to accomplish everything in a few days and my 3x3 grid, although quite uneven in brightness, was blinking furiously powered by a 5 volt commercial power supply. It turned out to be quite a bit of tedious work and when operating, kind of boring and unsurprising.
What to do next. I thought about building a huge grid, maybe a 3D color matrix, ahhh, a Star Trek transporter...no, not likely. Everything fun seemed a bit too difficult at this point. I needed something in-between.
While on the internet, I ran into a page concerning the 27 LED Harbor Freight flashlight. It caught my eye as I was debating junking one at that moment. I picked up a 27 LED Harbor Freight flashlight as a free give-a-way a couple of years ago. It came with the usual dubious batteries. Due to the poor quality of the batteries, and my neglect, the batteries had turn into some nasty, poisonous looking pseudo-solid in the battery compartment.
I decided to make a larger, homogenous grid using the flashlight. And as I thought about it, I thought of so many little possible additions that I might be able to make that this idea really interested me. I dumped the goopy batteries into a bag; scrubbed the unit in a sodium bicarbonate solution and dismantled it. I spent quite a bit of time measuring it for additions, that obviously wouldn't fit inside, but began to see myself in the future with hundreds of Harbor Freight flashlights each with a different but amazing function (like those Altoids projects).
In the end, this site (instructables.com) had given me several pieces of advice/information, and due to what I consider interesting discoveries (common knowledge to others, I'm sure), I decided that this project might be enjoyed as an "instructable".
It didn't take me very long to realize that I needed to use batteries to realize my daydreams. This flashlight has 3 AAAs, so the project was already under-powered for the BS2. I looked on the internet and the company that produced the BS2, Parallax, recommends using a 9 volt battery. Some suggested lithium ion batteries. I thought of adding a AAA battery.
I added a battery but even at around 6 volts to start, the voltage would drop and fluctuate and the BS2 would reset. I don't have lithium ion batteries. I used a 9 volt battery and it had good longevity but in the end, does not fit into the flashlight case without serious modding and I would say it doesn't really work to complete this project. There are newer, much cheaper micro-controllers out there that have similar output specs and lower voltage requirements. That may be the way to go with lithium ion cells.
The attempt, eliminating all but the battery problem, took a week due to so many unknowns and therefore changes, but it produced some possibly interesting results. I, personally, was very surprised and had much fun as the project progressed.
The internet seems to say that LED current requirements range from 15mA to 50mA and the BS2 can only handle 20mA per pin and 40mA per BS2. So clearly, the transistors and some resistors would be needed.
I cut the traces on the back of the LED board to form rows as they were already in columns. I soldered some bronze wire across the rows relying on the board's varnish and while test fitting it back into the case, decided that the normal sized transistors and 1/4 watt resistors probably wouldn't fit.
Using a circa 2005 VCR/DVD combo I harvested 1/8 watt resistors and surface mount (SMD) transistors. I was surprised that some of these SMD transistors had similar specs as their much larger normal sized cousins. I left the SMD transistors soldered to the board and just cut the board away.
I connected everything with long wires to test it. The LEDs lit up! But burned dimly as a whole. Brighter than my other attempt, but not nearly as bright as the flashlight unmodified.
THIS WAS SURPRISE NUMBER ONE: USING HARVESTED SMD COMPONENTS.
I, of course, had to write a "scan" routine fast enough to display symbols and/or animations on the flashlight without flickering. Of course, I slowly learned that "scanned" LEDs with modified duty cycles was a way to dim them. And I still had flickering especially with stationary symbols. I decided that this BS2 was probably too slow to create a surprising result.
I began to play with the resistor values (I had resistors on the transistor bases and each column) and do math to determine the LED current requirements at bright levels. I knew something was going to burn.
I finally noticed that my inexpensive multimeter had an ampere measurement on it. I eventually ran a current check against the whole 27 LEDs at 4.5-5 volts adjusting the resistance until bright. According to the meter (and some math too), the entire set of LEDs used 8mA-10mA!?!?! A lot confusing, but I think true.
I removed the transistors and resistors; soldered some ribbon cable to the rows and columns; connected the grid directly to the BS2 and added some programming to the BS2. In complete amazement, spent the next day making several different data structures to address the rows and columns and produced several animations.
THIS WAS THE BIG SURPRISE NUMBER TWO: FAIRLY EASILY CONNECT A BS2 DIRECTLY TO THE FLASHLIGHT'S GRID AND YOU CAN MAKE SOME COOL ANIMATIONS AND/OR NORMAL FUNCTIONS THAT ARE EVEN BRIGHTER THAN THE FLASHLIGHT WAS UNMODDED.
Step 1: The Stuff I Used.
Here is the BS2 with programming port, the BS2 programming cable, and some surface mount transistors that worked great but I ended up not using.
I added a micro-relay that uses a salvaged momentary micro-switch to toggle the power replacing the awkward original. It gave the BS2 the ability to shut itself off--like for power saving. Or just appear to shut off when the power button was pressed, but can reactivate itself. I started writing a routine for what would appear as a haunted flashlight complete with sound.
I'm looking to salvage a complimentary pair of "MOSFETs" to replace the relay as another hardware experience. And still working on amplifying a micro-speaker.
Currently, two weeks after the big surprise and so, suddenly, only playing with the programming, the flashlight acts normally when turned on; switching between 24 and 3 LEDs alternately each time it is turned off and on. I added another switch to the project which when held 2 seconds during the 24 LED cycle, will randomly show animations that I'm working on. Pressing either button will return it to normal. When held during the 3 LED cycle, the animations, which include the steady 24 and 3 LED states, are shown sequentially. Pressing the extra button selects that "animation" as the default. Pressing the power button cancels the choosing.
The flashlight will display its default configuration each time the light is turned on until reset. Reset is accomplished by holding the extra button for 2 seconds.
I already like leaving the flashlight in the 24 mode as a default and have added this as its "normal"--it always starts in 24 but can toggle to 3.
THIS IS ANOTHER SURPRISE: THAT AFTER WIRED TOGETHER WITH A FLASHLIGHT, JUST THE PROGRAMMING OF A 20 YEAR OLD MICRO-CONTROLLER WILL CONSUME YOUR IMAGINATION FOR WEEKS.
So in the end, it appears to be true to me, about the power requirements of these LEDs. I have run the lights using a couple of different power supplies and a 9 volt battery for over a hundred hours directly connected to the BS2. I left it in demo mode for 24 hours straight.
I haven't included my programming because it would probably embarrass me and spoil other's discoveries. Yes, it was very easy and small, but with lots of ways to optimize from the obvious.
I haven't found another project that appears quite this easy (for a novice) yet so full of learning experiences. Yes, I know, it's kind of pointless, but really fun because of the instant gratification aspect. This micro-controller appears to be still sold but is expensive ($49) and so not recommended yet, unless you have one already.
I'm going to order a $2 micro-controller and, of course, buy another 27 LED Harbor Freight flashlight and see if I can actually close up this project easily into its case. Still worried about the battery problem but I see that lithium ion batteries are becoming cheaper. I'll have to install a charging port.
I see that broken cell phones might be obtainable and a source of speakers and batteries.
These LEDs have left all my other LEDs (years in the collecting) sitting and waiting for the trash, but I don't know where to get more or what to call them, for new LED projects, outside the Harbor Freight flashlight.
(I think I see a way to add more lights to the flashlight by reversing the polarity.)
So, I'll publish this project in the hope for some answers (and questions if there are any). I may even find a way to include a video.
Got a video on here, but poor quality. The animations are very smooth in reality. One is a POV (persistence of vision) experiment shown twice. One looks like flash bulbs in a stadium. One chases back and forth around the edge.
We have a be nice policy.
Please be positive and constructive.