Use arduino uno with solar panel to measure sun light Irridiation

Okay thats good.
So it looks pretty well calibrated.
Now we calculate for 5V.

#define ANALOG_PIN A2 // Analog pin
#define RESISTANCE 10 // Resistance in thousands of ohms
#define PANEL_LENGTH 200 // Length of solar cell in mm
#define PANEL_WIDTH 130 // Width of solar cell in mm
float Area;
float Power;
float Radiation;
int rawVolts;
float voltsInput;
float voltsLoad;
/*
  Main Setup function
*/
void setup() {
  // Begin serial communication
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Solar panel power meter");
  analogReference(INTERNAL);
  delay(1000);
}
/*
  Main Setup function
*/
void loop() {
  Area = 0.026 ; // (( PANEL_LENGTH * PANEL_WIDTH )/ 1000000 ) we are dividing by 10000 get the area in square meters
  rawVolts = analogRead(A2);  // read the ADC
  Serial.print(rawVolts);
  Serial.println(" = rawVolts at A2 Pin"); //print the voltage AT the A0 pin
  voltsInput = (float)rawVolts * 1.1 / 1023.0 ; // convert the ADC to a voltage.
  Serial.print(voltsInput);
  Serial.println("V at A2 Pin"); //print the voltage AT the A2 pin
  voltsLoad = voltsInput * 5.0;
  Serial.print(voltsLoad);
  Serial.println("V across load Resistor");
  //Power = pow(analogRead(ANALOG_PIN), 2) / RESISTANCE ; // Calculating power
  //Radiation = Power / Area;
  //char *msg;
  //Serial.print("The Solar Radiation is %f W/M2 : ");
  //Serial.println(Radiation);
  delay(1000);
}

Still leave the 5V connection, no PV or Load resistor.

Tom... :smiley: :+1: :coffee: :australia:

1 Like

OK , I tried to connect solar cell .. But reading is completely different from multimeter readings

Readings with this code , without solar cell

Hi,
If you connect the PV, disconnect the 5V pin connection.
What load resistor are you using?

Set the circuit up as in post #12.
But use A2.

Tom... :smiley: :+1: :coffee: :australia:

As I said before, unfortunately, I now only have 1/4 watt resestors .
I don't know what to do with this 10W :sweat:

what about your post #9

Hi,

If you want to go ahead and make it, then fine, you can check the final resistance with your DMM.

Tom... :smiley: :+1: :coffee: :australia:

HI , mr TOM :rose:

I found this two resistors in my rubish :laughing:

can i use them together as load resistor
Total Resistance : 71 ohm , 5 w

i try with solar cell without load resistor
and it read volage so good on "voltsLoad" function
and it is almost equal to multimeter measuring

Hi,
I had to get some sleep mate, it was a bit late for me.

Put the two resistors in parallel to get 5W.
51R in parallel with 20R

= (51 * 20) / ( 51 + 20) = 14.3 R

Tom... :smiley: :+1: :coffee: :australia:

1 Like

Hi,
Try this code, it should print out most of what you need.

#define ANALOG_PIN A2 // Analog pin
#define RESISTANCE 10 // Load Resistance in Ohms
#define PANEL_LENGTH 200 // Length of solar cell in mm
#define PANEL_WIDTH 130 // Width of solar cell in mm
float Area;
float Power;
float Radiation;
int rawVolts;
float voltsInput;
float voltsLoad;
/*
  Main Setup function
*/
void setup() {
  // Begin serial communication
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Solar panel power meter");
  analogReference(INTERNAL);
  delay(1000);
}
/*
  Main Setup function
*/
void loop() {
  Area = (PANEL_LENGTH * PANEL_WIDTH ) / 1000000.0; // (( PANEL_LENGTH * PANEL_WIDTH )/ 1000000 ) we are dividing by 10000000 get the area in square meters
  rawVolts = analogRead(A2);  // read the ADC
  Serial.print(rawVolts);
  Serial.println(" = rawVolts at A2 Pin"); //print the voltage AT the A0 pin
  voltsInput = (float)rawVolts * 1.1 / 1023.0 ; // convert the ADC to a voltage.
  Serial.print(voltsInput);
  Serial.println("V at A2 Pin"); //print the voltage AT the A2 pin
  voltsLoad = voltsInput * 5.0;
  Serial.print(voltsLoad);
  Serial.println("V across load Resistor");
  Power = (voltsLoad * voltsLoad) / RESISTANCE ; // Calculating power P = V * V / R
  Serial.print(Power);
  Serial.println("Watts    Power dissipated in Load Resistor");
  Serial.print(Area, 3); // Prints value to 3 decimal points
  Serial.println("Square Meters   Panel Area");
  Serial.println("======================================");
  Radiation = Power / Area;
  char *msg;
  Serial.print("The Solar Radiation is %f W/M2 : ");
  Serial.println(Radiation);
  Serial.println("======================================");
  delay(1000);
}

NOTE; you will have to change;

#define RESISTANCE 10 // Load Resistance in Ohms

To the value that your new load resistor measures.

Tom... :smiley: :+1: :coffee: :australia:

Is the amount of watts summed in both cases? Whether they are connected parallel or series?

I will try it now :hibiscus:

#define RESISTANCE 10 // Load Resistance in Ohms

For this it will be 14.3 ?

Hi

No only in parallel, you need parallel to get a low enough load resistance.

Yes.

Tom... :smiley: :+1: :coffee: :australia:

1 Like

The reading does not change with the intensity of illumination
It is zero and changes on its own

Will the solar radiation reading be limited only to electrical power and panel area?

I think , it will be in maximum read at ( 4 / 0.026 ) = ~154 W/m2 !

Can i scale this read by map ? like ...

Radiation = map ( radiation at solar cell , 0 , 154.0 , 0 , 1400 )

(1300-1400 W/m2 ) it is the maximum Direct Normal Solar Radiation

Hi,
What voltage do you measure with the DMM across the load, does it compare to the monitor load voltage readout?

Tom... :smiley: :+1: :coffee: :australia:

No it is not compare

DMM measure 8 mv

1 Like

Hi,
Where is the gnd wire between the UNO and the potential divider?

Also move the load resistor along the protoboard to be closer to the PV panel connections.

Tom... :smiley: :+1: :coffee: :australia:

Reading has become zero

i soldered load resistors direct to solar cell

connected GND of Arduino UNO

What about post #55 ? :smile:

Hi,
How much sun have you got shining on your panel?

Tom... :smiley: :+1: :coffee: :australia:

1 Like

Exactly, I don't know :sweat_smile:

But now I'm lighting the room

I can go up to the roof. But now what's the difference!