- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Every body,
Can any one provide me a demo code for oversampling my SAR output in PSOC 5LP.
I shall be very thankful to you.
Best Regards
Awais
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nothing to do with code, only the sampling rate is of interest which can be selected for instance by a timer signal
https://en.wikipedia.org/wiki/Oversampling
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nothing to do with code, only the sampling rate is of interest which can be selected for instance by a timer signal
https://en.wikipedia.org/wiki/Oversampling
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
Actually i am very confusing it.
I am using SAR for ADC and before my signal pass through the Bandpass filter i want to do oversampling in order to increase my ADC output resolution from 12 bit to 14 bits.
For this, what i am thinking is to read ADC output, store it in a variable say "adc_output". Performs oversampling on every 16 values and then pass it to the band pass filter.
Am i going right?
Looking forward for your suggestion
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Bob,
I am also trying to implement an elliptical low pass filter in psoc 5lp project. Is there any application note present how i can do that? I have no filter block left as i am also using two channel band pass filter.
Looking forward for your reply
Regards
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not quite right.
Oversampling has nothing to do with the ADC resolution. Think of a digitized sine with frequency f0 output to a scope.
When you digitize with 2*f0 (Nyquist) you will just see a square wave with f0
When you digitize with 20*f0 or even 50*f0 you will see a smooth curve on the scope. This is the effect of oversampling.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, So this means if i want to get more smooth signal then i need to multiply my ADC output with a factor "n" right?
So then what should i do then, in order to increase my ADC resolution?
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So this means if i want to get more smooth signal then i need to multiply my ADC output with a factor "n" right? Frankly: No
You will get a more smooth signal you have to take more samples/s
You cannot increase the resolution, it is a given property of the underlying ADC. When you take an ADC with 12 bit resolution you will have to take it.
You may use the Delta Sigma ADC with max. 20 bit resolution at the cost of only ~180 samples/s
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Moin Bob,
I mean using the method "IMPROVING ADC RESOLUTION BY OVERSAMPLING AND AVERAGING".
I think it is possible?
I cannot use Delta sigma because i need two of them which i don't have avaliable in PSOC.
Looking forward for your suggestion.
Regards
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Bob,
I wrote the code for oversampling using shifting method also called decimation technique.
I experiment it with Deltasigma ADC could please have a look on it please and guide me if that is the correct thing or not? Looking forward for your valuable suggestion.
Best Regards
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure right project attached?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yea i think so.
Its just an ADC with VDAC. I just try to implement over sampling in C file.
Awais
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just try to implement over sampling in C file Where and how are you implementing oversampling?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read page 11 to see that increasing the resolution only works for measuring DC, not for AC signals.
You can increase the precision of an AD conversion by oversampling and averaging and you may reduce niose this way.
Read this article from Dave van Ess.
Bob