Go Down

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

#### jremington

#15
##### Jul 09, 2018, 05:26 pmLast 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 metersPower = 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).

#### noobcoder22

#16
##### Jul 09, 2018, 05:51 pmLast 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

#### jremington

#17
##### Jul 09, 2018, 06:16 pmLast 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.

#### noobcoder22

#18
##### Jul 11, 2018, 01:09 am
Is the internal voltage affects the other analog pins? im going to use an ds1307 for a data logger

#### jremington

#19
##### Jul 11, 2018, 01:30 am
There is only one ADC, connected at times to different "analog pins".

Nothing to do with the DS1307.

#### noobcoder22

#20
##### Jul 11, 2018, 04:26 pmLast 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

https://prnt.sc/k57r2m

#### MorganS

#21
##### Jul 11, 2018, 06:05 pm
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."

#### noobcoder22

#22
##### Jul 12, 2018, 10:06 am
so heres the image

#### MorganS

#23
##### Jul 12, 2018, 11:37 pm
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