How To Build a Flashlight With Perfect Modes (picture heavy)

I don't know if I downloaded it correctly or not, but I did get the 4 files anyway.

I went ahead and flashed the programmable UI into a AK-47 that one of my lights uses. The Low is very impressive, about equal to the iTP A3 which is only 2 lumens. But I think the Low Battery is set too high or something because I was having a hard time with programming new modes. I don't think the Low Battery should be included by default since the settings involved are specific to whatever resistors the board is using.

I have no idea how to get started modifying and re-compiling programs. I had WinAVR and Eclipse installed, then decided that was too complicated, so I tried out AVR Studio 5 which people seem to like, but I don't even know what to do with it. There is only one driver.c program, but it seems to generate Simple, Extended, and Programmable?

I'd like to set up a 2-mode light with one of the modes being High and the other being one of several different lows: an indoor low of 1 or 2 lumens, an outdoor low of about 10 lumens, and a medium of maybe 50% in order to extend battery life. So what I'd like to get is set up some way of easily switching the Low mode only by tweaking and simplifying the programmable interface. With only 2 modes, I don't know that I would need memory, it could just always start in Low. Then I could single-click for Low or double-click for High. Or vice-versa, I kind of like the idea of the light not coming on immediately until you've had time to double-click, in which case a double-click for Low might work and you wouldn't be blinded by High flashing on first.

But right now I'd just settle for being able to turn off the Low Battery and recompiling the code.

. . . Think I'm getting a little closer. There was a "for" loop that AVR Studio didn't support (said to use c99, but I don't think that is supported), so I declared the variable before the loop and it seems to have compiled without any errors. I'm not sure what actually compiled though.

. . . 1 step forward, 2 steps back. Now one of the pins in the teeth of my clip has slid back, so the clip isn't making contact with the chip anymore. These clips are the worst pieces of crap I've ever had the displeasure of working with. Another $12 down the drain. I'll try to repair it when I'm less likely to throw it at a wall.

You can probably do it with just some small lead cutters, a fine point soldering iron, and fine point tweezers (and geezer goggles). Easy way to remove the chip is to cut the leads to the chip. Then use the soldering iron and some tweezers to pick off the lead nubs. Easy on the heat... most cheap boards have poor adhesive holding the pads down. Refresh the chip pads with a small blob of solder. Put the new chip down and reflow a corner pin. Tweak the chip position and reflow the opposite corner pin. Then do the other pins. It helps to push the pin down into the solder with the tweezers as you heat it.

Other useful things to have are liquid solder flux and/or solder wick. The liquid flux helps prevent solder bridges. The solder wick helps remove them. I solder surface mount chips by flooding the pads/leads with solder. Everything gets blobbed together. Then I use a fairly wide tip and the solder wick to wipe down the length of the leads (from the package towards to tip of the leads). This removes the solder bridges and leave enough solder to mount the leads.

texaspyro,

Where do you get the LED and the lens?

DigiKey and Newark both have them. The C4500 array runs around $45 and the reflectors around $5. Bridgelux has recently updated the line with some new units (and some of the older ones no longer show up in their datasheets). They now have an 8800 lumen array... delivery date keeps slipping out on it. Bridgelux parts are made in the USA. They have proper data sheets and verified specifications (no Chinese bogo-specs and pseudo-lumens). I get more light out of a 60 watt Bridgelux array than any Chinese 100 watt array.

The older arrays have a volatge rating that is almost perfectly matched for unregulated direct drive with LiFePO4 cells. The newer ones are a bit problematic there. That 8800 lumen array wants to be driven by a 9.5 cell pack. A 10 cell pack might cause it to draw too much current. I might need to add some diodes in series with it to tweak the drive level... wastes a bit of power.

1 1 976-1011-ND LED ARRAY COOL WHITE 5000LM 0 46.02000 $46.02
2 1 711-1077-ND REFLECTOR FOR BRIDGELUX BXRA 0 5.19000 $5.19
3 1 711-1078-ND REFLECTOR FOR BRIDGELUX BXRA 0 5.19000

$5.19you

The driver from here should work corret http://www.dalewheat.com/news/12v-dimmer-kit-v2-now-available/?

Thanks for your help.

Yes, that is the dimmer that I started with. I modified it quite a bit. I replaced the voltage regulator with an LM2936 ultra low standby power device that also can work at a higher input voltage, I changed the FET to a higher voltage one, I added a second FET for controlling the fan, I added an LM34 temperature sensor, I added a voltage divider to measure the battery voltage, I rewrote the firmware.

It really is a neat little dimmer board. You can't beat the price. Buy a bunch... Dale is a great guy and can always use the business (even if he hates to kit up parts). I have modified them to do all sorts of things. I even have one driving a 2000+ watt heater in a composite curing oven with millidegree level temperature control.

Quoting myself here. Does not work. That goddamn solderblob between the legs very effectively prevents the Soic clip of getting contact on that side (legs 1-4). It's just not possible to get the connection with that stupid lump on the way. No way no how. I got my clip today and arranged the wires accordingly. I've DMM:ed all the wires and the clip and all of them shows they have contact to programmer. But still, no connection to the chip.

Funny thing is, not only I have couple of those pre-blobbed buggers (both 1,4 and 2,8 amps) here that are now about as useful to me as penis-flavoured lollipops, I have also more of them on the way. Splendid. Well, guess I'm off to KD or DX or MF to order more same drivers, only ones that are not ruined in advance.

Too bad just about the only thing exceeding my lack of soldering skills is my lack of un-soldering skills. But I might still try that, after good nights sleep. After all, I have plenty of them to practice with.

I've never had any luck unsoldering with copper braid, but recently got a solder sucker. Tried it out and didn't seem to do much better, but I was worried about melting the plastic tip. After watching a YouTube video of a guy using a solder sucker, that doesn't seem to be a big worry because it looked like he put it right on there (though he also went very fast; video wasn't zoomed in enough to get a lot of detail and doing it fast from the same angle over and over again added very little to my understanding).

