This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28027 ADC: problem reading low

Other Parts Discussed in Thread: TL064

I am using F28027 piccolo launchpad kit.

I am facing problem in reading low voltages at low sampling frequency.

I have used the same code given in the example "adc_soc" given in the control suite.

modifications done are 

SOC is generated on  period match

PWM_setSocAPulseSrc(myPwm1, PWM_SocPulseSrc_CounterEqualPeriod);

PWM_setSocAPeriod(myPwm1, PWM_SocPeriod_FirstEvent);

PWM_setPeriod(myPwm1, 0x10BC);

clock frequency used is 60MHz

High speed prescaler is 1

TB prescaler is 1

sampling freq is 7 kHz

input voltage to the adc is 0.2V 

value read by adc is somewhere in the range of 800 to 900

  • Hi Jay,

    Did you check, at what settings are you getting accurate readings? Also, 7Khz of Sampling frequency should not be an issue. Also, at this present setup till what values are the results in an acceptable range?

    Regards,

    Gautam

  • Hi Gautam,

    Today i was working on same issue.

    I found out that if the SOC is generated by period match then there is error in output

    If SOC is generated by compare match then it is giving expected results.

    But still I am curious that why it is not working with period match.

  • HI Gautam,

    There was a mistake in my last comment.

    unexpected results were coming when I was sampling at high frequency...

    Example present in controlsuit  "AdcSOC" samples at a frequency of around 915 Hz.

    I want to sample at a frequency of around 7kHz...

    Are there any precautions to be taken when we are sampling at high frequency????

  • Jay,

    7ksps should not be a problem; The ADC is capable of up to 4.6Msps.  

    What are you using as an input to the ADC? 

  • Hi Devin,

    I am sensing the output of voltage sensor.

    In between the adc and voltage sensor I am using opamp TL064 in Voltage follower configuration.

    when the voltage is more than 1 volt ADC is reading voltage correctly.

    but for any  voltage is below 1 volt the adc result register shows values in the range of 700-900 

  • Is it possible to try the following (sorry if you have already done something like this):

    Provide a fixed DC voltage on the input of the voltage follower.  Measure the input to the voltage follower and the output of the follower/input to the ADC using a DMM.  Also convert on the ADC and compare to DMM reading.

    Repeat above, but place the DC voltage directly into the ADC input.

    If you see the wide range of readings, use a scope to determine if the input and/or output of the voltage follower does actually have a corresponding amount of noise.  (Note that a scope usually has 8-bit vertical resolution, so noise with amplitude of 200LSBs should show up, but a smaller amplitude noise may not, depending on the scope vertical range).

    Also check the channel mux settins, device pinout, and board connections to make sure you are converting what you think you are; a wide range could be indicative of a floating input.  

    Also confirm that you are following the first sample errata (I think you are if you copied the code from the example).