Go Down

Topic: Solar irradiance using solar panel (Read 1 time) previous topic - next topic


Jul 09, 2018, 05:26 pm Last Edit: Jul 09, 2018, 05:30 pm by jremington
I can't make sense out of either of these lines (especially the comments).

Code: [Select]
Area = .7280; // we are dividing by 10000 get the area in square meters
Power = pow(analogRead(ANALOG_PIN), 1)/10   ; // Calculating power

What is your thinking in using the pow() function, and raising an integer number to the first power?

If you are interested in measuring current, that would be  (current in Amperes) = (voltage across a resistor)/(resistor value in Ohms).


Jul 09, 2018, 05:51 pm Last Edit: Jul 09, 2018, 05:54 pm by noobcoder22
does the analogread function defines the current of the solar panel which indicates the solar irradiance?

im really confused


Jul 09, 2018, 06:16 pm Last Edit: Jul 09, 2018, 06:19 pm by jremington
The analogRead() function reads the voltage on the input pin, in ADC units. The result needs to be scaled to produce an accurate voltage measurement, and for that, you need to know the ADC reference voltage.

Study this short tutorial

Since you are using the INTERNAL voltage reference, for best results, you need to calibrate the actual value of the reference voltage (it is probably not 1.1V), but you need a multimeter for that.


Is the internal voltage affects the other analog pins? im going to use an ds1307 for a data logger


There is only one ADC, connected at times to different "analog pins".

Nothing to do with the DS1307.


Jul 11, 2018, 04:26 pm Last Edit: Jul 11, 2018, 04:26 pm by noobcoder22
Im really confused with the readings shown by the solar panel. it shows random readings even though it is completely covered. maybe there's something wrong in the wiring.

so heres the wiring



Can you upload the image here. See the sticky post on how to display images inline.

I'm on a phone right now and copy-pasting links is awkward.
"The problem is in the code you didn't post."



That image is spectacularly unhelpful. Without any explanation of what the wires are connected to, it's useless. Even if you try to explain to us what the yellow wires are (and where the yellow wire goes that just crosses the picture without connecting to anything in the picture) it's not helpful.

Draw a schematic. It doesn't have to be fancy or use standardized symbols. Just anything on a piece of paper will be more helpful than that photo. Often the act of drawing the schematic will find your error.
"The problem is in the code you didn't post."

Go Up