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

Got it programmed!

Big thanks to comfychair, JonnyC (you can also do the open command window here in Windows 8 ), WarHawk, Ima4Wheelr, Sixty545, Dr Jones, and Tido. A lot of knowledge and effort had been put into this.

Next step is to learn what the code means and how to manipulate it.

Awesome….good job!

Sky is the limit now!

Just don’t do what I do…flash a firmware you “think you want” and then permanently (aka solder) down the driver, getting it back out to re-flash to another one is a pain in da butt! (ask me how I know :wink: )

And thru my getting my Certs and Cisco training, there are ALOT of keyboard shortcuts (yeah…I actually went thru the course when it was still a .com vs a .edu, cost me $25K!!!)

On a P60 I use a piece of flexible cord, 1/2 inch long. Solder one end to the rim around the driver seat (on the outside of the pill) and the other end to the driver edge ring. That way I can later simply lift up the driver and twist it more than 90degr. for attaching the clip for reprogramming and then twist it back again In place.

Any chance you can get a picture of this?

After twisting the driver back, if it will not stay down, I press it down on a piece of paper at the edge.

Might have to tack the driver down with a spot or two of solder once you flash it

The whole point is that I can reflash without cutting or soldering!

See if you can help me! I’ve been all afternoon with the theme of “How To Build a Flashlight With Perfect Modes”

I’ve been a long time trying to flash my convoy S2 driver and not exactly I am doing wrong, to reassemble no lights in any way (if along the negative pole of the battery with the upper contact of the LED lights themselves ). I followed the step by step AVR Drivers - Flashlight Wiki and have read many posts in the forum but can not get the driver to work.

The clip and the drivers I think I’ve done well, if I flash with this command(after putting in folder AVRdude all the files of the folder “Programmable”):
avrdude -p t13 -c usbasp -u -Uflash:w:BLF-VLD.hex:a -Ueeprom:w:BLF-VLD.eep:a -Ulfuse:w:0×75:m -Uhfuse:w:0xff:m

I get this:

but when I test the driver on the flashlight will not turn on!

The driver I use is this: https://www.fasttech.com/p/1186301 , but I have another problem …. I have also tried with the Convoy S2 (I think that is exactly the same) and although I have managed to flash it and try several times with other files. hex had the same problem because they did not light, now my is impossible for me to connect my convoy driver

:_(

The version I flashed is: http://tarnover.4gh.eu/BLF-VLD/BLF-VLD-0.4.zip

Anyone know what I’m doing wrong? and how I can retrieve the driver of the convoy can not connect with AVRdude?

very thank you!

Usually that verification error means the chip is bad. That’s what I’ve found in my case anyway. Do to have another driver / attiny13a to try?

The driver gives me error Convoy is the S2 but when I started testing and got flash it for the first time, it is well connected to the driver. After flashing several times it suddenly has stopped to connect to the driver. I have another Nanjg 105c (of FastTech) that looks exactly the same and that I get to connect, the picture I posted is recently when I managed to flash the file in the “Programmable” of http://tarnover.4gh.eu / BLF-VLD/BLF-VLD-0.4.zip vesion.

I connected several times the driver of the convoy S2 if I was wrong but I think it’s worth noting, seems to have died, is it possible? If he is dead … I have to go buying several Nanjg 105c to test if I break them. The 105c Nanjg I flashed, why not turn on the flashlight?

I always make sure to issue a "-e" to do an erase before trying to flash.

I have the jumper in position 3.3v. there okay?

I tried to do a “erase” but I suspect that I did something wrong, I do not know exactly which command should I write

sorry, but I’m very clumsy and I’m stuck with this

From the way it writes but then gives that final error
“Verification error, first mismatch at byte”

I think that’s a pretty good indication they chip is bad, when in get a chip that does that I write it off as a loss and swap it out.

I even have some fasttech 105c’s that do that from the very first time and I simply swap out the MCU and go from there.

I use the 3.3v setting but I know for a fact either works.

I’m buying these chips to try to replace them and see if I have better luck…. until they get me to do more tests I will try to learn how to program them

http://www.ebay.com/itm/10PCS-IC-ATMEL-SOP-8-ATTINY13A-SU-TINY13A-SU-/261025856211?pt=LH_DefaultDomain_0&hash=item3cc65a7ad3

thank you very much to all for helping me, I was very happy to install and mount the clip correctly but I’ve had bad luck with chips

Tiny13A-SU is larger than the original package of the 105C. The original package is 8S1, ordering code Tiny13A-SSU.

Thank you! I think these are correct, the best price I’ve found are for this pack (without buying a lot of them) http://www.ebay.com/itm/250936543547

anyone knows a trick to desolder using a single welder?

Use a flat/spade tip, heat all 4 legs on one side and use a pair of tweezers to GENTLY lever under the chip and lift that side off the pads then go to the other side.

Be VERY gentle or you will lift traces.

That error usually means that you have a bad / intermittent connection. Try cleaning with an old toothbrush and some isopropyl alcohol and try again.

Thanks for the tips! After some modifications and testing …… I’ve made ​​a breakthrough!

1) Is the original configuration of the leads. (I think that was the problem because it was not able to correctly program the ATTINY13)
2) As it could be a connection problem, after cleaning the ATtiny13, I decided to solder the ends of the wires with some solder. (sorry for the quality of the pictures, not very well appreciated)
3) The next step was to try and desolder the ATTINY13 directly on clip. (I did not get any good results, got the same errors with the two previous ATTINY13)
4) After investigating many forum posts, find similar errors …. etc I find this post and after reviewing the positions of my cables, I made a change after change …. I did a couple of tests and AVRdude …. GOT IT!


I quickly put a few drops of tin in the driver to make contact with the pill, I now know that the flashlight was going to turn on!

Low mode! I put the .hex and .eep file of “programmable” folder, Now to see if I can understand how to program!
The next step for me is to learn to modify any firmware driver (I wanted to try luxdrv among others)

many thanks to all, I’m very happy today!

Hello friends,

I have bought everything I need to reprogram my Nanjg105c.
I am planning to add a hall effect to the circuit, and connect the output of the hall to the Attiny’s ADC.

Do you have any idea how do I read the values of the ADC?
and another questions, is the possible to use the Attiny in order to “completely block” any current to the led?
I mean is that possible to reprogram the driver to be turned off while ADC on low, and turn on while ADC on high [for example].

THANKS in advance!! :slight_smile: