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.
What does the Megas regulator look like?

Are you saying if this gets hot Mega is receiving too much voltage either from Power supply or a defective mega? Can this be confirmed with multimeter?

Things are back to working with the 12v supply and screw shield in place. It ran most of the day with 12v without screwshield. I'll let it run overnight with the screwshield to see if It loses connection.

So far it's it's either shorted screw shield or too much voltage to Mega. Correct me if I'm wrong, a short somewhere would likely be go or no go and not be intermittent.
 
Last edited:
So a hot regulator is normal if powered by 12v? Not sure how I can use "heat" at voltage regulator to assist in diagnosis
Check the part number on your regulator and pull the data sheet. Mine is an AMS1117-5.0. It outputs 5v regardless of input. I'd imagine the chip on your mega should be of similar spec, so if it's not outputting 5v stable, you have a problem.
 
Check the part number on your regulator and pull the data sheet. Mine is an AMS1117-5.0. It outputs 5v regardless of input. I'd imagine the chip on your mega should be of similar spec, so if it's not outputting 5v stable, you have a problem.
I'll check. To verify 5v stable I assume I can run a voltage test across 5v and GND and observe 5v (is there a plus or minus here which would designate an issue?)
 
I assumed I had the wrong to be based on this excerpt from the article. Out of curiosity why isn't 510 on the list?

"The simplest method to fix the flaw is to replace the resistor set. You can use the resistors with a resistance 47 or 68 ohms (marking 470 and 680, respectively)."

Only some boards made in China had the incorrect resistors. It was a known problem a while back. If your’s says 510, it means those resistors are 51 ohms, which is correct.You can move on past this diagnostic.

Again, I recommend feeling the regulator. If it’s super hot it will almost burn your finger. I also suggest powering into the jack to automatically drop your input from 12V to 11.3V. That might be enough to make a difference.

Again, sorry you have to hassle with this. This is the downside of open source hardware which we get cheap which allows manufacturers to do things on the cheap and cut corners.

When your mega is exposed, post a pic of what it looks like. In the meantime, can you post a link to the one you sourced?
 
Only some boards made in China had the incorrect resistors. It was a known problem a while back. If your’s says 510, it means those resistors are 51 ohms, which is correct.You can move on past this diagnostic.

Again, I recommend feeling the regulator. If it’s super hot it will almost burn your finger. I also suggest powering into the jack to automatically drop your input from 12V to 11.3V. That might be enough to make a difference.

Again, sorry you have to hassle with this. This is the downside of open source hardware which we get cheap which allows manufacturers to do things on the cheap and cut corners.

When your mega is exposed, post a pic of what it looks like. In the meantime, can you post a link to the one you sourced?
I'll give that a try but I'm a bit at a loss with the addition of screw shield along with the original 12v power supply not showing any issues whereas before they did. So, this is definetly intermittent.

Any suggestions to power through the jack? Do I need to purchase a wall wort or something like that?..

No need to apologize. I understand the potential lack of robustness this platform provides vs a commercial/higher priced alternative. I see the tradeoff in the form of a community willing to assist with the issues at hand. Everyone helps each other, this carries value beyond the dollar.
 
What does the Megas regulator look like?

Are you saying if this gets hot Mega is receiving too much voltage either from Power supply or a defective mega? Can this be confirmed with multimeter?

Things are back to working with the 12v supply and screw shield in place. It ran most of the day with 12v without screwshield. I'll let it run overnight with the screwshield to see if It loses connection.

So far it's it's either shorted screw shield or too much voltage to Mega. Correct me if I'm wrong, a short somewhere would likely be go or no go and not be intermittent.
A short like a cold solder joint could be intermittent. Heat could affect this as well.

