cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Hi,

   

I am trying to measure a voltage over a resistor to get it´s value, my problem is that i can not calibrate the ADC to measure the correct voltage.

   

I tried to measure the offset manually as recommended in the AN84783 "Accurate Measurement Using PSoC 3 and PSoC 5LP Delta - Sigma ADCs" that gave me a value of 42942, which makes absolutely no sense, then i tried to calculate two known points into a function to eliminate offset and gain error, but that did not help either.

   

After that i tried to implement the two-point-calibration from the ADC-VoltageInp Example project, that does not help.

   

I think i did something basically wrong, could someone please take a look at my project and tell me where i screwed up?

   

I am using the CY8C5888LTI-LP097 Prototyping Board, and Creator 3.3, attached for you is a picture of my circuit that is on the breadboard now. I need to switch between the reference resistors to measure a bigger range of resistors. I measured the internal resistances from the PSoC and added them to the values, thats why they look so strange.

   

If you need further information please let me know, I hope i have translated all necessary comments in the SW into english.

   

Thanks for your help, Greetings, Patrick

   


 

0 Likes
5 Replies
Bob_Marlowe
Expert II

You are not measuring the reference Voltage at pin V3out. Place an AMUX in front of ADC and swich the channels with a control register.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

thank you for your advice, I tried to what you told me, the result is in the graphic attached, but I can´t get it working.

   

   
        
   

I tried to have the Vss in the ADC by enabling "Enable Vref/Vssa" and connecting it to ground over a pin, but that was not successful.

   

When i have a resistor of 2.7kOhms as Rx to measure the voltage over it the multimeter shows 3.755V and the ADC shows 3.763V. But the main Problem is that the voltage I am expecting is around 4.65V (Rx/Rx+Rref)*Ub = (2700/2700+200)*5V.

   

Where am I losing that voltage?

   

Thank you for your help, Greetings, Patrick

   

0 Likes
Bob_Marlowe
Expert II

There is a resistor intern to the AMux switch, use the cydwr view, switch to analog and use the ohmmeter to estimate internal R

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you for your help, i measured and corrected the values for the resistors.

   

For this test I did not use any corrections for the offset, etc, thats just the values directly from the ADC and the ADC_Del_CountsTo_uVolts(ADC_Del_GetResult32) -function.

   

The problem with the calibration still exists, when i point the wire from the ADC to ground (0V) it shows a value of 42949 and a voltage value of 4294967224 (that´s in µV so it would be 4294 V, that´s impossible!? ), is that some sort of a over/underflow? When i point the wire to Vdd it shows a value of 44431 and a voltage of 5.086721 V, even if Vdd is only 4.7V on the USB-Programming adapter.

   

Any Tips to get correct measurements?

0 Likes
Bob_Marlowe
Expert II

4294967224 is a 32bit uint, as an int32 it would represent the value -72 which is quite reasonable.

   

Your reference voltage is set to VDDA. You told (in .cydwr view/System) that it is 5.0V. So when it is not 5V (4.7) the conversion cannot be correct.

   

I would suggest you to

   
        
  • Use the internal VRef of 1.024 V up to 6*VRef
  •     
  • Bypass VRef on P0_3 with 1µF
  •     
  • Change your input resistor ladder accordingly.
  •    
   

 

   

Bob

0 Likes