• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BruControl: Brewery control & automation software

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Sorry, it took me a few mins to find it. Please note these notes are mine, so it doesn't mean they are right!

Originally posted here:http://brucontrol.com/community/hardware/temp-sensor-selection/#post-82

Here is a copy (with a few changes):

1-wire: Pros: Inexpensive, fairly accurate, easy to integrate (wire), decent cable length, moderately immune to noise, can be acquired assembled or in parts, assembled waterproof versions available. Cons: Slow reading in multiples, not many physical configurations available (e.g. threaded probe lengths, etc.), large thermowell diameter required.

RTD: Pros: Most accurate, fairly immune to noise, decent cable length, many physical configurations available, fast reading in multiples, very small thermowell needed. Cons: Requires additional amplifier hardware to integrate into BruControl, higher cost, current limit is 4 in BruControl (though possible for more with custom firmware).

Thermistor: Pros: Already in use on some systems (e.g BCS, STC), can be very accurate if quality component, easy to build your own probe assembly, can have long cable lengths, very small thermowell needed, fast reading in multiples, assembled waterproof versions available, inexpensive. Cons: few physical configurations available (though DIY can make any type), signal can be noisy in certain electrical environments, requires additional circuitry (e.g. thermistor filter board) to reduce noise and create voltage divider appropriate for BruControl interface.
 
I looked through the interface map for the Mega and now I have even more questions:

1. Why is there a range of port #'s for Interface Pin #5?

2. If I choose RTDs, I assume I use the RTD firmware; the interface map for that shows only Pins 14-17 as capable of RTD, but those are digital pins if I understand it correctly. Why wouldn't an RTD get connected to an analog input pin? Looking at the schematics, the thermisters do connect to the analog pins...

3. What does the code "N/C" mean? Pins 20 & 21 have that code for all firmware; Pins 10, 50-53 have that code for the default and default + RTD firmware.

4. Pins 44-46 have "P" codes, which means they can do PWM, correct? The pinout maps of the Mega you have in the schematics only show Pins 2-13, 16, & 17 as PWM capable; the map says pins 16 & 17 are NOT PWM capable. I'm confused...

5. Pins 14-21 have other codes on the schematic maps (TX3, RX3, etc). If I understand correctly, those are for communication, but does that mean they should not be used for I/O assignments? What if I use a Ethernet or WiFi shield?

Thanks for putting up with all these questions; I'm trying to design my panel box before I buy anything so I don't have to return too many things!
 
1. Pin #5 is port #5 when using it as Digital I/O or a PWM Output. When connecting 1-wire probes to it (all in parallel to pin 5), each probe is addressed using virtual ports 200+. We picked 5 because it is commonly available for this function across all interfaces.

2. Yes, you would use the RTD firmware. This firmware has the functions to communicate with RTD amplifier boards. As I mentioned earlier, RTD's, like Pt100 probes, exhibit a very small range of impedance change, which is a low impedance to start with. 100 ohms is the nominal resitance, but each degree change might only be represented by a hundredth of an ohm change. This small change cannot be accurately read using a standard voltage divider as can be done with thermistors, which exhibit a higher impedance change with temperature variations. Therefore unique amplifiers are used to perform the readings for RTDs. These boards report the values to the interface via a serial communication bus. The pins which are used (e.g. 14-17 you mentioned) are implemented only to tell which board to perform the reading at a given time.

3. N/C = No Connection (we should add this to the note). No connection because these pins have special functions, like being used to communicate with other devices such as LCD displays. You just can't have all the pins all the time, man! ;-)

4. P means PWM Output -> correct. The schematic's MEGA representation came from Fritzing, the software used to create it. It obviously has the pins mislabeled. I never realized this - great catch! Therefore ignore the labels on the schematic and go by the Interface Wiring Map. 16 & 17 are not PWM capable.

5. Like above, ignore the pin labels on the schematics. You don't need to sweat which interface can do what - the Interface Wiring Map should be the source to rely on. Again, great catch! I will see if I can remove those.

I hear you on buying & returning... I have a boxes of stuff I bought and no longer use or need!
 
Thanks! It all sounds good. I've been looking to upgrade from my BCS-460 for a while now; the I/O is just too limiting. Switching to Arduino has been a bit daunting due to the learning curve, but BruControl looks like it will take a lot of the pain out of that!

