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 would be happy if someone made a script/tutorial/.reg that slimmed down win10 specifically for brucontrol so that running it on a 10 year old 2ghz/4GB machine was fast...
I'm working on a very similar issue for work as Rockwell software (Studio 5000) and Windows 10 have not been playing well in our environment. Also doesn't help that every other update cycle something new breaks. I've been told over and over that Win10 scales great on old hardware... I've never witnessed it though. That said, 10 year old hardware might be pushing it. Any way you can put more ram in it?
 
I'm working on a very similar issue for work as Rockwell software (Studio 5000) and Windows 10 have not been playing well in our environment. Also doesn't help that every other update cycle something new breaks. I've been told over and over that Win10 scales great on old hardware... I've never witnessed it though. That said, 10 year old hardware might be pushing it. Any way you can put more ram in it?

nope.. max is 4GB per HP specs, which is the same as the rPi4 maximum... it is just an old work laptop, running windows 7 now..
upload_2019-10-9_10-44-32.png
 
Ouch, that is going to be an issue if only 3 of the 4gig is usable. W10 is somewhat passable usage wise on a modern cpu with 4gig, I suspect you might have serious issues with 2 cores and effectively 3gig of ram (guessing a gig is being shared/stolen by the GPU). There was a Windows 10 "Lean" version that was being worked on a year or so ago... not sure where it went, but it might be worth looking into if you want to keep using the laptop.
 
Ive got the hardware side of things pretty much squared away...In an effort to learn, I'm starting with manipulating this script and getting it to interact with GUI as I would like.

I'd like to nail down the following...
1. To show variable day counter using global, cant seem to get this to show. Ive tried adding "daycounter" to string value in global properties.
2. Add a switch to run the script rather than rely on enabling via script run command. Can't get the code below to work in red. Also, why are there sometimes (2) "=" signs and others just a single "=" sign?
3. Have background change when fermenter is actively running. Ill probably put this in its own script later on. See code in blue.
4. To have Graph show Actual and Target temp over time. I currently have primary source showing RTD input temp, id like the secondary source to show target temp from a hysteresis control. The primary is working but not secondary. I believe the secondary may be showing the actual temp and not the target temp causing an overlap on display.


[START SWITCH]
wait "FV-1 START" State = false // an attempt to start script using switch
if “FV-1 START” State == true
endif



[BACKGROUND CHANGE]
if "FV-1 START" State == ON // attempt to change background when FV is active
"FV-1 CONTROL" Background = 2
else // removed the rest since if it’s not ON it can only be OFF
if "FV-1 START" State == OFF
"FV-1 CONTROL" Background = 3
else
"FV-1 CONTROL" Background = 1
endif
endif
sleep 1000
goto loop

[FERMENTATION PROFILE]

"FV-1 TEMP" Enabled = true // enables fermenter temp sensor device
"FV-1 CONTROL" Enabled = true // enables fermenter hysteresis device

new value daycounter // creates a new variable named daycounter
reset "FV-1 TIMER" // reset the timer (to its default of 0:00:00)
start "FV-1 TIMER" // start the timer running
daycounter = 0 // set the variable daycounter to zero
"FV-1 CONTROL" Target = 64 // set the starting fermentation temperature

[loop]
wait "FV-1 TIMER" Value >= 00:00:02 // wait (2sec) for a day to elapse
reset "FV-1 TIMER" // reset the timer (to default of 0:00:00)
daycounter += 1 // increase the variable daycounter by 1
if daycounter == 7 // if the 7th day, change the fermentation temp
"FV-1 CONTROL" Target = 66 // increase for diacetyl rest
endif
if daycounter == 8 // if the 8th day, change the fermentation temp
"FV-1 CONTROL" Target = 67 // increase for diacetyl rest
endif
if daycounter == 9 // if the 9th day, change the fermentation temp
"FV-1 CONTROL" Target = 69 // increase for diacetyl rest
endif
if daycounter == 14 // if the 14th day, change the fermentation temp
"FV-1 CONTROL" Target = 33 // decrease for cold crash
endif
goto loop // go back to loop and wait again