I've added a lot to the Wiki page on this topic lately, though I'm stuck again now that my clip isn't working.

http://flashlight-wiki.com/AVR_Drivers

Don't think I will every try another lollipop. Thanks for that image . . .

You need to get a copy of Nick Earls' "Batchelor Kisses".

It seems to be out of print everywhere except Australia where the author comes from. Nick seriously gets it about what I do for a living.

Buy it. Read it.

Laugh a lot! I just about wet myself.

Then ask me about strawberry jam....

:bigsmile:

HID45,

I've had good success by using a very small razor blade to carve away solder (exacto-style blade). May be worth a shot.

Try heating the joint then sticking the razor blade between the pins. Solder does not like to stick to razors. Treating the joint with liquid solder flux first really helps to clear the solder bridge.

I would also try the solder wick. Place it over the offending pins. Stick the soldering iron tip on the wick until the solder flows. Wipe the wick/iron tip down the length of the pins. Voila... no more solder bridge. I solder fine pitch SMT IC's this way all the time. Helps to use a real (temperature controlled) soldering iron with good tips.

Better yet, use what I use... a Pace PRC400/PPS2000 solder rework station. Retails for well over $6000 with a good assortment of accessories. Can be had, with luck, for considerably less on Ebay (or PM me if you are REALLY serious about your slobbering equipment and have about a tenth of that burning a hole in your pocket ... sorry Eurofolks, they only work on 120V and weigh about 30 pounds)

Thanks texaspyro, but no thanks. I'm not that serious with my soldering equipment, even for the tenth of the tenth. Actually I'm pretty sure one could buy similar setup that I use for about ten bucks nowadays from ebay or chinese online shop.

brted: You're welcome. I heard that expression somewhere some years ago. It got me thinking could there be any more useless thing than the mentioned item. After thinking really long and hard (pun not intended) I came to conclusion that nope, there is none. I mean most useless stuff can be either destroyed in a funny way - let's say by shooting it or blowing it up - for brief amusement or sold online. But I coulnd't imagine a way to destroy a lollipop in very spectacular manner. And I doubt that there is much demand for that particular flavour either, even among ebay users, who are notorius for buying just about any useless crap imaginable. And about that Wiki-page... It's the best thing ever. I could not have even get the drivers or other software sorted without it. It's just amazing. Thank you for doing it and if you ever come to Finland, I'll buy you a beer.

