Compact Attiny 13/85/84 Programmer Using Arduino Nano

by SF94 in Circuits > Microcontrollers

5129 Views, 18 Favorites, 0 Comments

Compact Attiny 13/85/84 Programmer Using Arduino Nano

header.png

I'm commonly using Attiny microcontrollers. They're cheap, have low energy consumption, and are suitable for many applications. The most famous are the Attiny85 and Attiny84, but I realized I rarely needed 8k to program them, so I'm mainly using Attiny13A, Attiny25, and Attiny24/44 which are even cheaper. Wikipedia has a fine comparison table for the Attiny family.

But unless you're using a dedicated development card like the Digispark, you need an ISP to program your attiny. the most common way to do it is to use an Arduino, there are some fine Instructables on how to do it, like

How to Program an Attiny85 From an Arduino Uno or Program an ATtiny With Arduino.

Using Dupont wires is fine for development and debugging, but I wanted something more permanent, that's how I came to make my Attiny programmer suitable for the ones I use: 13, 25/45/85, 24/44/84.

And to keep it compact, I decided to dedicate one Arduino nano to this device.

Supplies

supplies.png

You'll need :

  • 1 Arduino nano
  • 2 14pins ZIF DIP IC Socket
  • 1 solderable 7cmx5cm breadboard
  • 1 10uF electrolytic capacitor
  • ( optional) 3 330 ohm resistors
  • ( optional) 1 blue LED
  • ( optional) 1 red LED
  • ( optional) 1 green LED

LEDs and resistors are optional, but I find these indicators useful.

You'll also need the following:

  • wires ( I used wrapping wires )
  • soldering tools
  • (optional) epoxy resin or hot glue

Upload the Arduino ISP Program to the Arduino Nano

IDE-1.png
IDE-2.png
IDE-3.png

Let's start with this because, as you will see later, we will put the 10uF capacitor between the RESET and the GROUND pins of the Arduino. After doing this, we won't be able to upload another program to the Arduino ( Oh ! Did I forget this and have to desolder the capacitor to program the Arduino? .... Yes.... ).

Connect the nano to your computer, load the "Arduino as ISP" sample in the Arduino IDE, uncomment line 81 to define USE_OLD_STYLE_WIRING., choose Arduino nano as a board,

 // Uncomment following line to use the old Uno style wiring
 // (using pin 11, 12 and 13 instead of the SPI header) on Leonardo, Due...

  #define USE_OLD_STYLE_WIRING


If you're using an original Arduino, you should probably choose ATmega328P as a processor, if you're using a clone, you'll probably have to choose ATmega328P (old bootloader). This one is easy to find: if wrong, the program won't upload to the Arduino.


Connect the Components

pinouts.png
circuit.png
recto.png
verso.png

I used ZIF support to make this device as practical as possible.

Attiny 13 / 25 / 45 / 85 have a compatible pinout for programming, and Attiny 24/44/84 have another, so I used 2 ZIF support.


Here are the connections to be made :

Arduino====>Attiny====>Attiny84====>Attiny85

D10=======>RESET=====>PIN4======>PIN1

D11=======>MOSI======>PIN7======>PIN5

D12=======>MISO======>PIN8======>PIN6

D13=======>SCK=======>PIN9======>PIN7

5V========>VCC=======>PIN1======>PIN8

GND======>GND=======>PIN14=====>PIN4


Optional, but I find it useful, you can connect three LEDs ( with their appropriate resistors - 330ohm will be OK for any standard LED ), to visualize the status of the circuit.

Arduino====>Connect to======>Meaning

D7========>Blue LED========>Upload in progress

D8========>Red LED========>Error

D9========>Green LED======>Programmer ready


Don't forget to add the 10uF capacitor between the Arduino's RST and GND. It may work without it, but it will work with it.

Install Attiny 25/45/85 and 24/44/84 Support on Your Arduino IDE

preferences.png
Board Manager.png
attiny_board.png

you have to add Attiny support in your Arduino IDE, for that :

1. File -> Preference

2. Now Click on "Additional Boards Manager URLs"

3. Add

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

in the Additional Boards Manager List

4. Close and restart your Arduino IDE

5. Go to tools -> Boards -> Boars Manager

6. install the attiny board support

Install Attiny 13 Support on Your Arduino IDE

attiny13_board.png

Same operations as the previous step, but the Attiny13 needs a different board manager :

1. File -> Preference

2. Now Click on "Additional Boards Manager URLs"

3. Add

https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json

Close and restart your Arduino IDE

5. Go to tools -> Boards -> Boars Manager

6. install the Microcore board support

Test Your Device

arduino as isp.png
clock_speed.png
Programming an Attiny85

Now you have to put an attiny in the appropriate ZIF,

In the Arduino IDE, in Tools/Programmer, choose "Arduino as ISP" ( NOT ArduinoISP ).

In "Tools", the "Burn Bootloader" option does NOT burn any bootloader in the Attiny, but it sets the option (mainly the clock speed ) you've chosen

(optional) Coat

epoxy.png

I wanted a permanent and robust device, so I put some epoxy resin on the connections and the wires to fix everything.

You can also use hot glue.

And that's it, anytime you'll have an attiny to program, this device will be ready to use!

Thanks for reading.