Anyone willing to help me through this? I plan to u
I have some bistable relays that I set upon reaching a stage, say Day 7. If I have a power interruption for some reason, then it would set
the daycounter to 7, then set another for Day 8, then Day 9 and then Day 14. I have this implemented on a BCS but will move it to BruControl eventually. You could also save the daycounter into a Global. that way you could use a logic tree instead of a bistable relay as long as you do not reset the Global when a script starts.
 
I just discovered that a scroll mouse will increase the text just within the Scripting Window Pane when you hit CTRL and scroll. It affects the one pane only and not the whole screen.
bigscript.png
Sweet!
 
I beta tested on an old win95 era (15 years old now) computer 1 gig memory running XP. BruControl ran fine. Later, I also used a 2 gig ram Android tablet running iBochs emulator with XP. BC ran fine (after a 45 minute boot into BC however). Then I went experimenting win Win10 on the RPI after XP became a security risk. I have posted my results earlier in this thread. Admittedly latency is an issue. My goal is no PC to lug.
Ouch, that is going to be an issue if only 3 of the 4gig is usable. W10 is somewhat passable usage wise on a modern cpu with 4gig, I suspect you might have serious issues with 2 cores and effectively 3gig of ram (guessing a gig is being shared/stolen by the GPU). There was a Windows 10 "Lean" version that was being worked on a year or so ago... not sure where it went, but it might be worth looking into if you want to keep using the laptop.
 
I beta tested on an old win95 era (15 years old now) computer 1 gig memory running XP. BruControl ran fine. Later, I also used a 2 gig ram Android tablet running iBochs emulator with XP. BC ran fine (after a 45 minute boot into BC however). Then I went experimenting win Win10 on the RPI after XP became a security risk. I have posted my results earlier in this thread. Admittedly latency is an issue. My goal is no PC to lug.

I'm not doubting that Win10 would work on older hardware, but there is quite a line between working, stable, and usable.
 
I beta tested on an old win95 era (15 years old now) computer 1 gig memory running XP. BruControl ran fine. Later, I also used a 2 gig ram Android tablet running iBochs emulator with XP. BC ran fine (after a 45 minute boot into BC however). Then I went experimenting win Win10 on the RPI after XP became a security risk. I have posted my results earlier in this thread. Admittedly latency is an issue. My goal is no PC to lug.

But why? Build a $2500 setup, install $200 software on a $5 pc?

Drop $150 and get a compute stick. $500 and get a NUC.
 
But why? Build a $2500 setup, install $200 software on a $5 pc?

Drop $150 and get a compute stick. $500 and get a NUC.

That $500 NUC is obsolete for windows in a matter of a few years because of bloat and lazy programming that takes a meg of memory to add 2 numbers.... besides, spending $500 on 8GB and a quad core just to run a program that runs just fine on XP is insane...
 
someday you might have a 4-wire RTD you want to use...
Good point. Ill hide the 4th wire behind the back plate.
I have some bistable relays that I set upon reaching a stage, say Day 7. If I have a power interruption for some reason, then it would set
the daycounter to 7, then set another for Day 8, then Day 9 and then Day 14. I have this implemented on a BCS but will move it to BruControl eventually. You could also save the daycounter into a Global. that way you could use a logic tree instead of a bistable relay as long as you do not reset the Global when a script starts.
Never heard of bistable relays, good to know. Thankyou!
 
