Zymeter Simple

Monitoring the progress of fermentation of beer in a simple fashion

(found problems with yeast krausen effecting the hydrometer displacement)

Intro

We wanted to design a simple system to measure the change of specific gravity during fermentation, thus enabling us to see the rate of fermentation.

We also want to measure the temperature of the beer, which we do through the use of ds18b20 1-wire temperature probes.

We do this by measuring the distance of displacement of a hydrometer. This distance can be converted into a measure of specific gravity, provided we first calibrate our system with a known liquid, such as water, which will have a specific gravity of 1.000.

Diagram

We make use of a time-of-flight sensor, from ST, which uses an IR laser to emit a pulse of light, which is reflected by objects and picked up by the sensor. The sensor measures the time from the pulse being emitted, to being reflected and detected, allowing it to deduce distance from this, to approximately 1mm accuracy, for the distances we are interested in.

From the diagram you can see the hydrometer has attached to it, a small disc, which is used to catch and reflect the light emitted by the ToF sensor.

We make use of a swimming float, with the ToF sensor mounted on an acrylic pipe. This is because we need to measure the distance to the top of the hydrometer and need to work with arbitrary liquid levels.

Diagram depicting the 1-wire temperature probe attached to the Raspberry Pi, along with the LD1117V generating 2.8V

The ToF sensor connects to the LV pins of the bi-directional logic level converter

zymeter_simple_bb

