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.
...When I was in product development at Nortel we tried to have all bugs cleared before releasing to market...

Naturally we also try to test everything and release without bugs. At the end of the line is a lot of electric power that needs to perform as expected. We can’t test every scenario and definitely don’t always get it perfect, but try to listen to those who take the time to tell us about an issue to verify remedy it as soon as practicable. We sincerely appreciate our users for their reports and feature recommendations.
 
Well, Nortel has more specific product focus than this (ISP guy here). This is a wide open canvas, with unlimited options. You can’t test for options you don’t know exist. This is also some “guys” side deal. This is not a billion dollar business.
Ok, now I understand. I didn't realize it was more of a prototype. I'll keep following and see how it goes.
 
If people used it in place of an easy boil it would never have problems either. That’s like comparing a stone tablet to a super computer.

But people use it for everything under the sun and then some.

For instance I just did this with it.






Can your ezboil do that?! [emoji3]

Holy **** Batman! No my ezboils can't do that , damn cool system. I wasn't putting the brucontrol down I was just asking a question. Didn't mean to upset anyone. But all in all my control panel does everything I need it to do and does it very well. I'm a gadget guy too but personally I don't need that much automation in my life. Good luck to you all ill keep watching.
Prost
 
Greetings. Have been lurking on the site and specifically this thread for a long time. Finally got started with BruControl this week and rebuilding a new panel. Want to say thank you to everyone who has shared information, it has been a big help so far. I have been working on some basic scripts to get my head wrapped around it and am having an issue maybe one of you all can help with.

I have two scripts running a "brewing" script and a "button" script. The button script monitors digital inputs for the press of Start, Pause, and Stop physical buttons on the panel. In the button script if it detects a button press it issues the script command to perform that action on the "brew" script. Start button starts "brewing", Pause button pauses "brewing" etc. The problem I am having is 99% of the time when I issue the start, pause, resume, stop script command either by button press or just in a script the BruControl software will freeze and I have to End Task in windows and start the software again. I thought this was pretty simple but thought I might be missing something. Copy of the "button" script is below. The brewing script right now is just running a loop with alternating sleep and print commands to watch reaction to the button presses.

[loop]
if "DI37_btnGO" Value == On
start "Brewing"
endif
if "DI36_btnPAUSE" Value == ON
pause "Brewing"
endif
if "DI35_btnSTOP" Value == On
stop "Brewing"
endif
goto loop

I appreciate any input and am looking forward to being a part of this thread and the community as a whole.
 
Greetings. Have been lurking on the site and specifically this thread for a long time. Finally got started with BruControl this week and rebuilding a new panel. Want to say thank you to everyone who has shared information, it has been a big help so far. I have been working on some basic scripts to get my head wrapped around it and am having an issue maybe one of you all can help with.

I have two scripts running a "brewing" script and a "button" script. The button script monitors digital inputs for the press of Start, Pause, and Stop physical buttons on the panel. In the button script if it detects a button press it issues the script command to perform that action on the "brew" script. Start button starts "brewing", Pause button pauses "brewing" etc. The problem I am having is 99% of the time when I issue the start, pause, resume, stop script command either by button press or just in a script the BruControl software will freeze and I have to End Task in windows and start the software again. I thought this was pretty simple but thought I might be missing something. Copy of the "button" script is below. The brewing script right now is just running a loop with alternating sleep and print commands to watch reaction to the button presses.

[loop]
if "DI37_btnGO" Value == On
start "Brewing"
endif
if "DI36_btnPAUSE" Value == ON
pause "Brewing"
endif
if "DI35_btnSTOP" Value == On
stop "Brewing"
endif
goto loop

I appreciate any input and am looking forward to being a part of this thread and the community as a whole.
Not sure if this has anything to do with it, but in general it's best practice to add a sleep statement at the end of continuously repeating loops. Otherwise you script will consume more CPU resources than it needs to. Given that your interface is only updating values in software once a second or so, it doesn't make sense to check 3 million times each second if those states have changed.
 
Not sure if this has anything to do with it, but in general it's best practice to add a sleep statement at the end of continuously repeating loops. Otherwise you script will consume more CPU resources than it needs to. Given that your interface is only updating values in software once a second or so, it doesn't make sense to check 3 million times each second if those states have changed.

Crane thank you for the reply. That makes perfect sense. I will give it a try and see what happens. My thought process was that wanted immediate response to the button press but a second or so is really nothing in the grand scheme of things.
 
Greetings. Have been lurking on the site and specifically this thread for a long time. Finally got started with BruControl this week and rebuilding a new panel. Want to say thank you to everyone who has shared information, it has been a big help so far. I have been working on some basic scripts to get my head wrapped around it and am having an issue maybe one of you all can help with.

I have two scripts running a "brewing" script and a "button" script. The button script monitors digital inputs for the press of Start, Pause, and Stop physical buttons on the panel. In the button script if it detects a button press it issues the script command to perform that action on the "brew" script. Start button starts "brewing", Pause button pauses "brewing" etc. The problem I am having is 99% of the time when I issue the start, pause, resume, stop script command either by button press or just in a script the BruControl software will freeze and I have to End Task in windows and start the software again. I thought this was pretty simple but thought I might be missing something. Copy of the "button" script is below. The brewing script right now is just running a loop with alternating sleep and print commands to watch reaction to the button presses.

[loop]
if "DI37_btnGO" Value == On
start "Brewing"
endif
if "DI36_btnPAUSE" Value == ON
pause "Brewing"
endif
if "DI35_btnSTOP" Value == On
stop "Brewing"
endif
goto loop

I appreciate any input and am looking forward to being a part of this thread and the community as a whole.


Try this:

I did not test but just off the top of my head.



"DI37_btnGO" visibility = visible
"DI36_btnPAUSE" visibility = visible
//New Resume Button "DI39_btnResume"
"DI39_btnResume" visibility = hidden
[loop]
sleep 50
if "DI37_btnGO" Value == On
start "Brewing"
// Brewing has started so no need to start again.
"DI37_btnGO" Value = False
//hide the button so you do not make true again.
"DI37_btnGO" visibility = hidden
endif
if "DI36_btnPAUSE" Value == ON
pause "Brewing"
"DI36_btnPAUSE" Value = false
"DI39_btnResume" visibility = visible
"DI36_btnPAUSE" visibility = hidden
endif
// add a Resume Button
if "DI39_btnResume" Value == ON
resume "Brewing"
DI36_btnPAUSE" Value = false
"DI39_btnResume" visibility = hidden
"DI36_btnPAUSE" visibility = visible
endif
if "DI35_btnSTOP" Value == On
stop "Brewing"
endif
goto loop
 
Try this:

I did not test but just off the top of my head.



"DI37_btnGO" visibility = visible
"DI36_btnPAUSE" visibility = visible
//New Resume Button "DI39_btnResume"
"DI39_btnResume" visibility = hidden
[loop]
sleep 50
if "DI37_btnGO" Value == On
start "Brewing"
// Brewing has started so no need to start again.
"DI37_btnGO" Value = False
//hide the button so you do not make true again.
"DI37_btnGO" visibility = hidden
endif
if "DI36_btnPAUSE" Value == ON
pause "Brewing"
"DI36_btnPAUSE" Value = false
"DI39_btnResume" visibility = visible
"DI36_btnPAUSE" visibility = hidden
endif
// add a Resume Button
if "DI39_btnResume" Value == ON
resume "Brewing"
DI36_btnPAUSE" Value = false
"DI39_btnResume" visibility = hidden
"DI36_btnPAUSE" visibility = visible
endif
if "DI35_btnSTOP" Value == On
stop "Brewing"
endif
goto loop

Thank you Oakbarn. Your script answers another question I had regarding resuming and being able to know the status/change the buttons. I will give this a try and post the results.
 
Please email us your configuration file and we will test to see where the problem is occurring.

BrunDog. Thank you for the offer but I think the recommendations from Crane and Oakbarn got me taken care of. It seems so obvious now but it appears that not having a sleep command in my original script was causing the problem and overloading the cpu maybe. I added a 1 second sleep statement before the loop repeats and so far not having any more problems.

I really appreciate the quick and helpful replies from everyone. I have always seen the helpfulness of people of this forum and it holds true for new members as well as the ones that have been here from the beginning.
 
Ok. I agree the sleep is a best practice but the system should not crash without it.

I was going to suggest a toggle too - which would not allow the script to re-run a script if it was already running. Glad you have it sorted - feel free to ask for help again if needed.
 
Hi all,

@smort is correct here (as always). There is an issue for PIDs referencing analog inputs (not 1-wire or RTD). We will fix this and issue a new FW no later than Friday this week. Thank you for letting us know smort!