nope.. max is 4GB per HP specs, which is the same as the rPi4 maximum... it is just an old work laptop, running windows 7 now..
View attachment 647482
It should be a bit faster if you upgrade to a 64bit system since its a duo core... The thing is you can pick up a barebones system very cheap these days.. I got a small form factor hp elite 8300 just like this one for $100 shipped that I use at the brewpub for my brucontrol pc.
https://www.ebay.com/itm/HP-Compaq-Elite-8300-USDT-PC-Core-i7-3770S-3-1GHz-8GB-320GB-Windows-10-Pro/303260635134?_trkparms=ispr=1&hash=item469bbe0ffe:m:mY-84hV0QGliqkyVaHMzlmA&enc=AQAEAAACMBPxNw+Vj6nta7CKEs3N0qWxylNmusdFGflzS6dred/CDHVRzVoIjNrQjChj/yYP9vIJKbkldZW3kJo4L7m9YeeLqcV3PRrcsawY9P6MZ+jenicSkP2FM05C/hBzPp036SGJuRO9+ppipwH+bXZQHdxO/wJg1gxGfB6m46t7flHESvyR5n4U2qV/r2CsAxzq9ZnyiEWX7eCIYbZTCOaO78GZV0DnP5oHbgVbz/oDlcaoaCeVBAg+B+EXdkEli/3A2/m6ya7a1eJlovv7TjPhqWilOciGH2POJdKFwMmDxvew3VswMm1aAjrNbCZhig17hNI6jCd8HtfOUufDWEyGV/ABMVb24kYdpFohH43l1Easgkme+fvXIsEvL2rW4jWYVUn/Swqg+SI/NqXDUfYt8L+D+Zjand6aiuMVq+J07nJo5A40AHy+5L1dSohhV1CWhGKDxZDu0MYrJQWH3Q8p5V6ViETAAQ0E+lEtTuiUDLifYy5u2Fn+Qwe3IZim1Cuq1BjiwwSf5xj8uytj6dljo9JZ4npJNmaY/ShkrnPRE37uDoHdTL32PjlAXlAcops/aKOnnjSsND5BAekXzcCUSdXQvwgnvHHjalRnIyyirb5fnNrrcdf/DhqCRtht2kZ2G9s7XrvcHbP2fKnhF5P2VvkRtW+LT2W4bjkDeTwVNJRV2QMgQpjwltgAYuxIzoE0PS0aBy8fQFRY9LwHmiETjhi1Y4AYtYXN31SnnDgHeY9N&checksum=3032606351342a2da58977f643ccaf52415c69b51014&enc=AQAEAAACMBPxNw+Vj6nta7CKEs3N0qWxylNmusdFGflzS6dred/CDHVRzVoIjNrQjChj/yYP9vIJKbkldZW3kJo4L7m9YeeLqcV3PRrcsawY9P6MZ+jenicSkP2FM05C/hBzPp036SGJuRO9+ppipwH+bXZQHdxO/wJg1gxGfB6m46t7flHESvyR5n4U2qV/r2CsAxzq9ZnyiEWX7eCIYbZTCOaO78GZV0DnP5oHbgVbz/oDlcaoaCeVBAg+B+EXdkEli/3A2/m6ya7a1eJlovv7TjPhqWilOciGH2POJdKFwMmDxvew3VswMm1aAjrNbCZhig17hNI6jCd8HtfOUufDWEyGV/ABMVb24kYdpFohH43l1Easgkme+fvXIsEvL2rW4jWYVUn/Swqg+SI/NqXDUfYt8L+D+Zjand6aiuMVq+J07nJo5A40AHy+5L1dSohhV1CWhGKDxZDu0MYrJQWH3Q8p5V6ViETAAQ0E+lEtTuiUDLifYy5u2Fn+Qwe3IZim1Cuq1BjiwwSf5xj8uytj6dljo9JZ4npJNmaY/ShkrnPRE37uDoHdTL32PjlAXlAcops/aKOnnjSsND5BAekXzcCUSdXQvwgnvHHjalRnIyyirb5fnNrrcdf/DhqCRtht2kZ2G9s7XrvcHbP2fKnhF5P2VvkRtW+LT2W4bjkDeTwVNJRV2QMgQpjwltgAYuxIzoE0PS0aBy8fQFRY9LwHmiETjhi1Y4AYtYXN31SnnDgHeY9N&checksum=3032606351342a2da58977f643ccaf52415c69b51014

I paired it with a 26" touchscreen I bought used on ebay for like $140.

