cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

rnmi_4774376
New Contributor

Hi All,

   I am working with IC cy8c29466, I just burn the code in IC and checked on hardware and I am getting  ADC counts then I tried with another piece of IC and my ADC counts get variation near about 15-20 counts, I applied same input voltage, same code I burned, even the PCB is also same, every IC showing different different counts, the variation near about 15-20 counts, I don't understand  what's wrong with it.

suppose an example   at  0 millivolts  ADC counts are 2 and at 500 millivolts ADC counts are 1060 for one IC

I burn the code in another cy8c29466 IC (with same PCB and same input voltages) and got the output  at 0 millivolts ADC  counts are 1 and at 500 millivolts ADC counts are 1047 

I tried with 4 different IC every time I am getting different different counts at same voltage and same PCB, Even the ADC counts are stable and getting correct ratios with respect to input applied but due to the max. counts variation every IC have different ratio factor 

I don't understand what's wrong with it, may be it is issue of tolerance of IC ? please suggest something how to resolve this issue ?

 

Thank You.

 

0 Likes
1 Solution
SampathS_11
Moderator
Moderator

Offset_Counts and Counts_At_Full_Scale_Input will change from device to device. So you should incorporate a method to save these values in the device, and for every device.

Best regards,

Sampath Selvaraj

View solution in original post

0 Likes
3 Replies
SampathS_11
Moderator
Moderator

The difference in counts between various devices are due to the tolerances or errors in the offset and gain of the ADC. As an example, do kindly review the ADCINC datasheet. (I am not aware of the exact ADC you are using in your application.) 

On page 3, Section "DC Accuracy", you can find the values for the offset and gain errors. To compensate for these errors, you must incorporate offset and gain error correction in your application.

Offset error is the counts at zero input voltage, and the gain error is the difference in counts minus offset counts at the full scale input voltage.

To compensate you would apply the formula

Corrected_Counts = (ADC_Counts - Offset_Counts) * Full_Scale_Counts / Counts_At_Full_Scale_Input

Where Offset_Counts is the counts measured at zero input voltage, Counts_At_Full_Scale_Input is the counts minus Offset_Counts at full scale voltage applied to the input. Full_Scale_Counts is the nominal maximum expected from the ADC. An 8-bit unipolar will have 255, a 10-bit bipolar will have 2047, and so on.

Best regards,

Sampath Selvaraj

0 Likes
rnmi_4774376
New Contributor

Thank You @SampathS_11  Sir,

 

I implement this formula in my code, using this formula, I got the counts got zero at min voltage range (0 millivolt) and at maximum voltage  still get different different counts for another piece of IC's. I think this formula is used for making offset as a zero.  please tell the solution how to deal with this problem.

 

Thank You,

Sourabh.

0 Likes
SampathS_11
Moderator
Moderator

Offset_Counts and Counts_At_Full_Scale_Input will change from device to device. So you should incorporate a method to save these values in the device, and for every device.

Best regards,

Sampath Selvaraj

View solution in original post

0 Likes