We have this fixed - firmware v45H is posted. This correctstwo items:
1. Corrects PID/hysteresis/deadband when using analog inputs as the source. This was an issue we created when we enabled high resolution analog inputs for microcontrollers which support it. Right now, all except the Grand Central are set to 10 bit (1024 steps). The Grand Central is 12 bit (4096 steps). In the future, we will enable the Feather and ESP32 to higher resolution (enabling it blindly will funk up your configuration).

2. Reversed switch in PID now works correctly.

Thanks @smort for pointing out the issue!
 
I am wiring my control box. I have two TF3 and two SPI boards. I will have two Mega 2560s with screw shields. I also have a Analog Amplifier Model AA-1.

What widgets use the Analog Amplifier Model AA-1? I do not see a schematic for it and am not sure of its use. It is obviously for Analog Devices other than Thermoresistors??? I want to plan my board and have room for this. I do not anticipate using all of the available Temp Probes so I will have spare for future.

I want to plan for the future:

A quick list of Analog Widgets would be nice.

Is this any 40-20ma device?

I have a load cell that I think would use this Analog Amplifier Model AA-1.
 
What's a widget?

The AA-1 converts the PWM output signal into a true, amplified analog signal. You would use this to drive proportional devices like valves and SSRs. If you don't have any of these, you don't need one.
 
I apologize if this has already been asked and answered, I was unable to find it in searching this thread.

