Introduction: A Tiny Programmer for ATtiny Microcontrollers With Arduino UNO : Part1-Older ATtinys
It is currently interesting to use ATtiny series microcontrollers due to their versatility, low price but also the fact that they can be easily programmed in environments such as Arduino IDE.
Programs designed for Arduino modules can be easily transferred to ATtiny microcontrollers.
That's why ATtiny programming with Arduino is interesting.
This project aims to program the ATtiny13,85,84 microcontrollers and the range they belong to.
Special attention will be paid to ATtiny2313 programming (and the range it belong to).
We will build a shield for Arduino UNO on which there is a ZIP socket through which ATtiny to be programmed is connected.
It is cheap, easy to make and useful.
All components can be found on AliExpress at low prices.
Exceptions are those from their own workshop, which are even cheaper.
Step 1: Schematic Diagram
It's very simple.
The shield is powered by Arduino UNO, the presence of the supply voltage being indicated by the LED lighting.
Of course, only one chip can be programmed at a time, main photo being only illustrative of how the chips to be programmed are inserted. This is also shown in the schematic diagram.
Important is the presence of C1 = 22uF / 16V at the Arduino Reset pin. Its lack leads to not being able to do the programming due to the Arduino reset at the start of programming.
Connector J5 will be in the ON position when programming ATtiny13, 84, 85 and OFF when programming ATtiny2313 (C1 is in circuit only in the first case).
C2 = 47uF / 16V is anti-oscillating on the power supply.
The actual programming is done at J1 pins 3,4,5,6, respectively D10, D11, D12, D13 Arduino.
Because programming is done on 4 wires only, it is easy to adapt the programming of other ATtiny instead of ATtiny 84, using appropriate adapter plates.
The shield is connected to the Arduino UNO so that there is a 1 to 1 correspondence of the pins of the 4 connectors (see main photo).
Step 2: List of Components, Materials, Tools.
1. Arduino UNO R3-1 pc.
2. ZIP socket 2X14 pin-1pc.
3. C=22uF/16V-1pc, C=47uF/16V-1pc.
5. LED 5mm. Red-1pc.
6. Connector pinheader vertical 10pin-1pc, 8pin-2pcs, 6pin-1pc.
7. SMD adapter socket 8in-1pc., 14pin-1pc. There are attachments to the shield, only if you use SMD chips.
8. PCB to plant these components.
9. Fludor, soldering tools, tool for cutting component pins.
10. Digital multimeter (any type).
11. Lust for work.
Step 3: Making PCB
PCB is made by myself on 1.6mm thick FR4,double sided.No metallic holes.
The crossings are made with uninsulated wire.
After drilling and echting, cover with tin, manually.
We check with the digital multimeter the continuity of the routes and the possible short circuits between them.
For those who want to make PCB after my project, please contact me. The project is in KiCad and also allows the generation of Gerber files, for factory order.
Step 4: PCB Assembly.
It is simple (as in photo) using fludor and soldering tools.
It is useful to cover with plastic (white in the photo) 2X3 pins of ZIP socket. It helps a lot to correctly insert the chips in the socket.
The labels are made with the Inkscape program and are covered with transparent foil.
Once the assembly is finished, check.
The next step is to install the software necessary for the operation of the programmer.
Although this is described in several places, I find it useful to make a brief step-by-step description of it.
Step 5: Upload Arduino UNO With Arduino ISP (In System Programmer).
It's simple, but care must be taken not to have the programmer board inserted in the Arduino!
Connect Arduino board to PC / laptop.
In PC / laptop--> Start--> Control Panel--> Device Manager, we see where the Arduino UNO board appears.
In Arduino IDE -->Tools --> Board -->choose Arduino UNO.
In Arduino IDE -->Tools-->Port-->the port to which Arduino is connected is given.
In Arduino IDE -->Tools-->Programmer:"AVRISP mkII"
In Arduino IDE -->File->-Examples-->ArduinoISP-->ArduinoISP. Upload this sketch on Arduino board.
Now we may insert the programmer in Arduino.
Step 6: Upload ATtiny Core on Arduino IDE for ATtiny13, 84, 85
1. Launches Arduino IDE-->File--Preferences.-->Aditional Boards Managers URLs add adress:
This is done with Copy -->Ctrl + V.(Copy-->Paste not working).-->OK A good Internet connection is required.
2. Tools-->Board-->Boards Manager. In the table that appears, scroll until we find DIY ATiny.-->Install. Installation may take some time.
After it is done, in Tools --> Board --> DIY ATtiny we will find more ATtiny. From here we will choose the chip we want to program.
Step 7: Programming an ATtiny13, 84, 85
Suppose we want to program an ATtiny85.
It is inserted in the ZIP socket in the correct position, directly if it is THT or through the adapter if it is SMD.
Arduino IDE-->Tools-->Board-->DIY ATtiny-->ATtiny85
Now Tools-->Processor speed(chose), Internal Oscillator
We choose the port to which the Arduino is connected.
Tools-->Programmer-->Arduino as ISP
It is necessary to do Burn Bootloader first(from Tools-->Burn Bootloader).
The correctness of the operation is confirmed by the system.
Now we can do the actual programming of the chip, from Arduino IDE --> Upload.
And that's it.
Step 8: Programming ATtiny2313
Participated in the
Arduino Contest 2020