| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
tutorials:learn:sensors:tmp36.html [2010/11/18 19:42] ladyada |
tutorials:learn:sensors:tmp36.html [2016/01/28 18:05] (current) |
||
|---|---|---|---|
| Line 24: | Line 24: | ||
| - | These stats are for the temperature in the Adafruit shop, the [[http://www.ladyada.net/media/sensors/TMP35_36_37.pdf|Analog Devices TMP36]] (-40 to 150C). Its very similar to the LM35/TMP35 (celsius output) and LM34/TMP34 (farenheit output). The reason we went with the '36 instead of the '35 or '34 is that this sensor has a very wide range and doensn't require a negative voltage to read sub-zero temperatures. Otherwise, the functionality is basically the same. | + | These stats are for the temperature sensor in the Adafruit shop, the [[http://www.ladyada.net/media/sensors/TMP35_36_37.pdf|Analog Devices TMP36]] (-40 to 150C). Its very similar to the LM35/TMP35 (celsius output) and LM34/TMP34 (farenheit output). The reason we went with the '36 instead of the '35 or '34 is that this sensor has a very wide range and doensn't require a negative voltage to read sub-zero temperatures. Otherwise, the functionality is basically the same. |
| Line 172: | Line 172: | ||
| float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | ||
| //to degrees ((volatge - 500mV) times 100) | //to degrees ((volatge - 500mV) times 100) | ||
| - | Serial.print(temperatureC); Serial.println(" degress C"); | + | Serial.print(temperatureC); Serial.println(" degrees C"); |
| // now convert to Fahrenheight | // now convert to Fahrenheight | ||
| float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | ||
| - | Serial.print(temperatureF); Serial.println(" degress F"); | + | Serial.print(temperatureF); Serial.println(" degrees F"); |
| delay(1000); //waiting a second | delay(1000); //waiting a second | ||
| Line 238: | Line 238: | ||
| float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | ||
| //to degrees ((volatge - 500mV) times 100) | //to degrees ((volatge - 500mV) times 100) | ||
| - | Serial.print(temperatureC); Serial.println(" degress C"); | + | Serial.print(temperatureC); Serial.println(" degrees C"); |
| // now convert to Fahrenheight | // now convert to Fahrenheight | ||
| float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | ||
| - | Serial.print(temperatureF); Serial.println(" degress F"); | + | Serial.print(temperatureF); Serial.println(" degrees F"); |
| delay(1000); | delay(1000); | ||