*Ss Brewing Technologies Giveaway - Enter Now!*

Home Brew Forums > Home Brewing Beer > Electric Brewing > The braumiser, my braumeister inspired rig
Reply
 
LinkBack Thread Tools
Old 03-19-2012, 07:20 AM   #11
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

Quote:
/*
brauduino semi automated single vessel RIMS
created by s.mathison
Copyright (C) 2012 S.Mathison

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/

//libraries
#include <EEPROM.h>
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <PID_v1.h>
OneWire ds(11);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
// push buttons
const int Button_up = A3;
const int Button_dn = A2;
const int Button_prev = A1;
const int Button_nxt = A0;
// outputs
const int Heat = 9;
const int Pump = 8;
// variables
int WindowSize = 5000;
unsigned long windowStartTime;
double Setpoint, Input, Output;
boolean autoLoop = false;
boolean manuLoop = false;
boolean waterAdd = false;
boolean Conv_start = false;
boolean mpump = false;
boolean mheat = false;
boolean wtBtn = false;
float mset_temp = 35;
float Temp_c;
int temp;
byte mainMenu = 0;
byte setupMenu = 0;
byte pidMenu = 0;
byte autoMenu = 0;
byte stepTime;
byte pumpTime;
byte data[2];
byte i;
byte Busy = 0;
//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint,200,5,3, DIRECT);
void setup()
{
// Start up the library
lcd.begin(16,2);
pinMode (Button_up,INPUT);
pinMode (Button_dn,INPUT);
pinMode (Button_prev,INPUT);
pinMode (Button_nxt,INPUT);
pinMode (Heat,OUTPUT);
pinMode (Pump,OUTPUT);
windowStartTime = millis();
//tell the PID to range between 0 and the full window size
myPID.SetOutputLimits(0, WindowSize);
myPID.SetMode(AUTOMATIC);
}

void loop()
{
switch (mainMenu){
case (0):
Temperature();
lcd.setCursor(0,0);
lcd.print("The Brauduino");
lcd.setCursor(0,1);
lcd.print("Temp=");
lcd.setCursor(6,1);
lcd.print(Temp_c);
//read the buttons for menu selection

if (digitalRead(Button_dn)==0){
delay(1000);
if (digitalRead(Button_dn)==0){
lcd.setCursor(0,0);
lcd.print(" Manual ");
lcd.setCursor(0,1);
lcd.print(" ");
mainMenu=1;
while(digitalRead(Button_dn)==0){
}
}
}
if (digitalRead(Button_prev)==0){
delay(1000);
if (digitalRead(Button_prev)==0){
lcd.setCursor(0,0);
lcd.print(" Auto ");
lcd.setCursor(0,1);
lcd.print(" ");
mainMenu=2;
while(digitalRead(Button_prev)==0){
}
}
}
if (digitalRead(Button_nxt)==0){
delay(1000);
if (digitalRead(Button_nxt)==0){
lcd.setCursor(0,0);
lcd.print(" Setup ");
lcd.setCursor(0,1);
lcd.print(" ");
mainMenu=3;
while(digitalRead(Button_nxt)==0){
}
}
}
break;

case(1): //manual mode
delay(1000);
lcd.setCursor(0,0);
lcd.print(" Water added? ");
lcd.setCursor(0,1);
lcd.print(" Yes Quit");
wtBtn = true;
while (wtBtn){
if (digitalRead(Button_prev)==0){
manuLoop = true;
wtBtn = false;
while(digitalRead(Button_prev)==0){
}
}
if (digitalRead(Button_nxt)==0){
mainMenu = 0;
wtBtn = false;
while(digitalRead(Button_nxt)==0){
}
}
}
while (manuLoop){
Temperature();
Setpoint = mset_temp * 16;
Input = Temp_c * 16;
lcd.setCursor(0,0);
lcd.print(" Manual Mode ");
lcd.setCursor(0,1);
lcd.print("ST=");
lcd.print(mset_temp);
lcd.setCursor(8,1);
lcd.print("AT=");
lcd.print(Temp_c);
if (digitalRead(Button_up)==0){
delay(200);
if (digitalRead(Button_dn)==0){
digitalWrite(Heat,LOW);
digitalWrite(Pump,LOW);
mainMenu=0;
manuLoop = false;
lcd.clear();
}
else{
mset_temp= mset_temp+0.25;
}
while (digitalRead(Button_up)==0){
}
}
if (digitalRead(Button_dn)==0)
{
delay(200);
if (digitalRead(Button_up)==0){
digitalWrite(Heat,LOW);
digitalWrite(Pump,LOW);
mainMenu=0;
manuLoop = false;
lcd.clear();
}
else{
mset_temp= mset_temp-0.25;
}
while (digitalRead(Button_dn)==0){
}
}
//turns heat on or off
if (digitalRead(Button_prev)==0){
while(digitalRead(Button_prev)==0){
}
if (mheat==false){
mheat = true;
}
else{
mheat = false;
digitalWrite(Heat,LOW);
}
}

//turns the pump on or off
if (digitalRead(Button_nxt)==0){
if (mpump == false){
mpump = true;
digitalWrite(Pump,HIGH);
}
else{
mpump = false;
digitalWrite(Pump,LOW);
}
while(digitalRead(Button_nxt)==0){
}
}
if (mheat){
PID_HEAT();
}
}
break;
case(2):
if (digitalRead(Button_up)==0){
delay(100);
if (digitalRead(Button_dn)==0){
mainMenu=0;
while ( digitalRead(Button_dn)==0){
}
}
}
break;
case(3):
if (digitalRead(Button_up)==0){
delay(100);
if (digitalRead(Button_dn)==0){
mainMenu=0;
while ( digitalRead(Button_dn)==0){
}
}
}
break;
}
}
void Temperature(void)
{
ds.reset();
ds.skip();
// start conversion and return
if (!(Conv_start)){
ds.write(0x44,0);
Conv_start = true;
return;
}
// check for conversion if it isn't complete return if it is then convert to decimal
if (Conv_start){
Busy = ds.read_bit();
if (Busy == 0){
return;
}
ds.reset();
ds.skip();
ds.write(0xBE);
for ( i = 0; i < 2; i++) { // we need 2 bytes
data[i] = ds.read();
}
unsigned int raw = (data[1] << 8) + data[0];
Temp_c = (raw & 0xFFFC) * 0.0625;
Conv_start = false;
return;
}
return;
}
void PID_HEAT (void){
myPID.Compute();
/************************************************
* turn the output pin on/off based on pid output
************************************************/
unsigned long now = millis();
if(now - windowStartTime>WindowSize)
{ //time to shift the Relay Window
windowStartTime += WindowSize;
}
if(Output > now - windowStartTime) digitalWrite(Heat,HIGH);
else digitalWrite(Heat,LOW);

return;


}

well I have had some time to start writing the code for the brauduino, the controller I building for the braumiser that uses an arduino. I have got the manual mode going now I have to write the auto mode and setup parts of the code but the basic building blocks are there.

cheers steve
__________________
matho is offline
 
Reply With Quote Quick reply to this message
Old 04-07-2012, 11:58 AM   #12
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

well I have finished the code for the brauduino, an arduino based shield for a braumeister style rig.
I have added more features to it than my first controller
up to 9 steps in the mash schedule
brownout and power interruption recovery, allows you to resume where the unit was at the power interruption, it also allows you to stop the process change a setting and pick up where it left off
up to 8 hop alerts
as with the old unit full PID temperature control, built in pump rests, adjustable PID parameters, manual mode and auto mode.

Ill post schematics and code after I have tested it a bit more.
here are some pics of the prototype.





cheers steve

__________________
matho is offline
danilo Likes This 
Reply With Quote Quick reply to this message
Old 04-07-2012, 01:39 PM   #13
jkarp
Beer Herder
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
jkarp's Avatar
Recipes 
 
Join Date: Jun 2008
Location: Elizabeth, CO
Posts: 2,105
Liked 33 Times on 29 Posts
Likes Given: 4

Default

Awesome work Steve!

__________________

Many Bothans died to bring you this information.

jkarp is offline
 
Reply With Quote Quick reply to this message
Old 04-07-2012, 11:19 PM   #14
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

Quote:
Originally Posted by jkarp View Post
Awesome work Steve!
thanks for that, I have put a lot of work in developing the adruino based controller but I probably will stay using my PIC based system, the reason for going with the arduino is it is an easier platform for the vast majority to access with a good IDE and easy programming via USB. The Idea is to be able allow lots of people access to a cheap intergrated single vessel RIMS controller.
I will be making up kits for the shield but for the time being only 10 and I'm going to keep postage here in Australia. Ill be posting the schematic and the code and all relevant information so people can build one themselves.

