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.
Could I use this relay board to drive 10 12V ball valves? I use a typical arduino omega. The relay boards documentation says that the each input need 15 to 20ma. I am concerned because I thought 15 to 20ma was the maximum for a mega. Thanks.


SainSmart 16-Channel Relay Module Amazon.com

Motorized Ball Valve- 1/2" Stainless Steel Electrical Ball Valve with Full Port, 9-24V AC/DC and 3 Wire Setup by U.S. Solid https://www.amazon.com/dp/B06XD3W8Q...abc_RPJ6BKKAV6AAPH4T0NYJ?_encoding=UTF8&psc=1
 
Last edited:
Could I use this relay board to drive 10 12V ball valves? I use a typical arduino omega. The relay boards documentation says that the each input need 15 to 20ma. I am concerned because I thought 15 to 20ma was the maximum for a mega. Thanks.

Relay board

Ball valves
Hi, If you are using Mega 2560 rev3, max output per single I/O is 20mA (there is some documentation claiming it is 40mA), so you should be fine.
Some of the relay boards I am using with optoisolators don't draw more than 5mA per I/O. Sometime eventhough 15/20mA is marked, boards are more efficient. You'd need to measure it.

I couldn't check your links, they seem to be broken?
 
Is there a method currently in place to use scripts to talk to a device connected to a RS-485 converter connected to a Mega or ESP32? Not exactly brewery related, but I have a device I want to control that is RS-485, and was thinking BruControl scripts would be great way to control it...
 
fwiw, last I looked the ATmega2560 IO cells are rated for 40mA MAX output per cell and the Total IO cell power has a MAX IO current of 200mA.
The latter metric has historically been the limiter, and 10 actuators at 20mA will be right on that metric...

Cheers!
 
I edited my post and hopefully the links work.

Hi, If you are using Mega 2560 rev3, max output per single I/O is 20mA (there is some documentation claiming it is 40mA), so you should be fine.
Some of the relay boards I am using with optoisolators don't draw more than 5mA per I/O. Sometime eventhough 15/20mA is marked, boards are more efficient. You'd need to measure it.

I couldn't check your links, they seem to be broken?
 
Hi, If you are using Mega 2560 rev3, max output per single I/O is 20mA (there is some documentation claiming it is 40mA), so you should be fine.
Some of the relay boards I am using with optoisolators don't draw more than 5mA per I/O. Sometime eventhough 15/20mA is marked, boards are more efficient. You'd need to measure it.

I couldn't check your links, they seem to be broken?

Kinda true... but there are bank limits. For example, you can't have 45 outputs all on simultaneously, sourcing or sinking 20 mA each would equate to almost 1 amp.

Edit: I overlooked @day_trippr 's response above... he's on point!
 
Is there a method currently in place to use scripts to talk to a device connected to a RS-485 converter connected to a Mega or ESP32? Not exactly brewery related, but I have a device I want to control that is RS-485, and was thinking BruControl scripts would be great way to control it...

Right now, not directly. But we are working on adding some universal communications via the interfaces. I would suggest @crane's "Unsupported Devices" script in Arduino using JSON to communicate to BC. Or I suppose you could use Node Red to translate from BC to the RS-485 device. Perhaps if you share more details we can figure it out as a community?
 
Perhaps if you share more details we can figure it out as a community?
OK, completely non-brewing!

So about 8 years ago I bought a $1600 pool pump (Intelliflo 011018, pre2013 model) new on ebay for $800 which saved me like $45/mo in electricity because it has a VFD and spins super slow after it primes, it displays RPM and watts drawn, it draws 100-130 watts instead of 750-900watts, but the water still flows and turns over the pool enough...) the clock battery died a few years back so every power outage it loses time... now the display is sunburned and barely readable and pentair says it is $700 for a whole new drive or $1600 for a new pump (that they now price-protect and I cannot get for $800 on ebay any longer... they have several controllers such as intellitouch that talk to the pump via the RS-485 port and the control panel is not needed... but they are $500

Now, many VFD's have RS-485, so I was thinking this might be cool... I have been watching the tinkering online for a few years and found this document they have the codes somewhat hacked, it is almost like sending AT modem commands... Pentair Automation Bus (RS-485) Protocol
 
Ya I think the first option above is best, but will take some development. Problem is it will be trial and error. You'll need an RS-485 module and an ESP32 or other networked interface like an ESP32.

that is what I wanted, Connect a module to an ESP32 and then as a start, be able to just have a script running that maybe displays what is sent over the wire as a string to an inspector... then add in sending discrete commands, and then after that works, some listening logic and such...
 
If you go down the route of using my arduino sketch, I would start by creating a serial passthrough sketch where you can use the main serial connection through the USB port to send and receive commands/responses to the ESP and setup an RS-485 that takes those commands and sends them over the RS-485 port. This will allow you to test out the RS-485 communication with as few other variables. Once you get that working you can move over to my sketch to replace the USB serial UART with the JSON http get/put commands from BruControl.
 
If you go down the route of using my arduino sketch

Unfortunately, I see a lot of hours doing that and lugging pc outside to where pool pump is is probably not going to happen. I have some A-B PowerFlex drives that also use 485, but all of a sudden this rabbit hole gets deeper... I think it will go onto the back-burner until maybe universal communications comes out... but hey, then I can do my NTEP scale via serial port also and not overflow the 800lb of molasses everywhere ;-)
 
Again, odd that K works and O doesn’t on that board. Do you have it fully separated from any shields during this test. Can you post a link to it?

Also, the serial debug would be helpful... though I suspect you will get no response at all.
Back to trying to upgrade my production controller... a little drama, but I have it working 99% and on 1.1.20 and I think figured out what the problem is... RTD via SPI and Ethernet via SPI (W5500) are not able to be used at the same time.

