brew controller

can i pass this for collective wisdom.critisism?

My project for a brewday controller for my nano brewery has grown somewhat, on top of the usual ds18b20 temp sensors im using a flow controller to measure cold water into the system and a set of usb cdcacm interface scales to measure hot volumes and deduce efficiency. i started with a Uno board But am comming close to running out of digital pins Im thinking i may add a mega board with 3.2" tft to the system and removing the lcd shield overhead from the uno. and using serial comms between the two borads to coordinate. the Uno board will capture all input (other thn user) and control all output SSRs for elemnts pumps for transfer and valves for stopping transfer, and process the main brewing algotithm sending status bytes of data to the mega for the gui to display and waiting for control bytes to reflect any user input. or could the mega cope alone without a sister uno board? i imagine the tft control s/w is quite an overhead?

thanks for any and all input.

Your project sounds interesting, do you have any pics of the current setup?
Have a link to the 3.2" screen?
If the only reason for moving to the Mega is the lack of pins then it should be capable on it’s own with 54 pins, 4X the SRAM and 8x the flash memory of the Uno.

If you're using the TFT for just displaying text it's not that much of an overhead for the mega (get used to the F() macro and progmem). I think the uno could find itself redundant.

I'd suggest that you still keep it to one side to fill in for the mega (at least for the more vital tasks) in case of failure.

I'd still be interested in seeing more detail of your project. Just out of curiosity. It sounds interesting.

It sounds like the Mega alone should be more than adequate - much easier to debug too if there's no need for two systems to communicate.

This is my introduction to arduino initially i copied a project found on Jims beerkit forum by member Jaba which includes the pid lib to achieve efficient heating which is both a simple and elegant solution. the u/i achieved with a 20 x 4 lcd and 3 buttons.

However one thing i didnt like about Jabbas project was it is in effect a nanny telling you to do things like connect hoses up for job X, in effect a brewday nag.. so im thinking along the lines of a more automated system.

Total automation would be an even bigger kill joy on a brewday, nowt to do at all.. so somewhere inbetween is a sweet spot.

a brew day involves a few simple steps

heat up enough hot water to a) a strike temp to mix in with the grains to convert the starch to sugar durring the mash, and b) rinse off the sugars or sparge them

So mark 1 of my device will automatically fil from the mains water the 98L electrically heated HLT or Hot Liquor Tank using a flow meter and backup float switch with a standard solenoid NC water valve. then heat it to the target temperatures.

Im no physist but as a brewer i have noticed a tendency of hot liquor tanks under pid control which are left a period at the target temp to 'stratify' such that at the level of the measurement probe the temperature is spot on target but above that point its warmer while below significantly cooler. Now the manual aproach is to bung a ladel in and give it a stir before use ;) the automation method will be to pump the liquor out the bottom and back in the top to recirculate and stop it standing still.

the grain will be weighed into the mashing vessel or tun sat on 600lb/300kg capacity scales manualy, but the desiered volume of strike (cooking ) hot water will be pumped in from the bottom, mechanis of which are still on the drawing board, but will possibly be 19mm id silicone hose camlock coupled to the tun drain feedin up the tun side to a wide funnel into which the hot water feed will pumped into allowing gravity to get it into the grain. the pump rate will need control (using 12v pumps which are fine throttled by a lower voltage supply)

at the end of the hot water infeed into the funnel will be a second solenoid valve to shut off the supply the instant the scales register the target mass has been hit. took a while but i found a valve that is instant on/off AND donsent need huge back pressure to operate..

then its manual mixing time.. before a 60-90 minute cook or mash period while enzymes in the grain break down the starch into fermentable sugars..

the next stage is the sparge or rinsing of the grains, for simplicitys sake Mark1 will facilitate whats called a batch sparge where hot water is added and mixed in to loosen and rinse off the sugars, once drained a second batch of sparge water is added and again mixed in before draining into the boil kettle.

at this point Mark one will have stopped functioning as an automation device and will become a reminder for adding further ingredients at the relevant time, Hops at different stages according to the recipie and kettle finnings at the end of the boil period.

the gui MUST be started with a big red brew button ;)

the set up of a brew will involve determining volumes for the mash, and the 2 spage batches, when added and the kettle deadspace has been accoounted for will provide the target fill volume.

strike and sparge temperatures will be set, and any hop/ingredient addition timings for the boil will be added

once all set up the big red brew button will appear again ;)

on pressing brew the hlt heat up under pid control will start.... once upto temp the system will hang until the continue is given to start the tun fill, manual dial twisting of the pump speed control to ensure the tun feed funnel dosent overflow.. stir close and cook .. a real time temp reading should be dispayed of both the hlt and when mashing the mash tun also, and when heating upto the boil, that temperature too.

Progress so far..... ive got jabba's project as a framework, and ive played with the pid lib and all the h/w needed except the tft. im just rounding off a comms suite to connect to query and disect the output of the scales using the usbhost2 sheild..

So far with the tft all ive done is load an example sketch and change a few button sizes positions and function.. its a sainsmart ebay bundle of mega board shield and screen which when i first got had 0 support i could find, i picked it up again a week or so ago and found the libs and examples within minutes..

and the refit of my shed with wipe down walls and ceiling and rubber waterproof floor is almost complete so the winter project will be this...

afaik the only time gotchas invole not querying the DS18b20 temp probes too frequently..

the tft shield has an sd interface and reader so logging data will be no problem either..

future development can stretch into the boil and hop additions and even further into post boil chilling via a cfc and moving into sterile fermentation vessels. However i will first look at including herms/rims control which are both methods of maintaining and incvreasing the mash or cook temperature with an active heating system and recirculation of the liquor through it.

here is some of the brew h/w in the shed under construction

and the troller with 2 backup pids when running jabbas code base

a valve that is instant on/off AND donsent need huge back pressure to operate.

The ones used in washing machines work great. No back pressure required and they're instant. You need a relay to operate them though as they run off mains power.

Many years ago I worked in the labs of a major brewery. (microbiological dept) Interesting stuff. From what I saw there though, I'd rather have the produce of a microbrewery.

Cheers Ken, however i would rather keep to dc voltage devices, and have read about the w/machine solenoids burning out with extended open periods. (no cant trace a link) the other consideration is foodsafe, so while im developing with nylon body valves (cheap) im saving up for nice stainless steel body valves for production.

Nice equipment, and the shed dedicated to brewing is tops. Oh the joys of brewing beer. :D