Don’t Panic was once written on the cover of a now famous book and could probably be the catchphrase of WeightyBeer. With WeightyBeer you no longer have to worry about suddenly running out of beer and raging in surprised panic. WeightyBeer is the monitor system for your beer taps at home that you’ve subconsciously dreamt about ever since you got your first tap. With WeightyBeer you can register your taps and brews to keep track of which brews that’s currently on each tap and how much beer there’s left in each keg. At the very top it’s a React web app designed for that old tablet you never use, or the cheap one you’re about to invest in.

WeightyBeer consist of multiple individual modules with no inter-dependencies, except for the expected output of the modules. Most of the project (~95%) is implemented using Javascript, React and Node.js, and in addition a small program for the Arduino. The modules communicate through and store data in Google’s Firebase, though if you really want to you can exchange this as well – as long as whatever you choose to use implements the Firebase API. The project has been a fun way for me to learn different new technologies of which I have of course selected those that I desired most to learn. For the web app (aka the client) I went with React, Redux, webpack and Material-UI, which really was a giving learning experience.

2016-12-28-12-56-44-1

Architecture

There are three Javascript modules/apps that make up WeightyBeer: the client (web app), the weighthub and the weightsensor. The weighthub and weightsensor apps constitute a simple DSP (Digital Signal Processing) application. The weightsensor is the sampler of the two and is responsible for configuring the arduino and sampling data from the load cells (package scales). While the weighthub performs the quantization process, or in other words aggregates the sampled values from the load cells. The client then interprets the data from the weighthub, combines it with the declared keg volume of a tap and displays it to you and your guests on a nice interface on the tablet.

weightybeer-1

Get started

WeightyBeer is open-sourced (MIT) and available at GitHub and you can «easily» set it up for your own taps, but you’ll need a few items to do so.

Shopping list

  • Tablet
  • Arduino
  • Weak computer (e.g. Raspberry Pi)
  • Load Cell Amplifiers – HX711 (cheap on ebay)
  • Package scales
  • Dupont wire cables (cheap on ebay)
  • (Soldering iron)

Load cell amplifiers

I bought a pack of five HX711 load cell amplifiers for 10$ on ebay including free shipping. Each load cell amplifier included a metal shield and a set of different connection pins that had to be soldered on to the chips. If you don’t know the basics of soldering I do recommend that you read a simple introduction, it will save you some pain. The difficult part, for me at least, was that the chips that I bought had different names than what the tutorials I found has. In retrospect I’ve found that you can trust the tutorial of the SparkFun HX711, and there is a lengthy story of how I made it all much more complicated than it needs to be. Don’t worry though, I won’t bore you with the details.

Package scale

The package scales that I bought I found at a Norwegian electronics shop and is a bit more on the expensive side than the other components of this project. You may find cheaper scales on ebay that will work just fine for your purposes. For my purposes however, I didn’t find any cheap scales on ebay that fit the space requirements of my keg refrigerator. You’ll find a picture below of the inside of my scales and, as I’ve come to understand, no matter what scale you end up using the insides will be quite similar. There should be four wires coming out of the load cell that connects to a chip. You need to cut these wires from the chip, and then you can throw the chip away, or keep it – your choice.

Wiring

I’ll refer to the components that I used, but it should be similar in most cases I believe. See the pictures below. The «VCC, DO/RX, CK/TX, GND»-side of the HX711 amplifier connects to the Arduino and the other side to the load cell. The outputPin and clockPin will be the ones you configure in the weightsensor/config.json file. If the values read through the weightsensor app decreases, instead of increases, as you increase the preassure on the scale simply swap them (which is what I had to do).

  • HX711 → Arduino
    • VCC → 3.3v
    • GND → GND
    • DO/RX → outputPin
    • CK/TX → clockPin
  • HX711 → Load cell
    • out+ → red wire
    • GND → black wire
    • A+ → white wire
    • A- → green wire

20170110_000836-768x576

20170109_235249-768x479

Apps

Follow the guide found in the repository.

 

Legg igjen en kommentar

Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *