I'm doing a power meter with arduino uno but i have a problem.
Until now i only did the signal conditioning (amp op and dc offset to "put the wave on positive side").
Already checked the signals on the oscilloscope it's all ok.
But when i use the analog read of arduino i mesure signals without sence.
I think the problem is ground because the signal conditioning circuit have ground and arduino have another one.
Please give me some opinions/ideas about this.
Sorry about my english and tell me if anything are wrong it's my first post.
But when i use the analog read of arduino i mesure signals without sence.
What voltage do you have, and what readings are you getting?
I assume this is 50Hz or 60Hz AC? If you read fast-enough, you should be able to "follow" the AC cycle, but your software would need to process that data if you want to "analyze" that waveform. (Typically when you digitize an AC waveform, you read at a known sample rate.)
Have you tried it with DC to check your readings against your oscilloscope or multimeter?
In any case, you readings should be centered around zero (after subtracting the offset) and the peak readings should represent the positive and negative voltage peaks. Any one reading is (almost) useless, since it could be anywhere along the AC waveform.
If you are calculating an average*, remember that the average of a sine wave is zero (it's positive half the time, and negative half the time), or it will be equal to the offset. So, take the average of the absolute values or ignore the negative readings (after subtracting the offset).*
What kind of power meter are you trying to make.
What are you intending to measure with the power meter.
Measuring power is not a trivial exercise if you want accurate power readings especially if the loads being measured
contain switch mode power supplies.
But if i convert the signal to dc i can't measure phase difference between voltage and current waves which one i need to measure reactive and active power.
How you interface a voltage? Can draw a schem, at least on a paper?
Thanks for your reply.
I forgot the common ground and some resistors (i don't amplify directly th circuit have a couple of resistors between sensor and ampop ).
Say something if the schem is not perceptible.
From your graph, your current readings are OK but the voltage readings are not. But the scope trace of voltage looks OK, assuming you are looking at the AD622 output and the peak is a little less than 5V. However, you must connect a 10K resistor between the AD622 output and the analog input pin, to prevent damage to the pin when the AD622 output goes below 0V or above +5V. It may be that you have already damaged the pin, so try another one. Also check that you are selecting the correct analog pin in the code.
OP, I hope you follow David's suggestion, and fix the problem.
meanwhile you should drop a line to your chairman of department, "The LM741 is first/second generation Op, to use it just like run windows 3.0 at computer today"
meanwhile you should drop a line to your chairman of department, "The LM741 is first/second generation Op, to use it just like run windows 3.0 at computer today"
First of all thanks for all advices.
The problem is solved, now i can read the signals as i want.
I'm using the LM741 because in portucal it's hard buy some electronics components, i don't know why but stores only sell to companies.
I know that it was better with AD622 for several reasons ...