Clovis Fritzen's PCB Ruler Measures Both Length and Temperature, Thanks to an On-Board ATtiny85

One of Microchip's more compact microcontrollers drives a temperature sensor and clever two-LED "display."

Gareth Halfacree
2 months agoHW101

Engineer Clovis Fritzen has built a ruler with a difference: it lets you measure temperature as well as length, thanks to an on-board Microchip ATtiny85 microcontroller and an innovative approach to displaying its readings.

"Today I bring you something you have never seen before: a ruler with an embedded electronic functioning thermometer in it," Fritzen writes of the project. "It is a common 20cm [around 7.9"] ruler made out of PCB (printed circuit board), but it has a fully functioning degrees Celsius thermometer in it. The idea of making a ruler came from the JuliaLabs store, but hers is not a thermometer, just a normal ruler. I then wanted to add some electronics to it, thought of implementing a LED blink circuit with 7414 (or even a PIC16F675 or Attiny85). Then ended up deciding to do a thermometer, a useful and interesting way of using some available space on the ruler."

If your ruler only measures boring old length, why not upgrade to something a little hotter? (📹: Clovis Fritzen)

Like most PCB rules, Fritzen's creation uses the silkscreen layer to print measurements along one edge — allowing it to be used as a traditional ruler, both for drawing straight edges and measuring them. Its on-board Microchip ATtiny85, though, provides another feature: reading an NTC thermistor and returning a measured temperature in degrees Celsius. "[Although] the battery voltage decreases with time," Fritzen notes, "[I] had to input a fixed value of supply voltage in my code, meaning that this value will be correct only once and never again (until you replace the battery). This means that this thermometer ruler will never be super precise, but just enough to be usable."

There's one thing clearly missing from the bill of materials: a display. "Could be a TFT, an OLED, a LED display, or even LCD," Fritzen says of the options available to those building their own thermometer-ruler. "But I decided to make things simpler (at least in terms of coding) and implement a two LED display." Those two LEDs blink out the temperature reading in a pattern: if the first LED blinks twice and the second four times, that's 24°C; if the first LED doesn't blink but the second LED blinks nine times, that's 9°C — or the first LED's broken.

The full project write-up is available on Fritzen's website, with KiCad project files and source code available on GitHub under an unspecified license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles