Electric, and BIAB, and Bluetooth, oh my!

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

jzking

Member
Joined
Jun 29, 2015
Messages
13
Reaction score
0
Location
Phoenix
Hello all, this is my first post. I'm located in Phoenix, AZ, and as the title of suggests I have an electric single vessel 2.5 gallon BIAB setup with BT capabilities. While I enjoy making and drinking beer, I derive the most pleasure from the equipment. In line with that self observation, here are some pictures of my setup.

DSC_8712 (Medium).JPG


DSC_8714 (Medium).JPG


DSC_8715 (Medium).JPG


DSC_8718 (Medium).JPG


DSC_8735 (Medium).JPG


DSC_8740 (Medium).JPG


DSC_8727 (Medium).JPG


DSC_8748 (Medium).JPG


DSC_8778 (Medium).JPG


system overview.PNG
 
Guess I should show disclose the cellar as well. (Ignore the clamp light :))

20150529_172908 (Medium).jpg
 
Why does your heatsink have a heatsink? Can't figure out what that might be all about.

Brew on :mug:
 
There is actually a Peltier thermoelectric chiller wedged in between the 2 heat sinks. One side of the TEC gets cold, the other side gets hot. The big sink and fan are for the hotside. It keeps the inside of that sealed box cool, otherwise the SSR would probably cook everything inside.
 
There is actually a Peltier thermoelectric chiller wedged in between the 2 heat sinks. One side of the TEC gets cold, the other side gets hot. The big sink and fan are for the hotside. It keeps the inside of that sealed box cool, otherwise the SSR would probably cook everything inside.

Ok, that makes some sense. But, why not just mount the SSR where the Peltier cooler is? That's how most systems are built. Is there some benefit to not mounting the SSR to an external heatsink?

Brew on :mug:
 
Ok, that makes some sense. But, why not just mount the SSR where the Peltier cooler is? That's how most systems are built. Is there some benefit to not mounting the SSR to an external heatsink?

Brew on :mug:

Was hoping to cool the power supply and Galileo as well.
 
Was hoping to cool the power supply and Galileo as well.

Have you done any temperature measurements inside the enclosure? In contact with the hot components? Be interesting to understand how well this approach works.

Brew on :mug:
 
cool, want to share your program? I use something similar, inspired by ardbir project and want to add BT connectivity too
 
Absolutely! Attaching .apk for the Android app (and .aia file in case you want to modify the app with MIT App Inventor). Code for the Arduino is below. You will need to adapt it to whatever board you are using.

Code:
/////////////////////////////////START/////////////////////////////////////////////////////
int PinTemp = 0; // LM34 temperature sensor
int PinHeater = 13; //SSR control for heating element
int PinPump = 8; //pump control
int PinValve = 10; //valve control

float timer = 0;
String decimal = ""; //string for placing decimals
int state;  //used for setting heater, pump, and valve states from app
char ascii; //used to convert ascii byte to decimal
char ack; //used for communication acknowledgment with android app
int target; //varaible for target temp
int gonogo; //general variable for no and no go situations
float signal;
float millivolts;
int temp;
int heater;
int pump;
int valve;

/////////////////////////////////SETUP/////////////////////////////////////////////////////
void setup() // put your setup code here, to run once:
{
  //Set pin modes
pinMode (PinTemp, INPUT); //set temperature sensor pin as input
pinMode (PinHeater, OUTPUT); //set heater pin as output
pinMode (PinPump, OUTPUT); //sets pump pin as output
pinMode (PinValve, OUTPUT); //sets valve pin as output

digitalWrite (PinHeater, LOW);  //heat init to off
digitalWrite (PinPump, HIGH); //pump init to off
digitalWrite (PinValve, HIGH); //vavle init to pos A
gonogo = 0; //disables heater at begining

Serial1.begin(9600);// opens serial port, sets data rate to 9600 bps
}

////////////////////////////////////LOOP///////////////////////////////////////////////////////
void loop() // put your main code here, to run repeatedly: 
{  
 
 Handshake(); //waits for clocktimer in app to send a handshake byte
  
 Variables(); //collects variables that have been written to serial from app
 
 Status();//run status subrotine to report variables back to app
 
 if (gonogo == 1)  //When gonogo is set to 1, control heating element based on target temp and actual temp
    {
      if (temp < target)  //if the temperature is less than target, then
        {
          digitalWrite (PinHeater, HIGH);  //turn the heating element on, otherwise
          heater = 1;
         }
      else
        {
          digitalWrite (PinHeater, LOW);  //turn it off
          heater = 0;
        }
    }
 else {
       digitalWrite (PinHeater, LOW);  //if nogono is 0 then disable heater
       heater = 0;
      } 
 }
