Pages: [1]   Go Down
Author Topic: Project 3: Can't understand voltage to temperature formula  (Read 2309 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
float temperature = voltage * 0.01;

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

Could someone please explain why?


 
Logged

Offline Offline
Edison Member
*
Karma: 62
Posts: 1035
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Pages: [1]   Go Up
Jump to: