| Electronics > Beginners |
| LM35: resistance is futile |
| (1/4) > >> |
| PerranOak:
In my LM35 temp sensor project I have the LM35 connected to the input of a PIC16F1829. It seems to work ok-ish. However, I notice that some schematics with the LM35 have a 1k resistor between the LM35 and the PIC input or a 1k resistor grounding the LM35 output with the PIC input between the resistor and the LM35. Both these variations seem to make the measurement, slightly, more accurate but I cannot figure out why! Can anyone help please? Cheers. |
| JackJones:
It could be connected to a negative supply, allowing it to measure negative temperatures. Or if it's just to ground, it's possibly for capacitive loads or noise decoupling. There is a section about this in the datasheet on page 14: http://www.ti.com/lit/ds/symlink/lm35.pdf Edit: Could you give a link to an example of a schematic like you described? I tried looking for one but couldn't quite find one like you described. |
| spec:
--- Quote from: PerranOak on November 02, 2018, 03:52:36 pm ---In my LM35 temp sensor project I have the LM35 connected to the input of a PIC16F1829. It seems to work ok-ish. However, I notice that some schematics with the LM35 have a 1k resistor between the LM35 and the PIC input or a 1k resistor grounding the LM35 output with the PIC input between the resistor and the LM35. Both these variations seem to make the measurement, slightly, more accurate but I cannot figure out why! --- End quote --- + PerranOak The LM35 is an accurate but very low power device. And, as a result, it is a bit fussy about what it is connected to. To keep the LM35 happy you need to connect it to low noise power lines and connect a 1uf 100nF (correction) or larger low ESR capacitor directly across the LM35 supply and 0V pins pins. Also, the LM35 cannot tolerate much capacitance on it's output. So best to connect a resistor, with short leads directly to the LM35 output pin. You can then connect the free end of the resistor to your MCU. This is most likely the resistor that you have seen on other circuits. You should also ensure that the LM35 is not exposed to any magnetic fields. In addition, the LM35 should be shielded from heat, cold or draughts: apart from the temperature you are measuring, of course. :) There is a pretty good write-up in the TI application report: http://www.ti.com/lit/ds/symlink/lm35.pdf The thing to remember is that you are dealing with small millivolt signals. :) |
| malagas_on_fire:
This simple sensor is also part of Nokia 3310 cell phone .: :-DD https://malagas.wordpress.com/2011/06/03/pic18f2520-lcd-nokia/ it is now using another microcontroller (PIC18F1320) and it is inside the nokia 3310 case :P [ Edit] Old pictures of make up and final layout. I believe i put a zener diode between the power lines for the LM35D to stabilize it amd prevent spikes. |
| brybot:
Adding to spec's commentary, your ADC is essentially a capacitive load, albeit small. It may be causing some instabilities that are dampened with the extra resistor. As an experiement, you could try adding an op-amp buffer to the output to see if that stabilizes your readings. Depending on your application, you could even use the op-amp to increase your ADC resolution. Looking forward to seeing your circuit! |
| Navigation |
| Message Index |
| Next page |