A Solar-Powered Wristwatch With An ATtiny13

Wristwatches come in many shapes, sizes, and types, but most still have at least one thing in common: they feature a battery that needs to be swapped or recharged somewhere been every other day and every few years. A rare few integrate a solar panel that keeps the internal battery at least somewhat topped up, as environmental light permits.

This “Perpetual” wristwatch designed by [Serhii Trush] aims to keep digitally ticking along using nothing but the integrated photodiodes, a rechargeable LIR2430 cell, and a power-sipping face that uses one LED for each hour of the day.

The face of the perpetual wristwatch. (Credit: Serhii Trush)
The face of the perpetual wristwatch. (Credit: Serhii Trush)

The wristwatch’s operation is demonstrated in the linked video (in Ukrainian, auto-generated subtitles available): to read out the current time, the button in the center is pressed, which first shows the hour, then the minutes (in 5 minute intervals).

After this the ATtiny13 MCU goes back to sleep, briefly waking up every 0.5 seconds to update the time, which explains why there’s no RTC crystal. The 12 BPW34S photodiodes are enough to provide 2 mA at 0.5 V in full sunlight, which together keep the LIR2430 cell charged via a Zener diode.

As far as minimalistic yet practical designs go, this one is pretty hard to beat. If you wish to make your own, all of the design files and firmware are provided on the GitHub page.

Although we certainly do like the exposed components, it would be interesting to see this technique paired with the PCB watch face we covered recently.

Continue reading “A Solar-Powered Wristwatch With An ATtiny13”

DIY Fume Extractor With ATtiny13 Speed Control

Let’s be honest, commercially-available soldering fume extractors are cheap enough that you probably don’t need to build one yourself. But it still makes for a good starter project, especially if you go out of your way to really flex your maker muscles like [Arnov Sharma] did with this tidy build.

All the hallmarks of modern hardware making are on display here — you’ve got the 3D printed enclosure, a motor salvaged from a cheap toy quadcopter, and a custom PCB which uses the ATtiny13 and an AO4406 MOSFET to implement a PWM speed control.

The first press of the button starts the motor off at max speed, but keep pushing it, and the motor’s speed will ramp down until it turns off entirely. There’s even a TP4056 charge controller to top off the internal 18650 cell when the fume extractor is connected to a USB power source.

Is it over-engineered? Perhaps. But projects like these are a great opportunity to practice your skills, whether it’s PCB design or creating bespoke 3D printed enclosures. In the era of cheap 32-bit microcontrollers, it’s also refreshing to see hackers still dragging the ATtiny from time to time.

Continue reading “DIY Fume Extractor With ATtiny13 Speed Control”

An ATTiny board that one of the students developed for this project, etched on single-sided FR4.

Electronics And C++ Education With An ATTiny13

When [Adam, HA8KDA] is not busy with his PhD studies, he mentors a group of students interested in engineering. To teach them a wide range of topics, he set out to build a small and entertaining embedded project as they watch and participate along the way. With this LED-adorned ATTiny13A project, [Adam] demonstrated schematic and PCB design, then taught C++ basics and intricacies – especially when it comes to building low-footprint software – and tied it all together into a real-world device students could take home after the project. His course went way beyond the “Hello world”s we typically expect, and some of us can only wish for a university experience like this.

He shares the PCB files and software with us, but also talks about the C++20 framework he’s developed for this ATTiny. The ATTiny13A is very cheap, and also very limited – you get 1K of ROM and 64 bytes of RAM. This framework lets you make good use of it, providing the basics like GPIO wiggling, but also things like low-power operation hooks, soft PWM with optional multi-phase operation support and EEPROM access. Students could write their own animations for this device, and he includes them in the repo, too!

In educational projects, it pays to keep code direct and clean, cruft-less and accessible to students. These are the things you can only achieve when you truly understand the tools you’re working with, which is the perfect position for teaching about them! [Adam] intends to show that C++ is more than suitable for low-resource devices, and tells us about the EEPROM class code he wrote – compiling into the same amount of instructions as an Assembly implementation and consuming the same amount of RAM, while providing compile-time checks and fail-safe syntax.

We’ve talked about using C++ on microcontrollers before, getting extra compile-time features without overhead, and this project illustrates the concept well. [Adam] asks us all, and especially our fellow C++ wizards, for our opinions on the framework he designed. Could you achieve even more with this simple hardware – make the code more robust, clean, have it do more within the limited resources?

What could you build with an ATTiny13, especially with such a framework? A flashy hairclip wearable, perhaps, or a code-learning RF-remote-controlled outlet. We’ve also seen a tiny camera trigger for endurance races,, a handheld Flappy Bird-like console, and many more!

Old Gas Meter Gets Smart With The ESP8266