A better solution may be to get a better Mega. The EtherMega ($89) from Robotshop (EtherMega Ethernet Arduino Compatible Microcontroller) has a robust regulator that can take up to 28 vdc input ( I would not exceed 12 vdc myself) Additionally, the Model UM-1-ME: MEGA UniShield, with MEGA-2560 interface and integrated Ethernet: $389 US (Interface Assemblies – BruControl) not only has a better regulator, but able to control DC Widgets (Pumps, valves etc. without any additional hardware (except the Powers Supplies for the widgets). It can also do anything any Mega would do.
 
A short like a cold solder joint could be intermittent. Heat could affect this as well.

A better solution may be to get a better Mega. The EtherMega ($89) from Robotshop (EtherMega Ethernet Arduino Compatible Microcontroller) has a robust regulator that can take up to 28 vdc input ( I would not exceed 12 vdc myself) Additionally, the Model UM-1-ME: MEGA UniShield, with MEGA-2560 interface and integrated Ethernet: $389 US (Interface Assemblies – BruControl) not only has a better regulator, but able to control DC Widgets (Pumps, valves etc. without any additional hardware (except the Powers Supplies for the widgets). It can also do anything any Mega would do.
Thankyou for sharing I'll consider if I continue to have problems
 
Mega, Screw and Ethernet shield have been running stable for two days with the 12v power supply through VIN. Still haven't found a smoking gun issue. But with swapping parts out I guess that's to be expected. I'll start hooking up the rest of the panel this weekend!

How would one to about checking if I had intermittent connections/disconnections say in the middle of the night?
 
You can run a script that checks for a device element to become disconnected. When it does, activate an alarm. That alarm is set up to email you when triggered.

For example:

Code:
[loop]
if "Device Element" connected == false
"Alarm" Active = true
sleep 5000
goto "loop"
 
You can run a script that checks for a device element to become disconnected. When it does, activate an alarm. That alarm is set up to email you when triggered.

For example:

Code:
[loop]
if "Device Element" connected == false
"Alarm" Active = true
sleep 5000
goto "loop"
Good to know but isn't there some sort of log in which I can check for now?
 
Please post up some pics when you can.
The green is a mega screw shield. I plan to have 3 Mega (One a UM-1ME or UM1-GE) and one ESP 32 with external antenna. 1x TF 4 (8 10KNTC Probes) 2 x RP-3 (8 RTD Probes). I am toying with the ESP 32 being a UU1-EX. These will all fit very easily in this box. I plan to have 3 smaller boxes.

Box 1: 110v SSRs
Box 2: 220 SSRs and contractors.
Box 3: 5vdc Power Supply, 12 vdc Power Supply, 24 vdc Power Supply (Meanwell DIN Rail)

All DC Valves and other DC Widgets on the UM-1ME. I plan to add CR05 valves to my manifold and control them with the UM-1.
IMG_2491.jpg
 
Note that when using a UniShield to drive a valve directly, valves with single inputs will use 1 output, and valves with dual inputs will use 2 outputs. This might affect your choice of valve. For example, CR-02 uses one input, whereas CR-02 will require 2. When using these 2 input valves, you can use the new Dual Throw function in Digital Outputs to handle everything in one Device Element.
 
Note that when using a UniShield to drive a valve directly, valves with single inputs will use 1 output, and valves with dual inputs will use 2 outputs. This might affect your choice of valve. For example, CR-02 uses one input, whereas CR-02 will require 2. When using these 2 input valves, you can use the new Dual Throw function in Digital Outputs to handle everything in one Device Element.
I have yet to figure out the valves. I know where I have and need valves for the manifold I had that worked very well. I only had manual valves but am thinking of the CR05 so that:

I can create a visual flow to see which valves are open separate from a Computer. I am thinking of a sheet metal panel with LEDs so I can quickly see the valve position. I had colored lights for all my pumps that let me know if a pump was powered that I found very handy when brewing, and think a manifold display panel would be a nice feature. Since I will be using the UM-1 only to control valves, there will be plenty of I/Os to do that even it requires two I/Os per valve. I will have the extra Mega that could also be used if I run out of I/O. An obvious solution is a relay board that would use both the NO and NC terminals, but I think I will have enough I/Os without having to resort to that (Down with Relays!).

The third Mega is to create duplicate Elements that look and feel exactly the same so that I can manually control things like pumps from different workspaces. I had a "Yellow Pump" that I had written a script so that I could control the pump from either Digital Out Element on two different workspaces. I know you can do this with a Global Element or maybe a different Element, but a third Mega is so little $, it was a good solution to have the Elements look exactly the same.

Edit: Just looked and will need 16 valves but only 15 CR05. One proportional which could be on the Main Mega. I might get two proportional valves. The reason I want two I/O is so I can leave all the valves open after cleaning (CIP).
 
Last edited:
I am thinking of a sheet metal panel with LEDs so I can quickly see the valve position.

Death to dedicated controls. Spend your money on a big monitor! Sorry... I'm obligated by contract to say that.

The reason I want two I/O is so I can leave all the valves open after cleaning (CIP).

Independent of the valve type, you can set them where you want, then cut power and they will stay there.
 
Death to dedicated controls. Spend your money on a big monitor! Sorry... I'm obligated by contract to say that

Would you advise this for a commercial application? I've debated adding some rotary switches for elements in the event of a device failure.
 
I plan on a huge monitor (50 inch) but also want an independent display. I had manual push button switches that needed to be on as well as the SSRs powered for all my pumps. I use lit LED switches from Aurbrins (Illuminated Maintained Pushbutton Switch,1NO 1NC, 22mm.120/240V [SW11] - $11.98 : Auber Instruments, Inc., Temperature control solutions for home and industry) that allowed for manual control OFF when I needed it. I found it very useful for Chugger and March pumps although I really solved the cavitation issue by filling vessels through an "Off" pump. I also used a pump for Wort between the Brew Kettle and Fermentor. It was easy to kill the pump when all the Wort was transferred. I know you can do that with the Element Control, but the manual Off was quick and easy. Another issue is that you can only display a single Workspace. I have several workspaces depending on what part of the Process I am in is what is displayed. We also do a Second Batch at the same time many days with it own Workspace. As for adding "On" switches, I did that to my gas valves as I had some issues with the valves. I could bypass the automatic system quickly if I needed. There were times I wished I had a manual on for a Pump as well. If you are starting it is easy to wire in Manual Overrides (like rotary switches). They would also be useful when your script did not go the way you thought it did (from a end user logic failure). I certainly plan on Manual Overrides. I may never have to use them, but easy and cheap to do it now.
 
Would you advise this for a commercial application? I've debated adding some rotary switches for elements in the event of a device failure.

I was kinda joking, but your question is legit. Ingredients are expensive, but we aren't launching rockets, so I am not sure I would call brewing mission critical. LED's aren't going to do much as you can't control anything with them. I suppose you could ad parallel dedicated controls, but that's a lot of dedicated controls. I would personally rather put the energy into making a quality and reliable panel. I know your experience hasn't felt that way, but I'm confident that electronic control can be dead-solid reliable when designed and built following proper practices.
 
This sensor has 4 20ma output. Would it work with BruControl?

https://www.auberins.com/index.php?main_page=product_info&cPath=20_54&products_id=577
I do not know if I will go to low pressure burners and furnace controllers with their internal safety or return to high pressure burners. I am also trying to see if I could get Natural Gas which would be low pressure.

Yes, you can integrate it. That said, I think if you are building from zero, don't mess around with gas... go all electric.
 
Would you advise this for a commercial application? I've debated adding some rotary switches for elements in the event of a device failure.

Could you realistically run your process by hand in the event of an automation failure? For my system and process, that's a hard no. Now, if you built your process such that the automation was running on top of your manual efforts, then sure, having some manual controls (3-way Auto-Off-Hand type switches) would work.
 
This is finally happening!!! Want to see the BRUCONTROL Controller in action. Want to ask @BrunDog questions live?? You'll be able to this Sunday, September 6th 11:00 A.M. EST on our youtube channel!!
Come join us for a live brewday from start to finish using BRUCONTROL

Live Brewday Link

Thumb.png
 
Last edited:
Has any work been done/considered on the DB side for purging/record retention? The SQL express editions only allow DB sizes up to 10GB; I'm currently sitting at about 7GB, and I'm aware of at least one instance where the DB hit its limit. In the latter instance, we had to blow away the DB and start over. Just some food for thought as everyone will eventually hit the limit without any cleanup.
 
Has any work been done/considered on the DB side for purging/record retention? The SQL express editions only allow DB sizes up to 10GB; I'm currently sitting at about 7GB, and I'm aware of at least one instance where the DB hit its limit. In the latter instance, we had to blow away the DB and start over. Just some food for thought as everyone will eventually hit the limit without any cleanup.

Great point. Another user with many devices and a fast refresh has bumped the limit too. We have a plan to include a data capture interval (not much value in per second captures 29 days ago and time period limit. We’re discussing some auto purging of data in the back end to make sure the limit doesn’t get reached. When it does, bad things happens as the error log swells in a hurry to the point of filling the disk. That’s a silly SQL thing, but we still need to make sure the limit isn’t approached.
 
Great point. Another user with many devices and a fast refresh has bumped the limit too. We have a plan to include a data capture interval (not much value in per second captures 29 days ago and time period limit. We’re discussing some auto purging of data in the back end to make sure the limit doesn’t get reached. When it does, bad things happens as the error log swells in a hurry to the point of filling the disk. That’s a silly SQL thing, but we still need to make sure the limit isn’t approached.

Pretty sure we are talking about the same user here :)

A couple thoughts I had, though I'm not sure how viable they are.

1) Variable log timing for individual globals/inspectors, or the ability to turn it off completely. Currently globals appear to log 1/sec (86400 rows/day). A quick look at the table and some math put the daily space usage of a single global at about 2.4MB/day. Having the ability to adjust the log timing of what is likely used largely as a static parameter would greatly decrease the amount of data collected daily.

2) Interface refresh rate adjustable via script. For largely the same reasons as above, crank up the data collection when you need it and turn it down when you don't. This could be done manually now, but would be much more convenient to handle during brewday script operations.

3) Logging compression, i.e., if a value doesn't change, don't log a new value until it does. Digital outputs appear to work this way now. Applying this to globals alone would save quite a bit of space.

