Hello,
I'm working on a simple pv datalogger for my school project. I'm still a beginner EEE. I need to record both value of voltage and current measurement from solar panel then display the power in Watt, Voltage x Current. Is it okay if i connect 12V 83mA solar panel? of course i will need to use voltage divider to reduce it in the range 0-5V for an analog input measurement Ao, on Arduino. but what about the current? since the DC Current per I/O Pin is 40 mA on the arduino, should i reduced it too when connecting directly? and Any idea how should i measure the current? i really don't want to damage my Arduino, so i decided to ask first, Thanks a lot ![]()
usual way to measure current is to measure the voltage across a resistor in series with the load
break the ground connection of the load and put the resistor there
measure the voltage across the resistor and you get the current
the only fun bit is choosing the value of the resistor
make the value to low and the voltage is too low to measure
make it to high and you lose voltage to the load!
Ohm's law is your friend ...
If all you want to do is measure the performance of the solar panel without doing anything useful with the electricity then I THINK you should be able to do it very simply by feeding all the power from the panel through a suitable load resistor. (For 12v and 83mA I think it would be 144ohms at 1 watt - I would try the next lowest standard resistor.)
Then all you need to measure is the voltage because you can use Ohms law to calculate the current and power.
If you do want to use the electricity for something then you will need to measure the current by measuring the voltage across a very low resistance - I have 0.005 ohm resistors on my 80W solar panels which result in 5mV per Amp. And with very low resistances you get very low voltages so you will need to amplify the voltage before the Arduino can measure it. All a lot more complicated.
Also solar panels deliver their maximum power for different light levels at different voltages so you might find it interesting to be able to log the power with a few different load resistors.
You will need to measure the voltage (or voltage and current if you are measuring them separately) very frequently - once per second or better? - to allow for all the natural changes in sunlight if you live where there are clouds. I presume if you have clear sky all day things would be easier - but that might be another interesting experiment.
...R
"If all you want to do is measure the performance of the solar panel without doing anything useful with the electricity then I THINK you should be able to do it very simply by feeding all the power from the panel through a suitable load resistor. (For 12v and 83mA I think it would be 144ohms at 1 watt - I would try the next lowest standard resistor.)"
Hi, thanks for the reply. When u said simply feeding to the load resistor, do i also need to set up voltage divider, to reduce 5V for analogread? Wouldnt feeding 83mA during peak daylight be destroying the arduino as the recommended I/O pin is 20mA to 40mA max?
What exactly is the aim of the project?
Are you trying to measure how much energy the solar panel makes over some period of time
or just how much power the solar panel makes into some random value resistor?
Ideally, to measure how much energy a solar panel can make over some time frame , you need
some kind of MPPT tracker, but thats probably not what you had in mind .
YES a voltage divider is essential. Don't even think of feeding the current through the Arduino pins.
In the simple idea I suggested all the solar panel current will go through the load resistor and the Arduino will just measure the voltage across the resistor at regular intervals.
...R
What Cookiemonster apparently is trying to do is measure the output of the Solar panel under varies conditions (full sunshine, overcast etc.).
The solar panel needs a proper load, so what you need to do is to create this load by just connecting a resistor.
If the panel indeed produces 83mA at 12V you will need 144 Ohm. So if you connect this 144 Ohm resistor you can measure the voltage drop over this resistor.
As Ohm's law states:
I = V/R
You can calculate the current through the resistor by dividing the voltage by the value of the resistor.
As you want to use the arduino, the allowed maximum analog value is 5V, so instead of running this current through just one resistor, just use 2 resistors in serial for example 100 and 47 Ohm.
You can then measure the voltage drop over the 47 Ohm resistor.
The current then still is V/47 (being then 47 ohm resistor).
Note that you use resistors that can handle this 83 mA load. The 100 Ohm resistor will then dissipate 0.7 Watt, so I would recommend to use resistors with a 1W power rating.
check out this:
www.adamlhumphreys.com/~stuff/ALH_kWh_Logger.zip
I build this on an Arduino / Atmel328mini .... for my 55W Solar panel. I modified the code a little to my needs ... so it logs AH in/out and min/max voltage for each day.
The datalogger can hold this values for the last 86 days (in the atmels eeprom).
I use a ASC712 current circut (more easy) ....
My loogs look like that:
1day 13.1Vmax 12.1Vmin 0.5Amax 1.00AH inn 2.00AH out 18.00WH
A 12V 83mA Solar Panel .... ehm .... much to small! You can't run the arduino on it over time - only when the sun shines good.
A arduino with display will take about 70mA all time!
You cannot simply point a solar panel into the general direction of the sun and then magically expect it to produce the optimal amount of power. For every combination of solar light intensity, panel temperature and load the panel will produce a specific current, and the relation between those parameters is complex and non-linear.
That's why commercial systems use MPPT tracking, which constantly alters the voltage and resistance and looks for the best combination of voltage times current to produce the maximum amount of power.
cookiemonster:
Hello,
I'm working on a simple pv datalogger for my school project. I'm still a beginner EEE. I need to record both value of voltage and current measurement from solar panel manufactured by solar panels manufacturer then display the power in Watt, Voltage x Current. Is it okay if i connect 12V 83mA solar panel? of course i will need to use voltage divider to reduce it in the range 0-5V for an analog input measurement Ao, on Arduino. but what about the current? since the DC Current per I/O Pin is 40 mA on the arduino, should i reduced it too when connecting directly? and Any idea how should i measure the current? i really don't want to damage my Arduino, so i decided to ask first, Thanks a lot
Hello friend bit old thread but I have been working on similar sort of project.. Were you able to complete the project and can you help me out? I hope you will reply soon..