Making A Small-Scale Brewery With A Raspberry Pi And Python

No doubt many Hackaday readers will have tried their hand at home brewing. It’s easy enough, you can start with a can of hopped malt extract and a bag of sugar in a large bucket in your kitchen and achieve a decent enough result. Of course, once you get the taste it’s a field of infinite possibilities, so many enthusiasts go further into the realm of beer making with specialty ingredients and carefully controlled mash tuns.

Such an inductee into the brewery arts is [Christopher Aedo], who has documented his automated brewing system driven by a Raspberry Pi running CraftBeerPi. And it’s an impressive setup, with boil kettle, mash tun, and heat exchanger, a 5KW heating element, and all associated valves, pipes, pumps, and sensors. This ensures consistency and fine control over temperature over the long-term at all stages of the brew, something that would be very difficult to achieve manually at this scale.

The whole brewery is mounted on a cart for portability and has been used for a lot of brew cycles of many different styles. We can’t help a touch of envy at the array of beer taps in his kitchen.

Over the years we’ve brought you a few brewing projects. Another Pi-based setup graced these pages in 2012, as did a brewery using a Lego Mindstorms controller. Top marks go though to the brewer who fought his beer belly through brewing machinery powered by an exercise bike.

Via Recantha.

22 thoughts on “Making A Small-Scale Brewery With A Raspberry Pi And Python

    1. Not terribly.
      The most likely result is incomplete conversion of the mash. If the temperature is high (+27C/80F) during fermentation you can get some weird flavors from stressed yeast.
      Any old cool (~15C / 60F, even up to the 70’s after main fermentation) spot will keep the beer tasting good. If you’re comfortable, your beer is too.
      Getting enough fusel oils to be harmful, even if distilled, is kind of hard to do. We just happen to taste them at very low concentrations. At that point the amount of ethanol you’ve consumed will do more immediate damage.

        1. Again that depends.
          For centuries we’ve made beer and wine in open top containers. So long as there’s enough ‘head space’ and little air movement the CO2 from fermentation will create a protective blanket over the top. You’re not going to be making any aged alcohol this way but a perfectly drinkable product can be made.
          From there a bit of foil over the mouth of a carboy, a balloon, or a made for purpose airlock will achieve the aim for less than a couple dollars.
          Excluding oxygen is rarely the issue with off fermentations. With particularly strong beers the yeast can actually benefit from injecting pure oxygen at the beginning and other times during primary fermentation.

          True vinegar is caused by a bacterial infection. Skunking is the common name for oxidation and sunlight damage.

      1. Thanks! Its great to see people combining their love of good beer with their love of tinkering!
        I can now produce consistent results from brew to brew which was one of the main goals of the machine. And now? Well, we will make a better machine!!! :-)

  1. “…Another Pi-based setup graced these pages in 2012…”

    Yes, one did. It seems as though HaD’s enchantment with, and stars-in-the-eyes-blinding-me attitude regarding, the RPI started way back then (the RPI was only announced in 2012). Even though it had been stated that this was a two-processor system, with an Arduino doing all the heavy lifting, here’s how the author–Mike Szczys–ended the article: “…But now that he’s worked out most of the bugs it should be fairly painless to dump the Arduino and build a proper RPi shield for this purpose.”
    Apparently Mr. Szczys is not familiar with Mr. Shakespeare’s concept of ‘damning with faint praise’.

    It is very informative to consider the comments associated with that article:

    “The purpose of the arduino in this system is that it’s stable [emphasis mine], where in at least the author’s experience the RPi isnt. Keeping the control algo on the arduino prevents your beer from being potentially ruined if the RPi crashes.”

    and, from the project’s maker:

    “I just want to clarify that while this post suggests that it could be Raspberry Pi only” [in other words,the HaD author took some liberties when writing the article], “this will not be the case.”
    “The Arduino will be replaced by a beefier controller like the ARM Cortex M4.
    “The Pi is a bit too unstable [emphasis mine] to be trusted with direct control over the fermentation. The slave controller runs all the control algorithms, the Pi is for interfacing and data logging.”


    1. I disagree that the Pi is not stable enough to control the process directly. In order to demonstrate this I ported the BrewPi Arduino code to Python and ran it on the Pi itself. I have had it running for about six months without rebooting and in that time it has monitored and controlled several batches of beer.


      1. The only thing which has been “QED”d by you is that your RPi system has not been running long enough; that you’ve been extremely lucky.

        Since it is extremely apparent that you are oblivious to the very serious shortcomings of the Raspberry Pi, you need to educate yourself; and one of the best short courses appeared–in a most timely fashion–on these very ‘pages’, on 4 July, in the form of a post by James Hobson entitled “Softly to Sleep, My Raspberry Pi”.
        A comment (of forty-four) from that piece:
        “Ugh, RPi is such a disaster from a robust [my emphasis] design standpoint. SD card for OS Storage, really? USB ports with no data lines? Why doesn’t Raspbian have a USB serial console enabled by default? BeagleBones do it so much better (except for the USB Host port on the Black, not sure about later ones). I get that the Pi is for “educational” purposes, but that shouldn’t mean as an example of what not to do.”
        …And another:
        “I defined corrupted as being unable to automatically start up and run my data logger. I couldn’t find any documentation beyond people claiming “my RPI won’t boot anymore” and the solution being to reflash the card. Can you please show me where this is well documented so I can reproduce it and try to figure out what is happening?”

        This 4 July ‘article’ is an eye-opener on The Raspberry Pi Problem with which you should acquaint yourself. Do some OBJECTIVE analysis and critical thinking. The Raspberry Pi is not a machine which should be used for anything other than what was intended by Eben Upton: a machine to teach coding to small children.

        “People will generally accept facts as truth only if the facts agree with what they already believe.”–Andy Rooney

          1. You are, obviously, another who is in dire need of being disabused of the notions that the Raspberry Pi is the ideal solution to any problem requiring a microcontroller, and that it could never have a serious problem.
            Read the article of 4 July. Try to keep an open mind when you do.
            And thank you for the high praise.

        1. The second comment that you reference asks “Can you please show me where this is well documented so I can reproduce it and try to figure out what is happening?”, which you seem to be ignoring so far. I actually agree with your point about RPis, but it only seems fair to play the devil’s advocate when you are claiming that the RPi creators are “agressively” ignoring problems.

    1. It’s true this is not a 100% automated system. I certainly considered controlled valves, but the only time a valve is fully open or closed is on the HLT when I’m recirculating the water for even heating. When recirculating the mash both the outlet and inlet valve are partially closed, and the setting depends a lot on the grain bill (size and which grains). Yes that could be controlled with a servo but the truth is every batch has a little variability, and for good beer you need a human involved here and there ;)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.