BruControl: Brewery control & automation software

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.
@BrunDog and all
During the tests today (45O version of FW + build 15), I was able to "kill" MEGA so it wouldn't respond anymore. I don't think it's EMI this time. As this was dry run.

I have a script which I start during the strike step (or mashing) which is monitoring flow rate trough RIMS. If flow is less than 2L/s I disable the heater Duty Cycle or PID which ever is currently active, and stop brewing process with a message and waiting for user interaction "wait and press button when ready"
If the flow is ok again, I enable whatever heater was active before that.
Note: elements which I am enabling are connected to the same data output (RIMS DUTY Cycle and RIMS PID) as I have one heater. If one is enabled the other one is disabled. BC is also taking care that both can't be enabled in the same time.
The reason for using both is - I use duty cycle to heat faster until 2 deg below the target, then I switch to PID to maintain.
Unsure if that's important.

View attachment 713300

During testing, I was able to consistently to kill MEGA.
Attaching logs:
- one disconnect happened at 12:06 after:
12:06:26.657: Tx: /13!29,1,0,0,-1,0?2?100?208?209?48?49?102?103?3

-2nd disconnect happened at 12:20 after:
12:20:19.481: Tx: ?2?100?208?209?29?48?102?103?3

EDIT: -3rd disconnect at 13:18after :
13:18:39.959: Tx: !29,1,0,0,-1,0?2?100?208?209?48?49?102?103?3


Anyhow, I have no clue why how I am able to do it.
Maybe you would have idea why this happens when you look at the logs.

Thank you

Please email us a copy of the configuration file and a description of what is on each port.
 
It's not fully integrated yet. Only some thresholds are complete, so I'd ask you to sit tight a bit.
Will do. What are the expectations/limitations of the tool when complete?

What is predictive hysteresis and is it working?
 
Last edited:
Resizing Elements when using the script dialog is not fixed on 1.15.

The Size Dialogs are what I set them to, but the display is not what the size says. I open the property dialog and without changing any of the numbers, Click OK (but not Cancel) and the Elements go to the correct size. I had set them all to 420 x 360.

This is an example of the Trub Settled Alarm. I had already Opened and Clicked Ok for the 140 Degrees and Sparge Complete ones. They were all the same smaller size when I opened Workspace and not 420 x 360 as in their size boxes.

resize 2 error.png
 
