Using arduino to measure solar irradiance from a solar cell

hii guys, pls could someone guide me how to connect my small solar cell of 5V, 1W to arduino to measure the solar irradiance and a sample code for it to print out the radiation of my locality?
Thanks in anticipation

Attach the solar cell to a low value resistor and measure the voltage drop across the resistor.

The current flow is roughly proportional to the illumination intensity.

+1
Connect a voltmeter to the solar panel, put it in full noon sun, and experiment with a load resistor across the cell so voltage drops to <=1volt (you're only interested in cell current).
I expect ~10 ohm to do the trick.
Then measure voltage across the cell with 1.1volt Aref enabled in setup.
Leo..

thanks but could i use this same schematic i saw in your earlier post 2years ago? and how do i go about the arduino code to output the irradiance in W/m^2

solar.png

Thanks @Wawa i now understand the connection of a small resistor across the panel to measure the output voltage
but pls could you put me through on the 1.1v Aref?

Excellent tutorial for the Arduino ADC

Aref depends on which Arduino you're using (you didn't tell).
This test sketch works on an Uno/Nano/Mega, and maybe on others.
Leo..

const byte solarPin = A0;
int solarValue;

void setup() {
  analogReference(INTERNAL); // 0 to ~1.1volt gives 0 to 1023
  Serial.begin(9600);
}

void loop() {
  solarValue = analogRead(solarPin);
  Serial.println(solarValue);
  delay(1000);
}

thanks, i would surely go through the tutorial on arduino ADC

@Wawa thanks, i got the 10ohm resistor and experimented the code but i seem to be reading "0" on my serial monitor, or is my schematic wrong

here is a picture of the schematic diagram

Your schematic is correct. Use your multimeter to check the connections, and the voltage at the analog input.

Thanks, I measured ~1.2v with my voltmeter at noon and was my serial was reading maximum which is 1023, so now do i need to convert the analog reading to the original input voltage to calculate my power since power/area is irradiance i.e. V^2/R or I^2R (0.12^210) ?

You need a smaller resistor to allow measuring the full range of output current, so that the voltage across the resistor is less than 1.1V at full noon sunlight. I suggest 8 to 9 Ohms.

The voltage across the resistor is approximately linear in irradiance, so you can use 1-point scaling.

That is, if analog input reading A corresponds to irradiance L, the scale factor is L/A for subsequent measurements.

See this tutorial on sensor calibration.

thanks, but presently 10ohms is the least resistor i have perhaps i would parallel it to get 5ohms? right now, how do i get my irradiation value out of the value my serial monitor prints, is it with the formula i mentioned above or what coz i am confused right now and my target is to measure the irradiance from the solar cell then map it with the solar irradiance of my location.

how do i get my irradiation value

Please re-read reply #12, and work through the tutorial I linked.

If you only have 10 ohm resistors...
Three in series (30) added to the existing (10) in parallel will give you (30*10)/(30+10)= 7.5 ohm.
Experiment until you are just below that 1023 value in full noon bright sky summer sun.
Leo..

okay thanks, would try that at full noon but when i get the ADC units less than 1023, pls how do i arrive at the irradiance from the code, i would like if you please assist me with a sample code of getting the irradiance as i am behind schedule for the assignment submission@Wawa

Just multiply that returned A/D value with a number, so you get the Arduino to display what you want.
That factor should be close to 1 anyway if you want to display in W/m2.

float irradiation = analogRead(solarPin) * 1.0123; // calibrate

Leo..

okay thanks, so for instance if my A/D value reads 987 and i multiply by 1.0123 i get 999.14W/m^2 i would still need to map it with my location's irradiation value right?

1.0123 was of course an example. Could be between 0.8xxx and 1.2xxx.
Must experiment/calibrate against a known source.
Maybe your local meteorological station provides real-time solar data online.
Like this one close to me.
Leo..