Digital sight glass

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.
Joined
Jul 24, 2006
Messages
14,260
Reaction score
786
Location
Southwest
As many of you know, I use an Arduino microcontroller to monitor and automate much of my brew process. I'm planning a major upgrade to my home brewery, including a complete rework of the microcontroller code and functionality. The project is largely on hold right now (mostly due to the crappy housing market), but I've been tinkering with a few bits and pieces lately.

I want a means of electronically measuring the fluid level in my mash tun and boil kettle, but a mechanical float-type level sensor will just get in the way (or get broken). Sure, a float switch would work, but it won't necessarily measure the fluid level without some manual intervention. So, I started looking at other sensor types and brainstorming. Here's the result:

My mash tun and boil kettle are about 20 inches tall, so if I run a thin tube down the side (vertically), and cap it, the pressure inside that tube will be 0 - 20 inches of water (or roughly .75 psi, max). Using a simple calibration scheme and conversion factor, that pressure can be measured and translated to kettle volume. The Freescale MPXV5010DP is a 0 - 10 kPa (0 - 1.45 psi) that operates on 5 VDC and generates a 0.2 - 4.7 VDC output signal that is proportional to pressure at a plastic port - perfect for measuring the pressure on a digital "sight glass."

Bench testing the 5010 sensor results in output that (with 10 bit ADC) is sensitive to within .1", which should be quite sufficient for the application. More to follow as I (very slowly) build the new system.

EDIT:
Turns out that my idea isn't exactly original. A bit of Googling turns up this paper by Freescale, detailing the use of a very similar sensor as a level sensor.
 
I did a similar project back in school using PLC based control. It worked really really well. We had a couple different tanks and flow sensors to control input and output at various stage to keep a set water level (with their flow set by tank level). If I remember correctly it stayed within a few mm on the water level.
 
When I started reading, I thought you were going to measure the weight of the boil kettle to determine how much liquid was in the pot. Head pressure would be a good test as well.

Did you use your Arduino to measure pressure of your steam system?
 
Heat won't be an issue - I'll use a stainless tube inside the kettle with a plastic or hard rubber coupler that runs to the sensor.

I use the Arduino to measure and control the steam rig.
 
Yuri, you are a fricken gadget stud. I'm druck and not really adding to this thread, but just wanted to let you know how cool you are. And since you are a mod, I'm going to give you some respect. You ROCK, SIR!!!!
 
I was curious as to location of sensor and exposure to combustion, and effects of heat on trapped air in sensing tube as water warmed and air expanded. The fun part comes with trying to work out a scaling factor that works with a rounded bottom tank.
 
another nice aspect is it wouldn't be affected by the volume change of the water as it's heated (though it would be affected by the density)
 
another nice aspect is it wouldn't be affected by the volume change of the water as it's heated (though it would be affected by the density)

But wouldn't it be affected by the expansion of the air in the chamber? I would assume that it has to be in a closed chamber so as the air heats the pressure will increase.
 
Have a look at this guy's system Emile's Home-Brewing site: My Brewing Setup In particular the hardware section with a description of his MPX-based volume measurement. He seems to have have a working version of this and a whole lot more.


rlodian; thanks for posting Emile's Home-Brewing site, very intresting, simple, informative and to the point. Added this to my file.
 
Damn...just take the wind right out of my sails! First, I thought I had a fairly original idea - using a cheap pressure transducer as a means of volume measurement...only to find Freescale documentation outlining the procedure. Then I thought, "well, at least I'll be the first homebrewer to use that method." Wrong again!

At least I don't need an amplifier - I got a sensor that is intended for use with a microprocessor ADC. So there.

Thanks for the link! I'm going to do some light reading now...
 
Sweet idea. I develop sensors for a living so I have access to a few low pressure sensors that I'm definitely going to try this with.

BTW, I'm using Arduino as well for my brew-rig in progress. So far only basic PID temp control via electric element and serial data logging via Processing implemented but the sky's the limit.
 
I've been tinkering with building a HERMS system, and I thought of using electronic scales to gather the volume of liquid in the tuns. Though because of the lack of time I have to play around with the stuff i've bought i'm not sure how well it will work. Anyone else tried this?
 
What do you think is the best way to mount the transducer mechanically? Looking at the Freescale app note, I'm thinking that you could just run tubing right off of the top of an existing site glass.
 
