For a project I need to be able to program an ATtiny84 microcontroller but I don't own an AVR programmer. Happily, I did have an Arduino Uno lying around and a few other bits and so, with the help of a laser printer, 3D printer, one capacitor, a tiny breadboard and a few wires I made this:
2025-08-14
A self-contained AVR programmer using an Arduino Uno
It's a self-contained AVR programmer!
Inside the case is an Arduino Uno; the case itself is this object from Thingiverse (the Uno version). It's a three-part print (reset button, top and bottom halves). The halves hold the Arduino in place and there are nice countersunk screw holes.
The breadboard on top is a self adhesive breadboard that seems almost ubiquitous in projects over the last few years. It makes a nice place to insert the AVR microcontroller to be programmed. Six connections from the Arduino Uno to the AVR are needed and this is achieved via the coloured jumper wires.
To make is easy to identify the six connections needed for AVR programming I printed out and stuck on labels for the Arduino headers. The labels came from a PDF which I found here. I also printed little labels and attached them to the four cables on the right.
AVR programming requires six connections: Vcc, GND, the SPI connections: MOSI, MISO, SCK and the ability to reset the AVR. In the standard Arduino as ISP project those four are on pins 10 to 13. There's a lot of documentation on this project here, but once you've got your Arduino software the steps are as follows:
1. Open the Example 11. ArduinoISP sketch and upload it to the Arduino Uno in the normal way. This turns the Arduino Uno into an ISP (strictly speaking I'm not actually in-system programming here but my little device is flexible enough via its leads to be used for actual ISP).
2. Then you need to teach the Arduino software about ATTinyCore which will give it the ability to program all sorts of microcontrollers. Follow the installation guide to configure the Arduino software to be able to program the AVR microcontroller you are using.
3. You can then use the Arduino software to write to the AVR microcontroller via the Arduino Uno which is acting as the ISP.
With that in place you can uploaded some test code to the AVR to make sure everything is working. I uploaded this simple program that flashes an LED connected between pin 12 and GND.
int led = 1;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(3000);
digitalWrite(led, LOW);
delay(1000);
}
Note that I've also added a 10uF capacitor between GND and the Arduino RESET pin. This is described in the Arduino as ISP documentation as necessary to use a Uno as an ISP.
There's enough space inside the case to bend the legs of the capacitor and tuck it alongside the Arduino Uno. Note that you should only add the capacitor after having uploaded the Arduino as ISP sketch.
2025-08-14
Guest WiFi using a QR code
On my home network I have guest WiFi configured and when guests come round they need to know the password. Happily there's a way to make this trivial: WiFi QR codes. A WiFi QR code is simply a text QR code with a special format as follows:
WIFI:S:<SSID>;T:<WEP|WPA|blank>;P:<PASSWORD>;H:<true|false|blank>;;
The S sets the SSID of the network, T defines the security in use, P is the password and H whether the network is hidden or not. You can create this directly by making a text QR code or use a specialized QR code generator for WiFi networks.
The resulting QR code looks something like this:
Which when scanned with the default camera app on iOS or Android will pop up something similar to this. With one click you're connected to the network.
For a finishing touch just print out the QR code and place it in a cheap frame and any guest can scan and get online with ease.
Subscribe to:
Posts (Atom)