Go Down

Topic: Watt hours or amp hours? Basic question on what Unit to use (Read 1 time)previous topic - next topic

bestanamnetnogonsin

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?

janerlve

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.

Life is hard - Then you die

polymorph

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.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

bestanamnetnogonsin

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?

MarkT

10s is probably fine for a sample time, clouds drift by slower than that.  Just integrate the V I product.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

raschemmel

#5
May 21, 2016, 12:55 amLast Edit: May 21, 2016, 01:28 am by raschemmel
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...
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

couka

#6
May 21, 2016, 01:18 amLast Edit: May 21, 2016, 01:24 am by couka
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.

https://www.dropbox.com/s/y123hkwzg10sa81/Seminararbeit%20Solarnachf%C3%BChrung%20Endfassung%20anon.pdf?dl=0

lg, couka
Don't send me technical questions via PM. They will be deleted unanswered.

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.

raschemmel

Arduino Floating point  is 7 dugits
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

bestanamnetnogonsin

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

raschemmel

#10
May 21, 2016, 06:09 pmLast Edit: May 21, 2016, 06:10 pm by raschemmel
and "arduino Float"
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

MarkT

#11
May 21, 2016, 06:55 pmLast Edit: May 21, 2016, 06:56 pm by MarkT
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?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

raschemmel

#12
May 21, 2016, 07:46 pmLast Edit: May 21, 2016, 09:11 pm by raschemmel
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,
Code: [Select]
` 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 = V*I*t
= 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)

Code: [Select]
`  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 ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up