Anyone in the Santa Barbara CA area able to help me flash my D4?

no, not sure what that is

Had not considered the remote desktop idea. Would have thought I needed the SW also for that? I am in the LOOONG process of installing Studio 7 presently. Started about 24 hrs ago. It looks a bit over 1/2 done. I think I have the rest already. I am awaiting some more hardware, I think it will all be here by Friday.

I’m pretty sure getting it taken apart is harder than actually flashing it. I flashed my Q8 and another light but gave up on my D4 when I couldn’t even get anything loose inside.

Unless you want to tweak Andúril’s settings before compiling, you don’t need to bother with Atmel Studio.

ToyKeeper provides some ready-to-flash hex files for several lights.

While Andúril was in early development, I used Atmel Studio 7 to build hex files. I continue to do so because like to disable the boundary blinks at the top and bottom of the ramp and slightly lower the value for HOLD_TIMEOUT to make the light respond quicker to button presses.

To flash a hex file to a driver, I use avrdude 5.10 run from the command prompt of my Windows 7 PC. ToyKeeper pointed me to the correct fuse values, which are located in the script. Replace ANDURIL.hex with your hex file’s name:

avrdude -p t85 -c usbasp -Uflash:w:ANDURIL.hex:a -Ulfuse:w:0xe2:m -Uhfuse:w:0xde:m -Uefuse:w:0xff:m

Give it another try! I posted some details about getting the Emisar drivers loose in a different thread. I’ve successfully opened five Emisars without damaging anything.

ToyKeeper wisely suggests lightly filing or sanding the perimeter of the driver to remove excess adhesive before reinstalling.

I’ll give this another try. I remembered reading this post but couldn’t find it on the day I tried it.

Wow, some great info here. My install of Atmel Studio is still going while I am at work today. I did not realize that I did not need it to just flash the files as generated. I thought it seemed strange you had to compile your own, but I had read another post somewhere about a user requesting that someone compile the c to get a hex file for him. Anyway, between access to the hex files, and tips on the disassembly of the D4, you have been a great help goshdogit. :+1: :smiley:

I’m certainly a novice, but I’m happy to help! :+1: I only learned this compiling/flashing stuff in September 2017 when ToyKeeper released the first version of Andúril. I got lots of help in the E-switch and FSM thread while learning the process.

A few more notes:

I recall having problems with Windows properly recognizing my USB flashing device, but can’t remember the specific issue or symptoms. I have a note to myself to use the Zadig USB drivers available here.

I’ve noticed that I need to plug my flashing device into the same physical USB port on my computer each time I reflash a driver. I’m guessing this is due to the Zadig driver being set up for that specific port.

The ATtiny85 chip has a small dimple to mark the location of pin #1. I enhanced this with a dot from a silver Sharpie marker, and put one on my SOIC clip too. I reflash my lights whenever ToyKeeper issues a new version of Andúril, and this helps me get the clip on the chip in the correct orientation without squinting. :slight_smile:

I run this avrdude command to check the connection between the driver and computer before sending the hex file:

avrdude -p t85 -c usbasp -n

If the connection isn’t working, the command will yield some errors.

I have a cheap SOIC clip, so I sometimes need a few attempts to get a good connection to the chip.

I bought the cheap clip also. I also bought a board with an ATtiny 85 on it just to be sure I got the setup correct prior to taking my D4 apart.

I was skeptical when I started the thread I would find anyone in SB to help out, but the virtual help I am getting has definitely been a big plus. Lots of resource I won’t have to search out if I end up having problems.


Just putting this note here so I have all my reference data in one place, thanks again to goshdogit for all the help, as well as all other helpers here. :+1:

notes for ATTiny13 programming thread

Victory. removing my D4 driver was not too bad, this post , and these pictures really helped. I could “see” where to press on the board not on a component, especially the picture of the three drivers. I say “see”, as you (at least I) can not see through the hole to a spot on the board where there are not components. But with a skewer, a bit of offset to avoid R5 and his buddies (thanks to the pictures), and a couple taps with my D4 body (host?) and the driver came loose. I am using the cheap clip for programming, and I did have to fiddle a bit with the pins and how they extend through the clip body a bit. Once I got them all extended properly, the light programmed right up. I am SOOOO glad I had a demo board with a ATTiny85 on it to verify my setup (multiple times) during the process. The demo board was much easier to program, not sure why but it all worked out in the end. :smiley:

Special thanks to goshdoggit for all the tips and TK for the awesome firmware (but it really is software is it not?).


It is “soft” for you……… now! :crown:

That’s great news! Congrats on your successful reflash. :+1:

so I am trying to flash another D4, and the computer I used last time has a dead hard drive. I can’t for the life of me figure out where to find the anduril.hex file again. Help?

Never mind, I found it. used the 2018-01-24.hex file. :smiley:

Rats, now I see I broke a resistor ( thinking R5, the one in the center) when i pushed the board out. What value is that? Maybe a small leaded part can fit back in there.

don’t use that nasty old hex…get the latest one:

awesome, update done. BTW, what is the difference between this one and the one from say May or so? Oh, nevermind, I see there are lots of updates in the old file. I am just wondering what’s been fixed since then.

Now, I still need to fix R5.

Anyone know the value? I am guessing 1k or 10k would work, but if someone knows, all the better. Better yet, maybe just a jumper?

some clicky bugs



On a sort of related note, I just finished doing some investigation on the D4 driver with an ohm meter. It appears R5 is in series between the battery and a large cap (C2), then a diode and a smaller cap (C1) bring power to the ATTiny85. Guessing something like 5 ohms would be good in here, a short would likely work fine also. R5 limits to some extent the current into the C2 when the battery gets connected. Not sure what other purpose it has, but too big would mess up the voltage readings I suspect.

The resistor next to it (R4) is marked and measures 47 ohms, so it’s ok. The C2 looks fine also, so just removing the old leads from R5 and installing a new component should get this up and running. Definitely a job for under the microscope at work. Some old leaded resistors I have a home look like they fit in the space between the driver board and the shelf (?) that the MCPCB mounts to on the other side.

R5 value?

Here’s a pic of my D1 driver, but you’ll need to stand on your head to read R5’s label. :smiley:

BTW, I popped one of my D4 drivers loose and had barely enough room to pry it sideways to verify that R5 is the same on the D1 and D4. It is. :+1:

Perfect, just as I suspected, R5 is 4.7 ohms (ok, I said 5 ohms . . .). I found a 3.3 ohm resistor at home this afternoon. I would prefer a chip if I can find one, but I’ll likely fool around with the leaded one tonight to see if I can get it to fit.

Thanks! :beer:

So I have replaced R5 and still don’t have a driver that works. I had reflashed the driver a few weeks ago, and it reported going well. When I put the light back together, no light. I am making voltage measurements on the driver board.

MCU has voltage on pin 8, I see pin 2 go from about 0.8V to ground when the switch is pressed, I see pin 3 go from around 0.6V to Vcc when the switch is pressed, pin 5 does nothing when the switch is pressed, nor does pin 6. Pin 5 should drive the 7135 and start high after the switch is pressed and released, as that would fully turn on the 7135. Pin 6 is a bit dicey to probe so I did not try much there, as pin 5 is not working either.

Wondering if I should reflash? I recall using the file
with the command
avrdude -p t85 -c usbasp -Uflash:w:ANDURIL.2018-09-07.EMISAR_D1.hex:a -Ulfuse:w:0xe2:m -Uhfuse:w:0xde:m -Uefuse:w:0xff:m

Or at least that’s what I think. Try again maybe?