Controls and automation for the AutoBrewer is achieved with 2 WiFi inkbird ITC 308 temperature sensors and an Arduino. This section details how they work together to brew your beer.
Sensor 1 - this sensor needs to be monitoring the temperature of your wort somehow, with a thermowell for example. The heating receptacle needs to control your heating element for your kettle. You will most likely need your kettle to have a secondary relay that the temperature controller will turn on and off. Remember your ITC 308 controller can only handle up to 10 amps, which is only a 1200 watt heating element. If your using a 240v system you absolutely need a relay somewhere to control it. If you need help figuring out a way to control your kettle email me and I'll try to help, otherwise please ask a qualified electrician. I plan to add a DIY kettle controller page eventually.
If your using a glycol chiller, the glycol pump will be plugged into the cooling side of sensor 1
Sensor 2 - this is the sensor that communicates with the Arduino. The Arduino is "looking for" 5v on it's input pin, in our case pin 2. Conveniently all cell phone charging blocks happen to be little 120vAC to 5vDC transformers, which means they are perfect for this. You can either buy USB pigtails or just cut the end off any extra charging cable you have and strip it back. Splice on some 22g solid wire and a resistor, at least 10kohm, to the wires. The resistor is called a "pull down," it ensures the voltage the Arduino senses on the wire stays at 0v unless the charging block is active. The pull down resistor helps ensure your AutoBrewer doesn't get false signals and prematurely do the next step. The red wire is positive, and that's the one you want to plug into pin 2. The black wire is negative, and needs to be plugged into a GND pin on the Arduino.
The Arduino - the Arduino program is extremely simplified. Normally the Arduino loops through the program very fast, appearing to be able to handle multiple inputs and outputs at a time and other programming tasks. We don't need it to do that, and I wouldn't know how even if I wanted to! We just need it to do 1 thing, and then wait, which is exactly what the program written in the programming section achieves.
Before each action the Arduino waits until it senses 0 volts and then continues waiting until it senses 5v. Once it senses 5 volts it changes the state of the next pin in line in the programming.
When you first plug in your Arduino, the first line in the code is "while pin 2 is seeing 5v, wait," if it doesn't see 5v the program moves on to line 2.
Line 2 is "while pin 2 sees 0v, wait," until sensor 2 activates its heating plug and puts out 5v, the Arduino will stop the program here. Once sensor 2 activates, the Arduino moves on to the next line.
The next 4 lines activate, and then deactivate the corresponding relay that is needed next. The first 2 times this happens the hoist relays are activated, the 3rd time is the fermcap injector, and then 4, 5, 6, and 7 are hop scoops.
After each action the Arduino waits until another signal comes from sensor 2.
Relays - the 5v relay module we use is "low signal on" which means the relays activate when they DON'T see 5v. That is why in the set up section of the Arduino code, all output pins are set to 1. And when activating they are set to 0 momentarily. In the Arduino programming 1 means put out 5v, and 0 means put out 0v.
Relays do not provide power, they simply make and/or break a circuit. This is where the second phone charging block, or other power source if you got solenoids with higher voltage, come in. The relays have 3 connections each. The center is the "common," this is the place you will bring the positive wire from your power source on all relays used for solenoids. The other 2 connections will have a line drawn, either connecting to the center, or not connecting to the center. This is the "normally closed" and "normally open" terminals. The positive wire from each solenoid will be connected to the "normally open" terminal. This means that when the relay is off, the circuit is broken, when the relay turns on, the circuit completes and voltage goes to your solenoid to activate.
How it works
The smart settings on the inkbird app is how the automation is actually controlled, all of the set up is detailed on the AutoBrewer page. What I'm going to detail here is exactly how all 3 of these components interact to brew a beer.
The inkbird smart automations handles all of the timing and activation. They can be set up to activate several different timers simultaneously using the same trigger by making several "if - than" automations. All of these are detailed in the programming section of the AutoBrewer build.
The whole brewing sequence starts with a 1 hour timer (to however long you want, I had it mash for 6 hours once when I set up at 10pm and wanted it finished at 9am, literally brewing a beer in my sleep)
After the 1 hour timer is up, sensor 2 is set to 212 for 2 seconds, and then back to -40. This momentarily turns on the heating plug, which sends 5v to the Arduino, signaling it to activate pins 3 and 4 which activates the hoist and pulls the bag out. It lifts for 5 seconds, enough to get the bag above the water level but not so much that it could splash everywhere. Now sensor 1 setting temperature changes to 212, and the kettle starts to heat for the boil.
After this the inkbird app looks at the wort temperature reading from sensor 1. When the wort is reading "greater than 190" on sensor 1, the app tells sensor 2 to signal the Arduino (set the temperature to 212 for 2 seconds again) this causes the Arduino to do the next thing, in this case raise the bag the rest of the way out. By now most of the wort has drained and splashing is much less likely.
The app continues to monitor the current temperature on sensor 1, and when it reaches greater than 193 it tells sensor 2 to signal the Arduino again. The next line of code activates pin 5, which releases the fermcap injector.
The app continues to monitor the current temperature on sensor 1, and when it reaches greater than 205 (the temperature my system starts to boil, yours may vary) it tells sensor 2 to signal the Arduino, in this case it activates the "60 minute addition" which drops the first hop scoop.
At this point all other automations activate all at the same time when the current temperature on sensor 1 reaches greater than 205, these include 60 minute timer and all incremental additions you selected.
Each addition is a separate automation on the app, and each has it's own delay timer. If your boil is 60 minutes, and you want a 45 minute addition, that delay timer will be 15 minutes.
30 minutes addition? 30 minute delay
15 minute addition? 45 minute delay
And so on.
Once the 1 hour delay on the "60 minute timer" reaches 0, that automation tells sensor 1 to set its target temperature to 68, this ends the boil, turns off the heating coil in the kettle and turns on the glycol pump.
All that's left is for you to transfer to your fermenter.