Close

Programming the ATtiny85

A project log for Salvaged bathroom scales rewiring

Re-implementing the electronics in a digital bathroom scale, for. low power consumption and cost.

fractalFractal 07/20/2016 at 08:100 Comments

The ATtiny85 is a small microcontroller with (for it's size) a decent amount of memory.

It's also £1 in one-off quantities from ebay. (I may need to do a comparison between these and a genuine one from Sparkfun!).

They don't ship with a bootloader, and in this project we don't want a bootloader either - it just takes up time when turning on. Because of this we need a programmer to load code onto the device.

Thankfully, a normal Arduino board is perfectly capable of becoming a programmer. Because the ATtiny85 will need to be reprogrammed many times, I've adapted the top of a protoshield to include a 8-pin DIP socket. (pictured?). It's wired according to the excellent instructions here: http://highlowtech.org/?p=1229. There is one exception - I don't need a capacitor to keep the original Arduino from resetting, since I have a Seeeduino V2.1 - it has a switch to disable auto-reset (as well as a 3.3v/5v switch!).

The code also needs to be somewhat updated from the instructions, as the Arduino IDE has gone through several versions since then.

Anyway, once it's all operational, a simple breadboard test should show it works.

Discussions