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.
There is this one:
http://rover.ebay.com/rover/1/711-5...0001&campid=5338413729&icep_item=292191073772

Looks like Brass and I just got a reply seconds ago if food safe, They say it is. I am ordering two. It goes to 100 C!

Should work, but a couple of caveats:
1. The "ambient" temp listed goes to 100C but I have seen similar sensors say 80C. I wouldn't sweat this as 85 is not much more than 80.
2. The threads on this are G (British Standard). I will interface with NPT with enough thread tape but know they are not technically compatible.
3. I'm personally not a fan of brass in food service applications - make your own decisions here.
4. The 400 pulse per liter rating is OK but if using at at sparge rates will not give you much resolution.

FM's are a bit tricky... lot's to consider when looking across the specs. I chuckle knowing I use a ~$15 unit on my rig with decent success.
 
I must say that the IFM SM6004 sensor, while having a few limitations, provides very accurate flow measurement.

https://www.ifm.com/us/en/product/SM6004

Yes it is limited to 80 C and 6.6 gpm but the temp limit is only limiting the bonus temp output as it is really a flow meter and the 6.6 gpm is not a value I even remotely approach so it is not technically a limit. Its wetted MOCs are 316L and PEEK, plus there is even a local display. You do need to convert the 4-20 mA output to voltage such that the MEGA can read the info but it is not hard to do that.

If you needed higher flow rate ranges, the SM8004 goes up to 26.4 gpm.
 
Last edited:
I must say that the IFM SM6004 sensor, while having a few limitations, provides very accurate flow measurement.

https://www.ifm.com/us/en/product/SM6004

Yes it is limited to 80 C and 6.6 gpm but the temp limit is only limiting the bonus temp output as it is really a flow meter and the 6.6 gpm is not a value I even remotely approach so it is not technically a limit. It is 316L and has a local display. You do need to convert the 4-20 mA output to voltage such that the MEGA can read the info but it is not hard to do that.

If you needed higher flow rate ranges, the SM8004 goes up to 26.4 gpm.
For that price why not go with a micro motion or other mass flow meter off ebay and measure both flow and specific gravity.
 
For that price why not go with a micro motion or other mass flow meter off ebay and measure both flow and specific gravity.

Price is going to vary. I got mine off of ebay for $130, so that is why not :). They are also super compact, easy to program with the local display, they also have a common 4-wire M12 connector. Don't get me wrong, mass flow meters are my choice at work as I work with DI & WFI and mag meters don't work particularly well with those of course.
 
Price is going to vary. I got mine off of ebay for $130, so that is why not :). They are also super compact, easy to program with the local display, they also have a common 4-wire M12 connector. Don't get me wrong, mass flow meters are my choice at work as I work with DI & WFI and mag meters don't work particularly well with those of course.
I found a couple on Ebay for $55. What do I need to look for to make sure I'm not getting the wrong thing? I know nothing about flow meters.
 
Micro Motions I see on Ebay are $$$$$$$. Brass is not my favorite either but who wants to live forever? My water meter at the front of my property is brass. The connections on my hot water heater are brass. Bras or Plastic, pick you poison.
 
I found a couple on Ebay for $55. What do I need to look for to make sure I'm not getting the wrong thing? I know nothing about flow meters.

Well, you need to be sure that the FM meets your needs for measuring flow (range) and I would make sure to get a unit that includes the mounting adapters. The flow meter has a G 1/2 coupling (BSPP...British Standard Pipe Parallel thread) and you are likely to want the adapter that goes from this to 1/2" NPT. The IFM adapter is the E40200 and is $60 new for a pair. So you really want to get a unit with these adapters to keep cost down. For larger flow meters (SM8004), larger adapters are of course needed.

You are also going to need something to convert the 4-20mA output of the flow meter to a voltage so that the MEGA can read it. I used the one below (you need two if you want to bring in the flow and temp signals), it works and is $8.50.
https://www.amazon.com/gp/product/B073PRCDY2/?tag=skimlinks_replacement-20

