I'm using a 12 bit ADC (MAX1270), SRAM (23LC1024) and PIC18f4550 to measure temperature transient at the output of an RTD. The communication protocol is SPI. The voltage is sampled and sent to PIC, and is saved in SRAM. At the end of the experiment, the data is read back from SRAM, sent to desktop PC via UART and received using HyperTerminal.
The issue: The data read has periodic fluctuations- at an interval of around 2.5 sec. If I probe the ADC input pin with a Digital Storage Oscilloscope in High Resolution mode, the voltage variation is smooth without any fluctuation. Any idea what the problem could be?
x- axis: Interval is 50 ms. The fluctuation occurs roughly every 50 counts (50 * 50ms = 2.5 sec).
y- axis: Voltage
Edit 1: Sample and average technique is used to obtain ADC data: 16 consecutive samples are taken, sorted in ascending order and the extreme four values are discarded. The middle 8 samples are then averaged to get the final value. This process repeats itself every 50 ms (a timer interrupt is configured such that the sampling takes place every 50 ms in the main routine).
Edit 2: A 40mHz sinewave (+10V to -8V) was applied to the input of the Opamp buffer feeding the ADC. Please refer the attached image. https://i.stack.imgur.com/f1cm5.png The waveform is OK except for the first 4 seconds, in that it shows some fluctuation. The ADC is directly connected to the opamp buffer without a RC network. How big a problem can it cause? https://i.stack.imgur.com/LiUAE.png
Edit 3:
I probed the RTD transient with the DSO in normal mode, without post-sampling processing (one ADC sample every 50 ms, no sample and averaging). The DSO output is in blue and ADC in red. There is an offset between the two. What could be the reason? The fluctuation seems to have gone, but I need to verify it by testing with another RTD. REF pin of the ADC is at 4.085V as against 4.096 given in datasheet. REFADJ pin is at 2.492V. The ADC is used in internal reference mode.
Please Note: I won't have access to the test setup for the next 5 days. I'll get back with the results of your suggestions as soon as I get access.