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.

MCU-PLUS-SDK-AM263X: Difference in ADC value between the voltage given and the value printed in the software

Part Number: MCU-PLUS-SDK-AM263X
Other Parts Discussed in Thread: LP-AM263

Hello Team,

I have tested adc_soc_software project in the MCU PLUS SDK folder. While measuring i can see the difference of more than 0.3v with voltage given and teh vaue printed in the software.

Voltage Given(in volts) ADC Result printed in the software Difference between printed value and given voltage(In volts)
3.073  0.18
2.684  0.3
2.747  0.325
2.264  0.803

Is there any error percentage tolerance? What could be the reason for this much difference?

Thanks 

Aswathy Jg 

  • Hi Aswathy,

    The ADC seems to sample the same voltage (floating, in my expectation) for all the combinations you have mentioned. The example is sampling the ADC 0 Channel 2, which on the HSEC dock, is present on pin 15 for AM263x CC E2 revision. could you please cross check and confirm ?

    thanks and regards,

    Madhava

  • Hi Mihira,

    Sorry I have checked wrong pin. I captured the values using correct pin (ADC 0 Channel 2, which on the HSEC dock, is present on pin 12 for AM263x CC E1 revision).

    Please find the details below.

    adc_soc_software
    ADCVOLTREF 3.3v
    Resolution  4095
    Voltage Given Calculated ADC Count Value Value Printed from Software
    2.29 2841.6818
    2.155 2674.159091
    1.889 2344.077273
    1.373

    1703.768182

    Calculated ADC count using the equation = (4095/3.3) *Voltage given.

    Could you please confirm the difference between calculated ADC count and the value printed in the software?

    Thanks in advance

    Aswathy J G

  • Hi Aswathy,

    Thanks for confirming. ADC input range is from 0v-3.2v for codes 0v-4095v. and hence the conversion formula is adc_code = (vin*4096/3.2). yet, the codes in your shared table are almost 30 LSB away. this too high of an error, than what is mentioned in the datasheet. the common scenario is when the Signal source has higher impedence. looping in HW expert for better results. meanwhile, could you please try the following,

    1. Try a lower impedence source and see if there is improvement in the codes.
    2. Are there spikes in the input when the ADC is sampling. (please check with a high BW oscilloscope.)
    3. Try increasing the Sample and Hold window and see if there is any improvement over codes 

    Thanks and regards,

    Madhava

  • Hi Ashwathy, 

    Please check everything Madhava has highlighted above. 

    I am excerpting the AM263x datasheet (https://www.ti.com/lit/ds/symlink/am2634.pdf) ADC electrical specifications below. The combination of  Gain error and Offset error would set a boundary on our overall error bounds on a single channel. Noise should be evaluated against those bounds. 

    In addition: 

    • Please reference the AM263x TRM ADC Chapter: https://www.ti.com/lit/ug/spruj17e/spruj17e.pdf see 7.4.2 Analog-to-Digital Converter (ADC)
    • Please review SAR ADC input circuit guide here: https://www.ti.com/lit/an/spracy9/spracy9.pdf (also included a linked training video series)
      • This was written for C2000 ADC, but the Sitara AM26x devices use a derived SAR ADC and so this application note and training almost completely applicable 
    • See the attached spreadsheet I put together for the AM263x SAR ADC timing/input circuit requirements based on the above TRM chapter and SAR ADC application note. This might be handy. 

    sar_adc_calculator_rev1.xlsx

    • Can you share what your source and input circuit look like now? 

    Let us know if any of that helps.

    Thank you,

    -Randy

  • Hi Madhava,

    We are using the evaluation board E1 and E2, and we are providing power supply to the board using external power supply. 

    There is no much difference in count by increasing sampling window.

    Thanks 

    Aswathy J G

  • Hi Aswathy

    Were you able to review the other material I sent? Were you able to measure the PSU on an oscilloscope to confirm that the noise seen is/is not present on the actual input signal? Can you elaborate on exactly the sampling window settings you have tried so far?

    The LP-AM263 do not include the RC charge-bucket circuit that SAR ADC require. I am making an update to that for LP-AM263 Rev A, but that revision is not released yet.

    For best SAR ADC noise response (like our datasheet shows), you need to include a tuned RC charge-bucket filter, along with a low-impedance, high-bandwidth driver outside of the board. Typically bench supplies will not have the transient response bandwidth to feed a SAR ADC directly. See the docs and spreadsheet calculator I provided. 

    Thank you,

    -Randy

  • Hello Randy,

    I have checked with oscilloscope and there were no noises seen. 

    I have measured the ADC counts with External reference. and which is connected as per below thread.

    (+) AM2634: Usage of external ADC reference voltage - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Observations:

    1. When number of channels increased the difference in ADC Count also increases.

    2. Difference in ADC count is more in low and high extreme values. Seems to be normal in middle range.

    Please find the attached sheet for more details.

    ADCMeasurement_ExtADCREF.xlsx

    Have you tried with max number of channels in each ADC unit?  

    Could you please confirm this behavior and please provide your feedback.

    Thanks and Regards

    Aswathy J G

  • Hi Aswathy, 

    Can you please share what the full source and input circuit look like now? I don't think you shared that anywhere in the post yet. I understand you are using an LP-AM263 LaunchPad with a bench supply input. Can you please post an image or diagram or schematic of what that connection looks like? 

    Are you using the AM263x MCU on-die VREF source or are you injecting a VREF into the VREFHI/VREFLO pins of the MCU? Can you please share scope shots showing the VREFHI pin voltage during acquisitions? I'd be looking for the overall noise envelope of the VREF source (onboard or offboard). 

    SAR ADC acquisition noise will be affected by the bandwidth of the source feeding it because of the inrush current charging the hold capacitance. Can you please review the material I provided and let me know what your required bandwidth is compared to the bandwidth of the power supply you are using as a source?

    Like I mentioned already, if you are attaching a power supply, with very limited bandwidth (compared to the SAR BW requirements) then you can expect higher sampling noise.  

    Thank you,

    -Randy