Measuring the usage of domestic utilities such as water, gas or electricity usually boils down to measuring a repetitive pulse signal with respect to time. To make things easy, most modern utility meters have a pulsed LED output, which can be used to monitor the consumption by using an external optical sensor. But what do you do if your meter isn’t so cooperative?

That’s exactly what [Francesco] had to figure out while developing the non-invasive gas tracking system he calls ESPmeter. His meter might not have an LED, but it did have a magnet attached to the counter disk which activated an internal hall sensor. With some hacking, he was able to attach an external Hall-effect sensor to pick up this magnet and use the signal to monitor his daily gas consumption.


A big stumbling block in such projects is the issue of powering the device for an extended period, and remembering when it’s time to change the batteries. With the clever use of commonly available parts, he was able to reduce power consumption allowing three AA batteries to last about a year between changes. For one thing, he uses an ATtiny13 to actually read the sensor values. The chip doesn’t run continuously, its watchdog is set at 1 Hz, ensuring that the device is woken up often enough so that it has time to power up the sensor and detect the presence of the magnet. Battery voltage is also measured via a voltage divider connected to the chip’s ADC pin.

At regular intervals throughout the day, the ESP8266 polls the ATtiny13 to pull the stored sensor pulses and voltage measurement. Then at midnight, the ESP transmits all the collected data to a remote server. Overall, this whole scheme allows [Francesco] to reliably gather his gas consumption data while not having to worry about batteries until he gets the low voltage notification. Since the data visualization requirements are pretty basic, he is keeping things simple by using Plotly to display his time series data.

If you are unfortunate enough to have an even older meter which doesn’t use optical or magnetic rotation sensing, you can use a disassembled mouse to keep track of the Gas Meter.

Telco Curio Hacked Into Simple Counter

The tikkenteller was a device used to measure the duration of telephone use. 70 Volts were sent down the telephone line at 50Hz to run an electromechanical counter, and the devices were often used in communal areas where several users shared a single phone. [Charles Babbadge] decided to repurpose the stout 1950s hardware into a simple counter.

The build uses an ATtiny13 to generate pulses for the original hardware, when receiving inputs from the tikkenteller’s buttons. A solid state relay is triggered by the microcontroller, which connects the original solenoid to mains power to jog the counter. An HLK-PM01 5V power supply is used to run the micro, allowing the entire project to run off a single mains supply.

It’s a big, heavy, beautiful hunk of metal, built in a style that we simply don’t see anymore. It’s in no way the cheapest or most efficient counter you could build, but it’s got a charm you can’t find on more modern hardware. You could use such a device to track your Youtube subs, that is… if the API hadn’t broken that for everyone. Video after the break.

Continue reading “Telco Curio Hacked Into Simple Counter”

Implementing Qi Inductive Charging Yourself

Inductive charging is a technology that has promised a lot, but hasn’t quite delivered on the promise of never needing to plug in your phone again. The technology behind it is surprisingly simple though, and [Vinod.S] takes us through it all with an ATtiny13-based example.

An inductive charger has to be clever in its operation, for if it were to operate continuously it would soon have more in common with an inductive hob and thus become a fire risk, so it has to be sure that a compatible device is resting upon it before it tries to transmit power. It achieves this by periodically sending out a pulse of power intended to wake any devices in contact with it, and the device responds with a serial data stream encoded onto the device’s field by modifying the resonance of the receiver tuned circuit. This is done by a pair of MOSFETs under the control of the ATtiny in [Vinod]’s device, resulting in a functioning inductive power receiver built on a piece of prototyping board and sporting a buck converter capable of supplying 5 volts suitable to charge a phone. You can find the code on GitHub and see it in action below the break.

This tech has made an appearance here before a few times, such as when a Qi charger was integrated into a Chromebook.

Continue reading “Implementing Qi Inductive Charging Yourself”

An ATtiny Metal Detector

A metal detector used to be an entirely analogue instrument, an oscillator whose frequency changed with the inductance of its sense coil when a piece of metal approached. [Łukasz Podkalicki] shows us a more sophisticated machine, but with judicious use of an ATtiny 13 it is not a complex one.

A pulsed induction metal detector induces a current spike in its search coil, and times the decay of the resulting oscillation. The coil is part of a resonant circuit with a capacitor, and any metal in its field will change its resonant frequency. In [Łukasz]’s design the ATtiny13 fires a pulse at his coil using a MOSFET, and the voltages at the coil are sensed by an analogue pin through an appropriate clamp circuit. His software does the timing, and sounds a buzzer upon metal detection. It’s a deliciously simple implementation, and while as he shows us in the video below the break its relatively small coil is more suited to detecting coins or wires behind the drywall than locating lost hoards, there is probably ample scope for further experimentation.

This isn’t the first project from [Łukasz] that has found its way into these pages, his history with the ATtiny13 goes back a few years.

Continue reading “An ATtiny Metal Detector”