# What is the relation between these two measures? [closed]

Imagine you enjoy automation, and have a friend who makes beer.

tl;dr: How would you mathematically correlate a scale of 7.2 to 2.5 (starts from 7.2 and goes down) to a scale of 1.060 to 1.000? Bonus points for a relation that projects further, i.e. if the start is more than 7.2 it would reflect a respectively larger starting number on the other scale

While working your automation magic, you come across the following issue:

There is a hydrometer floating in water at a certain depth. At this depth, 2.5 cm of it is sticking out of the water. Put it in some dense wort ("almost-beer" juice, the stuff you ferment to make beer), and it will stick out 7.2 cm above water level.

As the beer ferments and the alcohol percentage increase, the hydrometer will slowly sink. You measure this sinking motion with a distance sensor. How would you correlate this sink, i.e. increasing distance of the hydrometer from the sensor, to the scale of 1.060 down to 1.000 which the hydrometer describes?

Known parameters:

Minimum height of hydrometer in liquid (in water) = 2.5 cm above liquid level. The densor the liquid, the higher the hydrometer will sit in the liquid.

Distance between sensor and liquid: 18 cm. Meaning that in water, the hydrometer is 15.5 cm away from the sensor.

If there are any parameters you think would be useful, just ask for them in the comments

• I must admit that home improvement projects around my house do tend to involve a lot of beer, but nevertheless I am sure this question belongs in another forum. – A. I. Breveleri May 6 '18 at 16:25
• Well, you have a point - in my case, it's his beer that fuels most of my home automation efforts... Thought I'd return the favor and try to automate his brewery. If not here, where should it be asked? – Mike Meyers May 6 '18 at 16:55
• There's actually a dedicated site: alcohol.stackexchange.com – fixer1234 May 6 '18 at 18:55
• There's a dedicated site for automation: iot.stackexchange.com – Harper - Reinstate Monica May 6 '18 at 19:32
• I'm voting to close this question as off-topic because this is a math or brewing question, not home improvement – mmathis May 7 '18 at 14:48

If the scales of both relationships are linear then it is very easy to write a linear equation to translate from one scale to the other. You have two points (x,y) from your endpoints as follows. (x being your input value and y being the output value).

``````(x1,y1) = (7.2, 1.06)
(x2,y2) = (2.5, 1.00)
``````

Knowing that the two point form of a linear equation is: You can solve that for y in terms of x and arrive at: (helpful equation solver widget that was used)