You could run tubing off the sight glass, but your sight glass would stop being a sight glass. Try this experiment: take a drinking straw, put your finger over one end and push the other end down into a glass of water. Does the straw fill? No, not until you release your finger and equalize pressure. Sealing a pressure sensor over the top of a sight glass would be like putting your finger over the straw. A second tube of any length should work, but there is the danger that a vigorous boil might force wort a ways up a short tube and damage the sensor. I suspect there is a reason that commercial kettles use CIP-able ultrasonic sensors instead.
 
your sight glass would stop being a sight glass
Yeah, it would become a digital sight glass.

Seriously though, I agree with you. It would be nice to have both. But once you get accustomed to reading and trusting the measurement off of a screen, losing manual measurement isn't a big deal. At least that's my experience with temperature measurements.
 
Does anyone have a suggestion on how to measure the weight of a mash tun with an Arduino?

I was thinking about measuring the weight and temperature of the mash tun.

The micro controller could determine how much grain was added. It would know the temperature of the grain.

It could suggest a temp and volume of strike water to reach a desired temp and water to grain ratio.

As the water was added, it could alert when the desired water volume was reached.

Jason
 
This is a great idea Yuri, I just ordered a few sensors and i'm going to have a play with this. I was just looking at sight glasses and wasn't really happy with the prices or designs. I'm thinking of coupling 3 of these sensors along with temp probes to a 4x20 LCD that way I can get stats on all three tanks.
 
How do you propose to clean the inside of the tube, in a MLT or BK, it's going to get pretty nasty. In an HLT? sure. I do think you'd have to do some kind of temperature compensation. If you're reading 8 gallons in the pot at 70F and start heating, it will definitely start reading as more volume as the air temp increases inside the tube.
 
I was planning on cleaning it the same way you clean any sight glass since it's basically the same thing just with a hose coming off the top of the tube to go to the sensor.

I would imagine the pressure would change but since i'm monitoring the temp with the same microprocessor, compensation in the code should be easy.
 
I was planning on cleaning it the same way you clean any sight glass since it's basically the same thing just with a hose coming off the top of the tube to go to the sensor.

I would imagine the pressure would change but since i'm monitoring the temp with the same microprocessor, compensation in the code should be easy.

There is no need to take temp into account. Increasing the temp of the air in the tube won't affect the final pressure reading. Yes, air expands when heated, and in a sealed tube would increase pressure, but in this case, it's open ended. You also don't have to take the temp of the water into account...except in your initial calibration. The reason is because you aren't directly measuring volume. So while, the volume of a set amount of water does increase with temp, its density decreases by a corresponding amount, leaving you with the same total mass of water, and therefore the same pressure.
 
I've wondered about this too.

As for cleaning... It shouldn't be too bad. Liquid should not go all the way up the tube. It will be a compressed column of air. The pressure sensor will be positioned so it will not come in contact with the liquid.

As for temperature, the device described by Yuri is temperature compensating. It would be nice to see it work in action. My first test would be to bring tap water to a boil and see if the sensor detects a change in volume.

There should not be a build up of pressure since this is not a closed system. The pressure in the tube should be caused by head pressure.

Jason
 
Just to throw out an alternative solution you could use a float in a traditional sight glass with a series of infrared emitters and sensors. The float would block a specific sensor and that would be your volume. This is assuming that the light infrared light passes through the cylinderical sight tube to make a connection when empty.

This setup would be more complicated than the pressure based solution if you were looking for a decimal value to feed into a computer program but if you were just looking for a down and dirty method to set a cutoff you could use a many-pole switch (rotary, etc) to select the target sensor and the output could control a valve, pump, etc.
 
yeah I had thought of that but for the level of accuracy that I want it would be a lot of IR pairs :)
 
Yuri,

How are you interfacing your arduino with pc for display?

I am not finding much on the web. there is of course a ton of material on microcontrollers- I just would like to know how you use yours with a pc

Also, if I am understanding what your plan is for level measurement correctly, wouldn't it be a bit easier to cap both ends of the dip tube and use displacement pressure to measure level?

Mount your strain gauge to the top of the dip tube and head pressure will generate appropriate displacement forces upward against the strain gauge. Still need to account for specific gravity though. Maybe this is exactly what you're doing,
 
I'm using serial communication and custom Java software that I wrote in order to interface the Arduino and computer.

Rooster - see the paper referenced above for the concept. It's not a displacement measurement.

Temperature compensation is an issue, but I don't think it's going to affect the accuracy beyond that which is required for my intent. If it makes enough of a difference, I'll compensate in the software. After all, I intend to measure the temperature of the mash, anyway. FYI, the sensor itself is temperature compensated, but it's not going to allow for changes in water density as a result of temperature - I'll either have to take that into account or knowingly ignore it.

