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...
![:australia: :australia:](https://emoji.discourse-cdn.com/twitter/australia.png?v=12)
do you mean Digital Multi Meter ?
if yes .. yes Ihave one ![:sweat_smile: :sweat_smile:](https://emoji.discourse-cdn.com/twitter/sweat_smile.png?v=12)
are you mean the arduino uno not have 1.1 v reference ?
i put it ..
it is 0.3 v
It does not change with the intensity of illumination
This is the current connection ![:sweat: :sweat:](https://emoji.discourse-cdn.com/twitter/sweat.png?v=12)
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...
![:australia: :australia:](https://emoji.discourse-cdn.com/twitter/australia.png?v=12)
you are right , its give 1V on A2
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...
![:australia: :australia:](https://emoji.discourse-cdn.com/twitter/australia.png?v=12)
Hi,
Where is your A2 connection?
What is the ribbon connection for?
Tom...
![:australia: :australia:](https://emoji.discourse-cdn.com/twitter/australia.png?v=12)
I was showing you reading on the multimeter
Do I put the orange tip in A2 ?