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 think on a UM-1 you would need 2 pairs of I/O configured in double throw mode (dual throw port config) to use a CR05 valve natively. I would use CR03 valves with the SPST relays native on the UM-1, or use a SPST to trigger a supplemental board of DPDT relays to cycle your CR05 valves.

Edit: Looking at your last picture, can I assume you have a relay board of SPDT relays? If so, use 2 I/O from the UM-1 and configure the dual throw port config, wiring each I/O to one of the SPDT relays and wiring the relays as you have depicted.
 
Last edited:
I think one port and two relays. Both relays tied to same trigger signal.

The type of relay where there is a Common and a NO and a NC

If using Port 11 of the UM-1 Wire the Relay IN to 7-4 D


"Digital Out Port 11" state = true //is power
power.png

"Digital Out Port 11" state =false //is no power

no power.png
 
Last edited:
I think on a UM-1 you would need 2 pairs of I/O configured in double throw mode (dual throw port config) to use a CR05 valve natively. I would use CR03 valves with the SPST relays native on the UM-1, or use a SPST to trigger a supplemental board of DPDT relays to cycle your CR05 valves.

Edit: Looking at your last picture, can I assume you have a relay board of SPDT relays? If so, use 2 I/O from the UM-1 and configure the dual throw port config, wiring each I/O to one of the SPDT relays and wiring the relays as you have depicted.

The CR05 valve is the one least easy to use. The UniShield has high-side drivers only (can our source positive voltage, not sink to ground).

You do need to use two DT relays in parallel, but only one output from the US is required. I'll post a schematic tomorrow.
 
OK... three steps:
1. Email us for a firmware - it will change the ADC resolution from 10 bit to 12. We'll keep making it available or switch it permanently in upcoming releases.
2. Edit your ESP32.brumc interface definition file. I'd actually recommend you make a copy of it, such as "ESP32-12bit.brumc". Right at the top, inside <AnalogOptions>, change <MaxValue> from 1023 to 4095.
3. Make sure all your analog input device elements are adjusted to read correctly.

That said, the ESP32's isn't known for the best ADC... it tends to read a bit noisy and non-linear (especially above 2.5v), so I am not sure that the extra resolution will help much. This is kinda why we didn't switch it permanently. BUT, if you want good repeatability, you could map out a lookup table for a good calibration.
 
Thanks, I just emailed you.

I've also noticed that the ADC on the ESP32 wasn't exactly what you would call linear, and I agree with you that a lookup table is the best option. Looking forward to trying it out.
 
I searched the thread but didn’t see exactly what I need…

I have three industrial sensors with 4-20ma outputs (DO, pH, and flow meter) that I want to have BC read.

I know I need a resistor for each sensor, but how do I calculate resistor size?

Any help (or link to what I should use/buy) would be greatly appreciated!
 
I am adding 3 IFM SM4000 flow meters to my setup and thought about using a current to volt transmitter instead of a resistor. This is all new to me but my thoughts are by using the transmitter I can dial in exactly the low end (4mA) and the top end (20mA) without the risk of the tolerance creep using a 1% 250 ohm resistor. I've read @crane 's thread on his build and he mentions the FM's are capable of temps higher than the factory set 170F (20mA) up to approx 211F (21.5mA).
I realize using a MEGA board max input is 5V/pin and what confuses me is that a resistor (250ohm) would prevent more than 5VDC from being sent to the MEGA, how would one be able to measure temps above approx 170F thru BruControl if 20mA is tops for input? This is important as for the placement of the FM in the system as it could be subject to boil temps even though it may not be a necessary reading for the brew process.
This brings me back to using a transmitter board where I could set the span to accommodate the range within say 75F to 211F, without maxing out the pin. Is my thinking wrong on this?
 
No need for an external transmitter with the IFM series, they are built in. Looking at the manual for the SM4000, it will output 21.5mA at 100C. I would figure on maxing out the 5v pin with 22mA, so that would be a 227ohm resistor. Also, it looks like the analog outputs can be switched from 4-20mA to 0-10v, so you could also wire up a voltage divider to get the same result, though personally I find it easier to use a single resistor with the 4-20.

Edit: Also, looking at the manual, it looks like this a 1/4" connection and a max throughput of 3lpm, so I'm hoping you were prepared for the lower max flow of this unit.
 
Last edited:
If you are really concerned about overloading the MEGA input, and this would be good practice anyway, would be to use a diode to clamp any overvoltages. This is a somewhat comprehensive overview of u-controller protection: https://www.digikey.com/en/articles/protecting-inputs-in-digital-electronics

Under the 'external clipping diodes' section, you see two schottky diodes. For simplicity, after your resistor voltage divider, you could put a resistor in series to limit current, then a single schottky diode to 5V. If your incoming voltage to this circuit exceeds 5.2V, the diode will start to conduct, and the resistor will limit its current. Example below. Note the top resistor in the divider can be 0 ohms (eliminated) if not needed to limit max voltage, or the combination can be upscaled to limit current and eliminate the middle in-series resistor for simplicity. In this case, 20mA out of the sensor through the 250 ohm resistor will result in 5V at the input of the 10k ohm resistor. That resistor will limit current flow to the MEGA to a 0.5 milliamps, and if that voltage goes above 5.2 for some reason (like the sensor puts out 25mA), then the diode will start to conduct and limit the voltage at the input of the MEGA to not more than that.

1644771714427.png
 