I'm not using a strain gauge, but there are plenty of documented ways to connect one to a microprocessor-based ADC. An op-amp based circuit seems most appropriate.
 
Yuri,

Have you had any luck with this? All my Arduino stuff comes next week and I would like to do something similar...

Phill
 
Hey Yuri,

For those of us who are a little less controller savy, do you know of any resources to learn the basics of digital controllers. Make magazine has inspired me to use controllers in some of my many projects (both beer and non beer). I just don't know where to start. PS I'm a water supply engineer, so i can handle technical manuals.
 
be aware that using head pressure to measure liquid level is also dependent on the specific gravity of the liquid...so as your boil progresses your S.G. increases and your sensor will actually "think" there is more liquid above it than there is..you will have to do the math on it...i don't know if the inaccuracy will be enough to worry about..but there will be one.

p=(hxS.G.)/2.31

p = pressure in psi.

h = height in feet

S.G.= specific gravity of the fluid

2.31 = a conversion factor. (2.31 feet of fresh water equals 1 psi.)
 
be aware that using head pressure to measure liquid level is also dependent on the specific gravity of the liquid...so as your boil progresses your S.G. increases and your sensor will actually "think" there is more liquid above it than there is..you will have to do the math on it...i don't know if the inaccuracy will be enough to worry about..but there will be one.

p=(hxS.G.)/2.31

p = pressure in psi.

h = height in feet

S.G.= specific gravity of the fluid

2.31 = a conversion factor. (2.31 feet of fresh water equals 1 psi.)

As has already been pointed out, you will also have to compensate for the expansion/contraction of the measured volume as it heats and cools. In my boil kettle, I observe a little over half a gallon difference on my pyrex sight glass from mash temp to boiling.
 
I'd bet you can use a constant ( say 1.040 SG) and get PDC... (Pretty darn close) .
For 2' of beer, there is about .04 diff every 10 SG points.

P H SG
4.62 2 1
4.6662 2 1.01
4.7124 2 1.02
4.7586 2 1.03
4.8048 2 1.04
4.851 2 1.05
4.8972 2 1.06
4.9434 2 1.07
 
As has already been pointed out, you will also have to compensate for the expansion/contraction of the measured volume as it heats and cools. In my boil kettle, I observe a little over half a gallon difference on my pyrex sight glass from mash temp to boiling.

that is true too....as you heat the liquid there is a slight increase in volume so there is a decrease in density with temperature...but the bigger area of concern would be that as the density increases because of water evaporating...the liquid you are measuring will actually be getting heavier per unit volume (the specific gravity)..because you are concentrating it more.

when we take specific gravity reading as home brewers most of our hydrometers are calibrated to a certain temperature (20 deg C i think) to standardize it.

the difference you see in the sight glass is due to thermal expansion and isn't really related to the specific gravity of the fluid.

ya you should be able to get PDC using a constant..you just might have to play around a bit to get the most accurate constant...and as long as you are aware of the error you can tailor it to suit your needs...good luck with the experiments!!
 
This is what I am using for my level sensing - Devantech SRF02 Sensor

Just scale the distance read to actual volume of the keggle. It is a linear scale and the sensor is up out of the way of everything, eliminating the cleaning issues.

That sounds like a decent solution, but pretty expensive... How well do the sensors hold up to heat and moisture? Mounting one in a hot water vessel seems like it would wreck it in short order. My HLT is covered to conserve heat, so it would have to be mounted inside with a significant amount of steam...
 
Hey Yuri,

For those of us who are a little less controller savy, do you know of any resources to learn the basics of digital controllers. Make magazine has inspired me to use controllers in some of my many projects (both beer and non beer). I just don't know where to start. PS I'm a water supply engineer, so i can handle technical manuals.

goto Arduino - HomePage

There is a huge amount of information there. There is what they call the Playground which has lots of code examples. There is a forum and there are also lots of other resources. I'm also working on an Arduino format to control and monitor my brewery. I'd always wanted to learn to code but always got too bored after "Hello World" and so this is a great platform for me to learn on since I can use the practical application for my brewery. I've learned a ton and found it to be very easy.

I really like this digital site glass concept. I have been thinking about the various ways to do this and pressure sensors were certainly one of them. I really like Bull's use of the ultrasonic sensor and I think that's probably the way to go. Bull, can it read through a lens? If it can read through a lens then it could be isolated from the steam and reasonably insulated from the heat. The only advantage I see with using the pressure sensor is that it can be remotely mounted and connected via tubing.

-Derrin aka Backyard Brewer
 
Back
Top