PSoC6 - Die Temp Sensor calculations for Vref=VDDA/2 instead of Vref=1.2V

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

cross mob
Ma-_4161786
Level 1
Level 1
5 likes given First like given

Hello Everyone;

Can anyone provide some valid calculation for Die Temp Sensor with Vref=VDDA/2?

I am using several other Analog sensors with PSoC62 WiFi BT Pioneer kit. And if I will use 1.2V bandgap as Vref then maximum voltage measuring range will be 2.4V and it will require external hardware to limit the analog input voltage.

There is only one possible scenario in which external hardware can be avoided is continuously deinit and init the sar adc with alternate settings and similar working is also shown in die temp PSoC Creator example.

If there is any other way to measure die temp sensor value kindly share it with me?

0 Likes
1 Solution

The default setting of ADC for the Die Temp Sensor is sigle-ended mode with VNEG = VSS, VREF = 1.2 V. The measure range is 0 - Vref(1.2V). That is, the setting is fixed to use this sensor. I don't see any equation applicable to VDD/2, as the VDD voltage varies for P6.

Is there any equation in your original STM32 project for 3V3 ADC range? Maybe you can reuse it just with switching the ADC config like the die temp PSoC Creator example you mentioned when the sensor scan comes.

As for the WICED studio issue, I am afraid it might not be maintained any more as currently the Modus Toolbox is promoted more.

View solution in original post

0 Likes
4 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

The Die Temp Sensor is a internal sensor, and it will be enabled only when it is connected to the positive input of the SAR ADC. You can get the actual temperature value using PDL software function. Therefore you don't need to take care the analog input voltage when using it.

The device TRM only shows the temperature equation under condition SAR ADC ref voltage is 1.2V. I am not sure the equation is still effective under ADC ref volt changes to VDDA/2. Maybe you can make a test to verify this using die temp PSoC Creator example.

Just curious, what's your prupose considering the Die Temp Sensor calculations? bacause the original ADC Vref is VDDD/2 for other usage and you don't want to change it when using Die Temp Sensor?

0 Likes

Yes I know its an internal sensor and Also know how to read its value.

All the calculations for this sensor are based on 1.2V Vref. And if I want to read external analog sensors too then unfortunately I can only measure upto 2.4V of analog voltage with this setting. OR I have to continuously deinit and reinit the ADC to measure external voltages as shown in die temp example. You can still read temp sensor values at Vref = VDDA/2 but then these calculation will become invalid and result in wrong temperature value.

Already tested and verified.

Even tried to convert ADC counts from 3V3 voltage to 2V4 but still getting wrong answer because die temp sensor is a transistor and with increase in CE/BE (common CB) voltage the BE current will increase too but it will not have linear relationship with Vce or Vbe.

So I just want to know is there any equation or way to get die temp value at VDD/2?

The PSoC6 wifi-bt kit wiced platform files are confusing. In wiced studio ADC functions need multiple inputs but using one or non of these inputs. So I dont know why we need to pass these values to wiced adc functions when its not going to use them. wiced adc functions for psoc6 platform required major overhaul. And also you cant control ADC functionality without altering the platform adc file.

I am using WICED studio and using PSoC6 wifi-bt kit.

I am building an IOT device and want to record die temp along with ambient temperature.

I am converting STM32 project to PSoC6.

The die temp equations for other ARM mcu are based on standard 3V3 ADC range but in case of PSoC62 its based on 2V4 .

0 Likes

The default setting of ADC for the Die Temp Sensor is sigle-ended mode with VNEG = VSS, VREF = 1.2 V. The measure range is 0 - Vref(1.2V). That is, the setting is fixed to use this sensor. I don't see any equation applicable to VDD/2, as the VDD voltage varies for P6.

Is there any equation in your original STM32 project for 3V3 ADC range? Maybe you can reuse it just with switching the ADC config like the die temp PSoC Creator example you mentioned when the sensor scan comes.

As for the WICED studio issue, I am afraid it might not be maintained any more as currently the Modus Toolbox is promoted more.

0 Likes

Thanks for the help.

Unfortunately modus toolbox doesn't support wireless connectivity for that particular kit. Only option is WICED studio.

0 Likes