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”

Tiny Amplifier With ATtiny

Small microcontrollers can pack quite a punch. With the right code optimizations and proper use of the available limited memory, even small microcontrollers can do things they were never intended to. Even within the realm of intended use, however, there are still lots of impressive uses for these tiny cheap processors like [Lukasz]’s audio amplifier which uses one of the smallest ATtiny packages around in the video embedded below.

Since the ATtiny is small, the amplifier is only capable of 8-bit resolution but thanks to internal clock settings and the fast PWM mode he can get a sampling rate of 37.5 kHz. Most commercial amplifiers shoot for 42 kHz or higher, so this is actually quite close for the limited hardware. The fact that it is a class D amplifier also helps, since it relies on switching and filtering to achieve amplification. This allows the amplifier to have a greater efficiency than an analog amplifier, with less need for heat sinks or oversized components.

All of the code that [Lukasz] used is available on the project site if you’ve ever been curious about switching amplifiers. He built this more as a curiosity in order to see what kind of quality he could get out of such a small microcontroller. It sounds pretty good to us too! If you’re more into analog amplifiers, though, we have you covered there as well.

Continue reading “Tiny Amplifier With ATtiny”

Temperature Sensor And Simple Oscillator Make A Value-Added HF Beacon

Sometimes the best projects are the simple, quick hits. Easily designed, fast to build, and bonus points for working right the first time. Such projects very often lead to bigger and better things, which appears to be where this low-power temperature beacon is heading.

In the world of ham radio, beacon stations are transmitters that generally operate unattended from a known location, usually at limited power (QRP). Intended for use by other hams to determine propagation conditions, most beacons just transmit the operator’s call sign, sometimes at varying power levels. Any ham that can receive the signal will know there’s a propagation path between the beacon and the receiver, which helps in making contacts. The beacon that [Dave Richards (AA7EE)] built is not a ham beacon, at least not yet; operating at 13.56 MHz, it takes advantage of FCC Part 15 regulations regarding low-power transmissions rather than the Part 97 rules for amateur radio. The circuit is very simple — a one-transistor Colpitts oscillator with no power amplifier, and thus very limited range. But as an added twist, the oscillator is keyed by an ATtiny13 hooked to an LM335 temperature sensor, sending out the Celsius and Fahrenheit temperature in Morse every 30 seconds or so. The circuit is executed in Manhattan style, which looks great and leaves plenty of room for expansion. [Dave] mentions adding a power amp and a low-pass filter to get rid of harmonics and make it legal in the ham bands.

Beacons are just one of the ways for hams to get on the air without talking. Another fun way to analyze propagation is WSPR, which is little like an IoT beacon.

Continue reading “Temperature Sensor And Simple Oscillator Make A Value-Added HF Beacon”

Upgrading A USB Soldering Iron!

Seeing the popularity of the TS-100 soldering iron, GitHub user [ole00] found himself desirous of a few of its features, but was put off by its lack of a power supply. What is a hacker to do? Find a cheaper option, and hack it into awesomeness.

[ole00] stumbled across the inexpensive ZD-20U and — despite a handful (sorry!) of issues — saw potential: it’s compact, lightweight, and powered via a USB power cable. Wanting to use as much of the ZD-20U’s original board as possible, the modifications were restricted to a few trace cuts and component swaps. The major change was swapping out the 555 timer IC controlling the iron with am ATtiny13a MCU to give it a bit more control.

Continue reading “Upgrading A USB Soldering Iron!”