Hi everybody, I’m trying to read a LM35 sensor. When I test the sensor on a standalone mode,only connected to a multimeter, I get correct values form the output pin, but when I connect the output to an analog pin on the spark, the readings that I get on the multimeter increase around 120 mV and that affects my output on my program. I already put a 0.1 uF capacitor across the output pin and GND on the sensor to filter any noise coming from the voltage source. I don’t know if the sparks seends some voltage feedback that is affecting the sensor’s output or what is causing this odd readings. If anyone can help me I would appreciate it.
Add 47k or 39k resistor between GND and sens out.
Core’s inputs float around ~170mV when they aren’t pulled to gnd via resistor (dunno why).
This might clarify things i bit
Plus the fact that the ADC uses precharged sample and hold caps internally against your signal (see STM32F datasheet)
A forum search for ADC does come up with more
Thanks for your reply!! According to the LM35 datasheet, the supply voltage has to be around 4V minimum for a proper operation of the sensor, that’s why I didn’t hook it up to the 3V3* supply. I connected the Core to a 5V supply source and used the same supply to power up the sensor so that it has a proper operation. I tried using the TMP36 before but it gives me odd readings and it seems that it can be affected more easily form noise coming from the supply than the LM35. I’m really confused about that ~120 mV extra milivolts that the sensor gives when it’s connected to the analog pin that is reading it’s output. It’s really strange…