Design Flaws

A project log for Attiny High Voltage Fuse Reset-er

I've started playing around with the Attiny series of chips but want a way to recover them in case of bad fuse settings

sjm4306sjm4306 04/14/2022 at 15:130 Comments

So in total it's taken me around 3 months from inception of this project to having a working prototype in my hands. There were a number of problems I encountered, which isn't anything uncommon in my projects lol. It wouldn't be nearly as fun if everything just worked perfectly the first time!

The first big issue was I flipped the OLED header connection upside down and ended up blowing a screen. Oops, a silly mistake I should have double checked before sending gerbers and definitely before powering on. Fixed in new board files, but for this prototype I just used wires to flip the display the right way around.

Secondly, I designed the closed loop boost converter on breadboard and then transferred the design to surface mount components on the final pcb. I rummaged through my parts bins for inductors, diodes, capacitors and mosfets I could use. I figured that since the 12V is really only used to trigger the attiny high voltage programming mode and not to power any heavy load so I could get away with pretty small components with low power ratings. The issue I ran into is a bug in the first iteration of my pid software would occasionally shoot the output on full blast, basically shorting the inductor to ground, creating a large shoot through current that the tiny mosfet couldn't handle. This resulted in the first mosfet I soldered releasing it's magic smoke in the first round of tests. This wasn't an issue when I tested with the larger/beefier components on breadboard. I ended up printing out the variables on the OLED in real time, and monitoring them while powering from an external current limited supply. I decreased the gains a bit and decreased the output limiter so I wouldn't set pwm above around 90%. This will affect transient response to heavier loads but for the light load conditions of this design it's not an issue. Since this fix I haven't observed this issue.

Next, I saw an issue where sometimes the slave chip under programming would sometimes be recognized but sometimes not (causing the whole device to hang). Rule 1 of debugging though shalt measure voltages! The reference circuit I based my design off of used 1K resistors on all pins connected to the slave chip. In theory this looks like a good idea to protect the rest of the onboard circuitry, just in case the slave chip is plugged in backwards or is damaged. The issue is my vcc rail is 5V but the measured slave chip's vcc was only around 2.5V due to the series resistor dropping the voltage when current was drawn through it. My quick fix was just to short that resistor out, and now it works perfectly. I'll probably just end up swapping in a low value resistor in the future, so there's something to limit current but at the same time not drop the voltage so much the chip cant be recognized.

The final issue was also pretty simple. I was able to detect and program attiny85 chips but not attiny84's! However during one test with an 84 I was able to get it to detect and program! The thing I noticed was that during the test I was touching the board, pressing down on the chip to make sure it was fully seated into the socket. I could not reproduce this however. So I had a feeling it was something related to capacitance or grounding. Reading the datasheet and doing a little google search showed that I had forgotten to ground pins PA0-PA2, which allows the chip to go into high voltage programming mode. Oops once again! I was able to bodge a wire onto the dip pads and get it to work in the end, but the pads for the surface mount footprints are gonna be difficult to bodge so for this first prototype I'll have to use an external smd to dip adapter to flash smaller attiny84 chips. I've already fixed this flaw in the new pcb files.

So there, I've had tons of fun hunting down these problems (at the cost of some destroyed components and some time) but I had some good 'aha!' moments learning from my mistakes so it's not a waste to me.