Quantcast

Can it even be done? Measuring Specific Gravity using Arduino or Raspberry Pi

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

JKoravos

Well-Known Member
Joined
Jul 24, 2009
Messages
1,206
Reaction score
77
Location
Chelmsford, MA
Agreed, but a temperature probe outside the cooler should be able to track the temperature difference. I suspect temperature difference will be the deciding factor (ie it takes x amount of energy to keep the inside at 30 degrees in a 60 degree room and x amount of energy for 60 in a 90 degree room.) If that curve can be modeled and is reliable, then you're in. Much experimentation will be required, of course.

You'd really need a good handle on the thermal properties of the cooler. The heat lost to the environment will change fairly significantly with liquid level, interior temp, exterior temp, exterior convection sun exposure, etc, etc. If it was a steady state, stable process it would be one thing, but the transient nature of fermentation would make it a bear to attack the problem from the angle you're thinking of. To test all the conditions necessary to control for each variable in that system would probably take you a year of testing and modeling.
 

kiteD

Member
Joined
Jan 13, 2015
Messages
24
Reaction score
0
You'd really need a good handle on the thermal properties of the cooler. The heat lost to the environment will change fairly significantly with liquid level, interior temp, exterior temp, exterior convection sun exposure, etc, etc. If it was a steady state, stable process it would be one thing, but the transient nature of fermentation would make it a bear to attack the problem from the angle you're thinking of. To test all the conditions necessary to control for each variable in that system would probably take you a year of testing and modeling.
Good points. I'll watch for those variables and continue to consider others.
 

MalFet

/bɪər nɜrd/
Lifetime Supporter
Joined
May 31, 2010
Messages
8,632
Reaction score
1,479
Location
NYC / Kathmandu
Bringing up an old post here, but i thought I'd ask. I have a couple of mass flow meters I bought years ago to do exactly this. I've always felt like it would be the most painless method for real time fermentation monitoring. Did you ever put together a thread/post on how you implemented? Are you totalizing the CO2 or just getting the live readings? Do you have any temp correction for CO2 saturation in the beer? How are you keeping gunk out of the meter? Sealed knockout?

Sorry lots of questions. I want to get my system implemented this summer so I'm gearing up.
Sorry, I never quite got around to writing things up, and most of my gear is in storage far, far away from me for the foreseeable future. Happy to help from memory as I can, though.

  • My mass flow controller didn't have a totalizer built in, but it did have a serial connection. I used that to log gas output rates, and then I just calculated the area under the curve to produce a live estimate of the total.
  • I was doing fermentations under pressure, I was already keeping track of my CO2 saturation for that. For a normal ferment, however, I can't imagine that the CO2 dissolved in the wort is going to substantially disrupt your gravity estimates.
  • My fermentor fed into a sealed blowoff container, which fed into a moisture filter, which fed into to mass flow controller.

Good luck! Let us know how it goes.
 

fritz_monroe

Well-Known Member
Joined
Feb 16, 2007
Messages
129
Reaction score
0
.. I'll have to do some digging for more details ;) And the Beaglebone stuff probably wouldn't be that useful if your more used to Arduino or the like, but I'm up for helping out and doing more experiments with this! :D
You wouldn't happen to have the details of the Beaglebone stuff available. I'm looking into doing something similar, but I'm playing around with Arduino, Raspberry Pi and Beaglebone stuff.
 

megabyte

Member
Joined
Sep 23, 2013
Messages
9
Reaction score
2
@Malfet, I looked into mass air flow sensors some years ago but abandoned the idea because I thought that the first blow-off event would destroy them (fragile hot-wire, difficult if not impossible to clean etc.).

Was your sensor tolerant to blow-off events or did you use other measures to prevent such an incident?
 

MalFet

/bɪər nɜrd/
Lifetime Supporter
Joined
May 31, 2010
Messages
8,632
Reaction score
1,479
Location
NYC / Kathmandu
@Malfet, I looked into mass air flow sensors some years ago but abandoned the idea because I thought that the first blow-off event would destroy them (fragile hot-wire, difficult if not impossible to clean etc.).

Was your sensor tolerant to blow-off events or did you use other measures to prevent such an incident?
Nope! Not tolerant at all. I've got mine hooked through via a closed blowoff container (water filter housing) and a moisture filter.
 
Joined
Sep 16, 2009
Messages
10
Reaction score
0
Location
England
I was looking into measuring SG while sparging, to ensure sparge is stopped before tanin extraction.
I was going to go down the digital refractometer route, using a simple 'drip feed' from the output of my mash tun to moitor the brix of the wort coming out. ie drop a drip of wort into the electronic refractometer's test well, digitaly read the brix after a few seconds to allow the sample to settle and cool, then displace the drop with the next sample and test etc. Taking a measurement every minute or so.

Also was going to include a rinsing mechanism, that simply squirts the well clean with RO water. COuld be simply implemented with a solenoid.

Still plan on implementing this at some stage, but would need some help to hack into the refractometer to triger it and read the results.

Steve
 

megabyte

Member
Joined
Sep 23, 2013
Messages
9
Reaction score
2
Has anyone tried measuring SG with the resonance of a piezo driver? I imagine if a piezo speaker were immersed into a liquid its resonance should alter along with the S.G of the liquid. I don't know how reliable the results would be but it might be worth investigating.
 

craigmw

Well-Known Member
Joined
Dec 29, 2012
Messages
338
Reaction score
72
Location
Villa Park
Has anyone tried measuring SG with the resonance of a piezo driver? I imagine if a piezo speaker were immersed into a liquid its resonance should alter along with the S.G of the liquid. I don't know how reliable the results would be but it might be worth investigating.
I've had similar thoughts. This would be akin to an oscillating U-tube densitometer. The principle would be to determine the density of the wort/beer using a piezo transducer immersed in the liquid running a frequency sweep. The impedance would spike at the resonant frequency of the liquid. This would be fairly easy to implement, but I just don't know how much of a shift in resonance would take place given the relatively small difference in density of unfermented wort vs. beer. I think it's certainly worth some investigation though.
 

megabyte

Member
Joined
Sep 23, 2013
Messages
9
Reaction score
2
I read an article over here that makes it sound do-able, but I also wonder if it could be easier to just use a 3 lead driver and the traditional feedback circuit to drive it. I doubt they make sanitary versions of these piezos though.
 

burnthesheep

Member
Joined
Jul 29, 2015
Messages
17
Reaction score
4
Imagine this: have a denser mass or weight that will sit in the bottom. Then have a thin wire with a strain gauge on it connected to a bladder or sphere full a lesser SG liquid that final SG, such as straight alcohol. The sphere would not float on top, but still be fully submerged.

As the SG of the batch changes, the float will exert more or less force on the strain gauge.

The strain gauge reading could be plotted in various liquids of known SG to obtain a calibration curve, water an alcohol % of x, y, and z.

Then you could graph it and see that it levels out near final OG.
 

megabyte

Member
Joined
Sep 23, 2013
Messages
9
Reaction score
2
Yep. Great idea and it sounds similar to the BeerBug. I think the drawback is that strain gauges need frequent calibration which is why your scales calibrate every time you turn them on. Dangling a weight in wort for days, weeks or months without calibration leaves plenty of time for errors to drift in.
 

burnthesheep

Member
Joined
Jul 29, 2015
Messages
17
Reaction score
4
Yep. Great idea and it sounds similar to the BeerBug.
Lol, I was racking my brain at my desk thinking of a cheap way to do it. I didn't know there was such a thing as a BeerBug or all these brewing gadgets.

Strain gauges themselves are really cheap, scoring a used quality signal conditioner is the trick.

Luckily, I used to work for an automation company that couldn't' reuse equipment decommissioned. So I have 3 very nice dip switch configurable conditioners that can do all sorts of stuff. So I could try it on the next batch maybe and hook it up to my Arduino and send the data to a CSV file.

Good point on the durability/calibration aspect.

I should see how they handle SG of the product they make at the plant I work at. They use genetically modified yeast to eat up its food to make a medical product. They measure it but probably in the most expensive way possible. Still worth a talk with a calibration technician though.
 

craigmw

Well-Known Member
Joined
Dec 29, 2012
Messages
338
Reaction score
72
Location
Villa Park
I read an article over here that makes it sound do-able, but I also wonder if it could be easier to just use a 3 lead driver and the traditional feedback circuit to drive it. I doubt they make sanitary versions of these piezos though.
Actually, it's even simpler than this. It would be a simple matter to have a frequency generator that feeds a sine-wave pulse to a piezo driver. If a known resistance is provided, then as the frequency of the sine-wave changes, there will be a impedance peak for the driver in free air, thus showing it's free air resonance. I've used a similar approach for determining the resonance of a speaker in a speaker cabinet. When submerged in wort, this will change due to a difference in the speed of sound in wort vs. in air. Depending on the density of the wort, there will be shift in resonance. It's certainly worth playing around with once I've got a chance. I agree that "sanitary" piezo drivers might be difficult to find, but I was thinking it might be easy enough to just vacuum package one in a small "Seal-a-Meal" type bag that I use for Sous Vide.
 

craigmw

Well-Known Member
Joined
Dec 29, 2012
Messages
338
Reaction score
72
Location
Villa Park
Well, I just had to try it, and this doesn't seem to work. I used a 25 mm piezo transducer, vacuum-sealed it and then connected it to a signal generator and frequency analyzer. I could see a strong dip in voltage (and thus increased impedance) at around 4.5 kHz in free air, however, when submerged in water, there was no shift in resonance. Instead, the water merely acted to dampen that resonant peak. It is possible that the level of peak dampening could be used to determine density, but I think there are better ways to do this.

Actually, it's even simpler than this. It would be a simple matter to have a frequency generator that feeds a sine-wave pulse to a piezo driver. If a known resistance is provided, then as the frequency of the sine-wave changes, there will be a impedance peak for the driver in free air, thus showing it's free air resonance. I've used a similar approach for determining the resonance of a speaker in a speaker cabinet. When submerged in wort, this will change due to a difference in the speed of sound in wort vs. in air. Depending on the density of the wort, there will be shift in resonance. It's certainly worth playing around with once I've got a chance. I agree that "sanitary" piezo drivers might be difficult to find, but I was thinking it might be easy enough to just vacuum package one in a small "Seal-a-Meal" type bag that I use for Sous Vide.
 

bucketnative

Well-Known Member
Joined
Apr 23, 2015
Messages
1,096
Reaction score
532
Location
Toledo
Instead, the water merely acted to dampen that resonant peak. It is possible that the level of peak dampening could be used to determine density, but I think there are better ways to do this.
In a previous job as a foundry process engineer, we were evaluating a product to provide real-time measurement of our ceramic slurry viscosity. The product we looked at was used by food manufacturers, like Coca Cola, to measure the viscosity of their products. It was basically a piezo-driven, stainless steel tuning fork that measured the damping/resistance. Since it was manufactured specifically for the food and beverage industry it was well-sealed and sanitizeable. It also had a threaded fitting that allowed it to be fed through a stainless/plastic container. In the end we didn't use it because the abrasive nature of the slurry quickly eroded the forks. Wish I could remember the company... but that info is probably googleable.

EDIT - 99% sure it was Solartron that we looked at, but Emerson also makes them. Fork density meters.
 

megabyte

Member
Joined
Sep 23, 2013
Messages
9
Reaction score
2
Pics or it didn't happen :)

Do you find that after a few weeks the tubes start to fill with wort?
 

alphaomega

Well-Known Member
Joined
Jul 10, 2013
Messages
1,041
Reaction score
461
The tilt hydrometer does look interesting. And $100 is probably reasonable for a complete product. But... hacking is fun... and the LightBlue Bean that the tilt is based on is $24. But... a 3 axis accelerometer module is about $2 and a BLE module is about $2.50...
Could be a fun project :)
 

rayven

New Member
Joined
Oct 12, 2016
Messages
2
Reaction score
0
I'm not testing wort but i am having that problem. I only need it to stay calibrated for 8 hrs at most. I read somewhere, perhaps this thread, that injecting air till it fills the tube again is a solution. I thought an aquarium pump and a check valve might do the trick.
 
Joined
Feb 6, 2011
Messages
1,008
Reaction score
236
Location
Las Vegas
The tilt hydrometer does look interesting. And $100 is probably reasonable for a complete product. But... hacking is fun... and the LightBlue Bean that the tilt is based on is $24. But... a 3 axis accelerometer module is about $2 and a BLE module is about $2.50...
Could be a fun project :)
Well, if you want to get started, here's the original Tilt/Brewometer code for the Light Blue Bean...:ban:
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Raising this thread from the dead (not for the first time, I see) because it's full of interesting information already.