One more question about the flowmeter: Do you think it is accurate enough to use as an interlock with the RIMS heater? I currently use a flow switch for that purpose, but it does stick sometimes with the odd bit of grain.
 
Thanks! It all sounds good. I've been looking to upgrade from my BCS-460 for a while now; the I/O is just too limiting. Switching to Arduino has been a bit daunting due to the learning curve, but BruControl looks like it will take a lot of the pain out of that!

One more question about the flowmeter: Do you think it is accurate enough to use as an interlock with the RIMS heater? I currently use a flow switch for that purpose, but it does stick sometimes with the odd bit of grain.


Yes. I currently do this in my system. Since you only care about a flow threshold, shear accuracy is again not critical. You will need to use a script to handle this, but it’s easy and only a few lines. That basically inspects the current flow rate, disables RIMs output of its too low, then re-enables it when the rate increases above the threshold.

Are you saying the FM or the flow switch got clogged with grain? My FM clogged once but a few taps got it going again. This is really dependent on the false bottom design etc. The script can also issue an alarm when the flow is low, so zero could be easily reported to the user.
 
Are you saying the FM or the flow switch got clogged with grain? My FM clogged once but a few taps got it going again. This is really dependent on the false bottom design etc. The script can also issue an alarm when the flow is low, so zero could be easily reported to the user.

Yes, that's exactly what happens. I usually can clear it by tapping or by backflushing after my brew session is over. However, since you said the flow meter is pretty bulletproof in that regard, it occurred to me that the flow switch would be redundant with the flow meter installed. I use this flow switch. At 3/8", I think it also restricts my re-circulation rate a bit, so going with something that allows more flow won't hurt either.
 
Last edited by a moderator:
Here is what a script could look like:

Code:
[mash_prep]
new bool FlowOK		// create a new true/false flag
FlowOK = true		// set flag true

[mash_loop]
if "Flowmeter" Rate < 3			// check flowrate
	"RIMS PID" Enabled = false	// turn off RIMS
	FlowOK = false			// set flag to denote RIMS was turned off
else
	if FlowOK == false		// check for RIMS was off flag
		if "Flowmeter" Rate >= 3	// check flowrate
			"RIMS PID" Enabled = true	// turn on RIMS
			FlowOK = true			// set flag true
		endif
	endif
endif
// do other stuff
sleep 3000		// wait a few seconds before checking again
goto mash_loop

This script uses a flag, "FlowOK" to toggle turning the RIMS tube on only once when the flowrate is good. You can do without it, it would then just keep re-enabling the RIMS Tube repeatedly when the flow rate is good... which has no real implications. But the toggle also gives you the ability to incorporate 1-time events each time the RIMS tube is turned back on for flow. LMK if this doesn't make sense.
 
That makes sense; I know how to code in Visual Basic; your scripting language doesn't look too different, really.

And now I have a different topic to ask about, this time about the schematic for wiring in switches. I'm having trouble figuring out how the Mega can tell the which switch activates.

You show the +5V pin being tied to both switches; after the switches, they are both tied to the pull down resistor, and to the two pins (D6, D8). To me, this means that, no matter which switch is activated, the connection on the "downstream" side of the switches is the same electrically. I can shut either or both switches, and the voltage at the point where the pull down resistor is connected is the same. How do those two pins see which switch is activated if they are tied together on the upstream and downstream sides of the switches? Am I making sense?
 
Holy Carp! You are right! You have a keen eye and I should probably be paying you for identifying our mistakes!

Here is the skinny... (and I will fix the schematic). If you want to use a switch to switch 5V, you will need a pulldown resistor for EACH switch. If you want to use a switch to switch Ground, you do not need a pulldown resistor (as the micro has them built-in), and you would select 'Active Low' for the input in BC.

This is getting embarrassing...
 
Yes, that's exactly what happens. I usually can clear it by tapping or by backflushing after my brew session is over. However, since you said the flow meter is pretty bulletproof in that regard, it occurred to me that the flow switch would be redundant with the flow meter installed. I use this flow switch. At 3/8", I think it also restricts my re-circulation rate a bit, so going with something that allows more flow won't hurt either.

I also use a flow switch and had it stick once not allowing my rims to fire.. very frustration. good to know a flow meter will also work.
 
