cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

I am not getting good die temperature measurements.

   

I have the voltage reference set to vda/2 and as a negative reference.  This gives me a 12 bit voltage range from vda of ground.  The values being 2048 to -2048. 

   

Can the die temperature measurement be used in such a configuration?

   

If so, then is the following equation to correct for voltage references that are not 1024 is to multiply the a/d counts by vref/1.024v?

   

Also what is vref.  Is it vda or vda/2.

   

Thanks

   

Glenn

0 Likes
Reply
7 Replies
Honored Contributor II
        What kit are you using? Vref is 1.024.   
0 Likes
Reply
Contributor II

Note: Vref is 1.2V for PSoC 4S

Using Vref of 1.024V for PSoC 4S devices can result in negative numbers returned for die temperature.

Greg

0 Likes
Reply
Anonymous
Not applicable

I am using the CY8KIT-043.  The VREF I am referring to is the VREF for the ADC_SAR_Seq component.  The correction from the data sheet is ADCCountsCorrected = (Refact /1.024) * ADCCounts .

0 Likes
Reply
Honored Contributor II

Here is your program I don't have the 043 module but I have tested it on Pioneer Ble and it works.  Also there is a .pdf file that explains the settings for the ADC.

0 Likes
Reply
Anonymous
Not applicable

Thanks for your help.

   

However a 12 bit a/d reading for single ended measurements is more important than reading the die temperature.  Also, I need and A/D range of 0-Vdd.  That is why I used Vdd/2 as the negative reference on the A/D.  It appears that the 1.024 voltage reference cannot do this.  I can give up the temperature Die measurement.

0 Likes
Reply
Moderator
Moderator

Hi Glenn,

The die temperature sensor is very sensitive to reference voltage. So when you are providing VDDA/2 as reference, the all API's are using VDDA value as 5.0(or 3.3, default values). But the actual VDDA value you are giving can be different. You can measure the VDDA voltage using a multimeter and input that value in, Creator->.cydwr->system: VDDA . Also change the main.c code line 180. 

   

ADCCountsCorrected = ((float)result[TEMP_CH])* ((float)ADC_VREF_VALUE_V/1.024);  

This should improve the accuracy. But this is not the right method to follow. The better way is to provide a more accurate VDDA voltage. That should solve the problem.

Best Regards,
VSRS

0 Likes
Reply
Moderator
Moderator

Hi Glenn,

I created one example project which does dynamic vref change for measurement. Could you check whether it is working properly. Make sure that your VDD is accurate for accurate measurement.

Best Regards,
VSRS

0 Likes
Reply