ESP8266 Fermentation Controller Build

I’ve been meaning to do a quick write up of the fermentation controller I built that uses an ESP8266 running BrewPiLess, with my ESP8266 PCB. The ESP8266 is a very popular WiFi enabled IoT device. Their most popular commercial use that I know of is in “smart plugs”. They’re used all the time for various home automation tasks.

There’s not much to this build, really. The ESP8266 PCB keeps the connections simple. In a small enclosure, I have an ESP8266 with my PCB, with a pair of relays for heating and cooling outputs. There’s a 5V DC power supply to power the ESP8266. For temperature sensors, the popular and cheap DS18B20 sensors are used. At minimum you need two sensors: one for beer/fermentor temperature, the other for chamber temperature. You could optionally use a third for the “room temperature”. And that’s it!

While the build is pretty simple, I know when planning a project like this, it can be very useful to see finished projects. I’ll include a parts list at the end.

Here are the internals of a completed controller. In the upper left is my ESP8266. In the upper right are some solid state relays. In the bottom left, there is a 5V DC power supply. Connections for temperature sensors and heating/cooling outputs are found on the bottom.

Here’s a better look at just the ESP8266 on my PCB. You’ll notice I use an external antenna. The metal enclosure used for the controller operates essentially as a Faraday cage. So a ~$1 upgrade to include the wireless antenna really helps with the strength of the controller’s WiFi connection, and reliability. Though it continues to work if the WiFi connection is dropped, you can’t do things like change the beer or chamber set points.

Here’s a close up of one of my assembled ESP8266 PCBs. The screw terminals are used for powering the device (5V), temperature probe connections, and heating and cooling outputs. They’re all labelled (which can’t be seen here). There are also 4 pins across the top which are used to connect to an LCD using the I2C protocol. More details on this PCB can in another post, here.

Here’s the bottom of my enclosure – I use XLR connectors for my DS18B20 temperature probes, and cable glands to secure SJOOW for AC inputs and outputs. I personally find these a fair bit easier to install than installing outlets into a controller (which generally involves bringing out the jigsaw if you’re using an enclosure like mine).

This is the LCD I mentioned earlier. It is a 20 x 4 line display. This shows the current controller status, as well as some basic information such as the IP address when booting up. These LCDs are 5V logic whereas the ESP8266 is 3.3V logic, so making this work required a logic level conversion circuit on my PCB (otherwise the PCB would be a bit simpler).

And finally, a shot of it all closed up! I did still need my jigsaw for this project in order to make a cutout for the LCD.

That about covers it. Let me know if you have any questions in the comments.

The parts list below uses links as it’s what I generally use and I do get a small commission for purchases through my links. These components are generally easily found on other Amazon locales, or can be ordered directly from China (generally cheaper but longer wait) using on eBay or Aliexpress.

 1Electrical enclosure for controller and relays. This is the one I use. There are many other options for this – including 3d printing one.
SainSmart 5V 2-Channel Relay Module Shield Control Board for Arduino Raspberry Pi Arduino 8051 AVR PIC DSP ARM ARM MSP430 TTL Logic1

2 channel relay module. One channel for heating and one for cooling. In this build I used a pair of high quality SSRs as it is what I had on hand. Whatever you use, ensure that it is properly rated for the application at hand. For a fridge, or other appliance with a compressor, you should really use HP-rated contactor, that is controlled by this 5V relay module.

RS Components Raspberry Pi 3 Model B+ Motherboard1 (optional)

Raspberry Pi. You can run Fermentrack on this Raspberry Pi to manage many of these fermentation controllers, or if you would like to do without, you can run BrewPiLess directly on each of your ESP8266. Both work great. 

If you are using a Raspberry Pi, you will also require a 5V power adapter and a microSD card – there’s lots of well priced kits available that have everything you need to get started.

1 (optional)2004 LCD (20×4 LCD). This is extra display that will show the activity of the controller. It’s a “nice to have” – not at all necessary to have a working controller. These can be found for cheap on eBay and Aliexpress.
2DS18B20 Temperature probes. 2 are required (one for chamber, one for fermentor). Note that the link provided on the left is for a set of 3. A third can be used to monitor outside ambient temperature.
WEMOS D1 Mini Pro 16MB (128Mbit) ESP8266 comp. WiFi, Arduino Lua NodeMCU, Antenna1

Wemos D1 mini (ESP8266). This is the actual microcontroller used in each controller. It will read our temperature sensors, and based on our settings and temperature history, it will activate the heating or cooling relays. It also has wireless capabilities for connecting to your network.

1An ESP8266 PCB, as well as the necessary components for its assembly.
MEAN WELL RS-15-5 AC to DC Power Supply Single Output, 5V 3 Amp 15W1A 5V DC power supply for the ESP8266. Can also be found on Aliexpress or eBay for cheap.
 VariousMiscellaneous connectors/receptacles are required for:

  • Main power input
  • Outputs for heating and cooling
  • Temperature probe connections (I use XLR)

6 responses for ESP8266 Fermentation Controller Build

  1. Jon says:

    Thanks for posting this, it is super helpful. Question about wiring the 2-channel relay to your PCB: Am I correct that I can wire the relay’s ground terminal (on the low voltage side) into one of the ground terminals for the temp sensors? Would that be the best approach?

  2. Andrew J says:

    Nice post, very helpful. Did you use heat sinks on your ssrs? I’m using 10amp ssrs for my build. If not, any issues with heat buildup?

    • Justin says:

      Yes my SSRs have heat sinks, but I don’t have a fan running in the enclosure or anything, so maybe a moot point. They won’t be putting off much heat in this application.

  3. William says:

    Nice work. Could you tell me what device do you use for cooling? and for heating?
    Another question, why does this system require two temperature sensors? Wouldn’t it work with just the fermentor one?

    • Justin says:

      I used an all-fridge for cooling. For heating I use a silicone heating band from ebay. The control algorithm used in brewpi and brewpiless involves both a “chamber temperature” and a beer temperature. I believe there is an option to use it only with a beer temperature however.

  4. Leave a Reply

    Your email address will not be published. Required fields are marked *