Lastly you are going to need a M12 connector or a cable with a M12 connector already on it. I used this one.
https://www.amazon.com/gp/product/B01MS9PRF6/?tag=skimlinks_replacement-20
 
Last edited:
Well, you need to be sure that the FM meets your needs for measuring flow (range) and I would make sure to get a unit that includes the mounting adapters. The flow meter has a G 1/2 coupling (BSPP...British Standard Pipe Parallel thread) and you are likely to want the adapter that goes from this to 1/2" NPT. The IFM adapter is the E40200 and is $60 new for a pair. So you really want to get a unit with these adapters to keep cost down. For larger flow meters (SM8004), larger adapters are of course needed.

You are also going to need something to convert the 4-20mA output of the flow meter to a voltage so that the MEGA can read it. I used the one below (you need two if you want to bring in the flow and temp signals), it works and is $8.50.
https://www.amazon.com/gp/product/B073PRCDY2/?tag=skimlinks_replacement-20

Lastly you are going to need a M12 connector or a cable with a M12 connector already on it. I used this one.
https://www.amazon.com/gp/product/B01MS9PRF6/?tag=skimlinks_replacement-20
Thanks. Great info. Any concern about finding out what they were used for previously, or is it not essential with them being stainless steel?
 
The ifm units are awesome. I almost pulled the trigger myself, but for my personal rig, I need adequate resolution for sparging on the fly. At 1 qpm (~1 lpm) my current sensor puts out about 10 pulses per second. Much less than that and I can't make fine adjustments to the proprtional valve which adjusts based on the flowmeter. The ifm, if I recall correctly, has a much lower pulse rate, even at the finest setting.
 
Hey all... update on v1.1 Release Candidate: I know I promised to post it, but we found a memory leak that is attributed to the code which updates the cursor in scripts when they are running. That exists within a third-party library we use for the front end, so we have notified the company who developed it for a fix. We feel this is important, so did not want to release it with this. I will keep you updated.
 
Well, you need to be sure that the FM meets your needs for measuring flow (range) and I would make sure to get a unit that includes the mounting adapters. The flow meter has a G 1/2 coupling (BSPP...British Standard Pipe Parallel thread) and you are likely to want the adapter that goes from this to 1/2" NPT. The IFM adapter is the E40200 and is $60 new for a pair. So you really want to get a unit with these adapters to keep cost down. For larger flow meters (SM8004), larger adapters are of course needed.

You are also going to need something to convert the 4-20mA output of the flow meter to a voltage so that the MEGA can read it. I used the one below (you need two if you want to bring in the flow and temp signals), it works and is $8.50.
https://www.amazon.com/gp/product/B073PRCDY2/?tag=skimlinks_replacement-20

Lastly you are going to need a M12 connector or a cable with a M12 connector already on it. I used this one.
https://www.amazon.com/gp/product/B01MS9PRF6/?tag=skimlinks_replacement-20


The mega can read 4-20 just fine. 250ohm resistor and the scale is 1-5v. I have like 10+ 4-20's going into my megas.
 
The ifm units are awesome. I almost pulled the trigger myself, but for my personal rig, I need adequate resolution for sparging on the fly. At 1 qpm (~1 lpm) my current sensor puts out about 10 pulses per second. Much less than that and I can't make fine adjustments to the proprtional valve which adjusts based on the flowmeter. The ifm, if I recall correctly, has a much lower pulse rate, even at the finest setting.

Hey @BrunDog, please forgive me for a dumb question. I don't know much about any of this stuff, so I feel silly questioning someone with 1000 times the knowledge I have, but...

Since the ifm outputs the signal at 4-20ma, which we will be converting to 1-5v for the arduino, isn't this going to be treated more like a pressure sensor than a pulse count flow meter. Therefore, the pulse count per second isn't an issue as you're not counting the pulses but rather converting the signal voltage to some flow rate on a scale between 0 and 6.6gpm (or whatever the max flow rate is on the meter)? If that's the case, I'd assume that having the input pulsed at 25 times per minute at 1 quart/minute sparge is more than enough (I think I saw in their literature that it pulses up to 100 times per gallon), and I'd assume that we'd probably be smoothing that somehow anyway.

