Recover Bricked ATtiny Using Arduino as high voltage programmer

Hi! Today I’ll explain you how to recover your bricked ATtiny microcontroller using your Arduino board. ATtinys are very popular due to their small form factor yet very powerful. While working with them you may accidentally brick the ATtiny. As arduino is extremely popular and really easy to use, I guess you have one or more lying on your work table. You don’t need to purchase a HVP (High Voltage Programmer), or search for an old PC with parallel port to recover ATtiny. Just build a small circuit, plug it into Arduino board, upload a sketch and you are good to go. So let’s start…

1) HOW ATTINY CAN BE BRICKED?

Actually, there are many reasons. But let me explain what I mean by “bricked”. If you’ve powered it with over voltage and fried it, well, it’s not “bricked” then, rather it’s roasted. Arduino and HVP have nothing to do with it. But, if your ATtiny stopped responding due to some wrong fuse settings, then it’s “Bricked” and hopefully we can recover it using Arduino as HVP. So another question is, what is fuse settings? Well, there are 3 bytes of permanent (by permanent I mean that they stick around after power goes out, but that you can change them as many times as you’d like) storage called the fuses. The fuses determine how the chip will act, whether it has a bootloader, what speed and voltage it likes to run at, etc. Note that despite being called ‘fuses’ they are re-settable and don’t have anything to do with protection from overpowering.

To learn more about fuses, simply google about AVR fuse. Or you may check this article .
There are various mistakes one can make in fuse settings that result in a bricked AT tiny. Most common of them are Disabling ISP Programming and Selecting Wrong Clock Source. If ISP programming is disabled in fuse settings, AT tiny will not respond to an ISP Programmer. It’s just like, you have a robot that does exactly what you order him and one day you order him “Stop listening to me!”. You know what’ll happen.
And if you set fuses that select wrong clock source than you are actually providing, it will stop responding until correct clock source is provided as per fuse settings which you either don’t know or forgot.
In these situations we can say AT tiny is “Bricked”.

2) HOW TO RECOVER IT?

Okay, now we need to learn how we can recover our AT tiny from bricked state. As we’ve already learned, ISP programmer can do nothing anymore until fuses are reset in default mode, hence we need a High Voltage Programmer. If you want to know how a HVP works, google about it.
Here we’ll make a High Voltage programmer using Arduino. Arduino has more than enough pins to simulate a HVP. A very minimal additional circuitry is required.
We’ll make the circuit, plug it in to Arduino, Upload sketch in Arduino and we are good to go. The HVP will reset the fuses of AT tiny to default one. So, the AT tiny will again respond to ISP programmer.
Considering you already have Arduino, the cost of rest of the circuitry will be very small.

THINGS YOU NEED

To make the circuit on breadboard, you’ll need the following parts:

  1. A breadboard
  2. An Arduino Uno (any Arduino should work fine)
  3. A 2N2222A transistor (Any NPN transistor should do)
  4. 6 x 1K resistor
  5. Some jumper wires
  6. A 12V power supply @ 500mA.
  7. If you don’t have 12V source, you may use a boost converter. 5V to 12V converter is a good choice. [PURCHASE LINK]

Read More: Recover Bricked ATtiny Using Arduino as high voltage programmer

Leave a Comment

Your email address will not be published. Required fields are marked *