Last edited by a moderator:
Holy Carp! You are right! You have a keen eye and I should probably be paying you for identifying our mistakes!

Here is the skinny... (and I will fix the schematic). If you want to use a switch to switch 5V, you will need a pulldown resistor for EACH switch. If you want to use a switch to switch Ground, you do not need a pulldown resistor (as the micro has them built-in), and you would select 'Active Low' for the input in BC.

This is getting embarrassing...

Hey, no worries! I'd say for all the advice and help you've given this community, we're more than even.

So...if I have this right, the simplest way to wire a switch as a digital input is to wire a pin to one side of the switch, and the ground to the other side of the switch, and then set up the pin to be "Active Low". Correct? Why even bother with wiring it to switch 5V?
 
I also use a flow switch and had it stick once not allowing my rims to fire.. very frustration. good to know a flow meter will also work.

I've had both stuck open and closed happen; you don't want to to find that by the smell of a burning heating element...

I absolutely believe in some sort of interlock to prevent the RIMS from firing at no flow; you can use the pump status, but that can fool you too - just because your controller has told the pump to run doesn't mean it is actually moving liquid. More than once, I've forgotten to plug the pump in, and the system thinks it's running even when it's not. Detecting flow via a switch or meter is the only sure way to protect the RIMS and your wort. Sounds like the meter will be more reliable than the switch. Based on it being a pulse based sensor, the only failure mode it can have is to fail safe (i.e. no flow), which, while annoying, won't cause any damage.

I also like that, via scripting, you can set up conditions to ensure the system is stable before turning on the RIMS (for example, flow above a certain value for at least 30 seconds). I've had issues when initially starting re-circulation where I have to cut back on the flow rate a lot to avoid compacting the grain bed, and the RIMS control overshoots as the flow rate gets too low. Being able to ensure a steady minimum flow rate before firing the RIMS will help with that.

The functionality of BruControl continues to impress me!
 
Hey, no worries! I'd say for all the advice and help you've given this community, we're more than even.

So...if I have this right, the simplest way to wire a switch as a digital input is to wire a pin to one side of the switch, and the ground to the other side of the switch, and then set up the pin to be "Active Low". Correct? Why even bother with wiring it to switch 5V?

Thanks! Yes - you have this right.

Why even bother? Well, that depends. Maybe your schematic / components require it. But given the choice, yes, go with the ground switching. Hey, we're all about flexibility! The interfaces support it, so we give you the opportunity to do what you want.

I fixed the schematic to reflect both. Again, thanks for pointing out the error!
 
BrunDog I know your plate must be full with keeping up with the features you already have but, have you thought about using BruControl as a http://raspberrypints.com/ replacement for keg management. With the flow meters that you use, and the arduino ethernet/wifi connections in the Pro version it seems like a match made in heaven. And I believe that Kegninja has api calls. Anyway keep up the good work!
 
You are absolutely correct! You can do this currently. In fact I found a nice FM on amazon that has barb fittings which works perfectly with the beer line tubing. I think the flow rate rating is good though I do wonder what will happen to accuracy at low flow (e.g. taps with flow rate control). I keep meaning to connect one but then I defer because I will have to pass the wires through the gas/probe hole which is sealed with silicone and keep it open for a while with lots of cold beer in it. I should have anticipated and ran the wire in the beginning. I have 5 with room for 6 taps so would need at least 8 conductors. The sensors would tie directly to the micro controller interface which is used to control the dispensing fridge.

This would make keg management much easier for certain. I personally hate when a keg kicks when it wasn’t expected.
 
Will Brucontrol output the flow data to a file of sometype? I would like to link the data to taplist such as taplist.io or kegninja. Maybe if I get ambitious add a NFC reader and flow control with Untappd intergration. It is awesome to think of the possibilities of the Arduino and Brucontrol.
 
I am getting ready to purchase the Pro version of your software and had a few questions about licensing.
  • You are currently on version 1.x, if I purchase now how long do I have access to updates?
  • If version 2.x comes out during this period will I have access to it, or will I have to repay?
  • How often do you plan on new versions numbers v1 to v2 to v3 ect,?
I am just trying to gauge the pricing structure, I didn't see any information regarding this on your website. I just wanted to make sure I'm good for a year, because I'm still in the design phase. Also are upgrades from version 1.x to 2.x cheaper or full price.

