keg ultrasonic liquid level sensor.

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.

techbrewie

Well-Known Member
Joined
Nov 7, 2012
Messages
353
Reaction score
34
Location
Fargo
Hey all I had an idea I wanted to bounce off you regarding measuring keg volume electronically and reporting it to a controller. The three solutions that exist:

1). weight sensors.
2). flow sensors.
3). Sensing tap handle pulls and counting seconds pouring to calculate volume used using flow rate.

I'm going to buy a keg lid to experiment with. drill a small hole in the top through which I will run my wires. Attached to the bottom of the lid will be a ultrasonic sensor that would measure the exact distanct from the sensor to the liquid. Using that measurement and the exact dimensions inside the keg, I could accurately and continuously measure the exact liquid volume in the keg. my two concerns are

a). pressurizing effects on electrical components and the ultrasonic sensor. even though its a relatively low pressure i think it still deserves some consideration.

b). ability to re seal the keg to at least hold enough pressure to serve beer. (i could force carb and condition with normal keg lids).

the beauty of this idea is that the only modification is to an easily replaceable 10$ keg lid rather than messing with your beer lines, tap handles, kegerator etc. what do you guys think?
 
JB weld will seal the hole up well enough to hold pressure. You will want to pot your circuit to make it submersible and may want to worry about doing it in a food safe way. There are food safe adhesives and sealants available. Interesting idea.
 
Surprising that c) ability to withstand a hostile acidic fluid without contaminating same wasn't included in the list ;)

I think it would be cool to pull something off along this idea, especially if you could design the device that manipulates the transducers to support, say, six keg sensors (<= the fact that I have a six faucet keezer has absolutely nothing to do with that! ;) )

I'll definitely be following this thread. Hope it's a fruitful one!

Cheers! :mug:
 
I had the same idea, just am going about it differently. I'm doing the flow sensor method. I didn't want to deal with resealing the keg with wires coming out. And most weight sensors are not rated for continuous pressure (start to drift over time). Easiest solution for me is to use swivel nuts to seeedstudio.com's G1/2 flow sensor.
 
steven,
Flow sensors are the next best thing. They can measure flow to an acceptable degree of accuracy, however i have been looking for a way to get exact measurements because i am a little bit anal :p
You could either do this with an ultrasonic sensor or an infrared sensor. Infrared would be much easier to do, but im not 100% on the effects of infrared light on beer, even though it carries less energy than visible light. any thoughts on that would be helpful.

JB weld is an interesting idea, and wouldn't make contact with the beer, so as long as it doesn't release any airborne chemicals that would be the way to do it.

The unique part of this idea is that it would be exact in its measurements from what I understand this is unprecedented. Another idea may be to solder the gap shut, cover with jb weld on the outside? i may just have to pick up a lid and experiment. I guess.
 
IR will not hurt the beer. Besides, there's no reason you couldn't leave the IR off 99% of the time and just take sample measurements.

I have a feeling ultrasound won't work inside a keg due to echos.
 
so after some research it seems that jb weld after being cured is non toxic, and should leech any off flavors into the air. ordering up a keg top, wont get the sensor up and running yet. but ill put it together and pressurize with my Graff hoping for the best. *fingers crossed*
 
so it looks like I am going with an IR sensor sealing the top with JB weld. Endgame would be to program each IR sensor to read from its respective keg after each pour. (i have separate reed switch sensors to detect when a handle is pulled.) the only issure i can forsee is with the stout kegs running at 30 psi. unless you guys think the jb will hold.
 
You can't tell anything based on the pressure alone. The other very important factor is how much area your sensor takes up. At 30psi, if you drill 1 square-inch hole in your keg top (~1 1/8" diameter), your JB weld is going to have to hold 30 pounds of force. If you only have a 1/8" diameter hole, the force on the sensor is only 6 ounces.

I would just program the sensors to read every hour or minute or day or something. Or every 10 seconds if you want to. Why bother with reed switches?
 
The reed switch will be there for other "on pull" functionality. So I just figure that I might as well.
 
I fixed the radiator in my car after taking a rock hit about 15 years ago. It was a small hole but it made me a believer. I presume the hole you are making is just big enough for two or three wires to pass through.
I tried to use an IR thermometer to measure water and it more or less saw right through the water to the bottom of the pot (where it was hot from the stove). Will this be a problem with an IR distance sensor and beer of some color?
 
ultrasonic distance finders have been discussed before. ive never seen one made to work.

probably a more accurate (and sanitary) way to do it would be to put a mass flow sensor in the gas line, and a gas pressure sensor. with those two measurements (plus temperature), you can calculate the volume of headspace in the keg, and by extension, how much liquid is left.

if you know you put in x-amount (mass) of CO2, and X-amount of gas raised the pressure by Y-number of PSI, you can determine volume of space filled by the gas by the formula pv=RT (ideal gas law).
 
