Today was the first day of my journey back to the top of my maker IoT game and I want to try to post something I've learned every single day to share with you. Today's nugget came from an Instagram interaction when I posted some info about the TMP36 temperature sensor. mlimaco pointed out that she uses the LM35 temp sensor and enjoys it. Well, I've never used an LM35 so I dug in and looked at what the similarities and differences are.
The LM35 and TMP36 are both analog output temperature sensors that produce a linear output voltage in relation to the detected temperature. The both have a TO-92 package option and are pin swappable meaning if you currently have the TO-92 package of one of them in a circuit you could swap it out for the other as the ground, power, and output pins are located in the same place. The both feature a linear 10mV/°C output scaling and very low quiescent current drain.
The LM35 boasts a slightly higher temperate range at -55°C to 150°C versus the -40°C to 125°C range of the TMP36. The LM35 is also more accurate with a temperature reading that is accurate to +-0.5°C compared to the +-2°C accuracy of the TMP36. The biggest differences, however, that are likely to affect your project are power supply range and output voltage. The LM35 can be powered at 4V-30V while the TMP36 has an operating voltage range of 2.7V to 5.5V making it ideal for use in both 5V circuits like Arduino and 3.3V environments like the Particle Photon. The LM35 won't work in a strictly 3.3V environment which limits it's application in maker projects. The LM35 also uses negative voltages to represent negative temperatures. That means you can't just hook it up to an analog pin on the Arduino and detect negative temps. The TMP36 however has a voltage offset so the entire supported temperature sensing range is represented as positive voltages.
- 2.7V to 5.5V operating voltage range perfect for maker projects
- Entire supported temp range represented as positive voltage output
- Linear output
- Lower accuracy than LM35
- Slightly smaller temperature range
- +-0.5°C accuracy
- Excellent temperature range
- Linear output
- 4V minimum supply voltage prohibits easy 3.3V integration
- Requires negative output for negative temperatures
If you can spare the accuracy and few degrees of extra range I'd recommend the TMP36 just for ease of integration. That said, if your project is something like an indoor sensor connected to an Arduino that will never see negative temperatures then I'd probably take the extra accuracy of the LM35 since the supply voltage and negative output wouldn't be a concern. It's all about tradeoffs.
What's your favorite temperature sensor to use in your projects?