AVR High Voltage Programming (Fuses Rescue)

Half a year ago I restarted one of my old passions - electronics. I've studied electronics in college but that happened during the Middle Age (20yrs ago). While I was expecting this huge leap in schematics and what a hobbyist can do nowadays, I still had some difficulties in catching up.

One which frustrated me greatly was the fuses for AVR/PIC microcontrollers (MCUs). I found a lot of interesting schematics with MCUs and fuses is a very important aspect when programming them. However, because I was a newbie in this department, I didn't want to spend too much on this so I bought quite cheap programmers from eBay. The PIC programmer worked fine but the USBAsp clone that I bought for AVRs was not a very good choice. An important percentage of my burning got screwed up because the fuses were wrongly programmed - most of the times the AVR became unrecognizable, it had a wrong ID, in other words it became almost dead/unusable.

Step 1: Concept and Schematic

I started looking on the web for a solution and I found a very good way to reset the fuses using high voltage programming (link here: http://denki.world3.net/avr_rescue.html). I suggest reading the link for a better understanding of how it works :)

It was fun building it on a breadboard for the first time but it became boring and time consuming starting with the second, third and so on.

I decided to just put it on a PCB and have it handy whenever I need to quickly reset the fuses for an AVR. The schematic is very simple, I used minimum components, the lines between the "source" MCU and "destination" are not protected by 1K resistors and I also didn't use an external crystal for the "source". Powering the schematic and the "source" MCU is done via a simple LDO - LM78L05; I believe any 5V LDO given that it has the same pinout. I didn't bother with filtering, it's not quite important since the voltage noise is not (very) relevant for this circuit.

The AVR reset process is straight forward, after mounting the "destination" MCU in the IC2 socket, one has to power on the circuit. The LED will stay on until the Reset button is pressed; upon pressing the Reset button, the LED will go off and the default fuses will be burned on the "destination" MCU. When burning is complete, the LED will come on again. It will take few seconds to burn the default fuses, around 10 seconds, so don't panic.

The EAGLE files and HEX for the "source" MCU can be found here:
- EAGLE CAD files - both schematic and board

- EAGLE CAD prints - both top and bottom layers

- HEX file for the "source" - yes, one has to program it first and then use this MCU as "source"

PS: I didn't like the TO92 default pinout of the LDO so I've build a new library with the pins in line for ease of PCB design.One just has to copy it in the Eagle Lbr folder and load it in the software.

Step 2: Overview

The schematic works well for me, it is doing what it's supposed to do. The LED color is not important, it's just something to let you know the circuit works. I tried to design the PCB with as less vias as possible and 5 vias seems reasonable. The end result may not look at its best, the surface soldering of the IC sockets could be a little difficult but it wasn't a big deal and definitely not a show-stopper. I'm sure it can be improved using SMD components but I didn't have any handy so I opted for through-hole. Anyone can customize the EAGLE files for their own use.

Cheers and have fun,

3 People Made This Project!

Recommendations

  • PCB Contest

    PCB Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • First Time Author

    First Time Author

18 Discussions

1
None
cinderblock

1 year ago

Could you please publish a pdf version of the schematic?

1 reply
0
None
southsystem

9 months ago

This is excellent, I don't want the bloatware AVR studio on my computer to drive an AVR dragon, but I'm building a collection of bricked 380's. The problem with no filtering on the 7805 is individuals can be very effective RF transmitters without a cap on the input, and one on the output. If you were doing a board it would have been worth adding.

Thanks again, I'll be putting this together.

sdk

0
None
rodrigonh

2 years ago

Hello. I just etched the board. i use DipTrace and cant open the schematics. Was trying to solder parts anyway but: At first glance the first transistor looks like a PNP BJT; It's really a BJT PNP? If so... it's base is directly connected to power ground (so always saturated anyway?), and if it's a BJT: No resistor between base and ground, thats really very bad. So well maybe it's not a BJT, what part is that? I can see just a 2N3904 in the reference link http://denki.world3.net/avr_rescue.html . Thanks!

4 replies
0
None
rodrigonhrodrigonh

Reply 2 years ago

Alright. From reference link http://denki.world3.net/avr_rescue.html and board layout I conclude: The first transistor is a PNP, it's collector goes to atmega pin 7 (VCC). It's useless ad it's base is always grounded. It will be probably hot (and die occasionally), because there aren't any transistor driving its base. I will just change this PNP to a wire jumper pin7->VCC like in the reference link. Anyway, thanks for the layout! Going to try resurrecting some atmegas in some minutes.

0
None
rodrigonhrodrigonh

Reply 2 years ago

Ugh no no. It's not a transistor. It must be a 7805 :/ Thats what happens... with a board in hands... without the schematics... plus not feature in the reference link. Anyway... solved!

0
None
mnedixrodrigonh

Reply 2 years ago

Hey, glad you could make it work, I really apologize for the delay but I
completely forgot about this project and haven't checked out the
website for a while :)

0
None
mnedixsidbyron

Reply 3 years ago

It should work, you have to pay attention to pin mapping.

0
None
mnedixAviralV

Reply 3 years ago

The schematic does not burn specific fuses, it resets the MCU to the default/factory settings. The entire thing is intended to do that so if you want to use a 16 Mhz crystal later on then you have to program the fuses separately and accordingly.

0
None
DavidM417mnedix

Reply 3 years ago

What fuses should use to burn the hex file for the atmega328.?

0
None
mnedixDavidM417

Reply 3 years ago

The schematic doesn't burn specific fuses, it actually erases everything on the MCU and burns/resets default fuses

0
None
itsme_kathimnedix

Reply 3 years ago on Introduction

Thanks a lot.

just went through the data sheet of ATMEGA32, found the pin mappings.

0
None
itsme_kathi

3 years ago on Introduction

Thanks a lot.

just went through the data sheet of ATMEGA32, found the pin mappings.