It is very useful to measure the current against voltage characteristic for a solar photovoltaic panel.

Here I shown how I built an I (current) against V(voltage) curve tracer for solar photovotlaic panels which is battery powered and can be used ‘in the field’.

The output is displayed on a full colour LCD display, along with the interesting characteristic information, such as maximum power point, open circuit voltage and short circuit current.

The output is streamed via a serial connection and can be recorded on a computer or using the serial version of the dataduino.

The project files are available on GITHUB.

Photovoltaic characteristic curve

Each solar module is tested under standard test conditions (an irradiance of 1000W/m2, a temperature of 25C and an air mass of 1.5). Under these conditions the modules are ‘flash tested’ and their characteristics are used for the module rating plate on the back of the module.

An I-V curve for a PV module looks something like this:

The most useful points to mote are the open circuit voltage (Voc), the short circuit current (Isc) and the current and voltage at the maximum power point (Immp and Vmmp).

The actual curve will vary a lot depending upon irradiance, temperature and spectrum.

The irradiance will mainly affect the current, as shown in this graph:

The temperature will mainly affect the voltage, as shown in this graph:

Industrial IV curve tracers

These are the kind of thing used in industry. IV curve tracers are available but are are at quite a high cost as they are robust industrial pieces of kit with only a small customer base.

DIY IV curve tracers

Here are a couple of interesting projects which use an Arduino to do IV curve testing

Concept

The main requirement of an I-V curve tracer is to apply a load and then measure the current and voltage. These points can be stored and from the data we can draw the I-V curve.

In this device I would like to be able to measure panels from <5Wp up to 100Wp with reasonable accuracy (although I’m not going for industrial or academic accuracy).

I would like a local display to visualise the data. This visualisation should also highlight the most important parts of the curve.

I would also like to be able to store the data either locally on an SD card or onto a computer.

Hardware

I had already created a device which does a lot of these functions – namely measure current and voltage and control a load of some kind – this was the modular pedal power display. I used one of the circuit boards from this as the main ‘brains’.

This contains two MOSFETs, along with drivers, a high side current monitor, a potential divider for voltage, along with 5V and 12V regulators.

Here is a walk through video of the prototype:

Output LCD display

For the output display I had a small backlit TFT LCD module. This is full colour and I had already posted on getting it running with the Arduino IDE (which was easy).

I wired up the LCD screen to some spare pins on the arduino PCB. The LCD requires 5 lines. I removed the RGB LED (which is used as an indicator on the PCBs) and used these three outputs, alone with two more pins. (I will review the hardware and pin connections at the end).

Here is a graph display (during the testing phase – it has been cleaned up a bit now).

The start-up screen – I had fun making shapes…..

An IV curve from my bench power supply. Set to 21.6V and current limited to around 3.5A.

Each time the test is run the trace is added to the graph. If you want to clear the display you just reset the unit.

I wanted to show variation in the IV trace as the sunlight changes. It can also be used to test variation with temperature.

Load

All of this worked well. I now needed to sort out a load which would give me useful information from the solar PV module.

I wanted to measure smaller PV panels with ratings from aroudn 5Wp to 100Wp and voltages up to around 30V.
This gives a current range of up to around 10A (a 100Wp 12V nominal panel will have a short circuit current of around 10A).

The IV curve tracer will adjust the load which will change the position on the IV curve. It will then read in the current and voltage (averaged values, as these will change a bit). The load will be adjusted until most of the Iv curve has been drawn.

The load will be a MOSFET controlled dump resistor. To dump 10A at 12V the resistor will need to be 1ohm. To get the short circuit current then there should be no dump load resistor at all. For testing I used a 1ohm power resistor, as I was using a bench power supply.

The solar PV panel is current limited. The current will be limited by the irradiance (sunlight) on the panel. This is an important point, as it means we can directly short circuit the PV panel with no damage to the panel and (as long as we are within the MOSFET ratings) no damage to the MOSFET.

I used a PWM controlled MOSFET with no additional dump load as the load on the system. This means the MOSFET will get hot as it goes through the maximum power point, but with a large heatsink and quickly moving through this point then it should be OK. This output would be smoothed by a capacitor bank.

A computer heatsink with fan is used as the main dump heatsink.

At present there is only on MOSFET. I will increase this to 3, so each will share a proportion of the current. The 1ohm dump resistor was used for current limited testing (I did not want to short circuit my power supply as it is not current limited like a PV module).

Here I have added an additional two MOSFETs in parallel (this replaces the load ressitor). I know the wiring is horrible. If I decide to do an upgrade this will be the first thing to change. It works well and they do not get hot at all, but, due to the reduced ON resistance, the current increases very quickly as the PWM ON time increases. I will adjust the software to make smaller steps at the beginning of the curve to give better resolution.

