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.

LAUNCHXL-F28379D: ADC measuring with Simulink getting wrong Values

Part Number: LAUNCHXL-F28379D

Hey,

I'am using the LaunchPadXL F28379D with Simulink and watch the values of the ADC in display with external mode. I wanted to measure temperature sensors. with the 12Bit ADC input A_IN15 (Pin 63) and C_IN5 (Pin 64). The ADC displays an output of 2378.
So that would be in Voltage: 2378 * (3.3 / 4096)  = 1,91V
With multimeter i measured 1.74V. That would be = 2159. 
So the difference between real Voltage and measured in Simulink is about 170mV, What is a lot i think. 

The ADC Block Parameters for the Pin 63 are:
ADC Module: A
ADC Resolution: 12-bit (single-ended input)
SOC trigger number: SOC0
SOCx axquisition window: 64
SOCx trigger source: Software
ADCINT will trigger SOCx: No ADCINT
Sample time: 0.1
Data type: uint16
Post interrupt at EOC trigger: no

Configuration Parameters for ADC_A:
Selected CPU Core: Auto
ADC clock prescaler (ADCCLK): SYSCLKOUT/8.5
ADC clock frequency in MHz: 23.5294
Offset: AdcaRegs.ADCOFFTRIM.bit.OFFTRIM
INT pulse control: Late interrupt pulse
SOC high priority: All in round robin mode
ADCEXTSOC external pin: GPIO0

Do you have any ideas what the problem is.

Greetings 

Stefan

 

  • Hi Stefan,

    Did you try with using TI SW, namely using a Code Composer Studio example? What voltage is shown there?

    I don't know if this is a HW ADC issue (DC offset, correct grounding, jumper setting) or a MathWorks SW encoding/scaling issue. I think it would be good to try and isolate the issue to one or the other before digging further.

    Cheers,

    -Brian

  • Stefan, did you get a chance to try out any of Brian's suggestions to narrow down where the issue is coming from?

    Whitney

  • Hi Stefan,

    The problem is not coming from the ADC subsystem itself rather from the ADC VREF being at 3.0 V.

    2378 * (3.0/ 4096) = 1.74 V. Which is indeed the multimeter reading. Hope this clears up any confusion with the ADC subsystem. I have been working a lot with the Simulink library for this chip and also wrote a bunch of I/O blocks myself. You can contact me if you have some other questions regarding use of the Simulink library.

    Kind regards,

    Gert

  • thank you guys for your fast answers. I think Gert's solution will solve the problem. That would make sens. 
    Unfortunately i'm out of the workshop for the next 2 weeks. But after that i will try it. 

    Should i close this thread now or wait?

  • That's fine. The post should automatically reopen when you respond, so we'll get the notification if you still need help after all. If the post happens to lock (which happens after 30 days of inactivity I think) and you still need help, just go ahead and post a new thread.

    Whitney