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.
I had similar problems with disconnects and found it to be due to my power supply overheating the voltage regulator. Some MEGA's (especially the knock-off types) have had issues with the voltage regulator overheating due to overpowering it thru the barrel jack. The voltage regulator takes the eg.. in your case 9VDC and brings it down to 5VDC to power the chips on the board. The 2 MEGA's I had did have this problem, I tried 12VDC, 9VDC. and even 5.2VDC thru the barrel jack. I also tried the 5.2VDC power supply and used the micro usb port instead which bypasses the regulator to power it. Even with using the 5.2VDC thru the USB port for extended periods I found the odd dropout of communications with the board. At this point I can't say if I had damaged the regulator by using the barrel jack bui it was a bit better as far as overheating goes. Eventually I went with RobotDyn MEGA's and used the same 5.2VDC power supply and have never had connection problems. Those boards have the ethernet built in so no piggy backing of boards required. I tried to secure another one of these type boards last year but not sure if it's a chip supply issue or if they are actually not manufacturing them anymore? Hope this solves your problem.
Ok, thanks for the info. I just bought this board from BrunDog so need to make it work for the money spent. I guess I will try powering it from different sources and voltage and see if it helps any. Interested to see how others are powering the Mega?
 
I got this from @RiverCityBrewer

[setup]
new value MLTFlow
MLTFlow precision = 6
"MLT Flow Total" value = 0.0 //Global Element
[scan]
if "MLT FlowMeter" value >= 0.04
MLTFlow = "MLT FlowMeter" value / 60
"MLT Flow Total" value = "MLT Flow Total" value + MLTFlow
endif
sleep 1000
goto scan
[end]
stop "MLT Flow Totalizer"

I have not tested it.

What are you using the volume for? A little plug for @BrunDog, I ended up buying his volume sensors and they are amazing. You can use them by writing a script to fill your vessels to a specific volume and they are pretty accurate.
I use @BrunDog's press sensors at my pumps output, with the eventual goal to write a script to prevent cavitation (no press = pump off). Probably overkill - these sensors are not cheap.

I plan to have the SM6004 measuring my infusion volume into the mash tun.
 
Ok, thanks for the info. I just bought this board from BrunDog so need to make it work for the money spent. I guess I will try powering it from different sources and voltage and see if it helps any. Interested to see how others are powering the Mega?
I use a MeanWell 24VDC that feeds into VS pin on the Unishield. Power Supply Function Switch is set VR - 5V. I followed the Unishield User Manual to the letter in order to not screw something up. It's been up and running for a couple months now, no issues with power so far.
 
I use a MeanWell 24VDC that feeds into VS pin on the Unishield. Power Supply Function Switch is set VR - 5V. I followed the Unishield User Manual to the letter in order to not screw something up. It's been up and running for a couple months now, no issues with power so far.
This is interesting, I thought 20v was highest it could convert down. Maybe different Mega's have different ranges. I will have to go look at the paperwork. Thanks for the feedback and specifics
 
This is interesting, I thought 20v was highest it could convert down. Maybe different Mega's have different ranges. I will have to go look at the paperwork. Thanks for the feedback and specifics
Is it the Unishield you are having the problem with? My references mentioned above was in relation to a standalone MEGA with piggyback ethernet shield. Sorry if this may have confused the issue for you. I would contact Peter through his website [email protected] to work with you on this problem. He's legit with the equipment he sells and backs it up when things aren't working properly.
 
Its the ethernet shield I assume. I have tried to power it with 24v this morning with no help. I am going to try a local install on a machine and not VM to try and isolate its not the VM. If that doesn't connect then will assume a faulty ethernet shield or mega. Out of options as i have tried all power sources with no connections. Thanks to all for the help
 
What are you using as a power supply and what is the input voltage to the MEGA?
When working with Electronics, it always a good idea to be power off and not have any Static Electricity on your body. Either can fry an Arduino by accident. I even shut off power is removing and putting in an Ethernet Jack.
 
Have narrowed this down, it disconnects and never reconnects after adding elements. I have tried on barrel connector with 9v and also hard wired 24vdc from control board. Always happends when adding some type of element. If I reinstall the software, upload a saved config file, and add a new interface it connects. As soon as I add any new elements, it disconnects and never reconnects no matter what I cycle power wise. Any thoughts?
 
