Attiny25/45/85 FW Development Thread

I just posed this is in the Q8 thread, but I thought the audience here might be interested in the details:

As discussed a few times in this thread, the 25/85 MCUs seem to be more temperamental than the 13a, especially in higher power builds. After putting the Q8 V3 driver through its paces, and forcing the issue somewhat by using long-ish emitter wires (parasitic inductance), I am really not surprised.

For the Q8 driver we took a few precautions:

- There is a series gate resistor on the FET. This makes the FET switch slightly slower, lowering inductive kick-backs
-There is a good de-coupling capacitor arrangement for the MCU

The result was a stable driver, but a scope on it showed there are still issues. We can see inductive spiking and ringing over 6 V in amplitude on the power rails. I tried several things, but in conclusion the solution was a simple series resistor ahead of the D1/C1 we have on typical DD drivers. Of course the LED (s) still wire directly to the cell(s)+. The improvement is remarkable, and I do not see any downside. With this arrangement C1 can be upstream or downstream of D1, solving that debate as well. For best ADC results R1 should be connected to C1, whether up- or downstream of D1.
EDIT: But C1 after D1, and connected with short traces to MCU pins 8 & 4, is better. Or add a C2, as on the Q8 driver.

From the Q8 thread:

The scale for all traces are 1 V/div. 0 V for all traces is the second division from the bottom. Yellow is pin 8 of the MCU.

Here I am using a 2.2 ohm resistor. Eventually I settled on 4.7 ohm, but any value from 1 to 10 ohm will give a day-night improvement over the current designs. I hope this small addition will find its way into exiting designs. SPICE tells me the power dissipation in this resistor is a few mW, so almost any package size can do the job.

EDIT2: Un-scaled the image to clear up the text.