I am interested in solar power and so for my major project I
decided to make the arduino able to measure the voltage the solar panel would
produce. If I could get the voltage then I could find out the amps and power of
it with some changes to the system.
I changed the light available to check that everything had
been set up properly and that the solar panel was getting the light.
Problems
I had one big issue with this project which was getting the
solar panel to use. I have little money to spend so I needed a cheap panel
which I ordered from overseas but there was a problem and they wouldn't arrive
until too late. I was thinking about doing another project but I got lucky and
found a solar powered bicycle light in a second hand bin at Jaycar. I brought
that and canalized the solar panel to use for my project. This was perfect as
the solar panel needed to be under 5 volts or it could burn out the Arduino and
through research I was certain that this was (if it wasn't I would have needed
to add resisters to the project).
Here is the code I used to get and write the output to the
monitor:
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0 / 1023.0);
delay(1000);
Serial.println(voltage);
}
Here are the photos of the project and the output:














