# Data acquisition from a Photovoltaic panel

#### athcerr

Joined Jun 11, 2021
18
Good evening,
I would like to measure the voltage delivered by a photovoltaic panel whose characteristic parameters are as follows:
Isc = 5.92 A
Voc = 44.5V
Imppt = 5.48 A
Vmppt = 36.5V.
I need to lower the voltage from 44.5 to 5V to be able to measure it by Arduino using the voltage divider bridge.

If for example I use a total resistance of 10kΩ which will give R1 = 9kΩ, R2 = 1kΩ and I = 4.45 mA and the powers dissipated by the two resistors are: P1 = 0.175 W and P2 = 0.022 W.

but if I go for a total resistance of 40k I will have: I = 1.1mA, R1 = 36kΩ, R2 = 4kΩ, P1 = 0.044 W, P2 = 0.0055 W.

I know that whatever resistors are chosen, the important thing is that I must not exceed the nominal power of the resistor, but both cases give me currents I = 4.45 mA and I = 1.1 mA. My question is on what criteria I will use to choose the right amperage, is it better to choose the smallest or the largest amperage?

Thank you

#### LowQCab

Joined Nov 6, 2012
3,580
You need to determine the lowest Voltage that you wish to monitor,
then get a Zener-Diode with that Voltage Rating, or slightly lower.

Doing this will give you the greatest resolution possible.

You may also consider a Zener for clamping the Maximum-Output-Voltage,
because, under no circumstances do you want to exceed your
Micro-Controller's Power-Supply Voltage.

I don't understand all of your acronyms, so I am making the assumption that
36.5V is the lowest Voltage that you are wanting to measure,
and 44.5V is the highest Voltage.
.
.
.

#### AlbertHall

Joined Jun 4, 2014
12,293
One consideration for a low resistance divider would be any temperature rise in the voltage divider resistors which would change their values and affect the measurement accuracy.
For a higher resistance divider you must take into account the loading effect of the arduino ADC.

#### athcerr

Joined Jun 11, 2021
18
You need to determine the lowest Voltage that you wish to monitor,
then get a Zener-Diode with that Voltage Rating, or slightly lower.

Doing this will give you the greatest resolution possible.

You may also consider a Zener for clamping the Maximum-Output-Voltage,
because, under no circumstances do you want to exceed your
Micro-Controller's Power-Supply Voltage.

I don't understand all of your acronyms, so I am making the assumption that
36.5V is the lowest Voltage that you are wanting to measure,
and 44.5V is the highest Voltage.
.
.
.
View attachment 241188
Imppt = 5.48 A and Vmppt = 36.5V are the optimum current and voltage under which the photovoltaic panel can operate.
Isc = 5.92 A and Voc = 44.5V are the maximum current and voltage that the photovoltaic panel can deliver.
I would like to measure the gross voltage (44.5V being the maximum value between its terminals) delivered by the panel, it can be less than 36.5V, it can even reach 0V (it depends on the load connected to the panel) but it will not exceed 44.5V.
To measure it by the arduino board, I am considering using a voltage divider bridge to lower this voltage so that it will not exceed the supply voltage of Arduino (5V).

how much will be the voltage rating of the zener-diode then ?

#### Attachments

• 17.8 KB Views: 6

#### athcerr

