Reply by Les Schaffer August 16, 20042004-08-16
CBFalconer wrote:

> But what is that > 250 mV ripple on. If it is on a 0..10V signal, it represents a > maximum error of 1 part in 40, or roughly the lower 3 bits in an 8 > bit converter.
200 - 250 mV on an approx 2.6 VDC signal. (this is after non-inverting op-amp). the micro is running at 3.3 VDC, which the ADC refers to. i see about +/- 5 bits on the A/D.
> To do digital filtering on that is dead simple, if > you are willing to accept the equivalent of a RC time constant.
RC no problemo.
> > Vnew = (Vsample * (1-k) + Vold * k); > Vold = Vnew; > > on each acquisition, where k is less than 1 and is the effective > time constant, dependant on the actual sampling interval.
good idea, i will try this. i am stuck with fixed point math so need to be careful about k and deadbands.
> > At any rate, even if there were an aperture, you would be still > getting the random value that appears within that aperture. You > don't need it, I think.
i'd like to understand ADC at the aperture level and how slew rate affects readings. but i agree that i can get away without knowing the number. i just like understanding whats under the hood. Jim Granville wrote:
> Can you extract the readings, and plot them on a PC ?
not easily. i still can't convince the client to let me use the serial port for manufacturing setup, cal and testing, even tho they use it in an older product. but i managed to shoehorn in for testing purposes 13 bytes to store the latest values of the ADC conversion (about a 7 msec span), and i can see them in the emulator GUI everytime i click the refresh button. i see +/- 5 bits of fluctuation around the mean which correlates with the magnitude of the periodic "noise" signal. the 240 is peak-to-peak off the scope, but the periodic variations are slightly less, so the numbers match. [The "noise" is actually a cyclic variation in current on the current sense leg of a BTS555 http://www.infineon.com/cmc_upload/documents/008/691/BTS555_20030925.pdf whats really interesting is that every once in a while (minutes timescale) the frequency of the ripple chirps thru almost zero and back up to 760 kHz. very pretty on scope ;-) )
> If you know the true value is very slowly changing, simplest filtering > involves discard of wild variances, and a simple INC/DEC towards the rolling average nett of a few readings. Small and simple SW. > Effectively, you are making a tracking ADC on top of the SAR.
am going to try Chuck's most excellent suggestion today once i get go ahead from client to filter digitally -- they like saving money even on caps! ;-) thanks to both of you. les schaffer
Reply by Jim Granville August 13, 20042004-08-13
Les Schaffer wrote:
> CBFalconer wrote: > >> If you want to measure the input at particular discrete >> moments, then and only then do you need a sample and hold. > > > i have a 760 kHz, approx 250 mV ripple on the input of the A/D. > otherwise the voltage is fairly constant (changes over minutes or hours > are what we are looking at). i "want" only the average value. i can't > spare data space for doing a digital average. before i try to filter the > ripple with a cap (i may not even be able to do this), i need to > understand how the noise i am seeing in the A/D values relates to this > ripple.
Can you extract the readings, and plot them on a PC ?
> so my question is really about aperture time not whether there is a > sample and hold. > >> If the input is slewing during conversion the output will >> represent some value that the input held during the conversion >> cycle. > > > right, so which value? some random value, some value at the start of the > conversion, some average of the ripple? for successive approx., is the > aperture time approx equal to the conversaion time?
Not quite, Successive Approximation ADCs are quite susceptable to noise, and convert 1 bit at a time. Best test is to slightly worsen the noise, and get the data into a PC for histogram analysis. If you know the true value is very slowly changing, simplest filtering involves discard of wild variances, and a simple INC/DEC towards the rolling average nett of a few readings. Small and simple SW. Effectively, you are making a tracking ADC on top of the SAR. -jg
Reply by CBFalconer August 13, 20042004-08-13
Les Schaffer wrote:
> CBFalconer wrote: > >> If you want to measure the input at particular discrete >> moments, then and only then do you need a sample and hold. > > i have a 760 kHz, approx 250 mV ripple on the input of the A/D. > otherwise the voltage is fairly constant (changes over minutes > or hours are what we are looking at). i "want" only the average > value. i can't spare data space for doing a digital average. > before i try to filter the ripple with a cap (i may not even be > able to do this), i need to understand how the noise i am > seeing in the A/D values relates to this ripple. > > so my question is really about aperture time not whether there > is a sample and hold. > >> If the input is slewing during conversion the output will >> represent some value that the input held during the conversion >> cycle. > > right, so which value? some random value, some value at the > start of the conversion, some average of the ripple? for > successive approx., is the aperture time approx equal to the > conversaion time?
Basically random - depends on the phasing etc. But what is that 250 mV ripple on. If it is on a 0..10V signal, it represents a maximum error of 1 part in 40, or roughly the lower 3 bits in an 8 bit converter. To do digital filtering on that is dead simple, if you are willing to accept the equivalent of a RC time constant. Vnew = (Vsample * (1-k) + Vold * k); Vold = Vnew; on each acquisition, where k is less than 1 and is the effective time constant, dependant on the actual sampling interval. At any rate, even if there were an aperture, you would be still getting the random value that appears within that aperture. You don't need it, I think. If you have time this allows the same circuitry to handle multiple channels with no analog switching - you only need to select the digital output from one of the one comparators per channel. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
Reply by Les Schaffer August 13, 20042004-08-13
CBFalconer wrote:

> If you want to measure the input at particular discrete > moments, then and only then do you need a sample and hold.
i have a 760 kHz, approx 250 mV ripple on the input of the A/D. otherwise the voltage is fairly constant (changes over minutes or hours are what we are looking at). i "want" only the average value. i can't spare data space for doing a digital average. before i try to filter the ripple with a cap (i may not even be able to do this), i need to understand how the noise i am seeing in the A/D values relates to this ripple. so my question is really about aperture time not whether there is a sample and hold.
> If the input is slewing during conversion the output will > represent some value that the input held during the conversion > cycle.
right, so which value? some random value, some value at the start of the conversion, some average of the ripple? for successive approx., is the aperture time approx equal to the conversaion time? thanks les schaffer
Reply by CBFalconer August 13, 20042004-08-13
Les Schaffer wrote:
> > Does anyone here know what the aperture time is for the Philips > P87LPC767 A/D converters? i don't see it listed in the datasheets. > > it is an 8-bit successive approximations ADC. they list the slew > rate as 100 V / ms. but i would like the time the A/D "sees" the > input ignal. do they use a sample-and-hold? on this the datasheet > is silent.
If you think about true successive approximation A/Ds (i.e. a D/A driven by a register whose bits are successively set and optionally reset depending on a comparator between input and D/A) you will see that sample and hold or whatever is not really needed. If the input is slewing during conversion the output will represent some value that the input held during the conversion cycle. If you want to measure the input at particular discrete moments, then and only then do you need a sample and hold. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
Reply by Les Schaffer August 12, 20042004-08-12
Does anyone here know what the aperture time is for the Philips 
P87LPC767 A/D converters? i don't see it listed in the datasheets.

it is an 8-bit successive approximations ADC. they list the slew rate as 
100 V / ms. but i would like the time the A/D "sees" the input ignal. do 
they use a sample-and-hold? on this the datasheet is silent.

many thanks

les schaffer