PSoC4 Die Temp Issue (CY8C41xx , Kit 147, 4100PS)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
pascal_v
Level 1
Level 1
First reply posted First question asked Welcome!

Hello together,

I am facing some troubles with the Die temperature sensor in a PSoC4 4100PS (CY8C4145LQI-PS433, Kit 147).

I implemented the sensor together with an SAR ADC as described in the DieTemperature Datasheet in a design by my own. Additionally, I tried to transfer the example "ADC_SAR_Seq_DieTemp" to the device.

In both cases, I am reading non-useful values back, at room temperature the function gives me something like -20 °C from the ADC value. I already corrected the ADC value as described in the datasheet because of the 1.2 V reference voltage.

The attached screenshot shows the ADC settings which I am using in the "ADC_SAR_..." example. Compared to the key parameters according the DieTemp Datasheet I think this should be fine. Actually, I measure aroung 650 mV at room temperature, with rising temperature the voltage slightly increases. Unfortunately the datasheet is not giving any information on the behaviour of the sensor.

Any idea what I am doing wrong? Thanks for your help!

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Sahil_K
Moderator
Moderator
Moderator
250 replies posted First like given 100 solutions authored

Hi @pascal_v 

Thanks for waiting, I have reviewed your code and I have made changes and attached the new project file here.

To make the die temperature work correctly following settings are recommended for the CY8CKIT-147.

1) Please, configure your ADC as given in the datasheet of  "PSoC die temperature". On page no.6 you can find the configuration of die temp for SCAN_ ADC, here is the link   "https://www.infineon.com/dgdl/Infineon-Component_PSoC_4_Die_Temp_V1.0-Software%20Module%20Datasheets...".

2) There is no need for correction of ADC counts. As " ADCCountsCorrected = (Refact /1.024) * ADCCounts " is for reference voltage different then 1.024v for ADC_SAR component not for SCAN_ADC component. 

Please, Let us know if you have further issues.

Thank you

Best Regards

Sahil Kumar

View solution in original post

0 Likes
4 Replies
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @pascal_v,

Can you please share your implemented PSoC Creator project here, we will try to debug it.

You can also check the following recommendations in your application:

Key parameters of ADC SAR Sequencer include:

  • Channel Mode 1 – Single
  • Resolution 1 – 12 bit
  • Data format justification – Right
  • Reference – Internal, 1.024 volts
  • Sample rate – <= 100 ksps
  • Samples averaged – value >16 may be used to reduce noise
  • Averaging mode – Fixed Resolution
  • Single ended negative input – Vss.

Not following the proposed settings may lead to unexpected behaviour of the component or poor accuracy of measurements. However, the value of Vref can be different from 1024 mV. If the value of Vref in the ADC SAR Sequencer settings is different from the proposed, the value of adcCounts that is passed to DieTemp_CountsTo_Celsius API should be adjusted:

ADCCountsCorrected = (Refact /1.024) * ADCCounts

You can refer to the "Calculate Die Temperature with DieTemp Component in PSoC 4 - KBA229527" and the "ADC_SAR_Seq_DieTemp"  code example.

Please, let us know if this helps.

Thank you

Best Regards

Raj Chaudhari

0 Likes
lock attach
Attachments are accessible only for community members.
pascal_v
Level 1
Level 1
First reply posted First question asked Welcome!

Hello Raj,

 

thanks for your help and sorry for the late reply! Please find the example application attached which I used together with the Kit 147.

 

I checked again the parameters, from what I see, everything is set in the right way. Maybe you see what I am doing wrong. Dataformat is always right-justified according to the Datasheet of the SAR ADC. Reference Voltage is chosen as internal 1.2 V (as this is only available at this device). The correction calcuation is implemented.

With the attached example, I always read temperatures below 0 °C, same as my own implementation. Here the example UART output:

 

"Temperature value: -11C
ADC voltage CH0 = 1199mV

ADC voltage CH1 = 1199mV

Temperature value: -12C

ADC voltage CH0 = 1199mV
ADC voltage CH1 = 1199mV
Temperature value: -14C
"

Best regards,

Pascal

0 Likes
lock attach
Attachments are accessible only for community members.
Sahil_K
Moderator
Moderator
Moderator
250 replies posted First like given 100 solutions authored

Hi @pascal_v 

Thanks for waiting, I have reviewed your code and I have made changes and attached the new project file here.

To make the die temperature work correctly following settings are recommended for the CY8CKIT-147.

1) Please, configure your ADC as given in the datasheet of  "PSoC die temperature". On page no.6 you can find the configuration of die temp for SCAN_ ADC, here is the link   "https://www.infineon.com/dgdl/Infineon-Component_PSoC_4_Die_Temp_V1.0-Software%20Module%20Datasheets...".

2) There is no need for correction of ADC counts. As " ADCCountsCorrected = (Refact /1.024) * ADCCounts " is for reference voltage different then 1.024v for ADC_SAR component not for SCAN_ADC component. 

Please, Let us know if you have further issues.

Thank you

Best Regards

Sahil Kumar

0 Likes
pascal_v
Level 1
Level 1
First reply posted First question asked Welcome!

Thanks a lot, with your changes (basically no rescaling, directly reading UINT16 and giving this to the scaler function) it seems to work fine. Sorry for the misunderstanding, this wasn't clear for me from the datasheet.

0 Likes