Go Down

Topic: Project 3: Can't understand voltage to temperature formula (Read 2725 times) previous topic - next topic


Hello All and thanks for the help in advance

As mentioned in the book (page 48), every 10 millivolt represents 1 Celsius, which's mean to get the temperature, I write the following formula:
Code: [Select]
float temperature = voltage * 0.01;

Instead, it's written in the book as following:
Code: [Select]
float temperature = (voltage - 0.5) * 100;

Could someone please explain why?


Hello Furkidd

You need to multiply by 100, not divide by 100, to convert 10mV (0.010V) to 1 degree.

Subtracting 0.5 from the voltage is to correct for a 500mV offset voltage on the sensor output.


Hackscribble.  Writing about making things.
arduino@hackscribble.com | www.hackscribble.com

Go Up