Bill of materials

  • Hydrometer – £11
  • Swimming float – £3
  • ToF sensor (https://www.sparkfun.com/products/12784) – $14.95
  • Logic level converter (https://www.sparkfun.com/products/12009) – $2.95
  • Raspberry Pi – £25
  • Acrylic cylinder (40mm x 750mm) – £10

ToF sensor mounted onto polystyrene and attached to acrylic pipe

IMG_9327

LD1117V generating the 2.8V needed for the ToF chip from the Raspberry Pi’s 5V output

IMG_9325

Our system, connected to a networked Raspberry Pi

IMG_9326

Polystyrene attached to the top of the hydrometer along with acrylic pipe attached to float

IMG_9330
IMG_9340
IMG_9342
IMG_9345

Hydrometer photo taken 28/03/2015 10:30

IMG_9347

Hydrometer photo taken 28/03/2015 17:00

IMG_9350

Calibration

We took 2 points, in order to calibrate our system.

2-point
Distance from ToF (mm) Measured S.G.
611.050
1601.000

From these two points, we are able to create a formulae for the line. Which then enables us to convert distances from the ToF sensor to S.G. readings.

y − y1 = m(x − x1)
m = (1-1.05)/(160-61) = -0.0005050505
y - 1.05 = -0.0005050505 (x-61)
y - 1.05 = -0.0005050505*x + 0.0308080805
y =  -0.0005050505*x + 1.0808080805

SG graph

You can see a big ‘bump’ in the graph, near the start, which I can only think, is because of the explosion of yeast growth, creating a mass of foam, which pushes up the hydrometer (note that I applied a Gaussian filter to the data, to make the line nice and smooth)

sg

Temp graph

I’m not sure what is causing the glitches, with the 1-wire temperature probes at the moment

temp

Improvements

As the yeast foam seems to effect the displacement, I wonder if there is a way to agitate the top of the beer, to remove the foam around the hydrometer.

As the foam seems to be the issue, could pump a small amount of wort through a filter into another vessel to perform the measurement and then pump back into the main vessel.

Could we just do some jiggery-pokery to remove the ‘bump’ using maths – although that would be a hack.

Also I’m curious to hear of other ideas for this.

Addendum

Please note this is only an experiment, if it was to be used practically I would coat the foam with a plastic such as HDPE to make it sanitary.


18 Comments
  • Brian
    March 31, 2015 Reply

    Hi, I really like the project. Have you thought of trying a sort of “breathalyzer” type sensor to continuously monitor the vapors / gasses that come from the fermentation vessel? It could go in between the fermenting vessel and the airlock. It seems like it would work. Maybe with one of those MQ-3 alcohol sensors.
    Thank you for documenting a great project.

    • admin
      March 31, 2015 Reply

      Hi Brian, I have actually discussed this with a company that makes highly accurate breathalyzer sensors, and it does sound like it could work, provided you control things like the temperature and volume of liquid. I might buy one to have a play with.

  • waldy
    April 22, 2015 Reply

    Hi, Cool solution and nice work.. Just an initial thought: your float, as you mention both is an infection risk and the krausen will affect the tube position. Could the tube be fixed to the inside wall of the fermenter somehow , maybe with short offsets, and do away with a float?

    There is a regulated version o=f the sensor which will simplify a bit

    https://www.sparkfun.com/products/12785?_ga=1.102599681.1466490909.1429699738

    • admin
      April 22, 2015 Reply

      Hi,

      I guess you could fix the tube to the fermenter wall, but the problem is you’d have to adjust the
      height of the tube depending on the volume of liquid in the fermenter.

      cheers

      Chris

  • Jerry
    September 26, 2015 Reply

    Hi,
    I had some question about using the ultrasonic to find out the desnity and gravity. I saw your work about the calculation for the density and gravity by using speed of sound. Alcohol = (Original specific gravity – current specific gravity)*131, I am not so sure how you get the gravity here. Also calucation for the density:

    Desntiy2= Density1speedofsound1(1+R)/speedofsound2(1+R)

    R=-1(1-A2^2/(A1*A3))^-0.5.

    Howo do you get the density1speedofsound1?
    And also the R value?
    Thank you

    • admin
      October 6, 2015 Reply

      Alcohol = (Original specific gravity – current specific gravity)*131, is a fairly standard
      formula used in homebrewing. If you google ‘specific gravity calculations’ you should be able
      to find more info hopefully.

      cheers
      Chris

  • ae
    March 29, 2016 Reply

    Interesting project. I wonder if you could do away with the foam part by adding a second distance sensor to measure height of the wort?

    Attaching the tube to the side of the fermentor (as mentioned in a different comment), then doing subtraction between the two levels (top of hydrometer and level of liquid) would give the result.

    1) Would the bubbles affect the “top of liquid” measurement too much?

    2) Can this IR senser even reflect off the top of liquid?

    • admin
      March 29, 2016 Reply

      That’s a good point, I’m not sure how well the IR would reflect from the foam though.

      I really want to try working on an ultrasound / spectroscopy approach soon. Just need to save up heh.

  • Pete
    August 23, 2016 Reply

    I have a couple of thoughts to make this work more generically.

    1. You don’t really need to calibrate if you know your SG at the start (say 1.055 is where the first reading is). Then, if you know 1mm == .002 gravity units (example, I don’t know yet), you can just measure this all relative to start. So, if I change 10mm over time, then I know my gravity changed to 1.035 over the same time. This also removes the need for the larger float. To get real SG, then you compensate based on temp as well. So, if the measured start SG is 1.055, and then end is 20mm diff, I can factor for temp to know my end gravity is 1.013 (say the temp is 70F). These are not real numbers, but the idea should hold
    2. You can probably just put a tube around the whole thing and lower the tube into the wort. The tube has one or two large openings at the bottom and one or two near the middle, large enough to circulate wort so you get change over time, but not large enough to let the hydrometer out. At the top of the tube is the electronics, maybe the top of the tube is cut into the lid then to allow the electronics to exist outside of the fermenter. Then you only need a tiny reflector on the top of the hydrometer to make all of this work.

    Thoughts? I’ve put some thought into this, and think the science/math holds, but if I missed anything, let me know. My goal is to hook these up to a RPI or BeagleBone with a touch screen and show change over time for temp and gravity, and then also log it to a database for historical data. I plan to do this with a Fast Ferment unit. See https://github.com/buelowp/fermentmonitor for progress. It’s an older project that I will be tailoring over the next few weeks to incorporate this idea and then try to roll out in October if I can to measure an actual brew.

    • admin
      August 23, 2016 Reply

      Hey, I’m just wondering though, how you will handle the issue with the yeast krausen pushing the hydrometer about?

      • Jeff
        October 19, 2016 Reply

        You could just pump into the top of the tube and flush it just before you take a reading

  • Zachary
    December 9, 2016 Reply

    Have you thought about using a very fine, rigid mesh in a columnar shape that is slightly larger in diameter than the hydrometer and just a bit deeper than maximum depth that the hydrometer will descend?

    • admin
      December 9, 2016 Reply

      Hmm, that sounds an interesting idea, I wonder if the yeast krausen could still build up inside the column though.

  • Justin s.
    December 22, 2017 Reply

    I like this Idea, maybe instead use a site glass thats big enough for the hydrometer. like https://www.brewhardware.com/category_s/1819.htm

  • Dholi Paris Oktami
    December 2, 2019 Reply

    you don’t have coding for this project? if you have, can you give me source code this project?

    • admin
      December 3, 2019 Reply

      Hi, I’m afraid I can’t find the code I created at the moment. You might find this project
      interesting – http://www.ispindel.de/ it looks like it works better than mine, as I think it floats
      underneath the beer’s top yeast layer.

  • NJ Beer Snob
    March 25, 2022 Reply

    It seems like you basically created a big Tilt? It’s a cool idea and I’m curious how you will overcome the krausen problem. I wonder about rousing with a pump just before a measurement; that was mentioned and might work but seems like it would risk oxygenating your beer.
    BUT… what if you built this into a pressurized fermentation vessel along with the rousing system? You would be rousing inside a controlled oxygen-free environment!

    • admin
      March 25, 2022 Reply

      Thanks for you comment. I think the Tilt/ispindel are a much better design too be honest. A pressurised fermenter would be fun though!
      I just checked when I created this project, looks like it was around 7 years ago – I keep meaning to explore an ultrasound based version.

Leave Comment

Click here to cancel reply

Error Please check your entries!