Help with using ADC to LCD to measure a sine wave

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Hi, Can anyone help ?

   

I'm just trying to use the LCD to display voltage of the sinewave but so far i'm not getting any luck.

   

I'm feeding an a sine wave with from a function generator to ADC and display it on the LCD display.

   

I brought out AGND to en external pin to move the reference to Vdda/2.

   

It is able to read the dc values not ac values. HELP ??? I want to be able to read the value of a sine wave . Peak to peak or RMS.

   

 

   

Thanks

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

A "normal" multimeter rectifies an AC input and measures the DC about 10 times a second. When you try to measure a sine-wave, first question is: of what frequency? PSoC 5 normally is fast enough to measure 10ksmpl/s, when you take the values and look for the smallest and for the largest result, you have peak-to-peak which you can display on your LCD. Of course you can use the usual "rectify" method.

   

Bob

0 Likes
Anonymous
Not applicable

 Thanks for the reply Bob. I know it should work but it just not working. Whenver I input a sine wave it is showing a value almost zero. If I add a DC offset , it will show that DC offset. I tried different frequency but still gives me a zero. I don't really need to display it on the LCD but I just want to make sure I'm getting the correct data from the ADC. LCD is just for testing. I attached my project files hopefully someone can help me out.

0 Likes
Anonymous
Not applicable

 If you want to meansure an AC signal, you can

   

1. recitfy the siganl, use the peak detector then use the ACS to read the peak value of the signal. If the signal is pure sin wave, multipy the volage by 0.707 whcih would be the rms value ot the signal, I think there is a applciation notes of making peak detector or rectify here. 

   

2. Use the ADC with sample rate much faster then the signal, then use the software to read the maximum value which would be the peak value of the signal.

   

In both cases, I think you can not measure signal of too high frequeny.

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

Would you mind to upload your project here, so that we can have a look at it? Please use Zip - archive format and "Clean Project"  before you kompress it.

   

 

   

Happy zipping

   

Bob

0 Likes
Anonymous
Not applicable

Hi vl123,

   

 

   

If you are having trouble uploading the project over the forum, please mail it to me (dasg@cypress.com)

   

I'll upload it in this topic.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Thanks for the replies. I attached the project files.

   

Thanks

0 Likes