Arduino build

Hallo Makers :)

I just started to build an energy meter based on arduino using this components.

When i tryed to plot just the raw analog signal for example in excel, the result looks like the picture below. I am not sure if this wave is in right form. 

When there is no connection to adapter the analog signal is 514. 

Someone please check this output and answer me if it is OK. Thank you :)

Robert Wall's picture

Re: Arduino build

Without a time scale, your diagram is meaningless. It doesn't look right, but I have no means of knowing whether I am looking at aliasing or what. All I can say is if the vertical scale is counts, then you are not overloading the input and clipping the wave. The quiescent level at 514 is good enough.

What value have you used for C1? The circuit you have copied is taken from Building Blocks. That section of the site explains the theory behind specific parts of our designs and this particular diagram is drawn to explain the how the input bias circuit works, it is not a fully engineered schematic.

Clint's picture

Re: Arduino build

Thank you for your answer Robert. I cant tell you the timestamps because i just printed the raw values 

void setup() {  Serial.begin(9600); }

void loop() {  int sensorValue = analogRead(A0);
 
                    Serial.println(sensorValue);}

Value of C1 is 25V10µF . 

Robert Wall's picture

Re: Arduino build

What you're looking at there is aliasing. The serial output at 9600 baud is slowing the loop so much that your first sample is correct (by definition), but the second is coming a little less than half a cycle later (or 1 1/2 cycles later), not 1/16 th (or something like that, as it appears) of a cycle later. 

If you increase the baud rate to the maximum 115200, you will get a very different picture.

 

To get a truly accurate representation at the maximum speed possible from the ADC (about 120 samples per cycle), you will need to store the samples in an array and print them later - it's not possible to send them in real time.

Clint's picture

Re: Arduino build

Thank you Robert! Great explanation, after changing it to maximum the numbers are much better :)

I will posting here some other questions about this project if I get in trouble.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.