Use arduino uno with solar panel to measure sun light Irridiation

Thanks tom ..

I USE Arduino UNO

OK , I will be using this now

#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;
/*
  Main Setup function
*/
void setup() {
  // Begin serial communication
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Solar panel power meter");
  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
  voltsInput = (float)rawVolts * 1.1 / 1023.0 ; // convert the ADC to a voltage.
  Serial.print(voltsInput);
  Serial.println("V at A0 Pin"); //print the voltage AT the A0 pin
  //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);
}

Hi,
That will not provide the drop needed for 1.1v reference.

You will need to build your own.

That for 5.5V in you get 1.0 V out.

Do you have a DMM?

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

do you mean Digital Multi Meter ?
if yes .. yes Ihave one :sweat_smile:

are you mean the arduino uno not have 1.1 v reference ?

Hi,
What is the voltage at the A0 pin?
Can you measure it please?

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

Yes it does have 1.1V reference, which you put in your voltage calculation.
Sorry forgot to put the internal ref in the setup.

#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;
/*
  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
  voltsInput = (float)rawVolts * 1.1 / 1023.0 ; // convert the ADC to a voltage.
  Serial.print(voltsInput);
  Serial.println("V at A0 Pin"); //print the voltage AT the A0 pin
  //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);
}

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

i put it ..

it is 0.3 v
It does not change with the intensity of illumination

This is the current connection :sweat:

Hi,
Try this connection, disconnect the load and PV from your divider.
What are the values of you potential divider resistors?
Measure your 5V pin and A2 pin please.

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

Hi,
With those values, 5V should give you 1V on A2.

Try this, I have added a serial print.

#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;
/*
  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 A0 Pin"); //print the voltage AT the A0 pin
  //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);
}

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

you are right , its give 1V on A2

also noting :sweat:

Is this connection correct?

Hi,
Can you post a picture of your project setup with the 5V connected to the top of the divider and no PV or load connected?
This;

 Serial.println("V at A0 Pin"); //print the voltage AT the A0 pin

Needs to be changed to this.

 Serial.println("V at A2 Pin"); //print the voltage AT the A2 pin

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

ok

Hi,
Where is your A2 connection?

What is the ribbon connection for?

Tom... :smiley: :coffee: :coffee: :australia:

I was showing you reading on the multimeter

Do I put the orange tip in A2 ?

Yes please.
Leave DMM connected.

Tom... :smiley: :coffee: :coffee: :australia:

DONE