tms320f280049c analog temperature sensor read in simulink.

10 visualizaciones (últimos 30 días)
fatih erkin
fatih erkin el 13 de Mzo. de 2025
Respondida: Jaskirat el 27 de Mzo. de 2025
Hello, I am using tms320f280049c launchpad and trying to read analog temperature sensor. I set analog input and connected my sensor but I can't read the value. Do I need to trigger EPWM? How can I read the temperature value?

Respuestas (1)

Jaskirat
Jaskirat el 27 de Mzo. de 2025
Hello,
I understand you are trying to use the “TMS320F280049c” launchpad to read the analog temperature sensor.
The “TMS320F280049C” microcontroller features three ADC modules: ADCa, ADCb, and ADCc. Each module includes 16 SOCs (Start of Conversion), which initiate the conversion of an analog signal from a specific pin. Additionally, each SOC allows independent control of both its trigger source and the channel it samples. (Here, "channel" refers to any available ADC pin on the microcontroller, such as ADCINA4.)
ADC can be triggered using ePWM, refer to the following steps to achieve the same:
1) Configure ePWM to generate triggers:
  • Add the ePWM block and under the Event Trigger tab, set ADC Start of Conversion (SOC) Event = on Counter PRD (Period Match).
2) Configure ADC to use ePWM trigger:
  • Add the ADC block and select ADC-A, ADC-B or ADC-C depending on where the sensor is connected. Choose the correct ADC channel.
  • Set Start of Conversion (SOC) Trigger Source = ePWMx SOC Trigger.
You can then use a data display block such as “Scope” to view the data, and if required, apply a scaling formula to convert raw ADC values into a temperature reading based on the sensor’s characteristics.
Refer to the following documentation to know more about using ePWM with microcontrollers:

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by