This is the case on 3 different Mega's (sunfounder w/ W5500, a robotdyn MegaEth, and a keyestudio with tiny w5500 wired dongle) (and 2 different CZH-LABS screw shields) each and every one of them fails and goes into continual disconnect mode when the RTD via SPI is wired up (when Vcc - 5v is connected) to a RP-3 board with a single amplifier on it. This failure ONLY happens with with 45O, the Mega's and RP3 all work fine with 45K... I am using BruControl.45O.MEGA.E.hex as the test firmware... I had installed the RTD board to try to do PID that I have been trying to get working, but I have a workaround in place with a script that mimics a PID using very low values for slow response. I do not need the RTD board, but I *want* the RTD board working on the Mega...

If I follow the published schematic and when I have GND, 5V, D14 connected, as soon as I connect 'CLK' of the RP3 to 'D52' of the Mega, the failure happens.

Does anyone else have the RP-3 on their ethernet connected mega working with 45O?
 
Is there a method currently in place to use scripts to talk to a device connected to a RS-485 converter connected to a Mega or ESP32? Not exactly brewery related, but I have a device I want to control that is RS-485, and was thinking BruControl scripts would be great way to control it...
I'm using modbus via a RS-485 to Ethernet bridge, then I built a Node-Red flow to query/write data to some mass flow meters. BC interacts via the usual Global API path.
 
An HP display driver update that appears to have restarted my BC server (without me clicking restart) has rendered my config file unreadable... The file shows blank in notepad/wordpad, and brucontrol locks up for a while, then loads the default config... I have a working backup from a few days ago when I migrated to 1.1.0.20, but there have been changes since then... arrrrghhhhhh...
 
SQL Question - After a planned shutdown and reboot, should graphs load back up with previous data? I have 3 day fermentation graphs and they are blank on reboot, but the SQL on my Win10 machine seems to be working... is there a simple test so show if SQL integration is working properly?
 
An HP display driver update that appears to have restarted my BC server (without me clicking restart) has rendered my config file unreadable... The file shows blank in notepad/wordpad, and brucontrol locks up for a while, then loads the default config... I have a working backup from a few days ago when I migrated to 1.1.0.20, but there have been changes since then... arrrrghhhhhh...
There is a folder Documents/BruControl/Config Backup... mine has daily config backups for about a month or so, taken at midnight... maybe you'll get lucky.
 
SQL Question - After a planned shutdown and reboot, should graphs load back up with previous data? I have 3 day fermentation graphs and they are blank on reboot, but the SQL on my Win10 machine seems to be working... is there a simple test so show if SQL integration is working properly?
Yes it should load data back from the SQL server. Look at the controller log file - Documents/BruControl/Logs - find the file from the day you restarted and look for the line about SQL connectivity. If there was a problem it'll display it there.
 
Yes it should load data back from the SQL server. Look at the controller log file - Documents/BruControl/Logs - find the file from the day you restarted and look for the line about SQL connectivity. If there was a problem it'll display it there.

yep...
somehow I had the old SQL command in the file, but I swear that this machine never had the old 1.1.0.9 on it... oh well, I think it is working and extra backups saved... thanks again...
 
Interesting... I remember posting a while back about a similar device, but it was cpu limited... not sure how or if this is better than an ESP32 NodeMCU in any way, but a cool form factor... ATMegaZero ESP32-S2
2440a85377c6afd22de90d59885b1f575b707a99.jpg
 
We hit a bit of a roadblock with the way the I/O is implemented, but are still working on it.
So the surface pro 4 (SP4) I was using to run brucontrol just had had the battery swell to the point that the screen delaminated. Obviously I'm in the market for something to run brucontrol on (microsoft offered to replace the device for $450). Of all the options you have listed so far is there an emerging favored device that you or anyone else could recommend? I'm just looking for something that will pretty much be dedicated to running brucontrol. I liked the SP4 because it gave me the option of touch screen and wirelessly transmitting the image to a larger screen, but I'm very interested knowing what others think the "latest and greatest" might be.
 
You have lots of options. Can get a pretty good refurb off ebay, or if new, a mini-PC per @RiverCityBrewer. What type of form factor are you interested in? With screen (aka the Surface or a laptop), or a separate monitor?
Since I posted this, I found the Surface Go 2 for $400 which comes with Windows 10 and should run Brucontrol with no problems (https://www.amazon.com/NEW-Microsoft-Surface-Go-Touch-Screen/dp/B086QRQVD5) which I'm now leaning towards. But the thinkcentre M700 crane recommends combined with a touchscreen monitor like this one: https://www.amazon.com/s?k=touchscr...or,electronics,150&ref=nb_sb_ss_ts-doa-p_1_19
(or another one someone recommends) would give a larger display and a more powerful computer for a little over $100 more (albeit less of a warranty on the pc). Not sure how useful a larger touch screen would be during the brew day given the large number of programs for windows, mac and iPad that enable remote control of the brucontrol computer. Does anyone have a strong feeling for the advantages or disadvantages of using a larger touchscreen?
 
Along this thread of a new computer, how about a list of needed software to be added along with any option stuff like Node Red?

Needed Programs:
1 BruControl
2. SQL
a. xx xx xx
b. yy yy yy
3. XX x x

Optional Programs:
If Node Red:
1. xx xx xx
2. VPN
3. Anti Virus
4. XX xx XX
 
Has anyone attempted a DIY cool bot?
I had a "real" and it worked well to get a room down to the 50 F. I probably could have gotten it lower. I went to Glycol as you have better control. The issue is that you need to the ac not to shut off when it reaches 60 degrees. There was a small heater that you attached to the temp bulb of the AC Unit. The real one also had an Ice detector.
 
Back
Top