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.
Per above, we posted the beta firmware today. There were some additional changes, most notably the implementation of integrated Ethernet (W5100 and W5500 board compatible), so again we don't recommend using this in a production/critical environment.

Here's a quick tip to use the stored device function: In BruControl, disable all of your device elements. Then enable the ones you want and configure them as you want them at interface power-up/reset. In BruControl Settings, select the interface, then Advanced... (or Communications...) button. Enter '%5' in the Interface Communications dialog and select TRANSMIT. Test by shutting down BruControl and resetting the interface.

Note we did not include ESP32 support yet as the integrated Ethernet took a bit of time. We will add ESP32 support soon.
 
What is the proper format to script a time delay for a wait command? I am writing my auto brew script and I would like it to be so that when the brew alarm is triggered it waits for me to click continue or auto advances after 5 seconds in certain places. For example, with hop additions when the timer goes off it sets the alarm and updates the status but say it takes me 20 seconds to add the hops and I don't want to listen to the alarm the entire time. I have tried writing it as presented in the manual:

wait "Step" value <= hoptime1
Status = "ADD HOPS"
"Brew Alarm" active = true
"CONTINUE" state = false
wait "CONTINUE" state == true 5000
"Brew Alarm" active = false

However, the script stops at the time delay wait command and gives me this:

[ERROR : "5000" is not a valid second operator]

I have tried different times but still get the same error message. What am I doing wrong?
 
What is the proper format to script a time delay for a wait command? I am writing my auto brew script and I would like it to be so that when the brew alarm is triggered it waits for me to click continue or auto advances after 5 seconds in certain places. For example, with hop additions when the timer goes off it sets the alarm and updates the status but say it takes me 20 seconds to add the hops and I don't want to listen to the alarm the entire time. I have tried writing it as presented in the manual:

wait "Step" value <= hoptime1
Status = "ADD HOPS"
"Brew Alarm" active = true
"CONTINUE" state = false
wait "CONTINUE" state == true 5000
"Brew Alarm" active = false

However, the script stops at the time delay wait command and gives me this:

[ERROR : "5000" is not a valid second operator]

I have tried different times but still get the same error message. What am I doing wrong?

Well, it looks like you uncovered a discrepancy between the manual and reality. I just tested this, and you are correct that an error is issued which should not be. I will discuss with my developer partner and get it remedied! In the meantime, you should change that wait statement to a loop which would check for the switch state and if it doesn't change, move on. LMK if you need help with this.
 
I'm not sure why you would want to do this, but hey... it's your script and we're happy to oblige!

Code:
[setup]
"CONTINUE" state = false    // set the button state to false
new datetime dt            // create a variable to hold a time in the future
new datetime dn            // create a variable to hold a time now
dt = now + "00:00:05"        // set the future time variable

[loop]
dn = now            // set the time now variable
if "CONTINUE" state == true    // check to see if the button's been pressed
goto next            // if so, move on
endif               
sleep 50            // a 50 millisec time delay to keep CPU happy
if dt > dn            // check to see if time hasn't elapsed
goto loop            // start the loop over if it hasn't
endif

[next]                // next section to continue running
...
 
I run mine like this
http://www.********************/wp-content/uploads/2018/09/hops.png

[setup]

new value FirstHop
new time FirstHopTime
new value SecondHop
new time SecondHopTime
new value ThirdHop
new time ThirdHopTime
new value FourthHop
new time FourthHopTime
new value FifthHop
new time FifthHopTime
new value SixthHop
new time SixthHopTime
new value SeventhHop
new time SeventhHopTime

FirstHopTime = 00:50:00
SecondHopTime = 00:45:00
ThirdHopTime = 00:30:00
FourthHopTime = 00:20:00
FifthHopTime = 00:07:00
SixthHopTime = 00:05:00
SeventhHopTime = 00:00:01

[boil]
if "First Hop" state == true
wait "Boil Timer" value <= FirstHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Second Hop" state == true
wait "Boil Timer" value <= SecondHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Third Hop" state == true
wait "Boil Timer" value <= ThirdHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Fourth Hop" state == true
wait "Boil Timer" value <= FourthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Fifth Hop" state == true
wait "Boil Timer" value <= FifthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Sixth Hop" state == true
wait "Boil Timer" value <= SixthHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
if "Seventh Hop" state == true
wait "Boil Timer" value <= SeventhHopTime
"Hop Addition" active = true
Status = "Add Hops"
"Continue" State = false
wait "Continue" State == true
"Hop Addition" active = false
Status = "Boiling"
endif
 
Should one use a Duty Cycle or PWM/Analog Out with an SSR driving a heating element? The manual seems to suggest either is possible. My goal is to have a real smooth boil intensity (ie no surging) and as incremental intensity adjustment as possible. Thanks.
 
The frequency of PWM is 1kHz - that would be too fast to drive a binary SSR. You could however convert that to an analog signal to drive a proportional SSR if you wanted as smooth as possible, but that comes at an additional cost.

I would then suggest DC with a 1 or 2 sec cycle time - that will be fairly smooth. The element has decent thermal mass so it isn’t going to heat and cool instantly.
 
I will be testing the proportional SSR on my personal rig’s next round of updates. The SSR was $100 - so not going to whet too many appetites, but I am interested to see the performance of analog PID control. Right now I am debating whether to put it on the RIMs or Boil side.
 