cheers steve
__________________
matho is offline
danilo Likes This 
Reply With Quote Quick reply to this message
Old 06-07-2012, 07:12 AM   #15
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

so I have finished developing the brauduino shield to control a braumeister style brew rig.

here are some pics









the completed code can be seen here

https://github.com/mathoaus/braumise...brauduino2.ino

I have also created a build instruction on making the control box I can post it if you guys are interested

cheers steve

__________________
matho is offline
danilo Likes This 
Reply With Quote Quick reply to this message
Old 06-07-2012, 12:34 PM   #16
hrafnkell
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2010
Location: Iceland
Posts: 49
Default

Looks nice!

Might want to split the code up a bit, it's a bit overwhelming to see how everything works in such a large document

The control panel is pretty clean and probably nice to use? What do you think the cost of the box has been?

__________________
hrafnkell is offline
 
Reply With Quote Quick reply to this message
Old 06-07-2012, 12:56 PM   #17
matho
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: hazelbrook, New South Wales
Posts: 42
Liked 16 Times on 13 Posts
Likes Given: 6

Default

Quote:
Originally Posted by hrafnkell View Post
Looks nice!

Might want to split the code up a bit, it's a bit overwhelming to see how everything works in such a large document

The control panel is pretty clean and probably nice to use? What do you think the cost of the box has been?
the cost of the box to build is around $150 aud which at the moment is very close to the us dollar

cheers steve
__________________
matho is offline
 
Reply With Quote Quick reply to this message
Old 06-07-2012, 02:09 PM   #18
wyzazz
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2009
Location: Atwater, OH
Posts: 4,263
Liked 39 Times on 39 Posts
Likes Given: 48

Default

Very cool!

__________________
Quote:
Originally Posted by Revvy View Post
And I'd like to see my 1.080 beers ready from grain to glass in a week, and served to me by red-headed twin penthouse pets wearing garter belts and fishnet stockings, with Irish accents, calling me "master luv gun," but we can't always get what we want can we? :)
wyzazz is offline
 
Reply With Quote Quick reply to this message
Old 06-08-2012, 03:18 AM   #19
bobfranklin
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2012
Location: Bendigo, Vic
Posts: 2
Default

Quote:
Originally Posted by matho View Post
the cost of the box to build is around $150 aud which at the moment is very close to the us dollar

cheers steve
Hey Steve,

Nice work, I'm looking at have a bash at replicating this myself in the coming months for my small batch brews (wondering how it'll handle some bigger grain bills for Imp. Stouts etc too if you've attempted any?)

Do you have a 'parts' list of sorts for the hardware used/any recommendations on where to source it? (Kmart etc?) I can work it no worries, was just asking as it might save me some running around (why reinvent the wheel situation).

You mentioned you were getting 10 or so of the controllers made up? How did they go and are you interested in selling them? If so what sort of dollar value would you want?

Cheers mate
Dean
__________________
bobfranklin is offline
 
Reply With Quote Quick reply to this message
Old 06-08-2012, 10:31 AM   #20
mysobry
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2011
Location: Ivrea, Italy
Posts: 81
Liked 16 Times on 8 Posts

Default starting arduino based braumeister automation

Very very cool… after the completion of my single vessel braumeister clone controlled by SESTOS PID regulator I’m moving to and Arduino based controller too !



I love arduino philosophy …and I come from the town (Ivrea) where arduino team has developed the board and the system (I live not so far from Arduino Road..:-) )

A part from this I would like to evolve the system replacing the static PID temperature control with a time based programmable system (mashing steps , boiling…) and in the future also some flow and valve automation.

Off course I’m following your brauduino project as well other project (brewtroller, habs..) in order to get inspiration, ideas, suggestions..

I have just sourced an arduino board and some shield (display, temperature sensor…) and I’m playing with basic sketch.. just to getting started and understand the basic concept and I/O management
As soon as I have passed the getting started phase maybe I can contribute to this thread and project

Thank you matho for sharing your development

Davide

__________________
mysobry is offline
danilo Likes This 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Braumeister Question Soviet Electric Brewing 2 06-26-2012 04:24 PM
Speigle Braumeister? Halv2MX Electric Brewing 1 07-30-2011 09:07 PM