Thanks
 
Hi @Kmo4040,

You will have free updates until some major, major change comes out, which is not even on the horizon right now. We have no interest in sticking it to anyone - that’s not fair nor how we want to operate. In fact, the pricing is in place more so to ensure you are supported than anything else. You’ll be all set for more than a year!

Our goal is to provide personal support where needed, which just can’t be accommodated with free-ware.

We only charge the even difference to upgrade from the Basic version to the Advanced version now because we don’t think it’s cool to squeeze people into a box with their dollars.
 
Hi @Kmo4040,

You will have free updates until some major, major change comes out, which is not even on the horizon right now. We have no interest in sticking it to anyone - that’s not fair nor how we want to operate. In fact, the pricing is in place more so to ensure you are supported than anything else. You’ll be all set for more than a year!

Our goal is to provide personal support where needed, which just can’t be accommodated with free-ware.

We only charge the even difference to upgrade from the Basic version to the Advanced version now because we don’t think it’s cool to squeeze people into a box with their dollars.
 
I have been thinking about upgrading to one of these: http://www.crydom.com/en/products/catalog/mcpc-series-control-relays.pdf.

Proportional SSR... would allow for true variable heat control, resulting in no pulsing of the element on and off. Certainly more expensive than standard SSRs at around $90 each, but Crydom is a quality brand at least. BruControl supports analog output PID, so its fairly plug and play by adding a resistor and capacitor.
 
I have been thinking about upgrading to one of these: http://www.crydom.com/en/products/catalog/mcpc-series-control-relays.pdf.

Proportional SSR... would allow for true variable heat control, resulting in no pulsing of the element on and off. Certainly more expensive than standard SSRs at around $90 each, but Crydom is a quality brand at least. BruControl supports analog output PID, so its fairly plug and play by adding a resistor and capacitor.

Brundog, I have one of these that I don't use anymore. I had it installed on my boil kettle with a potentiometer to manually adjust boil element power. This was before I switched to BCS. Worked really well, boiling was continous vs. on/off cycling via duty cycle. Never had any issues with it, so I concur on the good quality of Crydom.

I like the idea of automating the power control like this; it's always a little disconcerting to see the element "on" light cycling on and off, and the boil doing the same. I use a 1 second duty cycle, but I'd much rather see a true proportional heater control, and it looks like you can get them for 0-5V control signals. Unfortunately, I don't think I can reuse my existing one, since it uses a potentiometer. Oh well...next upgrade!
 
I have been thinking about upgrading to one of these: http://www.crydom.com/en/products/catalog/mcpc-series-control-relays.pdf.

Proportional SSR... would allow for true variable heat control, resulting in no pulsing of the element on and off. Certainly more expensive than standard SSRs at around $90 each, but Crydom is a quality brand at least. BruControl supports analog output PID, so its fairly plug and play by adding a resistor and capacitor.

Doesn't seem like it would change much, other than less wear and tear on the SSR. I don't think it would get you too much closer to your set points. It does seem more logical than switching off and on repeatedly. But I don't know if it justifies the cost difference. It's nice to know it's an option though.
 
No, it wouldn’t do much more than eliminate electrical pulsing. This might be easier on your electrical hardware and panel, and maybe yield less boil pulsing, which is something that happens, whether we see it or not. This is of course normally reduced in a binary duty cycle system (PID or duty/manual mode) by decreasing the cycle time, but that does add wear and tear to your electrical components, including the SSR. Perhaps there are some electrical efficiencies saved, which are normally lost via heat through the heat sink, but I can only speculate that.

No, this is much more of a cool factor than a needed one. But this is automated brewing - we sometimes throw practicality out the window!
 
Well I’ll be! I had no idea Auber sold this. It’s a whole lot less money. Most SSVRs require a resistance input (potentiometer) but this one looks indicates analog voltage. Huh!

It has a very steep curve which doesn’t really start until 2V, but I think this would work! I may buy one and test a simple load like a light-bulb.
 
Correct me if I'm wrong, but don't these SSVR's work by basically doing pulse width modulation on a very fast scale? I would assume that they do, since they are basically a SSR with a little extra circuitry in them.

If that's the case, how would you connect it up to the Arduino? On one of the PWM pins? Will that work when the SSVR is looking for a variable input voltage?