I pulled the trigger on two of them, so the point is moot, but they will work well for me as I transition to an automated setup. During my transition, I'll try using the display on those meters to match my flow rates manually. If they end up working for the final build, even better.

edited to correct a math error...
 
Last edited:
Thanks. Great info. Any concern about finding out what they were used for previously, or is it not essential with them being stainless steel?

That is a judgement call. The wetted parts are SS 316L and PEEK. SS is easy cleaned and passivated and PEEK (polyetheretherketone) is a polymer that has great properties as it relates to chemical resistance, mechanical strength, etc. and can also be cleaned quite well. So at least the materials in the IFM FM are such that they could be cleaned if they have been exposed to something nasty. Some polymers can "absorb" previous product contact and leach it out later under the right conditions. So I would say yes it matters but it can be remedied one way or another in most cases.
 
The ifm units are awesome. I almost pulled the trigger myself, but for my personal rig, I need adequate resolution for sparging on the fly. At 1 qpm (~1 lpm) my current sensor puts out about 10 pulses per second. Much less than that and I can't make fine adjustments to the proprtional valve which adjusts based on the flowmeter. The ifm, if I recall correctly, has a much lower pulse rate, even at the finest setting.

The SM6004 units that I have and others are seeing on ebay do not have a pulse functionality as it lacks the totalizer functionality. The SM6004 unit outputs flow rate and temp only. I have the simple hall effect flow meters installed for totalizing functionality but I wanted a more accurate flow rate value as I will be running a horizontal RIMS setup and I need to pump out of the boil kettle at the same rate that I am pulling out of the MLT.

The SM6000 unit, however, does have the pulse output and totalizer functionality. I do not own a SM6000 but its pulse rate is adjustable via setting the volume that needs to pass for a pulse to occur. I believe the minimum for a pulse is 0.01l. That is indeed only ~1.67 pulses per second at 1 lpm. This is why I would agree it is not useful as a totalizer in this application.
 
The SM6004 units that I have and others are seeing on ebay do not have a pulse functionality as it lacks the totalizer functionality. The SM6004 unit outputs flow rate and temp only. I have the simple hall effect flow meters installed for totalizing functionality but I wanted a more accurate flow rate value as I will be running a horizontal RIMS setup and I need to pump out of the boil kettle at the same rate that I am pulling out of the MLT.

The SM6000 unit, however, does have the pulse output and totalizer functionality. I do not own a SM6000 but its pulse rate is adjustable via setting the volume that needs to pass for a pulse to occur. I believe the minimum for a pulse is 0.01l. That is indeed only ~1.67 pulses per second at 1 lpm. This is why I would agree it is not useful as a totalizer in this application.
Sorry that you're having to provide an education lesson for a dolt.

So if the SM6004 outputs the flow rate, does that mean that the arduino will be able to read that as, say, .25gpm, which I could then use in a script as a way to then open or close a proportional valve until I reach a desired flow rate?
 
Sorry that you're having to provide an education lesson for a dolt.

So if the SM6004 outputs the flow rate, does that mean that the arduino will be able to read that as, say, .25gpm, which I could then use in a script as a way to then open or close a proportional valve until I reach a desired flow rate?

That is perhaps best answered by BrunDog as I am in the early stages of testing that control but that is what I intend to do. That methodology is a common means to control a pump to produce a desired flow rate in industrial control systems.
 
Hey @BrunDog, please forgive me for a dumb question. I don't know much about any of this stuff, so I feel silly questioning someone with 1000 times the knowledge I have, but...

