Hello, I'm working on a simple project with a lm35 being on a esp8266 and Led's. I'm working on s simple temperature if it reaches 80F a red led turns on. The problem I have from what I'm seeing is that the lm35 requires 4v or higher. However I'm seeing other people using it on the esp8266 which is a 3.3v logic level. Is there a way to get the voltage higher on the logic level without killing the esp8266?
Sorry this is new to be I have never done anything like this before. and Maybe I'm phrasing this wrong in a way. If so please let me know so I can correct myself.
A NodeMCU the ADC takes 0 - 3.3V because there is a voltage divider on the ADC input to bring the 3.3V down to 1V. The regular ESP8266 ADC takes 0 - 1V.
The LM35 output is 10mV per degree C so the output is 1V at 100 degrees C.
Yep, no magic here.
The LM35 is supposed to work between 4 to 30V. However, it seems that some people can get a correct signal supplying the LM35 with 3V which is inside absolutes maximum rating specifications.
Just power the LM35 with 5volt from the V-in/USB/5volt pin of the D1 mini, and connect it's output directly to A0. The D1 mini has a 110k:220k voltage divider on that input, so nothing bad will happen. A TMP36 would have been a better choice. Then you would also have been able to measure temps below 32F. A digital DS18B20, with it's higher resolution, would have been much better.
Try this
float tempF = (analogRead(A0) * 0.592) +32.0;
Leo..
I like the suggestion of @Wawa, use the DS18B20 digital output sensor. Higher accuracy, no dependence on supply voltage or analog reference accuracy and one pin for multiple sensors.