Temperature Compensation for conductivity measurement?

Hey guys, I have developed a circuit that measures the conductivity of a liquid with two probes. As you might know, condcutivity is highly dependant on temperature. For this reason, my reading vary greatly under varying temperature conditions. The sensor outputs a reading from 0 to 5V. 5V meaning open circuit and 0 meaning short circuit. How can I integrate a temperature compensator to this project?

My problem is, a liquid at 25Celsius may give 2.5V of reading, however, a different type of liquid at 30Celsius may also give 2.5V of reading.

My main goal is to find a balanced temperature(the nominal operating temperature of the system), and apply compensation at any other temperature.

P.S: I am measuring the temperature with an NTC.

My code is as simple as an AnalogRead function, so didn't need to post it.

You need to know the relationship between temperature and conductivity for each liquid you are measuring, then you need to encode that relationship in a mathematical formula, or alternatively have a table of compensation values Vs temperature, and apply the relationship to the measured value.

I got your point. Is there a more simplistic approach like;

Cond Reading = CondReading ± (Known optimal temp - Current temp)*Gain

if the temperature is exactly the same as optimal temperature, the compensation part will be zero right?

I don’t really know what to say, I have never needed to do this but what I said in reply #1 seems obvious from a general understanding of physics. Each liquid will have its own temperature to conductivity relationship and if you want to compensate for temperature then you need to know that relationship. I do not know if such relationships are generally linear for conductive liquids. I do know that they are linear and well characterised for metals, but metals are not what we are talking about. You need to know what the relationship is for each liquid you are interested in. You might find that relationship for common liquids is published on the internet somewhere; you will have to do some research. If you discover the relationship is linear for the liquids you are interested in then you have a simple compensation factor for each one, which will be 0 at some reference temperature. You need to do your research.

Thanks. Will definetely do. =)