OpenSourceEBike / TSDZ2-Smart-EBike

Flexible OpenSource firmware for TongSheng TSDZ2 mid drive ebike motor
GNU General Public License v3.0
255 stars 131 forks source link

TMP36 vs LM35 temperature sensor #118

Closed j0bro closed 5 years ago

j0bro commented 5 years ago

While going through my stash of components I found a TMP36 sensor which is package and pin compatible with the LM35 but apparently slightly less accurate and the analog Vout translates to a different temperature offset: https://www.kevinsidwar.com/iot/2017/7/24/tmp36-vs-lm35-temp-sensor They both however increase their output at 10mV/C. Is this sensor usable (maybe with a different offset in code)?

casainho commented 5 years ago

No one seems to know. Closing for now.

pklapperich commented 2 years ago

From a glance at the datasheet it looks like the TMP36 will produce a 500mV offset at 0C, but still does 10mV/C just like the LM35/TMP35.

As long as the micro is OK with 1.5v on the input we're using then we can still read to 100C

This would be a nice software upgrade right now due to the IC shortage. TI has been sold out of LM35 for quite a while now and there's no end in sight.