///////////////////////////HANDSHAKE SUBROUTINE//////////////////////////////////////////////////////////////////////
void Handshake()
{
  ack = Serial1.read(); //reads any available byte from serial

  while (ack != 'A') //loops until handshake byte is recieved from app
  {ack = Serial1.read();}  
  
  Serial1.print('B'); //returns handshake byte to app
  ack = 'B'; //sets ack to force program to wait for next handshake byte from app

}

///////////////////////////////VARIABLES SUBROUTINE//////////////////////////////////////////////////////////////////////
void Variables() //sets & toggles variables
{
 
 while (Serial1.available() == 0) //loops until variables from app are available
  {delay(500);}
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if heater is on or off
   {
    gonogo = 1; //sets gonogo to 1 so heater will turn on using temp control algorithym
   }
  else 
  {
    gonogo = 0; //sets gonogo to 0 so heater won't turn on, regardless of temp control algorithym
  }
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if pump is on or off
   {
    digitalWrite(PinPump,LOW); //turn pump on
    pump = 1;
   }
  else {digitalWrite(PinPump, HIGH);
         pump = 0;} //turn pump off    
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if valve is pos A or B
   {
    digitalWrite(PinValve, LOW); //turn valve pos A
    valve = 1;
   }
  else {digitalWrite(PinValve, HIGH);
         valve = 0;} //turn valve pos B
  
while (Serial1.available() > 0) //collects all bytes for target temp and inserts into sring
  {
    ascii = Serial1.read();
    ascii=ascii-0;
    decimal += ascii;    
  }
target = decimal.toInt();// sets target to value that user entered in serial
decimal = ""; //clears string for future use
 }
/////////////////////////////////////STATUS SUBROUTINE//////////////////////////////////////////
void Status()  //reports the status of each variable back to app
{
  Serial1.print(gonogo); //gonogo status
  Serial1.print('C'); //delimeter
  
  Serial1.print(heater);
  Serial1.print('C'); //delimeter
      
  Serial1.print(target);  //print target temp
  Serial1.print('C');
  
  //Convert to deg F and display in serial
    signal = analogRead(PinTemp);  //read signal on AO1 and store as "signal"
    millivolts = (signal/1024.0)*5000; //signal is divided by 1024 (resolution) and multiplied by 5000mV to get voltage
    temp = millivolts/10; //converts voltage to temperature since there is 10mV per deg F
  Serial1.print(temp); //print actual temp
  Serial1.print('C');
  
  Serial1.print(pump); 
  Serial1.print('C'); //delimeter
  
  Serial1.print(valve); 
  Serial1.print('C'); //delimeter
  
   
}
 
Nice work! What uController are you using? What bluetooth are you using, looks like an hc-05 on a that breakout? What connectors are you using for the low voltage?

I've been using the hc-05/arduino in my RIMS controller but I'm about to switchover to using an esp8266/arduino.

Are you going to open source your code? Can you post a schematic of your circuits?
 
I just posted the Arduino code and .apk/.aia files but it needs to be approved for some reason. Maybe because of file size? The apk is like 2.5 mb
 
Nice work! What uController are you using? What bluetooth are you using, looks like an hc-05 on a that breakout? What connectors are you using for the low voltage?

I've been using the hc-05/arduino in my RIMS controller but I'm about to switchover to using an esp8266/arduino.

Are you going to open source your code? Can you post a schematic of your circuits?

The controller is an Intel Galileo with a ITEAD Studios BT shield http://imall.itead.cc/itead-bt-shield-master-slave.html which is indeed hc-05.
 
Maybe it's the URL tag causing the approval flat to trip?
Nice work! What uController are you using? What bluetooth are you using, looks like an hc-05 on a that breakout? What connectors are you using for the low voltage?

I've been using the hc-05/arduino in my RIMS controller but I'm about to switchover to using an esp8266/arduino.

Are you going to open source your code? Can you post a schematic of your circuits?

The controller is an Intel Galileo with a ITEAD Studios BT shield http://imall.itead.cc/itead-bt-shield-master-slave.html which is indeed hc-05.
 
Let's try this:

Code for the Arduino is below. You will need to adapt it to whatever board you are using. I will work on Github repo.

Code:
/////////////////////////////////START/////////////////////////////////////////////////////
int PinTemp = 0; // LM34 temperature sensor
int PinHeater = 13; //SSR control for heating element
int PinPump = 8; //pump control
int PinValve = 10; //valve control

float timer = 0;
String decimal = ""; //string for placing decimals
int state;  //used for setting heater, pump, and valve states from app
char ascii; //used to convert ascii byte to decimal
char ack; //used for communication acknowledgment with android app
int target; //varaible for target temp
int gonogo; //general variable for no and no go situations
float signal;
float millivolts;
int temp;
int heater;
int pump;
int valve;