Couldn't you simply base the calculation off the weight of the keg. In other words, weight the keg with no beer in it, weight it full, subtract these values and convert that weight into gallons of beer. You'd have to leave the keg on a scale, or perhaps check it at intervals, but at least you wouldn't have something floating in the keg with a jb welded lid.
 
Often wondered if a float fit around the tube out reading distance. Use them to read how much we have inside of 55 gallon drums at work. Brighter minds please chime in.
 
JB weld will seal the hole up well enough to hold pressure. You will want to pot your circuit to make it submersible and may want to worry about doing it in a food safe way. There are food safe adhesives and sealants available. Interesting idea.

Couldn't you simply base the calculation off the weight of the keg. In other words, weight the keg with no beer in it, weight it full, subtract these values and convert that weight into gallons of beer. You'd have to leave the keg on a scale, or perhaps check it at intervals, but at least you wouldn't have something floating in the keg with a jb welded lid.

JB Weld is food safe.
 
No it ain't. Show me where it says that.

Please don't immediately naysay without doing your own fact checking and/or basic search.

First off, as a chemical engineer and former hazardous waste lab pack chemist, we encountered JB Weld and other isocyanates all of the time. Unmixed and uncured they are considered a flammable solid, class 4.1. However, that is because when mixed, the resin and hardeners actually undergo an exothermic reaction and release heat in small quantities. That being said, once cured and all solvents have evaporated (15-24 hrs of set time), the now uniform solid gray putty is virtually an inert piece of plastic. Unmixed JB weld and other isocyanates were always packed separately from each other (i.e. resin in one bucket, hardener in the other), but cured and hardened JB Weld and other isocyanates were tossed into the drums with all of the other non-hazardous chemicals (i.e. talc, sodium chloride and other salts, and tons of other chemicals). As an aside, I never once got a ticket for improper packaging of materials and I also never screwed up a drum inventory or manifest.

http://www.jbweld.com/faqs/

Read the JB Weld FAQ page and see what it says. It states that "When fully cured, J-B Weld is non-toxic. However, we do not recommend consuming the product." So don't go eating any. Also, it states that "Original J-B Weld can withstand a constant temperature of 500ºF.", which is far below the temp you'll be storing beer at (35-55ºF). And to top it off, it states that "When fully cured, J-B Weld is completely resistant to water, gasoline, and about every other petroleum product or automotive chemical." So it will not just dissolve into your beer.

I now point you to a post I found right here on HBT: https://www.homebrewtalk.com/f51/will-exposed-jb-weld-cause-problems-hlt-195002/#post2266853

This post has a link to an NSF certified test of several JB Weld products in contact with a potable water system. It states that "The exposed surface area of each sealant in a household distribution system shall not exceed 1.3 sq. cm/L or .2 sq. in./L." So let's do some simple math.

5 gallons = 19 Liters and 19 L * 0.2 sq. in./L = 3.8 sq. in. or 24.7 sq. cm for the non-Americans out there.

This tells me that unless you decide to coat 3.8 sq. inches of the inside surface of your corny keg with JB Weld and it's in constant contact with your beer, you'll be completely fine.

http://www.jbweld.com/wp-content/uploads/2012/08/J-B-Weld-MSDS.pdf

Lastly, we turn to the actual MSDS of JB Weld. If you look at the ingredients list many of them are food safe in and of themselves. The ones in question are all either solvents (they evaporate completely upon full cure) or active ingredients (they are rendered inert by the curing reaction). So there you have it. JB Weld is fine to use for sealing a small 1/4" hole with a level sensor at the top of the keg that is unexposed to beer. Of course, you can always choose to use something else, but that's all your own preference.
 
^^^^^^^^^^
One of the MOST AWESOME post's I've seen in a LONG time... No name-calling, but presented the facts from several sources... Good job man!

On a side note: I just fixed the humidifier in my boy's room with JB Weld. My wife was concerned about the chemicals leeching into the water in the reservoir. Boy was she surprised when I assured her that JB Weld was indeed a food-safe product.
 
^^^^^^^^^^
One of the MOST AWESOME post's I've seen in a LONG time... No name-calling, but presented the facts from several sources... Good job man!

Can I get a post like? Haha thanks. Ya, I'm not into all that flame war shiz. Just all about setting records straight and helping out the other homebrewers out there who might not have as much chemical knowledge as myself. I'm actually glad Alien posted that because that gave me the impetus to put together that lengthy post in response.
 
JB Weld is food safe.

Thank you for providing some justification to your initial statement, which was provided without any justification or qualification. My response was in kind. It happens that I am an epidemiologist who works in the pharmacological sector. So I have a little knowledge of what it takes to get marketing approval for a substance. :)

The data are very interesting and many people will agree with your judgment call. But the fact remains that there are epoxy resins approved by the FDA as food grade and JB Weld is not one of them. Do you know for sure that JB Weld passes the toxicological requirements of FDA specifications CFR 175.105 and CFR 175.300?

