Go Down

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

Furkidd

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?



Hackscribble

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.

Regards

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy