Hi,
I am trying to interface an LM35 to and ESP32 and connecting it as per the data sheet but it gets very not.
I have tried multiple devices from two different suppliers.
Any ideas?
Hi,
I am trying to interface an LM35 to and ESP32 and connecting it as per the data sheet but it gets very not.
I have tried multiple devices from two different suppliers.
Any ideas?
I'd be very curious as to how you are hooking a LM35, which requires a minimum of 4Volts to a ESP32, which is a 3.3V device.
The ESP32 has a 5V usb output. I am connecting to this.
I'd see if the ESP is still working by disconnecting the sensor and trying this code
void fBlinkBuiltIn( void* pvParameters )
{
// toggle built in LED off/on
for (;;)
{
vTaskDelay( pdMS_TO_TICKS( 10 ) );
REG_WRITE( GPIO_OUT_W1TC_REG, BIT2 ); // GPIO2 LOW (clear)
vTaskDelay( pdMS_TO_TICKS( OneK ) );
REG_WRITE( GPIO_OUT_W1TS_REG, BIT2 ); //GPIO2 HIGH (set)
}
vTaskDelete( NULL );
}
. You may need to change the code to blink the internal led to work for a non-freeRTOS environment.
You might consider that if the sensor got hot its burnt. You might connect the sensor to 5V and ground and measure, with a volt meter, the output.
You are, also, aware that the 5V pin from the ESP32 is tied directly to the USB 5V power of the computer and that if something goes wrong on the ESP end that wrong will be fed directly into your computer? I use a powered hub between the computer and the ESP's I program.
ESP32 is working fine. If I connect a 100k:100k resistor pot down between 5v and GND, to the same analogue input I get the correct ADC reading.
I need to check the LM35 on a bench power supply.
Hi,
Can you post a photograph of your project, so we can see your component layout?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Have you double checked the pinout of the LM35?
Tom..
I and seeing the same problems the same problems when I power the LM35 with a PSU - same result with each device.
Could I just have dud parts. I bought 10 from eBay and 10 from amazon.
andyuk1970:
Could I just have dud parts. I bought 10 from eBay and 10 from amazon.
Absolutely, neither are respectable electronic component dealers like Digikey/Farnell/Mouser/etc/etc,
which is where the genuine parts are obtainable. Resellers that care about their customers are also trustable,
the sparkfuns/adafruit/etc depend on reputation.
I will get some on order....
The LM35 is from the analogue days.
Great for learning/experimenting, but not very good to use with microprocessors.
Better switch to modern digital sensors.
The DS18B20 is commonly used.
Leo..
Just tested parts from Farnell and they working a treat.
Thanks to all!