output of ADC with 12 bit resolution

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.
MaBo_3731426
Level 1
Level 1

Hello community,

I'm using the ADC, 12 bits with the psoc4 pioneer kit. The analog input comes from a potentiometer, the max voltage on the input pin is: 4,62 Volts (measured). I'm using 5 V for reverence. So I expect an output value of 3784 with this voltage. But the maximum output I get is: 3368. I've attached the project.  The output is shown on a 7 segment display on an arduino multifunction shield. What is going wrong? Thank. Mark.

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

MaBo,

When Vdd is used as a reference, the ADC is using actual voltage, which may differ from the nominal 5V value. You must measure actual voltage provided to the chip and it is usually 4.7-4.8V, when kit is powered through the USB port (the difference comes from the protection diode, which eats away ~0.2V). Put this measured value in the Design Wide Resources->System->VDDA. This way PSoC will know actual reference voltage.

Note that ADC results will depend on power supply voltage fluctuations. For more accurate measurements, use built-in voltage reference (typ. 1.2V), which does not vary with power fluctuations.

/odissey1

DWR_System_VDDA_01a.png

P.S. Upon reading your question again, I think that you asked about different issue. Please disregard.

View solution in original post

3 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

MaBo,

When Vdd is used as a reference, the ADC is using actual voltage, which may differ from the nominal 5V value. You must measure actual voltage provided to the chip and it is usually 4.7-4.8V, when kit is powered through the USB port (the difference comes from the protection diode, which eats away ~0.2V). Put this measured value in the Design Wide Resources->System->VDDA. This way PSoC will know actual reference voltage.

Note that ADC results will depend on power supply voltage fluctuations. For more accurate measurements, use built-in voltage reference (typ. 1.2V), which does not vary with power fluctuations.

/odissey1

DWR_System_VDDA_01a.png

P.S. Upon reading your question again, I think that you asked about different issue. Please disregard.

Thanks for your reply. I tried setting VDDA to 4.6 Volts (same output of 3368) and I tried the build in Voltage (very weird output). If anyone has some sort of guidance (tutorials, etc), much appreciated. Meanwhile, I'll try to figure this out.

0 Likes

Mark,

Can you check what is reported result in Voltage, rather than in Count. Use ADC_CountsToMv(Count). I suspect that Counts result depends on value of the SAR_ADC charging capacitor, which is not very accurate (>10%). as a result, Count output may vary from chip-to-chip. But when Counts are converted to Volts (or mV), this is taken care by the calibration constant (a register, which can be adjusted if necessary).

So my advice would be to set VDDA (4.6V) as discussed above,  convert Count to mV and compare result to the input voltage again.

/odissey1

0 Likes