AC average voltage measurement

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

cross mob
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

 Hi,

   

Attached is the code which demonstrate how to measure average voltage of an AC signal using PSoC1. Following is the code flow:

   

Analog to Digital Conversion->Rectify and accumulate the samples->check if integral number of full cycle sample is acquired->divide the sum with the total number of sample->Print the average on the LCD.

   

Some samples may be missed due to processing delay . In order to avoid that ADC output is collected inside the interrupt and filled into a buffer.Hope this will help.

   

Thanks and Regards,

   

Keerthy

0 Likes
1 Solution
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

No attachment present, use IE or Firefox.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
3 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

No attachment present, use IE or Firefox.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored
        Attached is the project.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Keerthy, a couple of observations -

   

 

   

1) I had to update project, translate you should be using latest version of

   

Designer when you post projects.

   

 

   

2) Looking at main.c I see a sparsity of comments relating to goal and reason of

   

project, methods, and code comments. Forum is a diverse group of skill sets,

   

generally you should target the beginners when you post a "how to" project.

   

 

   

3) The part you choose is not ( I am going out on a limb here) mainstream part

   

like the 29466 (PSOCEval1 kit or -001 kit), or 24xxx, 27xxx series. Just a thought.

   

 

   

Regards, Dana.

0 Likes