Voltage Measurement using ADC

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.
Anonymous
Not applicable

Hello I am using CY8CKIT-043 having MCU CY8C4247AZI-M485. My Application is to measure the input voltage which is 5V i have taken here. And i scaled it down to 1V using resistor divider of 4k and 1k to make input voltage compatible with ADC input voltage range. I have taken ADC reference as internal 1.024V. But i am not getting useful result .Everytime i am getting diffrent value of Output. I have also attached my project.

   

Please Be helpful.

0 Likes
5 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        
  • what are "different values" of the output? differing by how much from reading to reading?
  •     
  • are you sure your input is not noisy?
  •     
  • added a bypass cap for the reference voltage?
  •    
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

On the Kit-043 a bypass cap is already connected. Resolution of ADC is 11 bits, not 12 when VSS is selected for negative input. When you select Internal Vref range is 0..2048V @12 bits resolution.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

@BOb you are right but in  my case some times i got adc count 0 or some time random value for constant voltage.

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

I tested your project at my end and I am getting the right values. I checked in debug mode in the variable 'ouput' you have defined I am getting the correct output. I suspect something is wrong with your hardware or the input you are giving. Can you make sure that you are giving the right input value. 

Best Regards,
VSRS

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Sounds like a "loose" wire or a bad potentiometer contact.

   

 

   

Bob

0 Likes