I’ve been working hard on this project over the past week or two, and I put another week or two into it at the end of last year. Finally, though, it’s just about ready to show.

Gravity, Graviton, and Pendulum are the three components of an end-to-end wireless hydrometer system for homebrewers.

Graviton is a Golang server which manages batches and hydrometers. Gravity is a vue.js front end for Graviton. Pendulum is an ESP8266-based floating tilt hydrometer, with built-in calibration and automatic temperature compensation. Put them all together, and you get something a little like this:

For each batch you have in progress, you get a dashboard with a chart showing measured gravity and temperature over time, along with apparent attenuation and current calculated alcohol by volume: everything you need to know about a batch of beer in progress.

Backstory

Obviously, I homebrew, or else I wouldn’t have started on this project at all. I homebrew with a friend, however, which means that wherever we brew, at least one of us is going to be remote. The ability to check on a beer remotely is therefore valuable to us.

There are other existing systems: the open-source iSpindle, which inspired this project; Tilt, a commercial floating hydrometer of the same sort as Pendulum and iSpindle; and BrewBuddy, a commercial product which solves the long-term power issue by replacing your carboy bung and dangling a sensor-only torpedo into the wort.

The commercial products are out because we homebrew in part because it’s cheaper than buying good beer, and a do-it-yourself solution is way cheaper (if you, like me, value your labor at near-zero). Why not an iSpindle, then? Because we brew in glass carboys, whose necks are a mere 29.5mm across at their narrowest points, and iSpindle uses an enclosing cylinder which won’t fit.

So, because no product out there fits our needs, and because Go, vue.js, and some very light electrical engineering are all useful skills, I decided to roll my own.

How it Works

Like all tilt hydrometers, Pendulum uses the interrelation between density and buoyancy to figure out the density of the medium it’s floating in. A cylinder with a weight at the bottom naturally floats at an angle. If the liquid is denser, the angle between the hydrometer and the vertical increases. If it’s less dense, it decreases.

Pendulum is calibrated by preparing a series of sugar-water solutions of known density, recording its measured tilts in those solutions, recording specific gravity readings from a calibrated hydrometer, and providing tilt-gravity pairs to Pendulum’s configuration interface. It does the required calculations internally.

Technical Details

Pendulum uses an ESP8266 microcontroller, a GY521 MPU6050 accelerometer/gyroscope breakout board, and a lithium-ion 18650 battery. Which precise ESP8266 board depends on how it fits in roughly 27mm tubes; I have several coming which will help me answer that question. The board I’m using for development has some nice features, like built-in USB battery charging and discharge protection, and if possible I’d like to stick with it.

As far as cylinders go, I have two options: a 27mm outside diameter jobber with a narrower screw cap, which will have to be hacksawed off, and a 27mm inside diameter tube used to hold collectible coins. The former may be too small on the inside, unless I detach the battery caddy from the development board, and the latter may be too big on the outside to fit into our carboy.

To-Do

In addition to the hardware task above, I have some work to do on the software side, too; some fixes to hopefully make the ESP8266 wifi connection slightly more reliable, and some changes and improvements to the web app and back end to allow for management of users and permissions.

Most of the hard work is already done. It’ll take about a month for the various enclosures to arrive from China, a week or two to work out the remaining hardware issues and perhaps add a transistor to the voltage measurement circuit, so it can be fully turned off. By mid- to late summer, I should have something release-ready, with enough documentation and photography so that anyone handy with a soldering iron should be able to assemble their own Pendulum. Until then!