Since the ifm outputs the signal at 4-20ma, which we will be converting to 1-5v for the arduino, isn't this going to be treated more like a pressure sensor than a pulse count flow meter. Therefore, the pulse count per second isn't an issue as you're not counting the pulses but rather converting the signal voltage to some flow rate on a scale between 0 and 6.6gpm (or whatever the max flow rate is on the meter)? If that's the case, I'd assume that having the input pulsed at 25 times per minute at 1 quart/minute sparge is more than enough (I think I saw in their literature that it pulses up to 100 times per gallon), and I'd assume that we'd probably be smoothing that somehow anyway.

I pulled the trigger on two of them, so the point is moot, but they will work well for me as I transition to an automated setup. During my transition, I'll try using the display on those meters to match my flow rates manually. If they end up working for the final build, even better.

edited to correct a math error...

No dumb questions! We have typically used Hall effect flowmeters which have a wheel or turbine spin with the liquid, which generates pulses (via some circuitry). So counting pulses tells us the amount of fluid that has gone through aka “totalizing” or counting. Measuring the change of the counting over time allows us to calculate the rate. BruControl’s counter device element does this.

Now if you used a flowmeter that outputs an analog signal, it would be already measuring the rate. From that you would need to calculate the total amount, which could be done in BruControl via a script to add up the rate over time.

Hopefully that sheds some light. Again, FM’s can be a bit tricky as you need to look at all the specs and make sure they will work in your application such as flow rate min and max, temps, etc.
 
The SM6004 units that I have and others are seeing on ebay do not have a pulse functionality as it lacks the totalizer functionality. The SM6004 unit outputs flow rate and temp only. I have the simple hall effect flow meters installed for totalizing functionality but I wanted a more accurate flow rate value as I will be running a horizontal RIMS setup and I need to pump out of the boil kettle at the same rate that I am pulling out of the MLT.

The SM6000 unit, however, does have the pulse output and totalizer functionality. I do not own a SM6000 but its pulse rate is adjustable via setting the volume that needs to pass for a pulse to occur. I believe the minimum for a pulse is 0.01l. That is indeed only ~1.67 pulses per second at 1 lpm. This is why I would agree it is not useful as a totalizer in this application.

Yep, sounds right based on my previous research.

BTW I suggest you mount a RIMs vertically. If you heat aggressively you will get better performance, plus if flow stops, the rising hot liquid will prevent continued heating as the PID in inhibited by the high temp.

Also FYI I originally tried to match flow rates for sparging and found better reliability using a volume sensor in the MLT and using it to do electronic auto sparging.
 
Sorry that you're having to provide an education lesson for a dolt.

So if the SM6004 outputs the flow rate, does that mean that the arduino will be able to read that as, say, .25gpm, which I could then use in a script as a way to then open or close a proportional valve until I reach a desired flow rate?

Indeed. It’s measuring the total that takes a bit more work. But not much.
 
BTW I suggest you mount a RIMs vertically. If you heat aggressively you will get better performance, plus if flow stops, the rising hot liquid will prevent continued heating as the PID in inhibited by the high temp.

Sorry I wasn't clearer on my "horizontal" moniker for my RIMS setup. Horizontal is in reference to the location of the two vessels (side by side), not a RIMS heating element. Think of it as the opposite of the Blichmann BrewEasy which would be a vertical, or gravity, arrangement. My primary heat source is a Boilcoil in the boil kettle. I do have a Blichmann RIMS rocket that is in the flow path just as a secondary unit to shorten the time to get from one temp to another when large changes are required (going to strike from ambient for example). My plan is to do temp control via a sensor in the boil kettle (that is my plan anyway) while I will have a temp sensor on the exit of my vertical RIMS tube to keep track of things.

The arrangement would be like this with the BK and the MLT side by side (I do not have this particular Blichmann setup but this illustrates the arrangement well).
aHoriz-Elec-TK-20gal-BE.jpg
 
Last edited:
Yep, sounds right based on my previous research.
Also FYI I originally tried to match flow rates for sparging and found better reliability using a volume sensor in the MLT and using it to do electronic auto sparging.

