# Watt hours or amp hours? Basic question on what Unit to use

Hi I am trying to compare the Power of two solar cells, to see which one is more effective. I am measuring: Amps, Volts and Time. But Unit should I use, that tells me how much electricity my cell actually has produced over the day? Watt hours or amp hours maybe? Or should I just calculate the average power of each cell?

V x A x h (VAh) should be OK.
If V (voltage) is equal for all for all solar cells you could use A x h (Ah) for comparison.

Watt hours. The voltage will change over the course of a day, and total energy output is what you are interested in.

Amp hours won't tell the whole story.

ok, that seems good.

How would I go about calculating watt hours? I mean V and A will change during, so I can't just take the last measurement and multiply it by 12 hours. Should I measure V and A say every 10 seconds, and just assume they stay the same during that time? (Like this for example: 5V x 1A x 0.0027hours (10 seconds))

Or Is there a better way?

10s is probably fine for a sample time, clouds drift by slower than that. Just integrate the V I product.

If you collect data (V,A) and sample every second and multiply the two and save the result and add it to the previous result, at the end of an hour you will have a single result. Would that not be the average Watt/hours for that hour ? if you then save that result as hour_1, and do this for all 24 hours and add them all together would that not be the average output for one day ? If you divide that by 24 would that not be the average Watt/hour output for one day ? Couldn't you use nested FOR loops fir seconds, hours , and days ?
I don't know but that's my guess...

1 sample/minute is more than enough. I build a model to compare stationary and tracked solarcells, the project paper is in german, but you might be interested in the code and graphs, though. lg, couka

Wouldn't it be better to average amps and volts and at the end of the day you would take volts x amps x 24?Because if the arduino takes a sample, say every minute, you would have a result of say 0.055123 watt hours. But the arduino would make this 0.06 watt hours. So over time you would drift off.

Arduino Floating point is 7 dugits

Oh. That would be good. But why, if I print a float does it only give me two digits?

and "arduino Float"

bestanamnetnogonsin:
Wouldn't it be better to average amps and volts and at the end of the day you would take volts x amps x 24?Because if the arduino takes a sample, say every minute, you would have a result of say 0.055123 watt hours. But the arduino would make this 0.06 watt hours. So over time you would drift off.

Different result, if you want to measure energy you integrate instantaneous power, floats are plenty
accurate for this, why round spuriously?

OP doesn't know Serial.print() syntax.
ie:
float val = 1.23456789;

Serial.println(val,8);

"spuriously..."
Really ?
Whewww ! ( I have to Google that, LOL)
I get "bogus , false ,fake, etc.."
How does that apply to OP's rounding intentions ?
( or maybe "unintentions")

@OP,

``````float val = 1.2345678910;
void setup() {

Serial.begin(9600);
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:
Serial.println(val,10);
delay(1000);
}
``````

Let V = 12V
I = 2A
t = 1/3200 hours (1 second) = 0.000277

1 Watt/Second = VIt
= 12V *2A * 0.000277 Watt Hours (1/3200)
= 0.0075 Watt Hours

For the sake of illustration, let's assume the solar cell output was EXACTLY the same for EVERY one of the 3200 samples taken in one hour,
then
All the samples taken every second ard multiplied by 3200 (normally they would ALL be different and would SUMMED up as described previously)

1 hours output = 3200* 0.0075 Watt Hours (one sample)
= 24 Watt Hours (12V *2A * 1 hour)

Using nested FOR LOOPS, (pseudo code)

``````  For (i=0;i<24;i++) // 24 hours in a day
{
For (i=0;i<60;i++) // 60 minutes in an hour
{
For (i=0;i<60;i++) // 60 seconds in a minute
{
// put code here to measure voltage output =>"volts = xx.xxxxx;"
// put code here to measure current output =>"current  = xx.xxxxx;"
// put code here to multiply volts*current*0.000277  Watt Hours
// put code here to save add result to previous result =>"float daily output =
XXX.XXXXX;"
}
}

}
``````

Would that work ?