Match: Yeah, I think I'll try a combo of wicking and shaving the blob with a knife. I think by weekend I have gathered enough motivation to continue the pursuit of getting that connection working. It was like 1.00 AM here yesterday (or actually today, to be exact) when I finally gave up and went to bed. Had some serious frustration accumulated at that point. The connection was not working. We lost to the Czechs in hockey. I ran out of beer. I knew I'll have to wake up in six hours to get to work. Etc etc.

After some tinkering, I got connection to chip. Downloaded the settings and uploaded new ones (BLF-VLD). Everything went ok according to AVRdude, but I can't change modes. It's on high and does not change modes no matter how I click it on and off. What could be the problem?

I' want to set it up to 3 modes (lo mid hi) + sos without memory. There was that fine post #281 (or something) which described how to set up a 4 modes and no memory, which I have used as a base. I'm just unsure how to activate sos. Do I just use #define func_sos in build_simple?

Clip? What clip? Come on now... That's so last season. And not a genuine budget solution. This is how we flash chips HID45 style.

Hmm. Seems like I'm hijacking this topic... But could someone help me out with setting the modes. With the light itself. I flashed the fixed modes version of Tidos driver. Didn't change it at all. 3 modes etc. I'm able to enter the extended modes no problem, but can't lock the mode settings.

I've followed the instructions on the readme, but no luck. So let's say I want the normal low replaced by crazy low from extended modes. I'll go to low. Hang in there for over 2 seconds. Then click 6 times to enter extended modes. Then select the crazy low. Hang in there for more then 2 secs. Then turn off. What next?

Should I start tapping short short long short from there? Or should I first turn the light on to get that blink and then turn off and then start tapping s-s-l-s? Does it make any difference how long the pause between taps are?

I tried soldering to the legs like that, but I couldn't do it. You've got better eyes, a steadier hand, and better soldering skills than me. Are those the only 4 pins you have to have connected? Looks like you don't have 6 or 7 (SCK and MISO). When I was playing around I didn't think I needed 5 (SCK) which you are using.

On drivers with stars, I'm guessing you could solder to the stars instead of the IC pins or pads for some of them, but I don't know if the ones connected to the stars are needed for communication.

Can't be of help on setting modes right now. I was thinking the extended modes UI wasn't programmable, it just gave you a way to get to additional modes if needed. I thought only the programmable was user programmable.

Hmmm... Yes... that would make sense. I think it said that there are no blinky modes in programmable? I'm trying to set up a dedicated camping/tenting/trekking light and it would be nice to have some kind of SOS or other distress signal.

Soldering was actually not very hard. If you have someone to push enter, you only need to solder those 4 pins. That's what I did. My soldering skills are not so good that I would tried soldering those 4 pins on the upper side of the chip. It would have been one messed up driver after that. What I did was solder only the corner pins, which is no big deal, and then write (or copy/paste from flashlight-wiki) the command needed to command prompt. Then I stick the remaining 2 pins to the driver legs with my bare hands and ask the wife to come and push enter. Sorted :)

I need to get me one of those. The dogs are absolutely useless at that kind of thing.

Lol... Wife is not exactly a budget item, that's for sure. But it can be done without one. I've tried it with success but it's quite a hassle. You have to put the driver with all the leads on top of the keyboard, near the enter (well, depends on the keyboard you're using but that's the case with my laptop). Then connect the last two pins while not pressing hard enough for any other keyboard buttons to engage and try to hit the enter with your pinky. It's difficult and requires some precision. But after the wife has gone to bed saying something like "that's just stupid, go to bed, you have work day tomorrow and it's already 1 AM" there's really not many options but to cope with it.

More proof that too much internet makes you think in strange ways. The first thing I did after reading that sentence was to check whether budgetwifeforum.com was already registered.