Its now time to automate the fermenting process. The less things we need to worry about, the more we can focus on what we really love; making recipes and brewing beer!


Step 1 – Preparing the Raspberry Pi

Connecting cables to the Raspberry Pi

Step 2 – Connecting the SSRs (directly to the refrigerator)

Wiring Diagram (example)

Step 2 – Connecting the SSRs (easy method)

Step 3 – Setup CraftBeerPi

Equipment needed

1x Refrigerator

1x Raspberry Pi ( running CraftBeerPi )

1x Raspberry Pi case (or some way to mount it)

2x SSR (3-32V DC Input)

Jumper cables for GPIO (lets us connect to the raspberry pi using wires)

1x 4,7k ohm resistor

Wago connectors or similar wire connectors

Small zipties (for estetics)

Step 1 – Preparing the Raspberry Pi

  • Connecting cables to the Raspberry Pi and SSR


First thing we do is to connect the wires for the temperature sensor(s)



We have 3 wires connected to POWER (pin #2) GROUND (pin #6) and SENSOR (pin #7) Dont confuse pin numbers and assigned numbers. The SENSOR (pin #7) is referred to as GPIO 4.

This is the assigned number you will use in CraftBeerPi when it asks where things are connected.

Now we can add the other wires for our SSR control. You can choose what pins you use, but you need to remember this when setting up your CraftBeerPi software later.

To control a refrigerator, we place our COMPRESSOR on Pin 16 (GPIO 23), HEAT on pin 18 (GPIO 24) and black is GROUND.

If you have a case like the one we have (official Raspberry Pi case) then you need a hole to extend the cables out of the case. Remove the side and drill a hole where it wont interfere with internal components.


Find a small screwdriver or a knife and lift up the small plastic tap of the jumper cables and slide them off.


We find this to be easier to fit into WAGO clamps and etc. To ensure that the wires are both sorted from each other, organized and kept from pulling out of the case too much, we zip-tie them together inside the case.

To get the DS18B20 temperature sensor(s) to work, we need to jumper between the POWER and SENSOR with our 4,7k ohm resistor. There are 2 ways to do this, connecting on the outside (inside a WAGO clamp or similar) or like we have, connecting it using the jumper cables on the pins. (make sure they are firmly inside the connector after installing)


And now, you can assemble the case as we are done connecting the Raspberry Pi.


Your SSRs connected should look like this (see wiring diagram below)


Now, we want to put everything into an enclosure. This it not only for estethics, but also for safety purposes. We dont want to have exposed wires and connections laying around. The one i choose was a cheap junction box with a built in DIN rail. If you have the SSR with the heat sink on the back like we do, then that most likely has grooves that fit on a DIN rail. If not, you can buy DIN mounts for any SSR from Ebay. It makes it alot easier to make small control panels and junction boxes like this.


Next, you need to fit your two SSRs and Raspberry Pi inside. Make sure you have made holes in the box for all the wires. You also need to fit a power cable for your Pi and possibly a ethernet cable. We made two holes in the box, we have a seperate one for the temperature sensor cables. If you want to get fancy, you could buy plugs for your box and wires. For this project, that can be a “fine polish” at a later stage.



Step 2-Connecting SSR to original fridge wiring (Advanced)

The idea here is to let one SSR control the existing compressor in your refrigerator and the other one controlling a heat source. You will need to remove some panels and wires from the original layout, as we are not using the relay and temp sensor in the refrigerator. This is also a bit hard to explain in a guide, as all fridges are slightly different. Our suggestion is that older models tend to be easier to work with. On our refrigerator, we started with removing the front panel, exposing the wires inside.

You might find (as we did) that it is easier to pull new wires through were the original cables are, and leave everything else disconnected.

Either you have a small oven, heat cables etc. that will be straight forward to connect to. If your lucky, there is a drain hole at the very bottom of your fridge, ideal to pull wires through to the back side of the refrigerator. Remember, what the SSR is doing, is only cutting one of the powered wires going to your heater.

First, make sure that your original fridge power is expandable using Wago connectors or similar. This means that BLUE (N), BROWN (L) and GROUND are all inside wago connectors.

  • Heating – SSR #1
  1. Connect BLUE (N) from fridge power cable wago or similar connector. One goes out of the wago connector to the BLUE (N) on your heater.
  2. Connect one BROWN (L) to the SSR output.
  3. Connect the second SSR output to the BROWN (L) of the fridges power cable wago or similar connector.

This means we are cutting the BROWN (L) or connecting it to complete the power circuit.

  • Cooling – SSR #2

Locate the wires that runs to the compressor of the fridge. On some models, you can look at the bottom on the back and find where the wires connect. On our refrigerator, it works by connecting BROWN (L) to BLACK (compressor) So connecting this to our SSR requires some extra brain exercise. Because the original wire BLUE (N) coming from the main power supply is also connected to the light inside, and from the BLUE (N) wire, there is a white wire that runs down to the compressor. So just to go back a step, when you look at how the original temperature control for the fridge is connected, we get a BLACK, BROWN and WHITE wire to the back of it. In our case, its a matter of connecting the WHITE to the BLUE (N) on the power cord, and we get the SSR to connect the BROWN and BLACK wires to trigger the compressor on and off.

  1. Connect WHITE or any “third” wire from the original temp control to the BLUE (N) on the power cord.
  2. Connect BROWN (L) wire from the original wire to COMPRESSOR to the SSR using a wago or similar connector.
  3. Connect BLACK from the original wire to COMPRESSOR to the SSR using a wago or similar connector

I hope this made sense. *disregard the color blue wires, that was just what i had at the time. Let us know in the comments below if you want us to explain more. And thats it, you have one SSR to power the Heat and one to power the compressor, we can now let the wonders of CraftBeerPi do the rest!

Step 2-Connecting SSR (Easy)

If you dont want to go through all that wiring and connect it directly to the SSRs, you can make some power sockers that are controlled by the SSRs. Make them on the same principles, (N) straig to power and (L) via the SSR. Then you simply connect the entire fridge to the socket for “Cooling” and the heating source to the socket for “Heat” And thats pretty much it. (See wiring diagram below as example)

  • Wiring Diagram (example)



Step 3 – Setup CraftBeerPi

This guide will assume you have CraftBeerPi installed. If not, check out our Getting Started – Brewing with Raspberry Pi guide to get started. Only the latest version CraftBeerPi 2.2 has the fermentation controller option, so you need to make sure you are using the latest version. If you need to update, get to the installation folder of your CraftBeerPi and do;

git pull


You can access your new dashboard at (YourRaspberryIP:5000) ours is example:

You can start with adding your DS18B20 temperature sensor.

Now, you need to add your Hardware (heater and cooler) Basically, your SSRs

As you can see from the picture below, we have our Heater on GPIO24, our Cooler on GPIO 23 and our temperature sensor all set.

We can now add our “Fermenter” as a unit.

Make sure that you set some ON and OFF offsets. This is basically saying at what temperature the Heater and the Cooler will start. This is important because we dont want the two to switch ON and OFF all the time. This will also cause unnecessary wear on the compressor. Remember that the refrigerator will keep the temperature stable, so all we want to make sure is that we dont let it drift to high or too low.

With this all configured, you can now configure your fermenting process (time and temperature) If you have several stages of fermenting, you can add all these as seperate Steps. To add a Fermenter Step, press the “pluss” symbol.

When your happy with your setup, press “Play” and then press the “Auto” symbol to start the automated controls.

You can also view the current temperature chart by pressing the chart symbol on controls. Remember that the time used in this chart is (UTC) and depending on your Raspberry Pi timezone configuration.

If YOU have any issues with it or suggestions for improvements, add them on the Official Github page


Leave a Reply