Last edited:
No need for an external transmitter with the IFM series, they are built in. Looking at the manual for the SM4000, it will output 21.5mA at 100C. I would figure on maxing out the 5v pin with 22mA, so that would be a 227ohm resistor. Also, it looks like the analog outputs can be switched from 4-20mA to 0-10v, so you could also wire up a voltage divider to get the same result, though personally I find it easier to use a single resistor with the 4-20.

Edit: Also, looking at the manual, it looks like this a 1/4" connection and a max throughput of 3lpm, so I'm hoping you were prepared for the lower max flow of this unit.

Sorry I got the Model# wrong its actually SM6004, and thanks for the info you provided!!
 
If you are really concerned about overloading the MEGA input, and this would be good practice anyway, would be to use a diode to clamp any overvoltages. This is a somewhat comprehensive overview of u-controller protection: https://www.digikey.com/en/articles/protecting-inputs-in-digital-electronics

Under the 'external clipping diodes' section, you see two schottky diodes. For simplicity, after your resistor voltage divider, you could put a resistor in series to limit current, then a single schottky diode to 5V. If your incoming voltage to this circuit exceeds 5.2V, the diode will start to conduct, and the resistor will limit its current. Example below. Note the top resistor in the divider can be 0 ohms (eliminated) if not needed to limit max voltage, or the combination can be upscaled to limit current and eliminate the middle in-series resistor for simplicity. In this case, 20mA out of the sensor through the 250 ohm resistor will result in 5V at the input of the 10k ohm resistor. That resistor will limit current flow to the MEGA to a 0.5 milliamps, and if that voltage goes above 5.2 for some reason (like the sensor puts out 25mA), then the diode will start to conduct and limit the voltage at the input of the MEGA to not more than that.

View attachment 759457
Yes a bit more complex but the added insurance would be well worth the hassle of me not burning out my board. Thanks for the info guys, I'm still trying to learn some of this stuff and it's much appreciated you share your knowledge with others!!!
 
I know the feature request list is probably getting deep, but I had a thought that might be of interest for a number of users. In industry, we use process cameras all over, and in our plant system we can overlay and control IP camera streams direct from the HMI. I thought it would be a nice feature if a camera element could be created in BC and point to an IP cam(s). No idea how feasible it is with the current architecture, so just food for thought.
 
Following up on the 12bit firmware for the ESP32, overall the analog functionality works great. FYI though, I (and a few others) have noticed some issues when connecting a Tilt to boards flashed with the 12 bit firmware, and is immediately resolved by flashing back to the normal firmware. The issues are random disconnects, no readings from the Tilt, and incorrect readings from the Tilt.
 
Upgraded to BruControl Advance this morning... went to set up my Mega 2560 for Ethernet and smoked my ethernet shield when I connected to my PC via USB (ethernet cable was not connected on either end).

D'oh!

So I've ordered a new one but now have to wait to receive it...
 
Has anyone had issues with their BC dropping comms with their controllers? My BC will drop comms with both my ESP32 and ESP8266 for a few seconds then either cycle with trying to reconnect or finally reconnect.

Router shows them connected during those times, and neither controller is resetting during these instances (at least I don't see the devices connected to the ESP32 cycling through as if I switched the ESP32 off then on).

I used Node-RED to see if it maintains a general TCP connection with my ESP32 when BC showed drops, and NR also showed connection drops at the same time, so it's not. BC issue.

Because my router shows the devices as connected and it happens with both controllers, it seems like it could either by the router not sending the comms through reliably or my PC isn't maintaining a steady connection. Figured someone may have seen this before.

[Win 11; ESP32 is running 45O (just updated it to see if it helped here; nope); BC 1.1 build 22]
 
I have a thought, so what kind of router are you running and what kind of WiFi system do you run?

Netgear 4-Stream AX1800 WiFi 6. PC is connected via WiFi 6. I assume the controllers connect via WiFi 4, both 2.4Ghz. This is a more recent development; the PC had always been WiFi 6.

Did that cover the WiFi system question?
 
Netgear 4-Stream AX1800 WiFi 6. PC is connected via WiFi 6. I assume the controllers connect via WiFi 4, both 2.4Ghz. This is a more recent development; the PC had always been WiFi 6.

Did that cover the WiFi system question?
What are your interface settings in brucontrol? You might try increasing the timeout, depending on what it is set to.
 
Netgear 4-Stream AX1800 WiFi 6. PC is connected via WiFi 6. I assume the controllers connect via WiFi 4, both 2.4Ghz. This is a more recent development; the PC had always been WiFi 6.

Did that cover the WiFi system question?
If you look in your controller log, do the drops happen at a certain time/do you see a specific pattern, or are the drops random?
 
Last edited:
If you look in your controller log, do the drops happen at a certain time/do you see a specific pattern, or are the drops random?

Here's a screenshot that shows the connects and drops in a small time frame. My keezer controller stayed connected for a good bit here while my fermentation controller dropped and reconnected a lot, then the keezer joins in the same cycle.

Screenshot_20220306-121029_Word.jpg

Based on Jason's question below, I see the drops do come after 3 seconds consistently, which matches my timeout...

What are your interface settings in brucontrol? You might try increasing the timeout, depending on what it is set to.

My refresh is set to 1 second, and my timeout is set to 3 seconds. I keep the refresh at 1 so my pressure sensor/spunding setup is accurate. I'll change the timeout to 5 and see if that helps.
 
Back
Top