Do graphs introduce significant overhead in the system? I had a bunch of graphs that I had added, and the interface got really slow. I am not running on much horsepower, just a cheap lenovo mini pc (been fine so far). I restarted it and it was still pretty sluggish, then I deleted most of the "extra" graphs I had going (which honestly didn't need to be there) and things seem to be working fine now.

Is my observation about the graphs and interface reactiveness just coincidence or is there something there? In this case, it was 8 graphs of various things.
 
Yes. It really bogs down with all the data points. If you space them out more it will help. But the new database version really helps with that.
 
If you are running on a machine with limited hp, then yes, those could start to eat into the overhead. What is the CPU utilization during their use? It could be CPU, graphics, or disk subsystem - all are worth looking at.
 
Thanks for the feedback. I don't know about the other parameters but I know the processors were running <10% generally and would pop up to 75% now and then.
 
A little something cooking for the turnkey folks...
UniFlex v1-1-11 v7.png
 
What's a widget?

.

A widget:(google definition) a small gadget or mechanical device, especially one whose name is unknown or unspecified.

I was looking for the things that could use the amplifier. I have one (AA-1) and plan to install it in my panel. I am going to try the Load Cell if I can figure that out. I am planning on at least on proportional valve to control the flow of the cooling water to my Plate Chiller. I now control that with a manual valve. I think the AA-1 will handle 4 items, so that leaves two widgets that will become Analog Elements that I could add. Just looking for input of what others use.

I just assumed I would need one (AA-1) in the future. Since it is more difficult to add to an existing panel, it is much easier to put in now while I am building my panel.

Also, there is no schematic for the AA-1 Amplifier Board on the BruControl Website.
 
Another simple question: Port/Pin 13 also turns on the LED. Are there any types of elements that would not be wise to use with Port 13? I have Port 13 as a spare RTD probe in my plan.
 
A widget:(google definition) a small gadget or mechanical device, especially one whose name is unknown or unspecified.

I was looking for the things that could use the amplifier. I have one (AA-1) and plan to install it in my panel. I am going to try the Load Cell if I can figure that out. I am planning on at least on proportional valve to control the flow of the cooling water to my Plate Chiller. I now control that with a manual valve. I think the AA-1 will handle 4 items, so that leaves two widgets that will become Analog Elements that I could add. Just looking for input of what others use.

I just assumed I would need one (AA-1) in the future. Since it is more difficult to add to an existing panel, it is much easier to put in now while I am building my panel.

Also, there is no schematic for the AA-1 Amplifier Board on the BruControl Website.

A load cell is an INPUT to the interface - it will not jive with the AA-1, which "amplifies" the PWM/Analog OUTPUT from the interface.

Sorry about the missing schematic. Please reference the wiring instructions in the Product Note.
 
My error on Port 13. I will check all my other Element Port/Pin assignments. I am redoing some of them to move wiring together as I did not that that into consideration. Much neater with wiring if I had planned better.
 
My error on Port 13. I will check all my other Element Port/Pin assignments. I am redoing some of them to move wiring together as I did not that that into consideration. Much neater with wiring if I had planned better.
I failed in my pre planning for the wires. I have 20/8 awg running to my SSRs and DINs. Since there is not extra wire (changing from a BCS), I need to group my Digital Outs (On/Off, PWM) and Digital Inputs so I can wire the Mega. I am going to have to recreate my plan and rebuild the Elements with different Ports. Since I have written my scripts I need to be careful.
 
For beginners: I just discovered another important thing: Not all screw shields are equal. I have a CHZ-LABS D1100 Ver 1.0 and a

ARCELI Prototype Screw/Terminal Block Shield from Amazon. The Pins are laid out different.


 
Once again I am totally confused:

On the Mega Intereface Wiring Map notes at the bottom:

Duty Cycle and Hysteresis devices use a Digital Output (D).
PID and Deadband devices on pins with both Digital (D) and PWM Output (P) will use PWM Output.

For binary switches (e.g. SSR), select pin without PWM Output (P).


1.
On my BCS, I have my Out "Radiator-E" Heating Element set as PID controlled. My BCS Out was connected to a 40 AMP AC SSR.

If I want to run my "Radiator-E" Heating Element under PID Control, Do I:

Need to replace the SSR with a more sophisticated device. I have been searching the web all morning looking for PID, Arduino and SSRs without getting an answer. It seems that a lot of people are using cheap SSRs with the Arduino in PID applications. I have a Douglas Randal R40D Proportional Control Relay. (480 vac 40 Amp Load) that seems like what I should be using.

2. I run my "Bic Mac-E" Heating Element with Hysteresis that is also connected to an cheap SSR (24vac that controls a Mechanical Contactor). I should choose a None P port use a lot of SSRs for that Output? This sorta make sense from the notes but just checking before I submit my homework.

3. I run a lot of SSRs to on/off Pumps and other things. It would appear that from the
For binary switches (e.g. SSR), select pin without PWM Output (P) statement you should not use it with an SSR for on/off. I am confused because the Ports/Ports Pins are labeled D as well as P. (Pin/Port 46 {D, P, R}as example on a Mega) . Should I NOT use that Port 46 to control a Pump On/Off with an SSR?

I am reassigning a lot of my Pins/Ports because of the conversion and length of wires. Hoping to run a Water Test this next week.
 
The way it works... wonky as it may seem... is that if a port is PWM output capable, then a PID will generate a PWM output on that port. If it is not, then it will generate a duty cycle output on that port. We will eventually add a switch to give the user the ability to de-select proportional control, but its not built in yet.

So for example, on the MEGA, port 43 is D,R and 44 is D,P,R capable, respectively. A PID on 43 (no PWM capability) will create Duty Cycle, and on 44 (PWM capable) will create a PWM output. If you are using a standard SSR (on/off only, aka binary), it will need to be on port 44. If you are using a proportional SSR, it will need to be on port 43. That said, for 43, you can't wire it directly from the pin to the SSR if the SSR expects an analog input. You would either need a R-C circuit (low-pass filter) to convert the PWM output to an analog signal, or use the analog amplifier board to handle it. The analog amplifier board not only converts the PWM signal to analog, but amplifies it, so that the current drain on the interface's micro is not exceeded.
 
The way it works... wonky as it may seem... is that if a port is PWM output capable, then a PID will generate a PWM output on that port. If it is not, then it will generate a duty cycle output on that port. We will eventually add a switch to give the user the ability to de-select proportional control, but its not built in yet.

So for example, on the MEGA, port 43 is D,R and 44 is D,P,R capable, respectively. A PID on 43 (no PWM capability) will create Duty Cycle, and on 44 (PWM capable) will create a PWM output. If you are using a standard SSR (on/off only, aka binary), it will need to be on port 44. If you are using a proportional SSR, it will need to be on port 43. That said, for 43, you can't wire it directly from the pin to the SSR if the SSR expects an analog input. You would either need a R-C circuit (low-pass filter) to convert the PWM output to an analog signal, or use the analog amplifier board to handle it. The analog amplifier board not only converts the PWM signal to analog, but amplifies it, so that the current drain on the interface's micro is not exceeded.


Thanks. Now I have a use for the AA-1 Board! As I am coming from the BCS where the BCS PID mode used a binary SSR, I could hook it up as PID on Port 43 and it would act very similar to the BCS PID (a short timed duty cycle)? How tight of temperature control can I anticipate using that configuration? It is is fairly good, I will not mess with the SSR. My SSRs are in a separate enclosure that is quite high to keep little fingers away.

As for my confusion about the using a PWM Port like Port 44 (D, R, P), using it as a D (Digital Output) would be fine to control a Pump? My confusion comes from the For binary switches (e.g. SSR), select pin without PWM Output (P) statement.

The statement is one its own line so I took it literally.

Is this more the meaning of that statement?:

Duty Cycle and Hysteresis devices use a Digital Output (D).
PID and Deadband devices on pins with both Digital (D) and PWM Output (P) will use PWM Output. For binary switches (e.g. SSR), select pin without PWM Output (P) or the control method will be Duty Cycle even if PID is selected.

 
I'm honestly not sure what you are saying. You can't use a standard (binary) SSR with an analog input to it. It will not work. BruControl and the BCS are not different when you select a port without PWM capability - so do that.

The statement: "For binary switches (e.g. SSR), select pin without PWM Output (P)" only applies to PID and Deadband elements, not Digital Output elements. You can use a Digital Output on port 44 and it will be an ON/OFF device, which you could use to turn a pump on and off with.

The meaning is the meaning - not your interpretation above. Sorry if I'm not explaining it correctly. Bottom line: Use ports without a P in them for PID device driving SSRs UNLESS YOU ARE USING A PURPOSE-MADE SSR WHICH HAS PROPORTIONAL CONTROL INPUT TO IT. (e.g. 0 - 5V) You will know these when you see them because they are much more $$.

For example, this SSR - it is $100:

MCPC2425A.jpg
 
1. I found some used CARLO GAVAZZI RM1E60AA50 relays that are 4-20mA input . I read in the AA-1 notes that it is 0-5, 0-10, 0-12 etc.
Will these work directly from a (P) enabled Port or do I still hook up via the AA-1?

Sorry, but I am new to "real" PIDs. My understanding was from the BCS and not a true Proportional Controller.

2. Should I be looking for 0-5 or 0-10 Input Proportional SSRs instead. I see the Crydom PMP Series would work but as you stated in another thread on Homebrewtalk, the mount is not the standard hockey puck.

3. I read in the Bru Control manual where the Analog Output signal is from 0-255. Is that a 4-20mA signal or do I need some filter circuit to use with a 4-20mA Input Device?
 
Edit: I should address all your questions.

1) You will need an additional IC to convert 0-5v to 4-20ma.
2) Ideally yes, find devices whose inputs match the outputs of your controllers so you won't need intermediate converters.
3) 4-20 is current based, not voltage based like the arduino outputs (0-5v outputs on the mega), so see #1
 