Can anyone with any knowledge of the above various methods proposed for measuring gravity without taking samples explain to me why people are (were) talking about differential pressure sensors and measuring and comparing pressure simultaneously in various parts of the fermenting beer? What's the problem with using a single pressure sensor at the bottom of the vessel that is mounted through the side and measuring pressure against atmospheric rather than some complicated system of several sensors, tubes, etc?

If you know the depth of the sensor and the headspace is at atmospheric pressure (you could always compensate for the small pressure the airlock can hold back), then pressure = density x g x sensor depth. So density = (sensor pressure + atmospheric pressure) / (g x depth).

In practice, you could use a pressure gauge mounted through the wall of a fermenter a couple of inches above the bottom (easy enough in a plastic bucket or steel fermenter; obviously tricky in a glass carboy). You don't even need to fiddle around with pre-measuring the height of various volumes of liquid because you can take a hydrometer reading of what goes into the fermenter to begin with and use the above equation to work out your gauge measurement depth value for that batch. As the beer ferments, density of the liquid will decrease and so will pressure on the gauge. Let's say the depth of liquid is 1m. Water will read 1.42665 psi where I live. A wort with gravity of 1.050 is 1050 kg/m3 in density and should read 1.49798 psi.

A measurement range from 1.120 to 1.000 SG and accuracy within 1 gravity point would need a meter with accuracy of 0.001 psi and a range of 1.427 to 1.598 psi.

It took me forever to work out what a reasonable range and accuracy would be for something you can actually buy, having zero experience in this. But here's a variety of pre-made sensor board:

https://shop.pimoroni.com/products/...y60Z56B43UsFvfTtRRCSF_UoyLZT_HqRoCQfoQAvD_BwE

If you have a poke around the datasheets for that, you can see Honeywell sells cheap sensors within the above range and accuracy 'suitable for liquid media'.

So you could buy one of these digital sensor boards, get hold of rigid tubing of a diameter that would tightly seal over the sensor on the board (probably want to glue it in place for a reliable seal, or get hold of some kind of silicone tubular seal), mount a push-fit bulkhead fitting in the side of your fermenter and stick the sensor tube in. The sensor output is I2C for whatever one-board computer you happen to like, and deriving SG from pressure is a simple linear relationship when you know your sensor depth (or tell your software your OG measurement).

Is there a flaw I'm not seeing? Surely this is neater than a tilt solution?
 

Ayuir

Well-Known Member
Lifetime Supporter
Joined
Mar 31, 2012
Messages
59
Reaction score
5
Location
Black Diamond
Brew Perfect (www.brewperfect.com) makes a device that suspends a glass/lucite rod into the wort and then measures the stress via a strain gauge. The results are sent wirelessly and you can therefore get real-time gravity and temperature readings. Worked pretty well. Send it to your Pi and you're in business. It's just not DIY.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Interesting, but kind of expensive ($160) and inelegant compared to a single pressure sensor that doesn't float around in your wort. The fact that all the commercial products have gone with things that float in the beer I'm sure is an indication that one pressure sensor won't work, but I can't see why not. I suppose maybe most people in the US ferment in glass carboys so a wall mounted solution doesn't cater to much of the market? Seems unlikely.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
I have looked into the available sensors a little further with a view to testing this. For the record, for anyone looking at this avenue in future, here is the search process I've gone through and my conclusion (in a lot of depth, so I recommend skipping unless you're actually looking to solve the same issue). Forgive me if I've misunderstood anything; I'm at a very basic beginner level in electronics.

Updating the pressure range and sensitivity requirements first. Let's say the minimum depth of wort anyone might want to measure is 30cm (my application is more like 60cm) and the maximum in a homebrewing application is 135cm (e.g. Ss brewtech 1bbl unitank). The highest level of sensitivity required would be 0.0004psi (per gravity point at min sensor depth) and the maximum pressure it would ever need to read would be 2.2psi (1.120 gravity wort at 135cm depth).

I first looked at analogue gauges, as this wouldn't interface with a computer but would save having to take gravity samples. They do actually sell gauges within the right range (0-3psi), but I couldn't find any that were food safe and didn't enjoy the idea of sanitising them.

