Warthog Brewery stuff





Home brewer operating sequence
--------------------------------------------

version 1.0 (see diagram above)


Starting conditions:


(this is how the machine controls are at startup)
1. solenoid 1 is closed.
2. solenoid #2 is closed.
3. heater #1 is off.
4. heater #2 is off.
5. pump #1 is off.


Input sequence (for when the arduino is in use):


(this is the sequence of input values that the Ardino should ask for)
1. enter collect volume
2. enter strike volume
3. enter mash period (minutes)
???
4. repeat strike?
(would it be beneficial to have an option to repeat strikes more than once?)
(do repeat strikes always use the same volume as the first strike? do they always use the same amount of mash time?)


Automatic running sequence:


(this is the series of actual steps that the Arduino has to take when it is operating the brewery)
1. open solenoid #1 until flow sensor #1 measures the pre-set amount of collect.
3. close solenoid #1.
4. turn heater #1 on.
5. wait for temperature sensor #1 to turn on (on=high?).
6. open solenoid #2 until flow sensor #2 measures the pre-set amount of strike.
7. close solenoid #2.
8. turn heater #2 on.
9. count down for the amount of mash time entered.
10. turn on pump #1 for (how long? how does this pump know when to turn off? or do you want to just run it for a set amount of time?)
,,,
(10.A... Return to step #6 if the mash is to be rinsed again...? )
,,,
11. Turn heater 2 off.



Arduino input/output pins needed:


LCD display = I2C (pins A4 and A5)
2 solenoid pins (outputs)
2 flow sensor pins (inputs)
1 temperature sensor pin (input)
8 keypad pins (inputs)
heater 1 relay (output)
heater 2 relay (output)
pump #1 pin (output)
---------------------
This is 18 pins total, and an Uno only normally has 20 pins.


Note: if you want to enable serial messages for troubleshooting during programming, then you cannot use pins zero and #1.
So then at this point, you have used up all the pins that you have. It is a good idea to keep the serial pins unused, as that helps a lot with troubleshooting when coding.

You can get analog-out keypads from various places online. This is a 16-key resistive keypad that only needs one analog pin to work, instead of 8 pins. One is made by RobotDyn and is available on Aliexpress for ~$5, or on Amazon for $10. The keys on this keypad have clear keycaps so you can make your own labels for the keys. If you switched to the RobotDyn 1-pin keypad, then you free up 7 more pins....

What happens when this brewing routine is finished? Do you just remember when to check it, or would you want an audible alarm to sound?
If you don't use serial messages, then you could use one of the last two I/O pins to operate a speaker, so that the thing would beep at you when it was done. You would need to buy a 5v “active buzzer”. This is a speaker with an oscillator (tone generator) + a (small) amplifier built into it so that all your arduino has to do is set the signal line high for it to sound. Or you could put a LED light on it that blinks when done... Or both an alarm & the light...

Also the easy way to have the Arduino keep the first tank topped up with water would be to install a float switch near the top of the tank. The stainless-steel ones on aliexpress only cost $4 and are rated for 125 degrees C. That would require another input pin on the Arduino board.

If the Uno does not have enough pins for everything then there are ways to add more inputs and outputs on (using shift-in and shift-out modules) but for the cost and hassle it may just be easier to go buy a Chinese Mega clone instead. That would have way more pins than needed, plus it has much more memory besides.



Lastly I would advise that there be a separate testing menu available, to verify separately (as much as possible) that each different part is working as it should.
Like for example:
test screen 1 would allow opening solenoid #1 and reading from flowmeter #1.
test screen #2 would allow opening solenoid #2 and reading from flowmeter #2.
test screen #3 would allow manually turning the heater #1 relay on and off. (use a mechanical relay that clicks)
test screen #4 would allow manually turning the heater #2 relay on and off.
What you want is an easy way to verify that each individual part is working as it should. The version 2 sketch is only 18% storage and 29% ram, so this program should be possible on an Uno.





~~~~~ [-the end-] ~~~~~