I'm not saying that's the only relevant criterion for home brewers. What you mean by "food safe" may be something different. But if you are talking about "food safe" epoxy to me, that's what I understand it to mean.
 
Thank you for providing some justification to your initial statement, which was provided without any justification or qualification. My response was in kind.

The data are very interesting and many people will agree with your judgment call. But the fact remains that there are FDA approved epoxy resins and JB Weld is not one of them.

I agree, there are FDA approved (read: "Food Safe" label) resins out there, but they don't always have the general availability, bond strength, temperature range, pressure range and versatility that JB Weld and other "over-the-counter" resins have. FDA approval also costs money and JB Weld was originally intended for a different market. My challenge to you, Alien, is to find a readily available (i.e. at Menards, True Value, Lowe's, Home Depot, Ace, etc...) food grade epoxy resin that is reasonably similar in function and cost to JB Weld and then present your findings to us here on this HBT thread. That would help a ton of homebrewers and I would bow to you sir.

Maybe if all of us homebrewers out there unite and sign a petition for the makers of JB Weld to seek FDA approval they just might open the check book and get after it. Who wants to champion that cause?

EDIT: To clarify, in this application I feel it is fine, but I'd be a little more hesitant to use it on a pinhole repair of my MT, HLT, or BK. The conditions of contact with high temp, low pH wort for an extended period of time probably don't make it easy on the weld. In those cases, if you absolutely must use an epoxy resin, either you should find one that is FDA approved or be as careful as possible with correct 1:1 mixing ratios with something like JB Weld and then after allowing it to cure for 24-48 hours, hit the weld with a test boil of plain water to drive off any residual contaminants and "cure" the surface. Alien, you clearly are informed as well and I agree, I should have clarified my first post.
 
:mug:
This is more fun than the brass fittings/lead threads.
Thank you gents:rockin:
 
Let's shake hands at this point because I think we are on the same page really. JB weld used appropriately is probably safe enough, and the stuff in your post was quite persuasive. :mug:

Unfortunately food grade epoxies cost about 20x what JB Weld does. Jumping through that hoop is expensive and products that make the grade can charge consumers appropriately.

FWIW I would be totally happy drinking your beer. I think many materials can be adapted with reasonable safety even if they were not designed for that purpose. My mashtun has silicone sealant in that was not specifically approved by the FDA, but I found out enough about what goes in it to be happy that it was safe enough for me. IMO the potable water criterion is generally a sensible one, although beer is also acidic and alcoholic, so a little extra caution is justified as you say.

In truth, I haven't really looked very closely into what goes into epoxy resins, but the fact that they are 2-part compounds makes me slightly nervous because in the wrong proportions you could get unmixed resin or hardener exposed to the beer. On the whole I'd rather avoid it, but I am sure that miniscule areas of properly mixed, dried epoxy are not going to cause a lot of health problems any time soon. So, I guess I wouldn't use it to patch a hole in a kettle (which is what JB weld is really for) but I wouldn't have a problem with, say, using an epoxy thread sealant which was listed as OK for potable water but not certified as food grade. I know some people prefer JB weld to silicone for that purpose because it doesn't go mouldy. It's a judgment call and I could go either way, but what ever I chose I would want to be well informed, so thank you for helping me with that.
 
Let's shake hands at this point because I think we are on the same page really. JB weld used appropriately is probably safe enough, and the stuff in your post was quite persuasive. :mug:

Done and done. Alien --> :tank: <-- fc36

Edit: Btw, I like your blog. I'm just getting into RasPi, Arduino and microcontrollers. I may need to pick your brain in the future.
 
so back on point, I was thinking the same thing:

Often wondered if a float fit around the tube out reading distance. Use them to read how much we have inside of 55 gallon drums at work. Brighter minds please chime in.

Why not use a float like you'd have in a gas tank? Could work, no? I know it probably isn't super fancy and able to be hooked up to a network controller. But if your goal is to be able to know how much beer you have in your keg, this would do it. Then again, after kegging for many years, you just know how much you have in there..
 
I'm in the process of trying to determine the amount of beer left in my keg as well. I purchased a turbine flow sensor (see link) and connected it to my control system. I'm currently running trials with water and I'm very impressed with the accuracy so far. I talked to tech support before purchasing the sensor with concerns about beer flowing through it and would it affect the accuracy, he said it won't have any affect. I'll let you know in a few days. For the water trials I filled 10 12 oz water bottles and they all were filled perfectly. I then decided to fill a 1 gallon container and weigh it with a digital scale which came out to 8.3279. That's really close. Of course I'm anal about details due to my job (building control systems). The sensor was $105.00 which was a little pricey but the accuracy is worth it.

http://www.gemssensors.com/Products...-Sensors/Turbo-Flow/FT-110-Series-Flow-Sensor
 
Back
Top