Per above, we posted the beta firmware today. There were some additional changes, most notably the implementation of integrated Ethernet (W5100 and W5500 board compatible), so again we don't recommend using this in a production/critical environment.

Here's a quick tip to use the stored device function: In BruControl, disable all of your device elements. Then enable the ones you want and configure them as you want them at interface power-up/reset. In BruControl Settings, select the interface, then Advanced... (or Communications...) button. Enter '%5' in the Interface Communications dialog and select TRANSMIT. Test by shutting down BruControl and resetting the interface.

Note we did not include ESP32 support yet as the integrated Ethernet took a bit of time. We will add ESP32 support soon.

Happy to report we added ESP32 to the beta firmware. This is targeted for the ESP32 Development Board and has not been tested with other boards, though we expect them to be generally compatible. This includes Tilt support in preparation of the next release of the application (tease!).

Email us if you would like to test one - I'll send you the Interface Wiring Map and interface configuration file for it.
 
If you’ve been using the 8266 successfully there isn’t much reason to switch it. The 32 could be used for new designs. Speed, memory, I/O (especially analog inputs), Bluetooth, etc. It’s a significant upgrade for little cost difference.
 
Last edited:
I have had some issues but not quite sure it's not my script, it happens in both the 2 and 3 versions, I'll try it out just to see if it's the same issue.
problems I'm having are related to the DS18b20 using normal power mode all grouped together, it just hit me that I’m only using 3.3v to power the sensors am I right that I need 5 volts? it will only send 2 sensor data streams, the third is off and on and the fourth doesn't even show up, I'm thinking not enough power
 
3.3V is appropriate - you cannot connect power to 5V then the input to a pin which is 3.3V logic. What (and how many) resistors are you using? What wire and how long? Wired in dedicated or parasitic mode? When you say "your script", you mean your Arduino sketch... not BruControl script, correct? More info would help.
 
yes my Arduino script, I’m using 3 sensors really, I have one that has 4 and is only 3 feet long, I've tested 12 feet long and the same thing happens, this is how they are wired I really think I need some logic in the send data command, it's sending everything at once to the database wireless too, I’ll have to explain fully for you to understand my code maybe in email or private message, sorry don't want to get you sidetracked here
 

Attachments

  • probe connection.jpg
    probe connection.jpg
    40.7 KB · Views: 61
I think I know the answer to this. If the contents of my whole script got deleted, is there a way to recover it from somewhere within BC.

I guess my computer needs the back and file recovery features turned on.
 
Depends. If you had selected all and hit the delete key, then CTRL+Z will perform an undo step. Alternatively, it could be still alive in the configuration (.brucfg) file, but if it was deleted, shortly after that the file will be re-written and it’s then gone.
 
Ugg, yea. Every time I update a script/element I backup the whole folder to my NAS. I wouldn't even know where to start.
 
Messed around and added "over the air" updates for the ESP32 tonight... will allow users to upgrade firmware over WiFi and without plugging in the USB/serial port.

That said, got a bunch more testing to do to qualify it as a ready interface... thanks to @smort for running some tests and reporting I/O functions which don't seem to be working quite yet.
 
Last edited:
@BrunDog are the 3 indicator LED's in your schematic all 220v? It appears they are getting fed from both hot legs. My power led is 120v so I am going to have to run a line to the neutral bus instead.
 
@BrunDog Ok. I need advice on powering a mega because I gave fried two megas so far. This happens when I plug in my onewire sensor and wait about 5 minutes. The sensor previously worked on my cbpi/rpi setup too. I have powered the mega/shield via the vin/ground and even the dc barrel port as the documentation suggests both best practice. The power supply I used is 12v 1.8a and is from an old airport express. Also I’m using serial to interface with the PC. What an I doing wrong? How do I avoid this while testing and then in my actual panel eventually.

Sticking with the usb connection seems to be fine for testing but in my panel I have a 12v 5a power supply that I intended to hookup via vin and ground on the screw shield. So I am worried this may happen again.
 
Does the MEGA work fine when powered via 12V via Vin or the jack, plugged into USB, without the 1-wire sensor connected? Have you checked the voltage of the supply to be 12V DC (the current doesnt matter - the MEGA wont use more than a few mA). What shield is it (sorry I don’t recall if you mentioned it already).

Edit: Also, how do you have the 1-wire sensor wired? Do you have the 4.7k resistor wired between the Vcc (should be +5V from the 5V pin of the MEGA) and the signal line (Wired to pin 5 on the MEGA), and the ground line tongroubd.
 
Last edited:
Yes, without the sensor the mega works fine via vin or dc barrel. I’ve check the supply voltage to be 12v. I’m using a pre-soldered screwshield from Amazon.

For the sensor I used a onewire module from amazon that was supposed to have the resistor. I’m not sure this is true so I intend not to use it anymore and just solder the resistor myself.

I can send you links if you’d like...
 
So it sounds like the 1-wire circuit is the problem. Is it powered by 12 or 5V? If it’s powered by a 12V source, that voltage hitting the Vin or #5 pins will fry the chip - it can handle 5V direct but not 12.

Links and/or pictures would be great. Thanks.
 
I powered it off 5v on the mega. It reads 5v between the gnd and 5v before the sensor is attached. Then after 5 minutes or so the voltages start to shift all over and vary between less 1 and 11. Then the vin from the power supply goes wild too.

I’ll send pics and likes later. Thanks for your help!
 
I’m going to replace the ds18b20 in the probe too. If it’s already friend itself would that contribute to my continued issues.
 
Back
Top