Last edited:
I am suspecting that my previous problem with "killing MEGA" is with multiple wait commands in multiple scripts (not sure yet), so I tried to replace some wait commands with loops adding possibility to skip the loop with a button. But I encountered an error...
EDIT: I changed my code several times removing suspicious code, but I can't find why it's happening, but I am constantly killing my MEGA... :-(.
EDIT2: nope... it's not wait commands :-D ...

//instead of wait
"CONTINUE" State = false
[start]
if "CONTINUE" State == true
stop
endif
//if condition then
// stop
goto start

this can be avoided with another goto [endoftheloop].
Stop command worked before, right?

1610004962259.png


i know it can be solved like this, but it's ugly like that?
[loop2]
if "CONTINUE" State == true
goto endofloop2

endif
if "Mash Sensor" Value >= StrikeTemp
"RIMS PID" Target = 0 //turn off heating
goto endofloop2
endif
sleep 100
goto loop2
[endofloop2]
 
Last edited:
My issue with the sizing seems to be Alarm Elements and Global Elements. I just noticed that the background of one of the Global Elements was not "set" until I click OK on the Property Dialog. It does seem related to the Script Pane being open but can effect other Workspaces.
 
Resizing Elements when using the script dialog is not fixed on 1.15.

The Size Dialogs are what I set them to, but the display is not what the size says. I open the property dialog and without changing any of the numbers, Click OK (but not Cancel) and the Elements go to the correct size. I had set them all to 420 x 360.

This is an example of the Trub Settled Alarm. I had already Opened and Clicked Ok for the 140 Degrees and Sparge Complete ones. They were all the same smaller size when I opened Workspace and not 420 x 360 as in their size boxes.

View attachment 713362
Sorry I am not following you here.
 
I am suspecting that my previous problem with "killing MEGA" is with multiple wait commands in multiple scripts (not sure yet), so I tried to replace some wait commands with loops adding possibility to skip the loop with a button. But I encountered an error...
EDIT: I changed my code several times removing suspicious code, but I can't find why it's happening, but I am constantly killing my MEGA... :-(.
EDIT2: nope... it's not wait commands :-D ...



this can be avoided with another goto [endoftheloop].
Stop command worked before, right?

View attachment 713438

i know it can be solved like this, but it's ugly like that?

Don't debug power issues while running scripts. It is much better to incur the steps manually to see what triggers the fault.
 
Thanks to @crane @CDCTx @BrunDog.
If you don't want to risk it, I'd say best is to order it from BC site, however, that one didn't fit my needs as I'm not using tri clamp system, and shipping , customs would be too much for my tight balcony brewer budget.
If anyone is interested I found a pressure transducer sensor good enough for me. Important was to search for "flat membrane pressure" and "sanitary".
US $61.6 20% OFF| 20 200degree high temperature membrane type pressure transmitter high temperature flat membrane pressure transmitter 4 20ma| | - AliExpress
Then you request 0-5v output and customization you like.
My requirements were:
  • Joint Site / installation interface: 1/2" NPT G1/2
  • Output: 0-5V
  • power supply 12v
  • Measuring range 0-5kPa10kPa
  • Temperature measurement 70 - max 80 C, withstanding >105C min. (this one : 200C)
now it needs to arrive before brewing season starts :)

FYI: An update on the topic. This company from Ali informed me, that they can deliver only G1/2" and minimum 10kPa (higher values possible) with flat sanitary membrane, including 0-5V output.
So far I can only find 5kPa/6kPa transducer with a small hole. Flat membrane transducers with high sensitivity and 1/2" port seem to be technologically challenging.
 
Last edited:
@BrunDog and all
During the tests today (45O version of FW + build 15), I was able to "kill" MEGA so it wouldn't respond anymore. I don't think it's EMI this time. As this was dry run.

I have a script which I start during the strike step (or mashing) which is monitoring flow rate trough RIMS. If flow is less than 2L/s I disable the heater Duty Cycle or PID which ever is currently active, and stop brewing process with a message and waiting for user interaction "wait and press button when ready"
If the flow is ok again, I enable whatever heater was active before that.
Note: elements which I am enabling are connected to the same data output (RIMS DUTY Cycle and RIMS PID) as I have one heater. If one is enabled the other one is disabled. BC is also taking care that both can't be enabled in the same time.
The reason for using both is - I use duty cycle to heat faster until 2 deg below the target, then I switch to PID to maintain.
Unsure if that's important.

View attachment 713300

During testing, I was able to consistently to kill MEGA.
Attaching logs:
- one disconnect happened at 12:06 after:
12:06:26.657: Tx: /13!29,1,0,0,-1,0?2?100?208?209?48?49?102?103?3

-2nd disconnect happened at 12:20 after:
12:20:19.481: Tx: ?2?100?208?209?29?48?102?103?3

EDIT: -3rd disconnect at 13:18after :
13:18:39.959: Tx: !29,1,0,0,-1,0?2?100?208?209?48?49?102?103?3


Anyhow, I have no clue why how I am able to do it.
Maybe you would have idea why this happens when you look at the logs.

Thank you

update on this topic, it's power drain issue :
It looks like I have a problem with somewhat older relay board drawing too much current from MEGA when activating the relays.
It was hard to discover as even if I start all 8 relays, and all devices in the same time - MEGA would be OK.
But turning just a single relay from that board on-off like 20+ times with other connected devices (Sensors, valves etc) at some point would kill it.

If someone missed it in documentation (or forgot it like me :) ), it is imperative to find relay boards for which relay activation current is ideally under 15mA or just (again don't risk it ) and buy unishield from BC site.

Thanks again @BrunDog for helping me out.
 
Sizing Issue in 1.0.15
1. Open BruControl normally
s1.png
2. Open the AlarmWS Workspace. This is one that regularly has an issue but it is on other workspaces as well..
s2.png
3. Click the All Seeing Eye as the Elements visibility = hidden. I make them visible as necessary with Script.
s3.png
4. You can see that many of the Alarm Elements and Global String Type Elements are sorta small. They are not correct size.
s4.png
5. Click the Circle I of the Alarm Element "Sparge Complete" to bring up its properties dialog.
s5.png
6. Click the Appearance Tab.
s4.png
7. Note the Size. It says 420 x 360 which is the correct size of the "Sparge Complete" Alarm as well as the others ("Trub Settled", Drop Bitter Hops", Flavor Hops", " 140 Degree" Alarms.) I set these sizes in the size boxes.
s8.png
8. Click OK Button. This closes the Dialog.

s8.png
9. the "Sparge Complete" Alarm now sizes correctly.
s9.png
10. I can open the Properties Dialog of any of these Alarms and just Click OK (or Apply and close), and the Element goes to its set size.
s10.png
 

Attachments

  • s6.png
    s6.png
    426.2 KB · Views: 24
11. You can see that the "140 Degree" Alarm size is now correct.
s11.png


You can see some of the Global Strings ("Drop Irish Moss" is squished and not the correct size. The "Boil Timer" Element in the Bottom Right is not effected. There are several small alarms on the Left side that do not seem effected but they are the default size as when created. These "alm_Hidden..." are always hidden and I use them just to play wav files.

Generally, it seems to effect Alarm Elements and Global String Type Elements. It does not always happen, but often enough. I think it is related to the Script Dialog. I do have the Script Window large and the Coding Window with larger Text (Via CTRL and Mouse Scroll).

This is the AlarmWS with correct size Elements:
s12.png
 
Last edited:
update on this topic, it's power drain issue :
It looks like I have a problem with somewhat older relay board drawing too much current from MEGA when activating the relays.
It was hard to discover as even if I start all 8 relays, and all devices in the same time - MEGA would be OK.
But turning just a single relay from that board on-off like 20+ times with other connected devices (Sensors, valves etc) at some point would kill it.

If someone missed it in documentation (or forgot it like me :) ), it is imperative to find relay boards for which relay activation current is ideally under 15mA or just (again don't risk it ) and buy unishield from BC site.

Thanks again @BrunDog for helping me out.
Are you using "active low" relay boards with flyback diodes built in (or added)? I have 32 relays and initially I was afraid of the same issue you are describing. Using active low boards with discreet power sourcing, I can cycle all 32 simultaneously with no ill effects. From your post, I'm gathering that you are sourcing power from the MEGA? If so, I would agree with you that your relays are the issue.
 
Are you using "active low" relay boards with flyback diodes built in (or added)? I have 32 relays and initially I was afraid of the same issue you are describing. Using active low boards with discreet power sourcing, I can cycle all 32 simultaneously with no ill effects. From your post, I'm gathering that you are sourcing power from the MEGA? If so, I would agree with you that your relays are the issue.

Yes problematic board was active low type. I just measured and the Relay board is using 4mA to activate relays.
The problem went away when:
1) I disconnected board fully or
2) (strange one) I removed digital output from my "alarm device" and the board is still connected (digital output which actually is on the same relay board).
I ordered new 8 relay active board with active positive inputs, will test more. Not sure if I make sense anymore 🙃

