Suraj,
If this is the level of jitter in the displayed temperature, this is what I would expect using the LM35 directly connected to the PIC's adc.
You could use a Vref of +2.5V [ if you have a free adc pin!], to give a slight improvement.
or amplify the LM35 signal by times 5 as shown in the OPA circuit.
When it’s changing its value between two points the display is getting jitter. Means it will show 26.5 & when reaches 27.0 it will shift between these two values 26.5, 27.0,26.5, 27.0……so the display is not stable always shift between two values
hi,
If you amplify the signal by 5, that makes the 100C value 5V.
This will give a 'resolution' of 0.1C [ the accuracy of the LM35 will not change].
So the displayed temperature may jitter by +/-0.1C.
The gain of an OPA on the NON inverting input is +G = 1 + [Rf/Rin]
Where Rf= the sum of the fixed resistor and variable.
Rin is the resistor connected from the INV input to 0V.
The variable resistor in the Rf path enables the gain of the OPA to be adjusted to give a precise gain.
By adjusting the gain, the adc can be set to give 1000 counts for 100C, so you can see its a direct conversion to ASCII to display the tempr.
I still don't get it eric, 200 counts or 1000, right now he gets a .5 degree jitter, afterward he'll get a .1 degree jitter. The jitter isn't going to leave, or do you just intend to have him drop the last bit or two completely to get the desired .5 degree resolution? If he wants the .1 degree resolution without the jitter he's going to have to determine what's causing it. It just seems odd that even with 16 sample averaging it's still there.
Hi ericgibbs & Hi sceadwin now only I got the point.
Earlier I used 204 counts to represent 100C, that is 0.49 almost 0.5C resolution. Due to noise it will vary with big gaps like 0.5C.
If I set up the input with a gain of 5 then it will have a resolution of 0.1C = (100temp/1000steps). Due to noise it will vary with smaller gaps like 0.1C.
If I setup for a 0.1C resolution & display the results to a 0.5C then it will work nicely.
But if I setup for a 0.1C resolution & display the results to a 0.1C then it will still have the problem.
But it still doesn't FIX the jitter, it just hides it, I guess whatever works and gets you the .5 you need.
This is one of the reasons I like AVR's, some of them have a 20X gain stage you can switch on for the ADC, which would replace the opamp amp stage with a resistive divider to attenuate it to the required level. I'm not sure about PIC's but they also have a sleep mode that allows the ADC conversion to continue while the system clock is off removing it as a source of noise.
Hi ericgibbs & Hi sceadwin now only I got the point.
Earlier I used 204 counts to represent 100C, that is 0.49 almost 0.5C resolution. Due to noise it will vary with big gaps like 0.5C.
If I set up the input with a gain of 5 then it will have a resolution of 0.1C = (100temp/1000steps). Due to noise it will vary with smaller gaps like 0.1C.
If I setup for a 0.1C resolution & display the results to a 0.5C then it will work nicely.
But if I setup for a 0.1C resolution & display the results to a 0.1C then it will still have the problem.
That's the thing I don't understand eric, the average sampling scheme should erase the LSB jitter perhaps simply a larger averaging would work. Temperatures don't change very fast so sampling rate doesn't need to be fast anyways. Just massively over sample it, if you're averaging all 10 bits you can fit 63 samples into two bytes, you're already averaging 16 samples in the same 2 bytes so all it's going to do is slow the effective sampling rate by 4. If increasing the sampling rate that much doesn't cause the jitter to go away then it's not noise it's a non-averaging signal of some kind picked up from nearby.
Oversampling and decimation can pull amazing resolution and accuracy out of even the cheapest of ADC's and sensors, as long as you don't need it instantly. For temperature you should EASILY be able to add an extra byte to your averaging filter for a few thousand more samples.
hi,
Whatever sampling you chose at the end of the day it will either have an odd or even result when working with an odd integer value. [adc count]
Averaging will reduce jitter due to other causes.
The oversampling technique is basically a offset averaging method which to some extent simply 'loses' the offending bit.
If the device ie: the LM35 is only accurate to about 0.5C at best, according to the datasheet then however much data averaging you do on the output it will still have the same accuracy.
IMO the OP [Suraj] has expectations of the LM35 and PIC which exceeds the capabilities of the LM35.
Hi eric I made your circuit & checked, it worked, but you have to take more samples & average the result. The display is stable but when the temperature moving stage the jitter occurs. This can be eliminated by increasing sampling time ex: 0.1Sec etc…..
Whats your idea. In your LM35 project did you oversampled?
Hi eric I made your circuit & checked, it worked, but you have to take more samples & average the result. The display is stable but when the temperature moving stage the jitter occurs. This can be eliminated by increasing sampling time ex: 0.1Sec etc…..
Whats your idea. In your LM35 project did you oversampled?