4) DB maintenance operations handled by BC. I'm sure many users don't have the knowledge and/or want to put on a DBA hat and setup SSMS and dig into the guts of the SQL server. Having a DB panel in BC to see the size of the DB and perform operations like record retention might negate the need of 1-3.

Just my .02
 
Ya we are pretty aligned. We will have a back end management that ensures the limit isn’t approached by deleting older records. It’s a little tricky to determine how much to delete so this is why it isn’t implemented yet.

Regarding recording times, we will add a record interval to all data elements. You are right that recording data that isn’t changing doesn’t make much sense other than third-party consumer applications will like not having to interpolate a value.

Also looking forward, we will likely implement a data table element in addition to or instead of global elements. The table would allow you to store a bigger data set and manage it dynamically via data exchange and/or scripting.
 
Ya we are pretty aligned. We will have a back end management that ensures the limit isn’t approached by deleting older records. It’s a little tricky to determine how much to delete so this is why it isn’t implemented yet.

Regarding recording times, we will add a record interval to all data elements. You are right that recording data that isn’t changing doesn’t make much sense other than third-party consumer applications will like not having to interpolate a value.

Also looking forward, we will likely implement a data table element in addition to or instead of global elements. The table would allow you to store a bigger data set and manage it dynamically via data exchange and/or scripting.
You could also allow an element to be recorded or not on the element itself ( an Element Property with a script Like "record" command with a True or False range.) For example, I used three Temperatures on Mash Tun. I may want to record all three during Mash and Sparge, but not during the CIP Cleanup, although I need the Temperature Enabled at that time.