EDIT: No I wasn't power sourcing from MEGA, relay board is connected directly to 5V power supply and fly back diodes were built in.
 
Last edited:
If you isolated a single relay and your problem went away, it might be that single relay causing the problem. Either way, replacing the board is a good call, though I believe you will get a lower total mA draw using active low vs active high boards.
 
If you isolated a single relay and your problem went away, it might be that single relay causing the problem. Either way, replacing the board is a good call, though I believe you will get a lower total mA draw using active low vs active high boards.
I tested other outputs with the same result.

If I use low active board + ULN2803a (which makes it active positive with 1.5 mA current) ssue is away. I am changing board anyway.
Thanks a lot for help.
 
Hi all,

I know cross-posting isn't best forum policy, but not sure you would see this otherwise... happy to report that @UncleD has created a really cool product, called Flite, which is available in both DIY and turnkey formats, which measures in-keg remaining beer volume, pressure, and temperature. He has enabled it to work with Data Exchange, so this data can be reported, logged, and displayed in BruControl.

Check out the forum here: Flite - Keg Level, Temperature, and Pressure Sensor
Check out his site here: HOME | Flite
 
Sizing Issue in 1.0.15
1. Open BruControl normally
View attachment 713548
2. Open the AlarmWS Workspace. This is one that regularly has an issue but it is on other workspaces as well..
View attachment 713549
3. Click the All Seeing Eye as the Elements visibility = hidden. I make them visible as necessary with Script.
View attachment 713550
4. You can see that many of the Alarm Elements and Global String Type Elements are sorta small. They are not correct size.
View attachment 713551
5. Click the Circle I of the Alarm Element "Sparge Complete" to bring up its properties dialog.
View attachment 713552
6. Click the Appearance Tab.
View attachment 713551
7. Note the Size. It says 420 x 360 which is the correct size of the "Sparge Complete" Alarm as well as the others ("Trub Settled", Drop Bitter Hops", Flavor Hops", " 140 Degree" Alarms.) I set these sizes in the size boxes.
View attachment 713554
8. Click OK Button. This closes the Dialog.

