The reading was changing from 1023 in the bright sun to 800~200 in the shade and 0 in the dark ..
But after a while, the 10 ohm resistance started burning
I measured the volts and amperes coming out of the solar panel in the sun and found it to be 6.5 volts (Voc) and 0.5 amperes (Isc).
So far, I have not found any correct and accurate equations or codes
#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;
/*
* Main Setup function
*/
void setup() {
// Begin serial communication
Serial.begin(9600);
while(!Serial);
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
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);
}
yes, and it will take way to many of those in parallel to give you your required wattage.
For 5W you will need 5 / 0.25 = 20 resistors.
10 x 20 = 200 Ohms each.
If you used 220R then you would get 220/20 = 11 Ohms.
You could factor 11 Ohms into your calculations.
But first get your hardware sorted and measure your voltage with a DMM, to check your results before connecting it to your controller.
If we could talk in this code to avoid distraction
#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;
/*
* Main Setup function
*/
void setup() {
// Begin serial communication
Serial.begin(9600);
while(!Serial);
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
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);
}
#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);
}
I just want some clarification regarding the voltage divider area
Do I use a 400 ohm resistor for a 10 watt load ?
And resistance 2 and 3 how much do I put their values exactly?