Joined Jun 11, 2021
18
For a higher resistance divider you must take into account the loading effect of the arduino ADC.
what do you mean by the loading effect of the arduino ADC ? (I'm taking my first steps with arduino, sorry)

#### Ian0

Joined Aug 7, 2020
8,944
The most important consideration is the maximum source resistance for your ADC. For most microcontrollers it is in the range of 10k to 22k. (This is to make sure it can charge the sample-and-hold capacitor in the a/d converter quickly enough) So choose the lower resistor as 10k and scale the upper one accordingly which would make it 91k to accommodate the open-circuit panel voltage.
The zener circuit will give better resolution at the expense of absolute accuracy. The zener voltage will only be accurate to within 5% and will vary as the voltage changes (as the current through the zener will also change).
To measure the current, use a current shunt and an amplifier such as AD8418 or INA180. Assuming one with a gain of 20, then the shunt voltage needs to be 5V/20 (250mV) at Isc giving a shunt resistance of 250mV/Isc = 39mΩ

[EDIT] If the spec for Voc is 44.5V, then that figure is quoted at 25°C. If the outdoor temperature is -10°C then the voltage will increase by another 10%, similarly Isc could be rather higher at 70°C than the quoted figure for 25°C, so better use 100k for the top resistor in the divider and 33mΩ for the shunt.

Last edited:

#### LowQCab

Joined Nov 6, 2012
3,580
What is the lowest Voltage of interest ?
I assume that you don't care about the exact Voltage when it's below a certain threshold.

And, as someone previously noted,
the Circuit I provided earlier is somewhat "squishy", but so is the Output of the PVC Stack.
For instance when a cloud passes by.

I'm guessing that you don't care about tenths of a Volt in absolute accuracy,
but only a repeatable, very close number.
.
.
.

#### nsaspook

Joined Aug 27, 2009
12,296
You want to minimize drift in your voltage divider so first use stable metal film resistors in the network but you also want a fairly low impedance source to the ADC for measurement accuracy so it's a compromise. I use a little lower than what's needed resistance values to up the wattage a bit on the resistors for thermal stability over normal temp ranges. I do care about absolute accuracy,

For this solar monitor project I used the PIC18FK42 12-bit ADC, REF3440 4.096V precision reference and this resistor divider (with precision trimmer for higher voltages) to handle three 12 solar panels in series and the assorted DC measurements for 10 total analog input DAQ channels for the MPPT charge controller, MODBUS, and battery condition monitor system.

Prototype PCB voltage dividers and trimmers.

In the software I over-sample to get a extra bit of resolution and to reduce measurement noise by averaging.
https://github.com/nsaspook/vtouch_v2/blob/mbmc/touch_v2.X/daq.c
Code:
/*
* 12-bit analog 64 sample average per channel on ports A and B
* uses the compute burst average mode threshold interrupt to auto change
* channels during interrupt after a repeat count
* The end result is a 13-bit ADC value
*/
https://github.com/nsaspook/vtouch_v2/tree/mbmc

#### ericgibbs

Joined Jan 29, 2010
18,226
hi ath,
That circuit in Post #2, will be OK, just add a 10n across the lower 3.3/5.0 Zener.
The input impedance driving the Analog input is far less that the recommended minimum of 5k.

The parallel cap will provide more than enough current to charge the internal capacitor of the internal analog circuitry during Read/Hold cycle as well as acting as a 'noise' filter.

Choose a 10nF cap that has stable temperature characteristic, keep the Zener's and resistors close to the ADC, [ out of the Sun ]

E

#### athcerr

Joined Jun 11, 2021
18
from what I understand, the Zener diode is used to get more precise results ... but since I am not in electronics it is a bit complicated for me. this test is part of a simple experimental part for my studies ... I think that I will be satisfied with a simple divider bridge but I will choose the resistors judiciously taking into account your remarks.

To measure the current,
to measure the current I considered using an ACS712 hall effect sensor but I don't know whether I will opt for the 5A or 30A sensor. Will a 5A sensor not cause me problems knowing that the short circuit current of my panel is Isc=5.92A, and the optimal current Imppt=5.48A and they are both greater than 5A?

#### athcerr

Joined Jun 11, 2021
18
from what I understand, the Zener diode is used to get more precise results ... but since I am not in electronics it is a bit complicated for me. this test is part of a simple experimental part for my studies ... I think that I will be satisfied with a simple divider bridge but I will choose the resistors judiciously taking into account your remarks.

To measure the current,
to measure the current I considered using an ACS712 hall effect sensor but I don't know whether I will opt for the 5A or 30A sensor. Will a 5A sensor not cause me problems knowing that the short circuit current of my panel is Isc=5.92A, and the optimal current Imppt=5.48A and they are both greater than 5A?

#### LowQCab

Joined Nov 6, 2012
3,580
A 5-Amp Sensor will probably "survive" just fine,
but its Output-Voltage will simply remain maxed-out for any Current over ~5-Amps.
If you look around some more, you can probably find a 10-Amp Sensor which
will give you better resolution than a 40-Amp version.

Sometimes the Spec-Sheet will show how to achieve different sensitivities with
different Circuit-Board lay-out specifications.

Or, it my be easier to go with a "Pass-Through" style Current-Sensor.
With a Pass-Through style Sensor you can simply pass the same Wire through the
aperture multiple times to create as much sensitivity as you need.
( 2-passes would make 5-Amps appear to be 10-Amps to the Sensor,
3-passes would appear to be 15-Amps, 4 would be 20, 5 would be 25, etc. )

So you could use a Honeywell CSLA1CD 57-Amp Sensor,
then run 5-turns of your sensed Wire through it, and have a high-resolution ~10-Amp-Sensor.
.
.
.

#### Ian0

Joined Aug 7, 2020
8,944
A shunt and a INA180 is much cheaper than the ACS712. 36p for the resistor and 55p for the INA180 compared to £4.50 for the ACS712. You also have a huge choice of shunt values to make any resolution you would like.

#### du00000001

Joined Nov 10, 2020
116
from what I understand, the Zener diode is used to get more precise results ... but since I am not in electronics it is a bit complicated for me. this test is part of a simple experimental part for my studies ... I think that I will be satisfied with a simple divider bridge but I will choose the resistors judiciously taking into account your remarks.

to measure the current I considered using an ACS712 hall effect sensor but I don't know whether I will opt for the 5A or 30A sensor. Will a 5A sensor not cause me problems knowing that the short circuit current of my panel is Isc=5.92A, and the optimal current Imppt=5.48A and they are both greater than 5A?
A 20 A flavor of the ACS712 exists aswell. And other ACSses may provide further current ratings. A 10 A range might be feasible, considering the potential sensir drift over time and current.

#### athcerr

Joined Jun 11, 2021
18
A 5-Amp Sensor will probably "survive" just fine,
but its Output-Voltage will simply remain maxed-out for any Current over ~5-Amps.
If you look around some more, you can probably find a 10-Amp Sensor which
will give you better resolution than a 40-Amp version.

Sometimes the Spec-Sheet will show how to achieve different sensitivities with
different Circuit-Board lay-out specifications.

Or, it my be easier to go with a "Pass-Through" style Current-Sensor.
With a Pass-Through style Sensor you can simply pass the same Wire through the
aperture multiple times to create as much sensitivity as you need.
( 2-passes would make 5-Amps appear to be 10-Amps to the Sensor,
3-passes would appear to be 15-Amps, 4 would be 20, 5 would be 25, etc. )

So you could use a Honeywell CSLA1CD 57-Amp Sensor,
then run 5-turns of your sensed Wire through it, and have a high-resolution ~10-Amp-Sensor.

.
.
.
So the ACS712 5-Amp is not suitable for my job since my panel can deliver more than 5A.

Maybe I'll settle for ACS712 20-Amp since it's available.

A shunt and a INA180 is much cheaper than the ACS712.
I was offered an INA219 sensor module which starts from the same principle,
it is a current and voltage sensor, but the maximum current that it can measure is 3.2A while my panel can deliver more than that.

#### ericgibbs

Joined Jan 29, 2010
18,226
hi ath,
Have you consider a very low resistance by pass resistor in parallel with the ACS12-5.???

If it was my project and say I wanted to read upto 10Amps on a 5A max series device, I would make up some very low value bypass resistors for the ACS.
Ideally shunt/bypass 50% of the current in parallel around the the ACS

To calibrate the bypass resistor, use a bench power supply set for 5A into a test load, and empirically get the correct resistor value that shows 50% of that value on the ACS-5,

BTW: I would still recommend the Zener diode circuit Post #2, I am sure you will not be satisfied with the very poor resolution using that resistive divider method.

E

#### du00000001

Joined Nov 10, 2020
116
hi ath,
Have you consider a very low resistance by pass resistor in parallel with the ACS12-5.???

If it was my project and say I wanted to read upto 10Amps on a 5A max series device, I would make up some very low value bypass resistors for the ACS.
Ideally shunt/bypass 50% of the current in parallel around the the ACS

To calibrate the bypass resistor, use a bench power supply set for 5A into a test load, and empirically get the correct resistor value that shows 50% of that value on the ACS-5,

BTW: I would still recommend the Zener diode circuit Post #2, I am sure you will not be satisfied with the very poor resolution using that resistive divider method.

E
Honestly, if you can get a "perfect fit" device (ok - the 20 A are not really required) for the same  as the device requiring "fiddling", why should you consider the latter?
In terms of long-term stability and sensitivity drift, the 20 A device is way better than any tweaked 5 A '712.

#### athcerr

Joined Jun 11, 2021
18

hi ath,
Have you consider a very low resistance by pass resistor in parallel with the ACS12-5.???

If it was my project and say I wanted to read upto 10Amps on a 5A max series device, I would make up some very low value bypass resistors for the ACS.
Ideally shunt/bypass 50% of the current in parallel around the the ACS

To calibrate the bypass resistor, use a bench power supply set for 5A into a test load, and empirically get the correct resistor value that shows 50% of that value on the ACS-5,

BTW: I would still recommend the Zener diode circuit Post #2, I am sure you will not be satisfied with the very poor resolution using that resistive divider method.

E
Hi,
No, I haven't thought about this method, as I mentioned above electronics is not my field I'm a novice but I'm still trying to learn something.
That term you used "very low resistance bypass resistor" is it a simple resistor that will be connected in parallel or is it a resistor different from the others?

BTW: I would still recommend the Zener diode circuit Post #2, I am sure you will not be satisfied with the very poor resolution using that resistive divider method.
I just finished with a test, I used a 17.1V (21.15V open circuit) and 0.29mA (0.35mA short circuit) mini panel.
I plotted the characteristic curve I (V) using a rheostat, every time I vary the value of the resistance, the current and the voltage are measured.
I was inspired by the diagram shown in the attachment (I used the INA219 sensor module instead of the ACS712)
• To measure the voltage, I used a divider bridge of R1 = 4K and R2 = 1K. To measure the current I used the INA219 sensor, which also measures the voltage it gives me a voltage very close to the voltage measured by the bridge, so normally the voltage measurement is good since I got almost the same value by the two methods (divider bridge and INA219) ?

-But I will still try to understand the Zener diode circuit and realize it.

Note: for the large panel (5.92A) I cannot use the INA219 to measure current because the nominal value it can measure is 3.2A.

#### ericgibbs

Joined Jan 29, 2010
18,226
hi ath,
The effective series resistance of the ACS-5 is about 1.2milliOhms, ref image from datasheet,
So a 50% bypass resistor would also be 1.2milliOhm .

That is approx 225mm of 2mmDia Cu wire. ref image.

IF you decide this method I could advise on its construction.
E

#### Attachments

• 10.6 KB Views: 4
• 23.1 KB Views: 4