Last edited:
I agree. You *could* drive current with the 0-5 or 0-10V output of the AA-1 via a resistor. It's not going to be pinpoint accurate but probably good enough, assuming the impedance of the SSR is known. I agree on #2 also - look for a legit analog voltage drive SSR if going this road.

The MCPC series (picture above) is a standard puck style. It's a quality piece, and you get what you pay for IMO.

The logical output is 0-255. This is physically translated into a PWM signal that is ON for its logical value divided by 255. For example, if the PWM output is 255... 255/255 = 1 = 100% = full on. If it is 45... 45/255 = 0.176 = 17.6% = on about one sixth of the time. If you then convert that PWM to a voltage range, it will be a percentage of the full range (the AA-1 does this for you). So using the examples above, if the AA-1's max output is 5V, then 100% of 5V is 5V and 17.6% of 5V is 0.88V. This is why you match the AA-1 max output with the device range you are trying to drive to make life easy.

Also remember that PWM is around 1kHz... so this isn't something you can use to drive anything with directly... unless it is a PWM input device, which in brewery automation is fairly rare.
 
Thanks for all the answers. I found the CARLO GAVAZZI RM1E60AA50 used on ebay for about $45. They are in the $150 range new.

I will start looking for 0-5v Input Proportional Controllers SSRs as that will be cleaner.

I finally got my Digital Outs from the BCS better matched wiring to the Mega. It was a nightmare trying to figure out who was on first!

I regularly checked my scripts and it looks like I was successful. A little pre planning would have helped if I thought about it. The BCS footprint for the screw terminals is much smaller than a Mega Screw Shield. My new Plan that I will start wiring in a very short while.
BCS Out to Bcc.png
 
Back
Top