I would make any new elements record to False.

In most cases, I do not need to know if a Digital Out state is True or False, but there are times I might. But I am the source of what needs to be recorded or not. I have some Globals that "save" some of the times (like Wort Transfer or time to heat Sparge Water now. I wanted to know these to refine my processes. I might want those globals recorded once only.

Also to be able to "save" the data to a separate file and start "fresh". Again, maybe a property to "clear" certain data with a script command, giving an end user what data he wants persistent until cleared.

For example, If I could save all my Hot Side Data to a file and then clear for the next Brew but keep my fermentor data. Later, when the ferment is done, I would want to clear that data after saving to a separate file.

You could save the file in its entirety and have instructions on how to parse the data to a smaller file.

Again, on a fermentor, a 15 minute or even an hourly recording might be fine. A Refresh rate by Element would also be good. I might want the Mash Temp recorded every 10 seconds, but not the Ferment.

I also have a lot of Globals that I use as holders for variables (and even to do Math), they never need to be recorded even if they change.

For end users that do not even want any SQL data, a system setting to turn off Recording of any data.
 
Last edited:
What do you use to access the .mdf sql data file? I am very familiar with MSAccess but looks like you need an sql server to attach the data. There appears to be a free one at Microsoft (sql server 2008/r2) but there are several files to choose from.
 
You don't access the file per se... the database engine handles everything. So if you want data, you communicate with the engine. Copying files etc. won't work.

You can use Excel or Access right now to access your data. Get Data... From Database... From SQL Server Database... then use Server "(LocalDB)\MSSQLLocalDB" without the quotes.

Edit: @RiverCityBrewer is right, but you can use modern MS Office apps too.
 
Hey just want to extend my most sincere THANK YOU to @highland_brewer for hosting me today on his live brew day!! He is the quintessential gentleman... as well as being a good multi-tasker. Most importantly, he manages surprises really well!!!

Here is the link again - check it out when you get a chance to see the UniFlex and BruControl in action:

 
Back
Top