Current is measured via a 0.005 ohm shunt resistor (this is the first version with a 0.05 ohm resistor). An AD8211 high-side current sense IC was used to convert this small voltage into a current reading for the microcontroller. Voltage is measured with a 680K//10K potential divider. Check out these posts for more info on measuring voltage and current.

Analogue measurements

The current and the voltage signals were analogue values. These are read by the micrcontroller using the analogRead() function. The problem initially was with the accuracy. I used the power supply voltage as the reference voltage for the ATmega328 (with Arduino bootloader). This could vary slightly and hence affect the accuracy of the unit. I decided to use the internal 1.1V reference.

I have covered using this reference in this previous post. The accuracy problem comes from the fact that the internal reference could be anywhere from 1.0V to 1.2V, when it is meant to be 1.1V. This can be measured and a calibration factor applied. I applied an accurate voltage to the input and measured the reading. This gave me the calibration factor which I stored into EEPROM. This value is then used by the device.

The problem I found was that you must have NO voltage applied to the Vref pin to us the internal Vref. I had the Vref pin tied to the power supply voltage which caused me a couple of hours of head scratching. Once I disconnected the Vref pin (pin 21 on the IC) then I was able to use the internal 1.1V reference.

Hardware design

The hardware layout is shown here (although not every component has been shown as I have used a own-built project board for the basis of this project). This is designed as a basic overview of how to wire things up, rather than as a full wiring diagram.

Software

This was all written using the Arudino IDE. It uses a state machine to control the flow of the program. The flow of the code is shown here:

The actual Arduino IDE code is available via GITHUB. The code has lots of comments, but has not been condensed/sorted  too much. Please feel free to use it.

Testing

I finished this project at the end of October in the UK, but was surprised to have a sunny day, so I took an 80Wp solar module out into the sun and took a few readings.

The standard ‘cardboard box’ enclosure…..

Each Y grid line is 2A and each X grid line is 5V. The open circuit voltage is 21.4V, the short circuit current is 3.925A, the voltage at maximum power is 16.8V and the current at maximum power is 3.648A, giving a maximum power of 16.8V x 3.648A = 61.3W. Not bad for an 80Wp module in the UK in October.

The device performed well and produced some quite nice looking IV curves. But I need to do more testing when the sun comes out again.

Here are some photos of the finished enclosure for the unit. I still need to do more testing, but it works very well with an adjustable power supply:

Get one

This was a prototype, built as I was interested in designing it and having one for the solar PV workshops I run.

If you are interested in having one of these, then please get in touch.

To Do

This is a prototype and (as always) there is still lots to do.

  • Build laser cut enclosure Finished 28/11/13
  • More testing with different modules under different conditions
  • Battery recharge circuit
  • Data storage onto an SD card/computer

 

5 responses to “PV I-V Curve Tracer

  1. Quoting John Wax:Have you moved on to storing IV data to an SD Card?
    Thanks!

    Hi John,
    I did build an add on which stores the data to an SD card, using one of my DataDuinos.
    The code is available on GITHUB: https://github.com/re-innovation/DataDuino
    It is the code in the DataDuino_Serial folder. This was written over a year ago, so I am unsure if it compiles in the new Arduino IDE. Hope thats some help – I’ll update this page when I have done a nicer version with more bells and whistles…

  2. Hi John,

    You have done a very nice effort to build this IV curve tracer for solar panels. In my opinion, you should not have this 4700uf capacitor across Mosfet switch.
    1. The 4700 uf capacitor will actually not smooth the current but will act as differentiator and will actually generate heavy current spikes at the time of mosfet switching

    2. Because of this large 4700 uf capacitor the actual current and voltage waveforms will have lag. Which will mean the instantaneous current will be different than what Arduino will measure.

    I think instead of 4700 uf capacitor parallel to mosfet switch you should have a low ohmic but high value inductor in series with a switch. Having inductor in series with current path will actually smooth current and the inductor and mosfet switch combination will make a smooth load.

    Kind Regards,

    Asim Khan

  3. Quoting Asim:Hi John,

    You have done a very nice effort to build this IV curve tracer for solar panels. In my opinion, you should not have this 4700uf capacitor across Mosfet switch.
    1. The 4700 uf capacitor will actually not smooth the current but will act as differentiator and will actually generate heavy current spikes at the time of mosfet switching

    2. Because of this large 4700 uf capacitor the actual current and voltage waveforms will have lag. Which will mean the instantaneous current will be different than what Arduino will measure.

    I think instead of 4700 uf capacitor parallel to mosfet switch you should have a low ohmic but high value inductor in series with a switch. Having inductor in series with current path will actually smooth current and the inductor and mosfet switch combination will make a smooth load.

    Kind Regards,

    Asim Khan

    Hi Asim,
    Thanks for the comment and very interesting about the capacitor affecting the readings – I see what you mean. The capacitor will provide the current during the test pulses.
    I’m looking at re-ding this project, so I’ll include your ideas.
    Cheers,

    Matt

Leave a Reply

Your email address will not be published. Required fields are marked *