View attachment 713555
9. the "Sparge Complete" Alarm now sizes correctly.
View attachment 713556
10. I can open the Properties Dialog of any of these Alarms and just Click OK (or Apply and close), and the Element goes to its set size.
View attachment 713558

I'm sorry, but I still am not understanding what you are telling me. I can't seem to reproduce any sizing issues between what is reported in an elements properties and the actual size. Can you just describe what is happening without your specific graphics/items?
 
Hi all,

I know cross-posting isn't best forum policy, but not sure you would see this otherwise... happy to report that @UncleD has created a really cool product, called Flite, which is available in both DIY and turnkey formats, which measures in-keg remaining beer volume, pressure, and temperature. He has enabled it to work with Data Exchange, so this data can be reported, logged, and displayed in BruControl.

Check out the forum here: Flite - Keg Level, Temperature, and Pressure Sensor
Check out his site here: HOME | Flite
Policy shmolicy! Awesome!!
 
Yes, you can swap the MEGA for the GC on the UniShield. They are nearly pin compatible and we can help you switch over without re-writing all your devices.

@BrunDog how do I go about switching over to the GC on my Unishield. I don't have any non-RTD board sensors coming in yet so I thought I'd do the work now.
 
Last edited:
I have been having an issue for a long time where if the Mega gets powered off while sensors and other components are still power, the sensors shows a ---. I was curious if others are having this issue and have come up with a more elegant solution than just opening each element and pressing ok.

Thanks in advance!
 
@BrunDog how do I go about switching over to the GC on my Unishield. I don't have any non-RTD board sensors coming in yet so I thought I'd do the work now.

I can’t think of a compelling reason to do it now. It’s maybe more future proof given its memory and speed but I think the switch to 3.3V hardware has its constraints too.

The UniShield product note shows you how to disassemble it and replace the microcontroller board.
 
I have been having an issue for a long time where if the Mega gets powered off while sensors and other components are still power, the sensors shows a ---. I was curious if others are having this issue and have come up with a more elegant solution than just opening each element and pressing ok.

Thanks in advance!

Can you be more specific? What sensors? When exactly does this happen? If you power down the MEGA then yes, BC will not have communication so will start to show dashes or offline. Give us more details and perhaps can figure it out if it’s not expected behavior.
 
Can you be more specific? What sensors? When exactly does this happen? If you power down the MEGA then yes, BC will not have communication so will start to show dashes or offline. Give us more details and perhaps can figure it out if it’s not expected behavior.
My mega is powered by usb from my pc. If I turn off the power to my panel, the mega still has power. When I turn the power back on to the panel, brucontrol never updates with a new status.
 