I do need to play around with this but the primary goal is to set the boil kettle pump at say 1 gpm to send fluid into the MLT and then bring fluid out of the MLT back over to the BK at 1 gpm (the Blichmann autosparge could be deployed in this scenario as well to aid in level control but I am not sure on that). The primary control is that each pump has its own PID loop controlling flow via feedback from their own FM independently. There would be no need to compare the flow of each in this type of control scenario. However, the concern is around a stuck mash and maintaining the fluid level in the MLT (i.e. not pulling too much fluid out compared to what is coming in and/or running into a stuck mash). So some comparative scripting should be able to watch for this scenario (like a drop in MLT flow).

I choose to use DC pumps with the built in analog input to control pump RPM instead of control via a proportioning valve so I am not sure what effect this will have on control capabilities. I have been able to get it to work but I need to tune the PID settings a bit.
 
Ok, sounds good. Looking forward to your results.

Regarding stuck mash, I have also found that the hydrostatic pressure sensor works for for detection. After I dough in, I let the sensor measure the total volume and store it in a variable. The during the mash, if that volume drops below a certain amount, the mash is considered “sticking” and the proportional valve closes a bit. If the volume is correct, the proportional opens a bit. So through the mash, the valve operates automatically to keep the mash in a “pre-sticking” state. I find that by about 20 minutes in, the valve reaches maximum open (limited to 60%) and the flow rate is really fast.
 
Yeah I have a lot of theory and assumption going on here based on experience in other automation platforms and applications. I hope this is how it will work but once I buckle down and get into some scripting and control aspects, I will find out if I need to examine different routes or sensor inputs to get the control to happen as I wish it to. I am just about there aside from getting my mass input setup in some fashion.

Thanks for the input on the pressure sensor for use in determining a stuck mash. I will keep that in mind.
 
Last edited:
That would be my concern. I personally don’t fully understand the allure of saving a few bucks to have a poor operating experience. The hardware is already complex and has an associated cost - why skimp on the front end?

I really want to have the BC device in a panel, which means not using a full size PC or laptop or whatever, a DIN-rail mount PC bought new just for this is a waste... 3B+ is quad core, so I think it has some decent power.
 
Thank you @swimIan and @adman for pointing out and verifying the above. As it turns out, you are correct. We have a limiter that has been in the firmware for a long while that did not accept a scenario where the Max Integral would be higher than the Max Output. The problem is BC software doesn't have the same expectation, so it accepted the parameters.When those parameters were passed to the interface, the interface ignored them internally.

We have made the change in v44K and will post up the update later today. Once again, thank you for reporting the issue!

so if I load the new v44, and set max integral to 50 and max output to 100, will it eventually ramp up to 100% output? I experienced this issue back in December... in post 1547
 
I really want to have the BC device in a panel, which means not using a full size PC or laptop or whatever, a DIN-rail mount PC bought new just for this is a waste... 3B+ is quad core, so I think it has some decent power.

As I said, I'm down for the experiment. Mini PC's can used too are aren't much bigger. I use one on my personal rig, though admittedly its just for screen sharing.
 
so if I load the new v44, and set max integral to 50 and max output to 100, will it eventually ramp up to 100% output? I experienced this issue back in December... in post 1547

With a limited integral, it may not wind up to max output, and it should not. Keep in mind that the Proportional component typically plays a role too, so if the target is not being achieved, the Proportional component may make up the rest of the error to reach max output.

Anyway, it doesn't sound like your situation is the problem which was fixed (not sure it should be - I'll go back and look at the post). What was remedied is a situation where the max output is below the max integral, which wasn't accepted by the interface.
 
Just to make sure I'm reading your site correctly, if I purchase brucontrol for my laptop now and later buy a mini pc I can remove it from my laptop and then download it onto my new computer?
 
Yes, you can always move it.
Thanks for the immediate response, I've learned so much from this thread. I'm working with Stout now for my dream setup and am still sketching out how I want to automate my system. Once I get everything sorted out I'll be purchasing this and probably a lot more from you.
 
With a limited integral, it may not wind up to max output, and it should not. Keep in mind that the Proportional component typically plays a role too, so if the target is not being achieved, the Proportional component may make up the rest of the error to reach max output.