The Honeywell sensors (https://sensing.honeywell.com/honey...essure-mpr-series-datasheet-32332628-d-en.pdf) have a load of versions, but of course finding the right one in stock somewhere that can ship low volumes to you is tricky. They are a good place to start because they are waterproof (the sensor bit), temperature compensated, cheap, have integrated analogue/digital conversion and there are pre-made breakout boards that will connect them up to an arduino uno. I've looked through loads of other options and they seem to form three groups:

1. Industrial application sensors, which are great but very expensive. There's a homebrew company that sells one of these for $400, applying it to measuring liquid depths.
2. Small plastic - sometimes barbed - sensors intended for PCB mounting. These come in a variety of forms but tend to be for dry gas pressure applications and not going to be easy to clean if you get gunk in them, if they even survive.
3. Barometer sensor boards. Inappropriate for this application as the sensors are the wrong shape and spec.

Looking further into the Honeywell sensors: a 'gage' (gauge or differential, as opposed to absolute) version is necessary because I don't want to have to measure and compensate for atmospheric pressure. I want one with the closest possible range to 2.2psi (152mbar/15.17kPa/114mmHg) because the accuracy will be similar over the whole range between sensors so a larger range means more precision. This means one of the following:

0160MG or 0016KG - perfect (160mbar/16kPa max measurement)
0250MG or 0025KG - still fine (less than 2x the range we need)
0400MG, 0040KG, 0005PG, 0300YG - not great (all are a bit under 3x the range we need)

I then want to specify the version with L (long sensor, to put a tube over) and S (silicone coating for the end of the sensor; it seems this is the food grade version, though not 100% clear) in the part code.

Regarding precision of measurement: this has been tricky to work out. The datasheets quote something called 'transfer function', which I believe translates to the steps at which it measures. As noted above, it needs to measure in at least 0.0004psi (or 4 x 10^-4) steps to be sufficiently accurate. The transfer function tells you the number of measurement steps it can distinguish between (I think) and where the lowest measurement starts and the highest measurement stops. For the sensors above, I have calculated what I think the smallest measurement steps are:

0160MG/0016KG - 1.7 x 10^-7psi
0250MG/0025KG - 2.7 x 10^-7psi
0400MG/0040KG - 1.7 x 10^-6psi
0005PG - 1.5 x 10^-6psi
0300YG - 1.7 x 10^-6psi

So all are 100x to 1000x more accurate than we need.

On the other hand, the datasheet also tells you the minimum (worst case, I assume from the context) 'resolution' in bits for the various transfer functions for each sensor. Using these numbers (assuming x bits gives you 2^x possible values - I think that's right), the bottom few sensors are all just about scraping the level of accuracy needed to discern single gravity point changes in 30cm depth of wort. Less good, but still fine.

There are also error figures (plus or minus 2.5%) in the datasheet, but I'm not going to be able to interpret what these mean as they are clearly more complex than just 'your reading may be 2.5% under or over the actual value'. My hunch is they describe the full error range across radically different measurement conditions and so are not relevant here.

Conclusion: all these sensors seem OK. Possibly. What about sourcing?

None of the above are available in the UK as separate sensors individually online (YMMV in the US). Conveniently, however, the 0300YG sensor is sold pre-mounted on a PCB here: https://www.digikey.co.uk/product-d...2rbboFwo2PuPo4c-JquL5tblMfn2aY4YaAsVeEALw_wcB

Honeywell also sell testing boards that can be used with a wide range of their sensors in case you can find an individual 0160MG/0016KG sensor and want an pre-made way to mount it: https://www.digikey.co.uk/product-d...uctivity-solutions/SEK002/480-7110-ND/8024261

Looks like I'm going to get a Honeywell 0300YG sensor on a breakout board, connect it up to an Arduino Uno and do some fiddling. I'll need tubing and a through-fermenter-wall seal that will connect to the sensor (which is 2.5mm in diameter and only 3.7mm long). These bits are going to be a pain to sort out. If I can get tight enough silicone tubing and arrange it so that it won't slip off the sensor (maybe glue the tube to a rigid case enclosing the Arduino and breakout board), I can remove and clean the tubing when wort gets in.
 
Joined
Dec 19, 2014
Messages
5,361
Reaction score
1,541
Location
West Palm Beach
A couple of comments. First, I would double check your accuracy measurements - these values sound very optimistic. A pressure sensor that has a 0 - 2 psi range will likely not have accuracy better than 1/1000th of the range. Also don’t forget there are lots of areas for error to add up. The U NO’s DAC is not very linear (or accurate) so that will add error.

Another consideration is you MUST have assurance that the amount of liquid in the tube is the same. This is no small feat and I think this alone could be a deal breaker. You should fill to an overflow tube to make sure you achieve the same level each time.

Alternatively, and for best accuracy, consider a really low pressure range sensor and compare two liquid columns: one of distilled water and one of your sample. The heights must match but you can compare the pressure difference with a differential sensor.

One other thought, I wouldn’t sweat liquid resistance. You can mount sensors vertically to create an air gap below the sensor.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Thanks for the thoughts. Good to have some guidance from someone with more knowledge of electronics than me.

Regarding accuracy: noted. Not much I can do about that within this price range so I'm going to give it a go anyway and see if my shaky understanding of the accuracy they are claiming works out. If they really are accurate only to about 1/1000th of the range, the 160mbar sensors would be accurate enough for measurements within two gravity points in 60cm of wort, which would be fine for me if only I could get hold of one. The one I'm ordering would be accurate only to within 5 gravity points which is not really good enough but will give some indication of fermentation profile. More than capable enough for liquid level measurement which is how I'll repurpose it if it fails at gravity.

Don't worry about DAC. These sensors have an ASIC that does that plus temperature and calibration alterations and gives digital I2C output. I'm amazed they can fit that within the form factor. Mind boggling. This will also deal (as best as can be done) with error around the sensor characteristics and conditions, so given I am taking digital output direct from the sensor there isn't a great deal of room for additional error to creep in.

Liquid level in tube is interesting. I assume you mean the very narrow tube connecting the sensor with the fermenter. I maybe haven't explained the setup well enough. I am not taking samples (may as well use a hydrometer if I'm doing that), I am fixing the sensor in place against the side of the fermenter and sticking a connecting tube into the side of the fermenter to make contact with the wort. This enables me to have my sensor at the same depth as I'm measuring, rather than the vertical method which uses a column of air in the tube to displace the measured liquid and so measure pressure at the end of the tube (hence the air bubbler systems being talked about earlier in this thread, which would guarantee you are measuring the same depth of liquid each time). My understanding is that provided the tube and sensor are horizontal on the same plane there won't be any counterbalance from weight of liquid in tube. Rather, whatever air or liquid (including leftover water/sanitiser) there is in the tube should be compressed to equal pressure as the measured liquid at that level. Do tell me if I've misunderstood. The only thing that is innovative compared to previous suggestions is that I don't need to take differential pressure readings with different depths of liquid (neat though that concept is, as it is depth-independent if you use two fixed tubes with openings fixed at a known depth difference). This means just one reading and having to calculate your liquid depth at the start (assumed not to change, though that's an interesting thought as well: does the volume of liquid in a fermenter change as fermentation proceeds?).

I haven't taken viscosity into account, if that could make a difference... this tube will be very thin indeed (2mm inner diameter). Actually, a plug in the tube is my main worry. I'm considering putting in a t and valve with a CO2 feed so I can blow out clogs if needed.

Alternatively, if the amount of liquid vs air in a horizontal tube is a real concern (i.e. I've misunderstood the physics), I can prefill the tube with sanitiser so there is no air. Or even just stick the actual sensor nose through the side of the fermenter. It's just about long enough for that if I can find a small enough seal. I'd have to unmount it though, which would be a pain.

Not worried about sanitising because I'm going to use silicone tubing and just hold the tube on the sensor by loading up a bit of tension from the way they are positioned. When the batch is done the tube comes off the sensor and I can wash it separately with a little tube brush and wipe any gunk off the sensor head.

I've ordered the parts now, so we will see. They will take a while to arrive. I'll post pictures and graphs if I succeed or fail. I think I'll avoid setting too much store in the precise single point gravity readings, as I expect some systematic error will make these a bit off the actual reading. I'll be happy if I can just graph falling gravity against temperature, in the way tilt hydrometers and their ilk do.
 
Joined
Dec 19, 2014
Messages
5,361
Reaction score
1,541
Location
West Palm Beach
The only thing that matters is vertical height of the liquid column above the sensor. You won’t be able to measure absolute specific gravity doing this because your level in the fermenter will not be accurately known at the start. You might be able to track the SG changes over time but from a known to a known number... I think this will be difficult.

I’m all down for experimentation... so go for it. But from a feasibility standpoint, it sounds to me like this isn’t the best path.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
I can calculate the level using the original pressure reading and an OG hydrometer reading.

Using these I can calculate the height coefficient in the p=ρgh equation (p = static pressure, ρ = density, g = acceleration due to gravity, h = height of fluid column above sensor). h might change during fermentation, of course. If it does change significantly (evaporation through airlock? condensation on walls/lid? would venting CO2 change the volume of the wort?), then I'll still be able to see fermentation progress but the calculated gravity reading will slowly drift from the true value. I'm not actually interested in interpreting the value of h, provided it remains more or less constant.
 

dantodd

Well-Known Member
Joined
Oct 13, 2006
Messages
1,176
Reaction score
13
Location
San Carlos, CA
It seems that 2 sensors would give the optimal measurement. As long as you can calibrate the sensors so you know how far apart they are in the column then the actual height shouldn't matter as long as both sensors are covered.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Yes, that's true. It's what was suggested and actually tried out by earlier posters in this thread. The way it was implemented is with two tubes of different lengths, each with a pressure sensor at the top. There are even pictures and a graph showing it works. I didn't go down that route because it seemed over-complicated to build and to keep sanitary. Also difficult to get it into the fermenter and keep it sealed.

Your approach, if I understand correctly, would be similar to my suggested one - i.e. poking sensors through the side of the fermenter below the liquid level at known heights. Using two would mean you'd have the gravity from the beginning without extra effort and you could even take samples and the gravity reading from the differential in pressure would remain the same (with one sensor it would vary with the liquid level). I'm mainly not trying that because I don't want to buy another sensor unless I really have to, but there are other reasons relating to my sensor choice that I'd need a diagram to explain.

My preference would have been an industrial food-use pressure sensor that is sanitary and can directly contact wort. But those are very expensive for what's probably going to end up being a fun experiment. I could buy a nice shiny stainless conical for the price of one industrial sensor. And they also have data output protocols and power requirements that aren't going to play nicely with an arduino or raspberry pi, I expect.
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Received and hooked up a Honeywell MPR sensor to test the sensitivity. It is giving results that are stable to a resolution of 0.0002 psi, which is 1/30,000 of its range. That's plenty sensitive to measure a single gravity point of change in a normal shaped 5 gallon fermenting bucket. So I know the sensor will work. The tricky bit now is writing a script that will give me data in a graph (having next to no coding experience).
 

stronk

Active Member
Joined
Aug 18, 2014
Messages
26
Reaction score
4
Thanks, I'll look into it. I'm trying to take some shortcuts by modifying pre-existing libraries so not sure yet if these are going to be compatible with a visual coding language like that one seems to be. Looks like I have a choice of C or Python. If I want to use a different language I need to build a module to do the bit-level communication with the sensor. But having the ability to drag and drop to create an android app with graphs, etc is pretty neat, so maybe that would save time overall. Realising people probably don't want/need a blow by blow update on the project though, so I may just wait and post results once it is working (or failure reasons if it doesn't).
 

neumeon

Member
Joined
Feb 29, 2012
Messages
15
Reaction score
6
Location
Bay City
OK, this is more on the philosophical side, and I'm definitely not here to discourage anyone from pursuing an automated gravity monitoring system. I get it, you're doing it because you can - and of course it would be so cool. However, I know from personal experience the push for "ultimate" automation in beer production at times has served to isolate me - the brewer - from the beer.

Here's a concept from Lean Manufacturing: Autonomation. It means Automation with the Human touch. It means that automation shouldn't exclude the human from the process, instead it should eliminate boring, repetitive or dangerous tasks. The artisan in us still need to be directly involved in the creation of beer.

https://en.wikipedia.org/wiki/Autonomation

I occasionally get lost in an automation project - but when I come up for air I ask myself what my real goal is. Will this help me make better beer? Or am I distancing my senses from the process? Am I just being lazy? Lazy brewers don't make good beer.

Here's a project I'm working on to market commercially: It's a real-time beer density measurement system for commercial breweries - where optimizing fermenter volume means more profits. Moving a beer out even 4-6 hours earlier means several extra batches a year in production volume. This is an application - to me - that makes total sense and offers a Return on Investment. It's based on this sensor ($1500 a copy):

https://www.truedyne.com/density_sensors_for_liquids_and_gases/?lang=en

So - again, definitely not trying to discourage anyone from pursuing any kind of automation. But, I encourage you to ask the question - Will this automation actually help you make better beer? Don't let automation isolate you from your beer production process or enable laziness. If it does that, it's never good for the beer.

Cheers.
 
Top