I’ve never heard this. I’m trying to figure out why that would be the case. If you disable and re-enable these elements, do the come back?
The elements are still show up, but do not update. Say for instance, my rtd elements. When I shut off the power to the panel, and power it back on, it displays —-. Once I open the element and click ok, it shows the correct temperature. I don’t have to disable or reenable, just have to open and click ok.
 
I’d have to look into why certain devices didn’t come up. Is thinking it’s probably a power thing associated with the MEGA being powered solely by the PC and maybe switching back from panel power.

In the meantime, I suggest you disable all the element prior to power down, then enable them on power up. This is very easy to do with a script.
 
I’d have to look into why certain devices didn’t come up. Is thinking it’s probably a power thing associated with the MEGA being powered solely by the PC and maybe switching back from panel power.

In the meantime, I suggest you disable all the element prior to power down, then enable them on power up. This is very easy to do with a script.
I don’t currently have the mega powered by anything other than the usb connection. Should I have it powered by my 12v power supply as well?
 
Hey everyone!

Not sure if this is the best place to post. I am interested in the Uniflex control system but I have a few questions. If I get the dual vessel upgrade, would it be possible to upgrade to 3 vessel in the future? An element in the HLT, the BK, and a RIMS? I was originally looking at the SsBrewTech 3V system but I really like the automation aspect of brucontrol. I don't often get time to brew so I like the idea of being able to brew back to back batches. I am looking at having the power run for going electric and need to know if I should have a single 50-60A 240v run or dual 30A.
 
Hi there! The UniFlex can control up to two vessels, so if you are looking for 3 vessels, I'm sorry it's not fit for you,. You can however, build your own control system/panel with as many vessels as you need/want.

Okay, I may look more into that. Thanks for the reply.
 
Hi all,

I know cross-posting isn't best forum policy, but not sure you would see this otherwise... happy to report that @UncleD has created a really cool product, called Flite, which is available in both DIY and turnkey formats, which measures in-keg remaining beer volume, pressure, and temperature. He has enabled it to work with Data Exchange, so this data can be reported, logged, and displayed in BruControl.

Check out the forum here: Flite - Keg Level, Temperature, and Pressure Sensor
Check out his site here: HOME | Flite

Kudos to @BrunDog, BruControl's Data Exchange is really easy to use. Even if you don't use it with Flite, it's really simple to use with generic ESP devices. For those that want to play around with it, here's a little sample code you can run on your ESP to write data to your BruControl server. You will need to modify ssid, password, BruCotnrol server IP, and port.

#include "ESP8266HTTPClient.h"
#include "ESP8266WiFi.h"

//WiFi Settings
const char* ssid = "YOUR SSID";
const char* password = "YOUR PASSWORD";

void setup() {
Serial.begin(115200);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}

Serial.println("Connected to the WiFi network");

delay(5000);
}

void loop() {
if (WiFi.status() == WL_CONNECTED) {

Serial.println("------------------------");
Serial.println("Testing BruControl Data Exchange");

Serial.print("Current IP: ");
Serial.println(WiFi.localIP().toString());

HTTPClient http;

//Update global variable
//Modify server IP and port to match your BruControl server
http.begin("http://10.0.0.166:8000/global/MyGlobalVar");

http.addHeader("Content-Type", "application/json");

int httpResponseCode = http.PUT("{\"Value\":\"123.456\"}");

Serial.print("Response Code: ");
Serial.println(httpResponseCode);

http.end();

} else {
Serial.println("WiFi Not Connected...");
}

delay(5000);
}
 
I posted it for others to use, modify, ridicule my coding standards, etc. So pass it along. It does require the end user to be knowledgeable with writing code for arduino, so it's not for all but can definitely open doors for adding other devices that otherwise wouldn't be supported.

BTW, the Flite project is pretty cool. Not too feasible for a guy with 15+ serving kegs, but cool nonetheless.
 
Back
Top