It also seems like you could replicate the effect of an SSVR by choosing a very short duty cycle on a standard SSR. Are these more effective because they can handle much shorter cycle times than the Arduino can do?

I will admit ignorance on the internals of how they really work.
 
I've been researching the hardware of a BruControl setup and was wondering if the power box architecture for a BCS460/462 based box could easily be adapted for an Arduino card by simply swapping one for the other?
 
Correct me if I'm wrong, but don't these SSVR's work by basically doing pulse width modulation on a very fast scale? I would assume that they do, since they are basically a SSR with a little extra circuitry in them.

If that's the case, how would you connect it up to the Arduino? On one of the PWM pins? Will that work when the SSVR is looking for a variable input voltage?

It also seems like you could replicate the effect of an SSVR by choosing a very short duty cycle on a standard SSR. Are these more effective because they can handle much shorter cycle times than the Arduino can do?

I will admit ignorance on the internals of how they really work.

Connect it to an analog pin.

The SSVR regulates the output voltage by
phase-angle control. In this method,
the AC power control is achieved by advancing or delaying the firing point at
which the SCR will be turned on at each half-cycle. The Figure 4 shows a
waveform of which the SCR is fired a certain phase-angle. The original AC sine
wave is overlaid with the phase-angle controlled waveform in Figure 5. This is
how most of the light dimmer works. Phase-angle control is used for fast
responding loads such as tungsten-filament lamps or heating elements.
Because of the sharp cut off, there is a potential electromagnetic interference
(EMI or RFI) if there are inductive devices on the power line. Some of the
inductive devices cannot be controlled by this method.
http://www.auberins.com/images/Manual/SSVR.pdf
 
If it's an issue you can put the signal on a low pass filter to smooth it out.
 
I just purchased your software a few hours ago, and I will download the program this evening. I was reading the user manual and wanted to know if there is any more documentation about the script functions anywhere. Specifically can you use the print function to print to a file and can you read information from a file. Any help would be appreciated. Once I install the program I may be able to figure some of it on my own but any help would be great. Thanks!
 
Aren't the analog pins on an Arduino Mega only Analog Inputs? All the specs I've seen on the Mega list the analog pins as inputs but not outputs.

https://www.arduino.cc/en/Main/arduinoBoardMega

Can they be configured as outputs, or do we need a different interface that has a true analog output?

Yes... as @thekraken said, you would use a low pass filter to convert a PWM output to an analog output. This is simply a resistor in series with the output and a capacitor in parallel with the input. We actually do not have a schematic of this on the website, but I will create one ASAP.

This is how I currently control analog input proportional valves. The same circuit would power these analog control SSRs.
 
Correct me if I'm wrong, but don't these SSVR's work by basically doing pulse width modulation on a very fast scale? I would assume that they do, since they are basically a SSR with a little extra circuitry in them.

If that's the case, how would you connect it up to the Arduino? On one of the PWM pins? Will that work when the SSVR is looking for a variable input voltage?

It also seems like you could replicate the effect of an SSVR by choosing a very short duty cycle on a standard SSR. Are these more effective because they can handle much shorter cycle times than the Arduino can do?

I will admit ignorance on the internals of how they really work.

PWM from the Arduino and other microcontroller interfaces has too high a frequency for SSRs. They run at ~500 or 1000 Hz depending on the pin and interface. This works fine for DC motors being switched by a transistor or MOSFET but not SSRs (the switch frequency is often published). Keep in mind AC runs at 60 Hz in North America (50 for EU and many other areas). Side note: Random cross SSRs cut the signal when the input changes, where zero cross wait until the AC signal reaches zero potential in its cycle - theoretically these are more efficient and generate less heat.
 
I just purchased your software a few hours ago, and I will download the program this evening. I was reading the user manual and wanted to know if there is any more documentation about the script functions anywhere. Specifically can you use the print function to print to a file and can you read information from a file. Any help would be appreciated. Once I install the program I may be able to figure some of it on my own but any help would be great. Thanks!

Yes you did - thank you!

You can not currently print to a file... but this is a good idea to add in the future!

The manual currently documents all the commands and statements. If you are looking to do something unique or don't understand the language, feel free to post it here. We expect to push a firmware and software update in the next few days, which will add a few minor changes and several bug fixes.
 
Back
Top