/////////////////////////////////SETUP/////////////////////////////////////////////////////
void setup() // put your setup code here, to run once:
{
  //Set pin modes
pinMode (PinTemp, INPUT); //set temperature sensor pin as input
pinMode (PinHeater, OUTPUT); //set heater pin as output
pinMode (PinPump, OUTPUT); //sets pump pin as output
pinMode (PinValve, OUTPUT); //sets valve pin as output

digitalWrite (PinHeater, LOW);  //heat init to off
digitalWrite (PinPump, HIGH); //pump init to off
digitalWrite (PinValve, HIGH); //vavle init to pos A
gonogo = 0; //disables heater at begining

Serial1.begin(9600);// opens serial port, sets data rate to 9600 bps
}

////////////////////////////////////LOOP///////////////////////////////////////////////////////
void loop() // put your main code here, to run repeatedly: 
{  
 
 Handshake(); //waits for clocktimer in app to send a handshake byte
  
 Variables(); //collects variables that have been written to serial from app
 
 Status();//run status subrotine to report variables back to app
 
 if (gonogo == 1)  //When gonogo is set to 1, control heating element based on target temp and actual temp
    {
      if (temp < target)  //if the temperature is less than target, then
        {
          digitalWrite (PinHeater, HIGH);  //turn the heating element on, otherwise
          heater = 1;
         }
      else
        {
          digitalWrite (PinHeater, LOW);  //turn it off
          heater = 0;
        }
    }
 else {
       digitalWrite (PinHeater, LOW);  //if nogono is 0 then disable heater
       heater = 0;
      } 
 }
///////////////////////////HANDSHAKE SUBROUTINE//////////////////////////////////////////////////////////////////////
void Handshake()
{
  ack = Serial1.read(); //reads any available byte from serial

  while (ack != 'A') //loops until handshake byte is recieved from app
  {ack = Serial1.read();}  
  
  Serial1.print('B'); //returns handshake byte to app
  ack = 'B'; //sets ack to force program to wait for next handshake byte from app

}

///////////////////////////////VARIABLES SUBROUTINE//////////////////////////////////////////////////////////////////////
void Variables() //sets & toggles variables
{
 
 while (Serial1.available() == 0) //loops until variables from app are available
  {delay(500);}
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if heater is on or off
   {
    gonogo = 1; //sets gonogo to 1 so heater will turn on using temp control algorithym
   }
  else 
  {
    gonogo = 0; //sets gonogo to 0 so heater won't turn on, regardless of temp control algorithym
  }
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if pump is on or off
   {
    digitalWrite(PinPump,LOW); //turn pump on
    pump = 1;
   }
  else {digitalWrite(PinPump, HIGH);
         pump = 0;} //turn pump off    
  
  state =  Serial1.read(); //stores heater, pump, and valve states from app 
  if (state == 1) //checks if valve is pos A or B
   {
    digitalWrite(PinValve, LOW); //turn valve pos A
    valve = 1;
   }
  else {digitalWrite(PinValve, HIGH);
         valve = 0;} //turn valve pos B
  
while (Serial1.available() > 0) //collects all bytes for target temp and inserts into sring
  {
    ascii = Serial1.read();
    ascii=ascii-0;
    decimal += ascii;    
  }
target = decimal.toInt();// sets target to value that user entered in serial
decimal = ""; //clears string for future use
 }
/////////////////////////////////////STATUS SUBROUTINE//////////////////////////////////////////
void Status()  //reports the status of each variable back to app
{
  Serial1.print(gonogo); //gonogo status
  Serial1.print('C'); //delimeter
  
  Serial1.print(heater);
  Serial1.print('C'); //delimeter
      
  Serial1.print(target);  //print target temp
  Serial1.print('C');
  
  //Convert to deg F and display in serial
    signal = analogRead(PinTemp);  //read signal on AO1 and store as "signal"
    millivolts = (signal/1024.0)*5000; //signal is divided by 1024 (resolution) and multiplied by 5000mV to get voltage
    temp = millivolts/10; //converts voltage to temperature since there is 10mV per deg F
  Serial1.print(temp); //print actual temp
  Serial1.print('C');
  
  Serial1.print(pump); 
  Serial1.print('C'); //delimeter
  
  Serial1.print(valve); 
  Serial1.print('C'); //delimeter
  
   
}
 
Also, I don't have any schematics per se, other than in the words of Simple Jack, "my head schematics". I can whip up a block diagram if there is interest.
 
Have you done any temperature measurements inside the enclosure? In contact with the hot components? Be interesting to understand how well this approach works.

Brew on :mug:

I have not other than qualitatively. Before installation, the area above the SSR would get hot to the touch. Now, it is actually cool so I can only assume the other components are affected.
 
I have not other than qualitatively. Before installation, the area above the SSR would get hot to the touch. Now, it is actually cool so I can only assume the other components are affected.

Sounds like it's working ok then. Hadn't seen this approach before.

Brew on :mug:
 
Back
Top