Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Low Pass Filter

Status
Not open for further replies.
0.5C fine.For the time being also I'm displaying 0.5C.Ex:26.5

ericgibbs help me to stop this jitter thing.
 
Last edited:
0.5C fine.For the time being also I'm displaying 0.5C.Ex:26.5

ericgibbs help me to stop this jitter thing.

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
.
 
or amplify the LM35 signal by times 5 as shown in the OPA circuit.

I have no free analog inputs so the only solution is to amplify the LM35 signal by 5 times & feed it to PIC AD.

ericgibbs have you made a temperature display (SSD) like I build using LM35 didn't you get a similar jitter thing?

In your diagram there is a voltage gain formula.Can you tell from where is that [*5] comes?
 
I have no free analog inputs so the only solution is to amplify the LM35 signal by 5 times & feed it to PIC AD.

ericgibbs have you made a temperature display (SSD) like I build using LM35 didn't you get a similar jitter thing?

In your diagram there is a voltage gain formula.Can you tell from where is that [*5] comes?

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.

Insert a decimal point as required.

Which type of OPA are you using.?
 
Hi ericgibbs now I understood a bit how the jitter will affect.Can you tell me how did you get that 0.1C accuracy when I amplify the signal by 5?
 
Hi ericgibbs now I understood a bit how the jitter will affect.Can you tell me how did you get that 0.1C accuracy when I amplify the signal by 5?

hi,
I didnt say accuracy, I said resolution which is very different.:)

Like I said:
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.
 
Which still may not correct the jitter.
What about conversion speed? I'm going to assume conversion speed is running on a pretty slow clock?
 
Which still may not correct the jitter.
What about conversion speed? I'm going to assume conversion speed is running on a pretty slow clock?

hi SC,
The jitter will be about 1bit, approx 0.1~0.2C on the displayed value.

Suraj's present problem he is using 204 counts to represent 100C, thats at best +/-0.5C lsb and the jitter he has is +/-0.5C which is correct.
 
oops sorry eric when I amplify the signal by 5 how did you get the 0.1C resolution?


hi,
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.

Thats 100.0C, which is +/-0.1C displayed resolution.
 
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.
 
Last edited:
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.
 
Last edited:
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 SC,
If he amplifies * 5, he will always get about +/- 0.1C jitter, that the lsb jitter.

If he remains with the 204 counts per 100C he will always have +/- 0.5C jitter/lsb
 
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.

It will not have same +/-0.5C jitter problem, but a +/-0.1C jitter.

What are you expecting from a $1 LM35.??:)
 
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.
 
Last edited:
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.

We have a like thread running for Dr Mandrake.
 
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?

By how much does it jitter.??
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top