Forum Discussion

agieson_cl's avatar
agieson_cl
Icon for New Contributor rankNew Contributor
11 months ago

Integrated ADC Accuracy on the C10GX

While working with a C10GX, I'm having issues getting accurate voltage readings on the ADC. The voltages I'm seeing are roughly accurate within +/- 10%, but I would expect better results because I'm using an external +/- 0.2% 1.25V reference voltage. I understand the ADC is only accurate to ~20mV, but, for example, I'm reading 950mV when my oscilloscope measures 900mV (controlled voltage using a voltage divider circuit).

I'm using the Voltage Sensor Intel FPGA IP, and reading the samples directly from the sample_store_csr. I noticed when I initialize the voltage sensor IP, by first setting the controller_csr bottom bits to 0x102 and then enabling the bottom bit to start the ADC sampling, when reading back the controller_csr, the CAL bits are still set to 0 (which according to the documentation means my ADC is not calibrated). How can I calibrate the voltage sensor IP or my ADCs?

Could it also be possible my ADCs are somehow using the internal reference voltage (+/- 10%) instead of my external reference voltage (+/- 0.2%)?

Note: my results are still not close enough to the actual value when averaging...

4 Replies

  • Farabi's avatar
    Farabi
    Icon for Regular Contributor rankRegular Contributor

    Hello,


    Summary :

    1- external 1.25V +/- 0.2% reference voltage.

    2- ADC samples are off ~10% even when averaged.

    3- CAL bits in controller_csr remain 0, meaning calibration is not occuring.

    4- tried to init the IP with setting the controller_csr = 0x102, followed by setting the bottom bit to start ADC sampling.

    5- suspect ADC is using internal reference voltage instead of external voltage.


    From userguide:

    1- Cylone 10 GX ADC accuracy is ~+/- 20mV.

    2- ADC supports external reference, but need to be explicitly configured correctly.

    3- ADC defaults is to use internal reference ~+/- 10%. This would explain the deviation you see.


    Debug steps:

    1- by default, Voltage sensor IP may use the internal 1.2V reference (10% accuracy). To use external 1.25V reference, you need to perform below :

    a) Route the external reference voltage to the correct analog input pin.

    b) Set the IP to use external reference voltage correctly. (refer https://cdrdv2-public.intel.com/666896/ug_voltagesensor-683781-666896.pdf)


    2- CAL bits = 0 meaning ADC has not been calibrated, which will affect accuracy. To calibrate, please do below steps:

    a) write 0x102 to controller_csr:

    bit 8: RESET_N = 0

    bit 1: AUTOCAL = 1

    bit 0: ENABLE = 0


    b) then enable IP by setting controller_csr = 0x103:

    bit 8 : RESET_N = 1

    bit 1 : AUTOCAL = 1

    bit 0 : ENABLE = 1


    Notes: AUTOCAL need to get assserted with RESET_N to trigger calibration.


    regards,

    Farabi


    wait for calibration to complete, check the CAL bit. If CAL =1 , means ADC has been successfully calibrated.



  • Farabi's avatar
    Farabi
    Icon for Regular Contributor rankRegular Contributor

    Hello,


    I will transfer this case back to community. If you have further question, please raise open new forum case.

    We will help to answer your questions.


    regards,

    Farabi