beerbrewing / brewberry-pi

Home brewery automation the smart way

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brewberry π Build Status

Given a DS18B20 temperature sensor, a solid state relays and a wifi connector, automate the mash process.

At least, that's the plan.

This repo contains the code of my brewberry-π home brew software, built with Elixir and Nerves.

Brewberry π can:

  • control temperature within a 0.1 °C margin
  • read, set and control the mash process with your phone (web ui)
  • brewing software can be upgraded over the network
  • it's firmware, so you can pull out the plug at any time

Why Elixir/Nerves? Well...

  • Elixir is build on Erlang technology, making it fault tolerant by design.
  • Nerves provides a basis for real firmware. You can just pull out the power plug without bad things happening (you do not want to try that with Rasbian).
  • The system is up and running in less than 6 seconds(!) (not including wifi authentication). This is a lot faster than the 60 seconds it takes for Rasbian to boot.
  • The Erlang/Elixir actor model is a natural fit for message driven applications.

An older version of the Brewberry-π written in Python is available at https://github.com/amolenaar/brewberry-pi-python.

Get started

  • Go to the web application with cd apps/web
  • Run mix deps.get
  • MIX_ENV=dev iex -S mix will lauch the app and open a console, so you can tinker around
  • Open a browser on http://localhost:3030, the (web) app will be running there in "fake" mode

Firmware

To build an image for the Raspberry Pi (model B):

  • Ensure Nerves stuff is installed on your machine, check out the Nerves getting started guide
  • Go to the firmware application with cd apps/fw_rpi
  • Install dependencies with MIX_ENV=prod mix deps.get
  • Copy apps/fw_rpi/config/wifi-example.exs.example to apps/fw_rpi/config/wifi.exs and fix the ssid and psk properties
  • Create firmware with MIX_ENV=prod mix firmware
  • Burn to an SD card with MIX_ENV=prod mix firmware.burn
  • And do remote updates once your first image is up and running: MIX_ENV=prod mix firmware.push 10.192.168.122 --firmware ../../_build/rpi/prod/nerves/images/fw_rpi.fw

PCB

To control a brewing kettle some additional hardware is required:

A schema is made with Fritzing and is available in the file Brouwerij.fzz.

schema

Bill of Materials

Label Part Type Properties
- - PCB prototype board
J1 Screw terminal 3 pins, connector to DS18B20
J2 Power plug connector to SSR
Pi1 Adafruit Pi Cobbler manufacturer Adafruit Industries
Q1 NPN-Transistor type NPN (EBC); package TO92 [THT]
R1 4.7kΩ Resistor pullup resistor
R2 1kΩ Resistor

Learn more

TODO

About

Home brewery automation the smart way


Languages

Language:Elixir 76.2%Language:JavaScript 14.9%Language:HTML 4.7%Language:CSS 4.1%