If your municipality has an electronics drop off thats also a good place to look. I pick up I5 and I7 quadcore pcs and laptops there all the time that often only need simple things like a new charger or hard drive. in fact thats where I got the pc im typing on now (complete with 28" lcd).. last year I found a very nice hp envy i7 touchscreen laptop that just needed a new battery.. they still sell for around $350 used on ebay. We use that as the beersmith pc.
 
Last edited:
That $500 NUC is obsolete for windows in a matter of a few years because of bloat and lazy programming that takes a meg of memory to add 2 numbers.... besides, spending $500 on 8GB and a quad core just to run a program that runs just fine on XP is insane...

Got mine for free. I prefer using something that can keep up with me, and I usually don't have machines for a single purpose. I will likely install BeerSmith and a server of some sort on this machine.

My experience with dinosaur PCs is that they die, and the parts hard to find. And this comes from the gamer that rebuilds his machine every 3-4 years.

To each their own though.
 
Last edited:
How do I allow a switch to turn on (or off) a script?

How to change decimal place count of inspector element?

How can I have a graph show target temperature along with actual?
 
How do I allow a switch to turn on (or off) a script?
...
[Loop]
//you need a loop to keep the switch active.
if "Switch 1" state == true
//start my script named ScrReset
start "ScrReset"
"Switch 1" state = false
//You need to reset to false to get the switch ready for another time. You could also hide the switch if you were not going to use it again
endif
goto "Loop"
//I always add the stop script, although it will never hit in this case. You could leave off
stop "ScrTurnOnScrReset"


I would use a different switch to stop a script and use the visibility property to display the on or off switch,
 
Last edited:
How to change decimal place count of inspector element?

Use the vVInspectorTest as the variable in an Inspector Element

new value vVInspectorTest
[Loop]
vVInspectorTest = 1.1234567890
vVInspectorTest precision = 0
sleep 500
vVInspectorTest precision = 1
sleep 500
vVInspectorTest precision = 2
sleep 500
vVInspectorTest precision = 3
sleep 500
vVInspectorTest precision = 5
sleep 500
vVInspectorTest precision = 6
sleep 500
vVInspectorTest precision = 7
sleep 500
vVInspectorTest precision = 8
sleep 500
vVInspectorTest precision = 9
sleep 500
vVInspectorTest precision = 10
sleep 500
goto "Loop"
 
[Loop]
//you need a loop to keep the switch active.
if "Switch 1" state == true
//start my script named ScrReset
start "ScrReset"
"Switch 1" state = false
//You need to reset to false to get the switch ready for another time. You could also hide the switch if you were not going to use it again
endif
goto "Loop"
//I always add the stop script, although it will never hit in this case. You could leave off
stop "ScrTurnOnScrReset"


I would use a different switch to stop a script and use the visibility property to display the on or off switch,
I think you are confusing a switch and a button. What you said would apply if using a button, but with a switch you can use a single if else statement, and you don't need a second switch or anything else to turn the script off.
 
Well I use switches sorta like buttons in this way. You can do it with a button. You could also use an else statement if you got the logic right. Different way to skin a cat. I prefer not to use buttons and I tend to use if endif rather than an if else endif probably because of some old basic or paradox script from the 80s. Can't teach an old dog a new trick. I do sometimes use the else statement but I use a lot of nested if statements.


The way I wrote my script, the else statement would have caused my ignitor to fire every cycle if it the switch was true. The key is if you start a script with the start command and it is running, it will start again at Line 1.

I simply could not think of a way to use an else statement because of the ignitor the way I wrote the script.

The biggest factor in the way I did the script was that I have a running script that checks the state of a switch (or button), and if true, do something, like start "script". This running script checks the status of most of my switches and buttons. Depending on where I am in a script, the same button may do something else based on a different conditional if end if statement.

If it was to turn on a Light or Pump, I would use the if else endif. With scripts , I do not.

If it was a one time use to turn on a script, then you would not need the else, unless you want to manually kill the script. Then an if else endif statement would work.
 
Any command where you can open a web page in a script and then close it?



I want to play this when I start boiling
You could do this with the data exchange feature. You could use something like node red to poll a global Boolean value as a trigger to open the webpage. I do something similar with node red and a global Boolean to prompt node red to reimport my beersmith recipe.
 
[Loop]
//you need a loop to keep the switch active.
if "Switch 1" state == true
//start my script named ScrReset
start "ScrReset"
"Switch 1" state = false
//You need to reset to false to get the switch ready for another time. You could also hide the switch if you were not going to use it again
endif
goto "Loop"
//I always add the stop script, although it will never hit in this case. You could leave off
stop "ScrTurnOnScrReset"


I would use a different switch to stop a script and use the visibility property to display the on or off switch,
I was able to get the switch to turn on the script but then the script I want to run begins feverishly cycling between running and loading. I cant stop the switch script either. Id also like the script to stop when the switch is in the off position.

In my case, this is a fermentation profile for a single vessel. When full and ready to begin fermentation, Id like user to turn on the switch and itll begin the fermentation profile. The switch can be turned off manually

Use the vVInspectorTest as the variable in an Inspector Element

new value vVInspectorTest
[Loop]
vVInspectorTest = 1.1234567890
vVInspectorTest precision = 0
sleep 500
vVInspectorTest precision = 1
sleep 500
vVInspectorTest precision = 2
sleep 500
vVInspectorTest precision = 3
sleep 500
vVInspectorTest precision = 5
sleep 500
vVInspectorTest precision = 6
sleep 500
vVInspectorTest precision = 7
sleep 500
vVInspectorTest precision = 8
sleep 500
vVInspectorTest precision = 9
sleep 500
vVInspectorTest precision = 10
sleep 500
goto "Loop"
I was able to get this to work thankyou.,
I have a hysteresis element for each fermenter. Id like one source to show measured value and the other to show setpoint. I cant get the setpoint to work
 
I was able to get the switch to turn on the script but then the script I want to run begins feverishly cycling between running and loading. I cant stop the switch script either. Id also like the script to stop when the switch is in the off position.

I do almost the same thing in several places, just using a button instead of a switch (not sure why that would matter). What is in the ScrReset script? It doesn't modify "Switch 1" does it? One thing that all of mine have is a small delay after starting the desired script before shutting off the button, but that is only to give it time for the script being started to set a global status indicator.
 
I have a hysteresis element for each fermenter. Id like one source to show measured value and the other to show setpoint. I cant get the setpoint to work

Right now you cannot directly add setpoints to a graphing element. You can create a global and use a script to set the global to the same value as the hysteresis setpoint. Then you can add the global value to the graph.

I was able to get the switch to turn on the script but then the script I want to run begins feverishly cycling between running and loading. I cant stop the switch script either. Id also like the script to stop when the switch is in the off position.

In my case, this is a fermentation profile for a single vessel. When full and ready to begin fermentation, Id like user to turn on the switch and itll begin the fermentation profile. The switch can be turned off manually

As Oakbarn pointed out my original suggestion is flawed because calling the start command to launch another script will cause the script to restart if it is already running. In this case we need to add a boolean to indicate the previous state so we trigger on the switch state changing from off to on only once.

fermentation_start.PNG


In the above example you can see that I only added this "one-shot" triggering to starting the fermentation script. This script will continuously call the stop command which results in your fermentation script output window filling up with garbage stop statements.

fermentation1.PNG


So we can add another nested if statement in the else block to change both sides of the switch detection to a one-shot trigger.

fermentation_start2.PNG


Now our output window for the fermentation script will be cleaner.

fermentation2.PNG
 
Can someone sanity check a wiring question I got that I've searched all over this thread for and the Brucontrol site to no avail. For wiring the AA-1 Analog Amp board from a mega 2560 to a prop vlv, V+ connects to 24vdc, and In1 connects to any PWM pin on the mega?
 
Can someone sanity check a wiring question I got that I've searched all over this thread for and the Brucontrol site to no avail. For wiring the AA-1 Analog Amp board from a mega 2560 to a prop vlv, V+ connects to 24vdc, and In1 connects to any PWM pin on the mega?

If your PV's have an input voltage of 24VDC then yes this is correct.
 
Right now you cannot directly add setpoints to a graphing element. You can create a global and use a script to set the global to the same value as the hysteresis setpoint. Then you can add the global value to the graph.
What is the language for setting the global to the same value as the hysteresis setpoint? This is what I currently have for setpoint. FV-1 CONTROL being hysteresis device

"FV-1 CONTROL" Target = 64
 

Latest posts

Back
Top