How do we know if your keg is empty?

Beer Keg Challenges

When Binary Beer first started, one of our original goals was to develop a technology which would allow us to determine the precise quantity of product remaining inside a beer keg. This goal raised a few immediate challenges:

  1. Kegs are food safe vessels which need to meet certain regulatory requirements
    Any device or object which was to compromise this would be immediately dismissed.
    Building a device to meet these food safe standards is expensive and introduces many new technical challenges.
  2. Kegs spend much of their life pressurised
    Being a pressurised vessel means that kegs generally don’t enjoy being modified substantially, and any modification also needs to meet the requirements of a pressurised vessel. This would mean substantial installation time or significant production expense.
    Couplers have very well established universal standards, which meant designing a whole new type of coupler would be poorly received by the industry if it required the taps to change.
  3. Kegs are made of steel
    They are heavy when they are full and affixing something to them is complex.
  4. Kegs are not treated very nicely
    Kegs are often ‘knocked about’ in the supply chain. They can be rolled, dropped and even thrown when full or empty.
Kegs being rolled into a basement

These challenges alone ruled out any solution which involved securing sensors which would ‘look inside’ the keg or modify the coupler in some way.


Weight On Our Minds

Our first idea was to create a scale system which could be mounted to the base of the keg. This gadget would contain all the components needed to upload data regarding the kegs location and temperature, as well as provide the weight of the keg. The data could be used to tell if a keg is full to a high degree or accuracy.

This solution solves the challenges presented by points 1,2 and 3 but runs into additional challenges at point 4. Any ‘scale’ that we install on the base of a keg would need to be able to sustain the force of a solid drop with a full keg and be able to sustain being stacked underneath multiple kegs. After a few 3D printed models and some discussions with bar staff we concluded this would end up being an incredibly expensive solution- or one that will not last very long.


Proof of concept keg scale system (pictured as part of network testing). The keg was cut to allow for a variety of tests.

Good Vibrations

Our next solution was inspired by our conversations with bar staff; when asked how they know if a keg is empty when it’s stacked, they proceeded to kick it and listen to how it sounded. We experimented with a solution that replicated this, we ‘kicked’ the top surface of the keg with an electromechanical relay and listened to the vibration it generated using a peizoelectrical element.

This solution on the surface seemed perfect, as it could be a small device secured to the top of the keg and tucked away underneath the rim so it was less likely to be damaged. The issue with the solution was that a keg spends its life in a wide variety of environments. The ‘vibration response’ could vary wildly based on:

  • The surface the keg is stored on (i.e. on concrete or sitting on a pallet).
  • The temperature of the keg (i.e. if the keg is in very cold conditions, like a cool room or in the snow)
  • The pressure inside the keg
  • If the keg had other kegs stacked on top
  • If the keg was upside down or right way up
  • How the sensor was installed on the keg

Because of the wide variation- it was clear that this solution was at risk of being unreliable. Without knowing the conditions the keg was in, false positives would be a high possibility. One unforeseen issue arose when the electromechanical ‘kick’ produce a small noise. If you had a warehouse of 1000+ kegs, it might become quite annoying to constantly hear an audible ‘tick’ every-time a keg was uploading it’s sample.

There were technical challenges with this solution too, primarily on how to get a reliable and consistent installation. The ‘kicker’ and the ‘listener’ would both need to be physically contacting the keg in a very precise and consistent manner. This meant either wires from a seperate sensor, or a complex industrial design which could make the sensor prohibitively expensive.

Our ‘proof of concept’ for testing the ‘keg kicker’; a paint tin and electronics

The kicker concept was extended to see if a model could be trained to reliably assess the fill level of a keg. In this experiment, the acoustic sound of the ‘kicked’ keg was converted into a 2D array of frequency bins and amplitudes over time and a model was developed to correlate this data with the fill level of the keg.

Automated keg filling and acoustic training system

While the concept showed that fill level can be determined acoustically, the training process took a lot of time and didn’t translate from one keg to another, so the system would need to be re-trained for each specific keg. Furthermore if the keg were to be damaged throughout its life the system would need to be trained again. This solutions simply wasn’t going to scale.


Throwing a shrimp on the barbie

Another approach to monitoring fill level was inspired at a family BBQ when the host measured the fill level in their gas bottle with an ultrasonic sensor. An experiment was quickly devised to attach a traditional ultrasonic sensor to the bottom surface of a keg to determine its fill level. The results were generally quite positive, giving a good indication of the fill level of the keg but only when there was a reliable contact between the sensor and the bottom surface of the keg. The idea, while promising, was shelved because

  • The sensor alone cost nearly as much as the whole keg
  • The sensor needed to be on the bottom of the keg, which is a terrible space for an RF sensor to transmit from and this would detract from the feasibility of the entire solution

Rethinking the Keg Problem

While all this prototyping was happening, we were meeting brewers and learning more and more about how the brewery industry and its supply chains worked. During this, we openly discussed our solutions to brewers, learning more about their needs. One light bulb moment came when we learnt that the actual quantity of product inside the keg was not the most important detail. For brewers, the most important thing was if the keg was empty or full. This is the point that drives the supply chain as well as the sales process. So with this more specific goal, we refocused our efforts.

Our first method was using the technology we already had, temperature sensors. By looking at keg temperature over time, we can see variations as well as patterns. A cool-room has a ‘hysteresis’ where the temperature gets to a certain point and then the cooling system turns on and brings it down to a certain temperature where the compressor cuts off again. We used pattern recognition to identify this behaviour – this allows us to know when a keg enters and then subsequently leaves a cool-room. We pair this temperature data with the assumption that a keg should generally not be leaving a cool-room when it is full (if it is at a venue). So when a keg is at a venue and has left the cool-room, we can confidently mark this keg as ‘empty’ with a high degree of confidence. This solution is obviously not perfect, but is a huge improvement from not knowing at all.

An issue with this solution is that not all kegs go into cool-rooms to get empty. Many kegs around the world are emptied through a chiller box, where the keg remains warm, but the beer is chilled along its way to the tap, meaning there is no detectable temperature difference when a keg is being emptied. To improve on this solution we have developed a more reliable means of determining if a keg was ‘on tap’ or not.


Tap On, Tap Off

When a keg is being emptied, the coupler is connected to the top of the keg. Couplers can vary slightly from brand to brand, but they are all roughly the same size. Importantly, they all stick out the top from the coupler and remain coupled to a keg for a substantial amount of time.

Video of coupler detection production design in action

We developed a system to detect a couplers presence. Using a distance sensor and infra-red transparent plastics we are able to measure the distance from our sensor to whatever is above the coupler. This tends to be:

  1. Nothing
  2. A coupler
  3. Another keg
  4. Some random other thing (e.g. a bag of onions being stored for the kitchen)

The distance sensor sends data to our platform over time, and we interpret this data to determine if the keg is coupled or not. This now provides us with a far more accurate and reliable way to determine if a keg is on tap. Thus allowing us to more reliably determine if a keg has been emptied.

As an added bonus, because we are now measuring ‘time on tap’ instead of ‘time in fridge’ we can identify how long a keg was on tap for; this allows us to monitor a specific venues ‘time on tap’ values for specific types of beer and begin to make predictions on when a keg will be emptied, how many kegs will be needed for certain times of the year, what product is moving better or worse etc.


Coupler detection technology unlocks an incredible amount of value for the brewer and we are continuing to discover and develop new ways it can help a brand to sell more beer.

Sign up for our demo now and see how KegLink™ will revolutionise your business

Enter your email below and we’ll send you an invite link so you can try our platform for free