Anyway, it doesn't sound like your situation is the problem which was fixed (not sure it should be - I'll go back and look at the post). What was remedied is a situation where the max output is below the max integral, which wasn't accepted by the interface.

I disagree...

Integral is feedback of accumulated error, it has nothing to do with the max output level... in fact, the longer the error exists, the more the integral builds up and increases towards max of the system..

per wiki, you will also see nothing about any out limit:
Integral[edit]
An integral term increases action in relation not only to the error but also the time for which it has persisted. So, if applied force is not enough to bring the error to zero, this force will be increased as time passes. A pure "I" controller could bring the error to zero, however, it would be both slow reacting at the start (because action would be small at the beginning, needing time to get significant) and brutal (the action increases as long as the error is positive, even if the error has started to approach zero).

I have never seen a discrete PID act this way...
 
I'm not sure what you are disagreeing with... I didn't say integral has anything to do with max output. I said that if you limit the integral, alone it may not generate enough error to reach the max output of 100, which you asked about earlier.

Anyway, I can assure you the algorithm is correct. If you find it isn't, let me know how/why in your application and we'll check it carefully.
 
It may have just been that way in v43 firmware... Before I upgraded to v44, if I left Max Integral at the default of 50 (and default max output of 100) it would never reach 100% graph on post 1540, notes on post 1547. I just built a PID now and it seems to go to 100%
 
Calibration items for PWM vs PID: (I have a manual(PWM) and a PID element configured for the same output (and only enable one at a time) for automatic and manual control)
PWM(manual) require a 2.55 linear multiplier to display 0-100%
PID(Auto) require a .392 linear multiplier to display 0-100%​
Why is this? I think it has something to do with what is being calculated from what, but I am missing something...

Reverse operation of PID and PWM:
In PID(Auto), I can change it from +.392 to -.392 and it alters the automatic 0 to -255 output to 100-0 display... perfect, works great...
In PWM(Manual), logic tells me that I could take 0% to 100% on the display to actually output 255 to 0 by:
linear multiplier of -2.55
offset of -255 (adding 255) <---this does not work...

How do I use calibrations to make 0% to 100% on the display to output 255 to 0 on the analog out?​
 
I'm not sure what you are disagreeing with...

you stated "With a limited integral, it may not wind up to max output"....

With any integral larger than 0, correction will will build up over time and as wiki has it " An integral term increases action in relation not only to the error but also the time for which it has persisted. So, if applied force is not enough to bring the error to zero, this force will be increased as time passes. "

now, 'Max Integral' - maybe it just needs a better name or clearer definition?
Is this more correct?
Integral Limit - "Maximum output that can be given by the integral function, as a percent of total possible output. *note - reducing this below 100 may keep output from reaching 255."​
 
Good questions. Agreed it is a bit wonky why the calibrations for PIDs and PWMs aren’t the same. Technically the PWM is an “outputted” value from BC and PID is a calculated “inputted” value to BC from the interface. Crappy explanation but it’s the best I have.

Regarding the second question... I’ll have to test it myself. The only reason I could see for doing this is if you have an active-low switched device, like the N-channel FETs mentioned a little while back.
 
you stated "With a limited integral, it may not wind up to max output"....

With any integral larger than 0, correction will will build up over time and as wiki has it " An integral term increases action in relation not only to the error but also the time for which it has persisted. So, if applied force is not enough to bring the error to zero, this force will be increased as time passes. "

now, 'Max Integral' - maybe it just needs a better name or clearer definition?
Is this more correct?
Integral Limit - "Maximum output that can be given by the integral function, as a percent of total possible output. *note - reducing this below 100 may keep output from reaching 255."​

With a limited integral (Max Integral set below 100%), it will only wind up so far, independent of how much time is allowed. So max output (full ON) my not get achieved.

Yes, your definition clarification makes more sense. We were perhaps a little hasty with the naming. Hopefully the manual adds clarity.
 

Latest posts

Back
Top