Make it move · 11 / 16
TMP36: Sensor Voltage to Temperature
Explore a TMP36 temperature model. Compare Celsius readings with sensor voltage and calculate why 25 °C corresponds to 0.75 V.
Relate a TMP36 voltage to degrees Celsius.
Understand it
The TMP36 relationship used here is temperature = (voltage − 0.5) × 100. At 25 °C the ideal voltage is 0.75 V. Real measurements also depend on reference voltage, noise and sensor accuracy.
Your experiment
Set 0 °C, 25 °C and 50 °C. Run and compare the sensor voltage at each temperature, noting the offset at zero.
Connections
- A0 — TMP36 output
- 5V / GND — Sensor supply
Sketch
This sketch illustrates the hardware logic. The workbench runs its corresponding teaching model, not a C++ compiler.
void setup() {
Serial.begin(9600);
}
void loop() {
float volts = analogRead(A0) * (5.0 / 1023.0);
float celsius = (volts - 0.5) * 100.0;
Serial.println(celsius);
delay(200);
}Quick check
Why is 25 °C represented by 0.75 V rather than 0.25 V?
Show explanation
The TMP36 model includes a 0.5 V offset at 0 °C and adds 0.01 V per degree: 0.5 + 25 × 0.01 = 0.75 V.