Have narrowed this down, it disconnects and never reconnects after adding elements. I have tried on barrel connector with 9v and also hard wired 24vdc from control board. Always happends when adding some type of element. If I reinstall the software, upload a saved config file, and add a new interface it connects. As soon as I add any new elements, it disconnects and never reconnects no matter what I cycle power wise. Any thoughts?
Have narrowed it down to Alarm Element and something wrong with wiring. All else working now. Thanks for all the help.
 
I’m considering purchasing a UniFlex controller for a three vessel HERMS all electric system. I’m very new to the automated brewing idea, but it’s something that I want to learn more about and I like the expandability that the UniFlex offers, which would allow me to get started in the “shallow end,” before heading to the deeper waters.

Because I’m VERY new to this (and a lot less technically savvy that I thought I was before I started looking into this…), I have a dumb question. Does the BruControl software come with pre-set interface(s)? Or do you have to create all the elements, alarms, etc. to then be able to control them?

I like the idea of plug-and-play to help get me started, but I didn’t see any standard interfaces / workspaces, and I’m concerned about screwing up the settings when I’m setting up the elements for the first time.

Thanks!
 
I’m considering purchasing a UniFlex controller for a three vessel HERMS all electric system. I’m very new to the automated brewing idea, but it’s something that I want to learn more about and I like the expandability that the UniFlex offers, which would allow me to get started in the “shallow end,” before heading to the deeper waters.

Because I’m VERY new to this (and a lot less technically savvy that I thought I was before I started looking into this…), I have a dumb question. Does the BruControl software come with pre-set interface(s)? Or do you have to create all the elements, alarms, etc. to then be able to control them?

I like the idea of plug-and-play to help get me started, but I didn’t see any standard interfaces / workspaces, and I’m concerned about screwing up the settings when I’m setting up the elements for the first time.

Thanks!
Yes, you have to set all elements up in a workspace. There are not preset workspaces or pre-configured interfaces. You will also need some knowledge of electronics and wiring up relays and power supplies. It's not a plug and play solution. I think the software is great and the support has been good. I am having problems more with converting an old BCS system that is automated over to this platform. This would not be the case with a new from the ground up install. If your a self starter, the instructions are very detailed and there are videos on how to wire up panels. Its doable if you are willing to spend the time to learn, but plug and play it is not.

My 2 cents worth from somebody new to BruControl but not to automation or brewing
 
I’m considering purchasing a UniFlex controller for a three vessel HERMS all electric system. I’m very new to the automated brewing idea, but it’s something that I want to learn more about and I like the expandability that the UniFlex offers, which would allow me to get started in the “shallow end,” before heading to the deeper waters.

Because I’m VERY new to this (and a lot less technically savvy that I thought I was before I started looking into this…), I have a dumb question. Does the BruControl software come with pre-set interface(s)? Or do you have to create all the elements, alarms, etc. to then be able to control them?

I like the idea of plug-and-play to help get me started, but I didn’t see any standard interfaces / workspaces, and I’m concerned about screwing up the settings when I’m setting up the elements for the first time.

Thanks!

Yes, we have pre-made configurations you can use for the UniFlex. Check here: https://brucontrol.com/wp-content/uploads/2021/03/BruControlUniFlexConfigurations.zip

You can use these as your starter, then modify as you see fit. You can also build from scratch if so inclined.
 
Great, thanks for the reply. One more question. I'm about to purchase the 50 amp UniFlex. I don't currently see any reason why I need the integrated I/O (presently), but I may end up wanting to expand later. When it says "upgradeable controller," does that mean I can add that feature later? And would I just send it back for you all to install the integrated I/O? Same question about the proportional control SSR.
 
Great, thanks for the reply. One more question. I'm about to purchase the 50 amp UniFlex. I don't currently see any reason why I need the integrated I/O (presently), but I may end up wanting to expand later. When it says "upgradeable controller," does that mean I can add that feature later? And would I just send it back for you all to install the integrated I/O? Same question about the proportional control SSR.
I would get the upgrade to integrated I/O. There will be something a Temperature Probe or a Pump you want to add (very soon) or in the future, Unless you are doing distillation, the Proportional Control SSR is overkill.

The Din Rail will make it easier to wall mount.

Unfortunately with BruControl you can easily additional Hardware (not necessarily in the UniFlex box), and it is almost endless. You may not want to have that many bells and whistles, but it does start to grow on you to get a new toy! Boy, controlling a Pump would be fun!
 
Great, thanks for the reply. One more question. I'm about to purchase the 50 amp UniFlex. I don't currently see any reason why I need the integrated I/O (presently), but I may end up wanting to expand later. When it says "upgradeable controller," does that mean I can add that feature later? And would I just send it back for you all to install the integrated I/O? Same question about the proportional control SSR.

Yes, you can upgrade it later. Unless your budget is super-stretched, I'd recommend you add it from the beginning per @oakbarn's comment.
 
Question on pré-boil gravity; is there a way to obtain this info and integrate into Brucontrol? I’d like to know when my mash gravity value is stable so I can automate transfer to kettle..
 
Question on pré-boil gravity; is there a way to obtain this info and integrate into Brucontrol? I’d like to know when my mash gravity value is stable so I can automate transfer to kettle..

Sure, I think so. Can you give more detail? Your pre-boil gravity is determined from the brewing software, correct? You can enter this data into a Global Variable, then use that value in a script. That make sense?
 
Sure, I think so. Can you give more detail? Your pre-boil gravity is determined from the brewing software, correct? You can enter this data into a Global Variable, then use that value in a script. That make sense?
My apologies, I was not specific enough; I would like to actually measure the wort gravity during mashing. When the gravity is stable - mash completed- the transfer to kettle would occur. Something like an Ispindel/ electronic refractometer that would withstand mash temps and not blow my budget…wait: that’s already done!!!
 
The only "electronic refractometer" I know of for measuring SG in real time are some really expensive mass flow meters. Been looking for these at consumer grade pricing, but not much luck! Perhaps some other experienced folks here can comment on their solutions.
 
I use a mass flow meter, though I suppose you could use a floating hydrometer type as long as it was somehow separated from grain and liquid flow disturbance.
 
For the example of boil time:

Use a change node to parse the messages.

Set - msg.BoilTime
(J: Expression) ($substringBefore(msg.payload.RECIPES.RECIPE.BOIL_TIME, ".")

Then create a function node and use the below code to format it in the proper syntax for BC.

Code:
if(msg.BoilTime < 60){BoilTime = "00:"+msg.BoilTime}
if(msg.BoilTime >= 60){
    msg.remainder = msg.BoilTime - 60
    BoilTime = "01:"+msg.remainder
}

If you have boil times longer than 2 hours you will need to add additional logic and if statements.

Finally, bring it into BC with a Global element set as time.

Hope that helps.

Joe
Hi Joe,
My node-red import of brewsmith3 recipe.xml, based on your excelent scripting, died with my windows machine a few years back. Recently,I had the time to go back to it and recover my flows from the backup and was delighted that it still worked as before.

However, wanting to try all the new node-red brewing options (such as node-red-contrib-brewfather) I was forced to upgrade to Node-RED version: v3.0.2 and Node.js version: v18.15.0. As soon as I did this the import failed to work with the debug of the function giving me:
function : (error)
"ReferenceError: BoilTime is not defined (line 527, col 37)"
This was not only for BoilTime, but any time I used a version of the function code you have included above to define a time--such as in StepMash0Time.
Apparently how node-red deals with time values has changed (or the formatting in the brewsmith3 xml) and for the life of me I can not figure out what is wrong. I wonder if you have noticed this, and have figured out a solution or have any suggestions where I might look. Thanks.
 
Hi Joe,
My node-red import of brewsmith3 recipe.xml, based on your excelent scripting, died with my windows machine a few years back. Recently,I had the time to go back to it and recover my flows from the backup and was delighted that it still worked as before.

However, wanting to try all the new node-red brewing options (such as node-red-contrib-brewfather) I was forced to upgrade to Node-RED version: v3.0.2 and Node.js version: v18.15.0. As soon as I did this the import failed to work with the debug of the function giving me:
function : (error)
"ReferenceError: BoilTime is not defined (line 527, col 37)"
This was not only for BoilTime, but any time I used a version of the function code you have included above to define a time--such as in StepMash0Time.
Apparently how node-red deals with time values has changed (or the formatting in the brewsmith3 xml) and for the life of me I can not figure out what is wrong. I wonder if you have noticed this, and have figured out a solution or have any suggestions where I might look. Thanks.
I have not updated my node-red config in quite a while... I've been putting it off for this reason primarily. I'm going to do the upgrade today and I'll get back with you with the fix, I'm guessing its syntax.

Joe
 
So I think this was a poor coding practice on my part - taking advantage of the compiler that has now gotten more strict. I think all you need to do is declare the variable in the "BC Global Send" node by adding 'var' in front of each variable to be defined. Should be easy to find as the IDE puts a red line under all the syntax errors. Give that a try and let me know if that solves the issue.
1678557498786.png
 
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
new value strike
new value grainweight
new value wtg
new value grainloss
new value evaprate
new value batchsize
new value boiltime
new value runoff
new value totalwater
new value remainsparge
new value evap

batchsize = "Batch Size gal" value
evaprate = "Boil Off Rate g/hr" value
grainweight = "Grain Weight lbs" value
wtg = "WTG Ratio qts/lb" value
boiltime = "Boil Time min" value

strike = grainweight * wtg
strike /= 4
strike precision = 2

grainloss = grainweight * .5
grainloss /= 4
grainloss precision = 2

evap = evaprate * boiltime
evap /= 60
evap precision = 2

runoff = batchsize / .96
runoff += evap
runoff precision = 2

totalwater = runoff + grainloss
totalwater precision = 2

remainsparge = totalwater - strike
remainsparge precision = 2
print
sleep 1000
goto "Loop"

Thanks in advance
 
Last edited:
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
new value strike
new value grainweight
new value wtg
new value grainloss
new value evaprate
new value batchsize
new value boiltime
new value runoff
new value totalwater
new value remainsparge
new value evap

batchsize = "Batch Size gal" value
evaprate = "Boil Off Rate g/hr" value
grainweight = "Grain Weight lbs" value
wtg = "WTG Ratio qts/lb" value
boiltime = "Boil Time min" value

strike = grainweight * wtg
strike /= 4
strike precision = 2

grainloss = grainweight * .5
grainloss /= 4
grainloss precision = 2

evap = evaprate * boiltime
evap /= 60
evap precision = 2

runoff = batchsize / .96
runoff += evap
runoff precision = 2

totalwater = runoff + grainloss
totalwater precision = 2

remainsparge = totalwater - strike
remainsparge precision = 2
print
sleep 1000
goto "Loop"

Thanks in advance
Not sure what you are trying to do here. If you are trying to manipulate the recipe inputs for you brew day calculations, there are a couple of issues. First, you don't want to loop. This should be a top section of your script like [setup] that is only run once. Alternatively, I have found that it is best to use the global variable in the brewday script calculations real time in case something changes during the brew and you want to make a change on the fly. I brewed this weekend and my sparge was not close to being done when my boil volume was almost met, so I was able to increase the boil volume by changing a global variable. If this was only used in the setup, the script would never check it again. Let us know if I misinterpreted what you are doing here and provide more details.
 
Not sure what you are trying to do here. If you are trying to manipulate the recipe inputs for you brew day calculations, there are a couple of issues. First, you don't want to loop. This should be a top section of your script like [setup] that is only run once. Alternatively, I have found that it is best to use the global variable in the brewday script calculations real time in case something changes during the brew and you want to make a change on the fly. I brewed this weekend and my sparge was not close to being done when my boil volume was almost met, so I was able to increase the boil volume by changing a global variable. If this was only used in the setup, the script would never check it again. Let us know if I misinterpreted what you are doing here and provide more details.
Thanks for taking a look. This would be set up but also running all day during the brew day for that reason also. I could adjust things on the fly like you mentioned. Most interested in if there is a different or better way to do same thing. Just learning script as this is my first one. My intention is to take recipe inputs and enter on this page, then have the output be in the brewday script like water level. I haven't started hop additons and timers yet, but they will also be here. Again, thanks for taking a look
 
So I think this was a poor coding practice on my part - taking advantage of the compiler that has now gotten more strict. I think all you need to do is declare the variable in the "BC Global Send" node by adding 'var' in front of each variable to be defined. Should be easy to find as the IDE puts a red line under all the syntax errors. Give that a try and let me know if that solves the issue.
View attachment 814810
Well thanks for that--that cleared up throwing an error when it ran.

My problem now is getting it out of node-red and into Brucontrol.

I slimmed down everything to the "Beer Name" for testing and can email you or anyone else the flow as it won't let me attach that kind of file here.

What I can tell you is that at every debug step I get the correct information until the last step.
For example, "Beer Parameters" (the next to the last stesp before I export to Brucontrol gives me the recipe Name:
----------------------
{
"_declaration": {
"_attributes": {
"version": "1.0",
"encoding": "ISO-8859-1"
}
},
"RECIPES": {
"RECIPE": {
"NAME": {
"_text": "Muddy Pig Oatmeal Stout"
},
"VERSION": {
"_text": "1"
},
"TYPE": {
"_text": "Extract"
},
"BREWER": {
"_text": "Brian Smith"
},
"ASST_BREWER": {},
"BATCH_SIZE": {
"_text": "18.9298909"
},
"BOIL_SIZE": {
"_text": "14.8285447"
},
"BOIL_TIME": {
"_text": "45.0000000"
},
"EFFICIENCY": {
"_text": "75.0000000"
},
"HOPS": {
"HOP": [
{
"NAME": {
"_text": "Cluster"
...
________________


But "BC Global Send" gives me:

--------------------
msg.payload : array[1]
array[1]
0: object
Name: "Beer Name"
Value: undefined
----------------------

Since the "Value" is undefined, this makes me think that the msg. payload statement also needs to be updated:
----------------------
msg.remainder = 0
var Name = msg.Name
msg.payload = [

{ "Name": "Beer Name", "Value": Name },

]

return msg;
---------------------------
As the value is clearly stated in the previous debug as: "Muddy Pig Oatmeal Stout"

I'll start researching it, but if you or anyone else sees the error, I would greatly appreciate your insight.

Many thanks in advance.
 
We should take this to PM to keep from cluttering the board, but it looks like you are still in XML format, and ideally you should be converted to JSON for easier data manipulation and transfer to BC. I'll PM you.

Joe
 
If anyone is experimenting with the new SQL database and want an easy way to get a list of element names and their corresponding ID without having to search through the default.brucfg file I have put together a PowerShell script that generates a text file with the Element Name, ID, and Element Type. Example shown below. I am not sure how to attach a file so I have included the PowerShell code below as well. Just need to copy it into Notepad and save it as a .ps1 file and run it in Powershell. It will generate a text file on your desktop called ElementIDs.txt. This should make it easier till the issue that BrunDog mentioned in a previous post is taken care of. If you have any questions or need any help please let me know.

Output
BDO34_HLTELM - f4a39ba6-7f90-4246-9575-184966cb142b - (DeviceElement)
BDO36_BKELM - 1a8c9a2f-6165-4288-b083-45b2700db299 - (DeviceElement)
BK_TARGET_TEMP - 706b0100-fc96-487a-a2b2-881dcd66b1f5 - (GlobalVariableElement)

PowerShell Code
Code:
#Get BruControl Folder Path
$BCPath = [Environment]::GetFolderPath("MyDocuments")
$BCPath = $BCPath + "\BruControl\default.brucfg"
#Text File Path
$OutFilePath = [Environment]::GetFolderPath('DesktopDirectory') + "\ElementIDs.txt"

#Create Text File
New-Item $OutFilePath

#Read BRUCFG file as XML
[xml]$CFGFile = Get-Content $BCPath


$Data = $CFGFile.Configuration.Workspaces.Workspace.Elements.Element

#Read through each Element and log Name and ID to text file
foreach ($Element in $Data)
{
    $ElementData = $Element.Name + " - " + $Element.ID + " - (" + $Element.Type + ")"
    Add-Content -Path $OutFilePath -Value $ElementData
}
Thanks for sharing this handy Element Identifier, I'm not code savy but this was so simple to use. I tried it and now have a summarized Device/Chart/Global Variable Element cheat sheet which I've pinned to my desktop.
 
Last edited:
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
I use Globals for my variables.
 
Hello everyone, I was wondering if there is any news on an updated version of BC? It’s been almost two years since the last update in June 2021.
Looking forward.
@BrunDog
 
Good one! I will add exponents to the list. This is easy to do. In the meantime, you gotta do it old school. Here is a script example:

Code:
new value base
new value exp
new value result
base = 5
exp = 3
result = base
[exp_loop]
result *=  base
exp -= 1
if exp > 1
goto "exp_loop"
endif
print result
stop "script_name"
Could you add the Tinseth formula to BruControl?
 

Latest posts

Back
Top