BernhardSchlegel / Brick-32

Worlds easiest and cheapest to build brewing control. Supports mashing and fermentation. Combine multiple Bricks to control higher wattages or different functions (heating, cooling, pumps). Works with smartphone, iPad, Mac, & PC.
GNU General Public License v3.0
12 stars 2 forks source link
beer brewing control esp32 fermentation mashing pdi sonoff wifi

Bricks

ESP32, app based brewing control for mashing and fermentation

Brick 32

What's the easiest way to build a brewing control? Repurpose a off-the-shelve WiFi switch!

This repo is an alternate firmware for the Sonoff Origin producs (TH Origin THR316/THR320, TH Elite THR316D) to turn them into a brewing control (mashing and fermentation). The relay can be configured to control heating, cooling, agitation and pumps. The DS18B20 sensor supplies the temperature reading. After flashing, they can be added as a "Brick" on BierBot Bricks allowing a whole range of features:

If you want to use a RaspberryPi and do all the wiring/electronics yourself, please head over here.

Images

Bricks

Manual

Hardware

This software is tailor made for the Sonoff TH Origin (16A and 20A versions). Other, similar ESP32 powered Sonoff devices (POW Origin, POW Elite, etc.) will most likely work, too.

Build guide

A detailled build guide can be found on YouTube and on the BierBot blog. Feel free to check it out, if the following explanation is not detailled enough.

Brick32 wiring

  1. Read disclaimer below!
  2. Open housing by unscrewing all 4 screws.
  3. Solder 4 pins to the Terminal (3V3, GND, TX, RX).
  4. connect rainbow cable, route to outside.
  5. Connect to USB-to-serial adapter as show above.
  6. Download the latest release from here, i.e. "brick32_release_v.X.Y.Z.zip" (X, Y, and Z being placeholders).
  7. Unzip the file to a folder.
  8. Flash the software using the official "Flash Download Tool" available here.
    1. Unzip the tool, and open the "flash_download_tool_3.9.2.exe" (or similar) in the root folder.
    2. In the dialog, set chipType dropdown to "ESP32", workmode to "develop", hit OK.
    3. Refer the below image of all necessary adjustments:
      1. Select the four binaries in the order shown. Select the respective addresses (starting with 0x) on the right. Check all checkboxes to the right of the filenames. Make sure the beginning of the filename (i.e. 0x8000_) matches the address on the right (i.e. 0x8000) for each respective row.
      2. Select "SPI SPEED" of "40MHz" (should be the default),
      3. "SPI MODE" to "DIO" (should be the default",
      4. check "DoNotChgBin". At the bottom select the COM port (to figure out which one is your USB to serial converter, simply unplug and plug it back it), i.e. "COM3",
      5. set "BAUD" to "460800".
  9. Disconnect the (mini) USB cable to your Serial Converter. Now: HOLD the button on the Sonoff, insert the USB cable (while still holding the button), and release the Button on the Sonoff again.
  10. Hit "START" (lower-right corner) of the flashing tool. Wait for the process to complete. If it fails: Make sure all rainbow cables are attached correctly, close and re-start the flashing tool.
  11. Power up, and connect to the hotspot (see Usage-Section).

Flash download tool settings

Usage

Simply power up your BierBot Brick-32 and use any WiFi enabled device (Android, iPhone, Tablet, Mac, or PC) to scan for a Brick-32-Wifi (i.e. Brick-32-0042123) to configure your Brick. You'll need an API key which you can get for free at bricks.bierbot.com.

Buttons and LEDs

The following Buttons are available

The following LEDs are available to tell you which state your Brick-32 is in:

Troubleshooting

Q: My COM port is not recognized?
A: Download and install the official drivers from here.

For Developers :heart:

Refer the Developer Readme.

Disclaimer

:warning: DANGER OF ELECTROCUTION :warning:

If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don't know how to install it, please call an electrician (Beware: certain countries prohibit installation without a licensed electrician present). Remember: SAFETY FIRST. It is not worth the risk to yourself, your family and your home if you don't know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power).

We don't take any responsibility nor liability for using this software nor for the installation or any tips, advice, videos, etc. given by any member of this site or any related site.

disclaimer source