AVR Bootload Burner & Serial Programmer

Been working on a new project? Have everything working and now you want to transfer that new idea to it’s own board so you are not using up your arduino?

These are the very same questions I was asking my self the other day. Now The Arduino platform is great! It allows us to quickly try new ideas and make revisions on the fly whether we are building some new hardware or working on that new piece of code.

When it comes time to build our final project. They can be large and have to many features we don’t need. Wouldn’t it be great if we could take the heart of the Arduino for our project and leave the rest we don’t need out? Well the great news is we can do just that!! I will not go into to much detail concerning bread board or “bare bones” Aduino’s the Internet is our friend and is full of great tutorials on the subject. Instead I will be addressing how to get the heart of the Arduino (Atmega328 in the Uno’s case ) ready for our project when we are starting with a blank chip.

Blank Atmega328

When working with a new blank Atmega328P chip we first have to prepare it for use by setting fuses ect. In our case I need to be able to still use the Arduino IDE for future Sketch updates. The best way for us to set the fuses and prepare our chip will be to Burn the Optiboot bootloader.

But how to do this? Again the Internet to the rescue! Many have come before me documenting what is needed and the Arduino IDE even has the tools we will need built in, thanks to the Arduino as ISP sketch. However the one area I found lacking was the continued use of a bread board for this task. Bread boards are great and work really well. My concern comes from repetitive use. When you want to prepare multiple chips a bread board can be tricky; wires can come lose, connections can be broken. All leading to long trouble shooting when all you want to do is burn your bootloader and get back to your project. So I set out on a mid project project starting with listing a few requirements for myself.

  • Burn bootloader directly to 328 and over icsp header
  • Use Nano as ISP using Arduino as ISP Sketch
  • Able to load sketch without over writing bootloader
  • Blink circuit for testing “blink” test sketch
  • Socket to quickly swap out Atmega328 chips
  • Status indicator LED’s
  • Compatible with 509Makers own USB serial board

That should cover most of the things I will need to do with the board and be able to burn the bootloaders no problem. Over to Kicad to begin drawing up the new pcb board we will need. This ended up taking a few days. I know it is a straight forward board. But I kept adding more to it 🙂

OshPark once again came though in quick order and provide me with some excellent pcb’s!

Bootloader PCBs

Here is a closer look at the board and you always get a cool sticker with your order !

Board Closeup

My boards came in before my parts. I was making a larger order to Digikey for this mid project as well as my main project, so I needed to wait a little while before placing my order. Once placed the order came in relativity quick and I could begin assembly. First thing I always like to do is layout most / all of the parts so I know what I am going to be working with.

bootloader parts

Soldering everything together by hand went smoothly without any surprises. I may try some smd boards here soon. But you have to love the simplicity that comes with a complete through hole board.

assembled bootloader

Now that our board is done and ready to use we can grab our Arduino Nano and load up the Arduino IDE. We are going to load the Nano with the Arduino as ISP sketch provided with the IDE. You can find this sketch under Examples. Now we can place the last component on our new Bootload burner and put it to work.

bootload burner

You may find the need for a 10uF capacitor across the reset and gnd pins of the Arduino Nano. I have a few Nanos that require it and a few that do not. So if you get any errors while burning keep it in mind.

To burn the Optiboot bootloader to our blank Atmega328P chip. Load the chip into the Dip28 socket of our Burner board, Plug the usb cable from the nano into the computer and start the Arduino IDE.

Go to the “tools” tab and under the drop down select.

Board: Arduino/Genuino Uno

Programmer:Arduino as ISP

Click Burn Bootloader. The leds on board should flash during bootload burning and if any errors take place the center amber Error led will stay lit.

To write a sketch to our new Atmega chip will again make use of the Arduino IDE. However now remove the usb from the nano and plug in your usb serial uart. I will be using my USB Serial board Here. +5v goes to +5v and gnd to gnd remember rx goes to tx and tx to rx. Notice the Reset button towards the top of the board. Press and hold it then release when the IDE says uploading. After one or two goes the timing will become second nature for you.

Using the ICSP you can also burn the bootloader to smd 328 chips (or other avr’s ) A great cable to use with surface mount atmega328 chips is this one here. One end plugs into the ICSP header and the other connects to your chip. I use a 6pin icsp header on the board so a 6 to 10pin adapter may also be needed. Such as this one Here.

We now have a excellent tool for burning bootloaders and loading sketchs to raw atmega AVR chips.If you want to pick one up for your self head over to my Shop page I will have a few available for sale.

Bootload Burner

This is also a great way for you to support projects here at 509Maker! If you want to build your own I will have a hackaday blog post with the required files here soon…