remote data logger - murdoch university

68
REMOTE DATA LOGGER For Photo-Voltaic Research MARC PURVIS ENG460: Engineering Thesis November 2013

Upload: others

Post on 12-Jan-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

REMOTE DATA

LOGGER For Photo-Voltaic Research

MARC PURVIS ENG460: Engineering Thesis

November 2013

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | i

Contents Acknowledgements ................................................................................................................................ iv

List of Abbreviations ............................................................................................................................... v

List of Figures ........................................................................................................................................ vii

List of Tables ........................................................................................................................................ viii

List of Equations ..................................................................................................................................... ix

Abstract ................................................................................................................................................... x

1 Introduction .................................................................................................................................... 1

2 Project Objectives ........................................................................................................................... 2

3 Background ..................................................................................................................................... 3

3.1 I-V Curve Generation .............................................................................................................. 3

3.2 Solar Cell Basics ....................................................................................................................... 3

3.3 Current Voltage (I-V) Characteristic Curve .............................................................................. 5

3.4 Accuracy of Mathematical Models ......................................................................................... 6

3.5 Parameters effecting the Current Voltage Curve ................................................................... 7

3.6 I2C Bus ................................................................................................................................... 11

3.7 ZigBee .................................................................................................................................... 11

3.8 IEEE 802.15.4 ......................................................................................................................... 11

3.9 XBEE MODULES ..................................................................................................................... 12

3.10 Arduino Micro-Controller Board ........................................................................................... 12

4 Module Design .............................................................................................................................. 14

4.1 Principle of Operation ........................................................................................................... 14

4.2 Temperature Sensor ............................................................................................................. 15

4.3 MCP4725 Digital-to-Analog Converter ................................................................................. 15

4.4 LMC6482 Data Acquisition Amplifier .................................................................................... 16

4.4.1 Input Buffer ................................................................................................................... 16

4.4.2 Op-Amp Integrator/ Analogue PI Controller ................................................................. 17

4.4.3 Op-Amp ringing ............................................................................................................. 17

4.5 Alternate Input Buffers ......................................................................................................... 19

4.6 DS1307 Real Time Clock ........................................................................................................ 20

4.7 Adafruit Data Logging Shield ................................................................................................. 20

4.8 Arduino Due .......................................................................................................................... 21

4.9 I2C Design Revision ................................................................................................................ 21

4.10 TTL MOSFET .......................................................................................................................... 22

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | ii

4.11 Current Sensor ...................................................................................................................... 22

4.12 Power MOSFET ...................................................................................................................... 23

4.13 Voltage Division Potentiometer ............................................................................................ 23

4.14 XBEE Transceivers ................................................................................................................. 24

5 Design Strategy ............................................................................................................................. 26

6 Control Algorithm ......................................................................................................................... 27

6.1 Simplified Arduino Control Algorithm Flow-Chart ................................................................ 27

6.2 IV curve ................................................................................................................................. 27

6.3 File Naming System ............................................................................................................... 28

6.4 getCheckSum ........................................................................................................................ 29

6.5 SD operations ........................................................................................................................ 30

6.6 SDlineFetch ........................................................................................................................... 30

6.7 Communications Protocol ..................................................................................................... 31

6.8 LabVIEW Program ................................................................................................................. 31

6.8.1 Front Panel .................................................................................................................... 32

6.8.2 Initial Path Folder .......................................................................................................... 32

6.8.3 The Status Window ....................................................................................................... 32

6.8.4 Miscellaneous Indicators .............................................................................................. 32

6.8.5 IV/PV Graph .................................................................................................................. 33

6.9 General Block Diagram Description ...................................................................................... 33

6.9.1 String Search for Graph sub VI ...................................................................................... 36

6.9.2 Check Sum sub VI .......................................................................................................... 36

6.10 Error Handling ....................................................................................................................... 37

7 Results ........................................................................................................................................... 38

8 Future Recommendations ............................................................................................................ 44

8.1 Reduce Noise ........................................................................................................................ 44

8.2 Automate Communications Parameters .............................................................................. 44

8.3 Automate the DAC step size ................................................................................................. 44

8.4 Determine the Parasitic Resistances ..................................................................................... 44

8.5 Banana Sockets ..................................................................................................................... 44

8.6 Improved Sample Analysis .................................................................................................... 44

9 Conclusion ..................................................................................................................................... 45

10 Works Cited ............................................................................................................................... 46

Appendix A ............................................................................................................................................ 49

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | iii

Appendix B ............................................................................................................................................ 52

Appendix C ............................................................................................................................................ 54

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | iv

Acknowledgements

I would like to extend my sincere gratitude to Gareth Lee for his continuing assistance throughout

the development of this thesis project. Without the skills learned during the course of the Industrial

Computer Systems Major this project would not have been a success. As such, I would also like to

thank Graeme Cole for his guidance during this course.

Finally, I would like to thank all of the students at Murdoch University who have helped me

throughout this thesis project and throughout the entire degree program.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | v

List of Abbreviations ADC – Analogue to Digital Converter

ASCII - American standard code for information interchange

AT – Attention Commands

CS – Chip Select

CSV – Comma Separated Values

DAC – Digital to Analogue Converter

DI – Data In Buffer

DO – Data Out Buffer

EEPROM – Electrically Erasable Programmable Memory

FF – Fill Factor

I2C - Inter Integrated Circuit Control

IC – Integrated Circuit

ICSP – In Circuit Serial Programmer

IEEE – Institute of Electrical and Electronic Engineers

I-V – Current Voltage

Isc – Short Circuit Current

MISO – Master In Slave Out

MOSFET – Metal Oxide Semiconductor Field Effect Transistor

MOSI – Master Out Slave In

MPP – Maximum Power Point

PI – Proportional Integral

PV – Photo-Voltaic

RDL – Remote Data Logger

Rds – Drain Source Resistance

RF – Radio Frequency

SMA – Solar Module Analyzer

SPI – Serial Peripheral Interface

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | vi

SD – Secure Digital

SRAM – Static Random Access memory

TTL – Transistor to Transistor Logic

TWI – Two Wire Interface

UART – Universal Asynchronous Receiver Transmitter

USB – Universal Serial Bus

VG(TH) – Gate Threshold Voltage

Voc- Open Circuit Voltage

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | vii

List of Figures Figure 1: Single diode solar cell model ................................................................................................... 3

Figure 2: N-type Phosphorous doped Silicon Figure 3 P-type Boron doped Silicon ......... 4

Figure 4: Typical Current Voltage Curve ................................................................................................. 5

Figure 5: Comparison of Modelled & Measured IV Curves .................................................................... 7

Figure 6 IV Curves with varied irradiance ............................................................................................... 8

Figure 7 IV curves for varied Temperature ............................................................................................. 9

Figure 8 Effects of Series and Shunt Resistance on an IV Curve ........................................................... 10

Figure 9 Xbee UART data Flow .............................................................................................................. 12

Figure 10 Design Schematic .................................................................................................................. 15

Figure 11 MCP4725 Voltage Output Function ...................................................................................... 16

Figure 12 Voltage Follower Buffer ........................................................................................................ 17

Figure 13 Op-Amp Integrator Configuration ......................................................................................... 17

Figure 14 Op-Amp Oscillations with 0.1uF Capacitor ........................................................................... 18

Figure 15 Op Amp Oscillations with increased feedback capacitor ...................................................... 19

Figure 16 Op amp transient with 220uF capacitor ............................................................................... 19

Figure 17 Arduino Due Micro-controller ............................................................................................... 21

Figure 18 USB mounted XBEE module .................................................................................................. 25

Figure 19 Arduino connected XBEE module ......................................................................................... 25

Figure 20 Arduino Control Flow Chart .................................................................................................. 27

Figure 21 Log File Naming Code ............................................................................................................ 29

Figure 22 Custom Checksum Function .................................................................................................. 29

Figure 23 LabVIEW Program HMI ......................................................................................................... 32

Figure 24 LabVIEW Block Diagram ........................................................................................................ 35

Figure 25 String Search for Graph Sub VI .............................................................................................. 36

Figure 26 Check Sum Sub VI .................................................................................................................. 36

Figure 27 Remote Data Logger I-V Curve .............................................................................................. 38

Figure 28 Prova 210 I-V Curve ............................................................................................................... 39

Figure 29 Remote Data Logger Step size Tuned I-V Curve .................................................................... 40

Figure 30 Prova 210 Comparison I-V Curve .......................................................................................... 40

Figure 31 Remote Data Logger tuned I-V Curve with outlier................................................................ 41

Figure 32 Prova 210 Comparison I-V Curve .......................................................................................... 42

Figure 33 Final Tuned I-V Curve with Slew Delay ................................................................................. 43

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | viii

List of Tables Table 1: Energy gap for typical solar cell semiconductors ...................................................................... 5

Table 2: Ideality factors for varying recombination methods ................................................................ 6

Table 3 Checksum Example ................................................................................................................... 30

Table 4 I-V Curve Data Comparison ...................................................................................................... 39

Table 5 I-V Curve Data Comparison ...................................................................................................... 41

Table 6 I-V Curve Data Comparison ...................................................................................................... 42

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | ix

List of Equations (1) Fill factor ............................................................................................................................................ 5

(2) Cell efficiency .................................................................................................................................... 5

(3) Multi-Cell current for single diode model ......................................................................................... 6

(4) Light generated current ..................................................................................................................... 8

(5) Global solar irradiance ...................................................................................................................... 8

(6) Open-Circuit voltage .......................................................................................................................... 9

(7) Voltage division principle ................................................................................................................ 24

(8) Potentiometer resistance setting .................................................................................................... 24

(9) Source voltage ................................................................................................................................. 24

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | x

Abstract The following report delineates the design and development evolution of a micro-controller based

data logging module for testing photo-voltaic panels. A comprehensive background elucidates: photo-

voltaic theory, critiques the accuracy of mathematical models, explains a solar cell’s current-voltage

characteristic curve, and discusses the various technologies that have been used in the design. The

procedure and results for component tests are discussed as well as the major problems encountered

during the prototyping phase. An Arduino Due micro-controller contains the control algorithm, which

drives the requisite hardware components to generate, and record data for a current/voltage (IV)

curve. A file management system controls the creation and naming of comma separated value (CSV)

files that contain the I-V curve data, which is stored on an SD card. These files contain a millisecond

marker indicating the operating time from the last micro-controller reset, current and voltage

measurements, temperature readings, and a timestamp. A Wireless data transfer mechanism has

been incorporated into the system, and a LabVIEW VI was developed to facilitate real time data

monitoring as well as creating a secondary storage medium. The module produces measurements

within a range of ±1 to ±3% compared to a commercial solar analyser while being a fraction of the

cost.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 1

1 Introduction With a growing number of solar panels being installed across W.A [1] there is an increased interest in

determining the performance of competing solar technologies. An ongoing research project at

Murdoch University is concerned with how these competing technologies perform in our particular

environmental conditions [1]. As the conversion efficiency of a solar cell is affected by the losses due

to parasitic resistive elements, and dependent upon transient variables such as irradiance and

temperature, it is necessary to compile real operational data to be able to perform reliable

comparisons. This operational data is preferable to model-generated data as: mathematical models

do not completely encapsulate the true behaviour of solar cells (see 3.4 Accuracy of Mathematical

Models), solar panels are subject to performance effecting deterioration over time, and their

conversion efficiency is dependent upon transient environmental conditions (see 3.5 Parameters

effecting the Current Voltage Curve).

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 2

2 Project Objectives This project was concerned with the creation of a micro-controller based data logging system to be

used with a range of photo-voltaic panels. The objective was to design a system that is able to gather

and collate data to plot a current voltage (I-V) curve, which will be used as a vehicle for comparing

different solar panel technologies. The data will be used to obtain the maximum power point for the

panel being tested, and also as a metric to gauge the panel’s performance under varying

environmental conditions. The design should allow the system to be used with a range of solar panels

of up to 10W, and should also be scalable to allow future testing on panels with greater power ratings.

The system needs to be self-powered and able to store the data for subsequent retrieval. Although

not specifically required, data transmission to a central server at Murdoch University was specified as

“desirable”. Temperature data also needs to be collected to represent the environmental conditions

present at the time of measurement. This project is intended to be integrated with a separate, yet

related thesis topic, which is concerned with recording broader environmental data and creating a

database management system (DBMS).

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 3

3 Background

3.1 I-V Curve Generation There are multiple methods used to record the characteristic I-V curve for a solar cell or module. The

simplest method involves manually manipulating a variable resistor from zero resistance (Isc) to a

resistance value at which no current is able to flow (Voc) while recording the current and voltage levels

at each stage in between [2]. Various DC-DC converters, such as a buck-boost converter, are also

frequently used to obtain I-V curves by modulating the duty cycle of a switching element [2]. The DC-

DC converter method can be used over a large power range and can also control the output for specific

load requirements [2]. In “Measuring the I-V Curve of PV Generators” the authors demonstrate with

compelling experimental results that parallel, interleaved mode SEPIC converters produce superior I-

V curves when compared with buck-boost configurations [2]. The “electronic load method” involves

the use of an enhanced-mode power MOSFET that acts in a very similar fashion to a variable resistor.

The MOSFET’s drain-source resistance can be controlled by modulating its gate-source voltage. This

method requires the MOSFET to dissipate the majority of the power supplied by the solar cell and thus

its application is limited by the availability of appropriately rated power MOSFETS. [2]

Upon the advice of Dr Gareth Lee a variation of the electronic load method was chosen and verified

with a proof of concept simulation (see appendix). A SEPIC converter was carefully considered but

withdrawn as an option as it provided unnecessary complication with extraneous functionality. The

electronic load method is able to satisfy the design requirements while remaining simple and cost-

effective

Figure 1: Single diode solar cell model

[3]

3.2 Solar Cell Basics A solar cell is a diode that utilises semiconductor material to convert incident solar radiation into

electrical current [4]. “In practice nearly all photovoltaic energy conversion uses semiconductor

materials in the form of a p-n junction” [5]. The material is able to achieve this conversion by exploiting

the photovoltaic effect; when a photon with sufficient energy strikes the semiconductor it frees an

electron, which was previously bound in the structure’s covalent bonds [3, p. 36]. The minimum

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 4

energy required to liberate an electron from a semiconductor’s bounded valance band is known as

the “bandgap” energy [5]. Table 1 lists the energy gap for typical solar cell semiconductors. Modern

semiconductors are created by a process known as doping. Doping involves incorporating impurities

with a material, such as silicon, in order to precisely alter its conductivity [4].These impurities can

create an excess or deficiency of electrons leaving the material with a net charge. Silicon crystals

infused with phosphorus possess extra electrons, which are not bound by the covalent bonds making

them “free” to exist in the conduction band [4].Semiconductors with this electron excess are known

as n-type [4]. Figure 2 illustrates the extra electron present in n-type phosphorus doped silicon. When

silicon crystals are doped with a substance such as Boron, the resulting substance will have a deficiency

of electrons resulting in a net positive charge. These semiconductors are known as p-type, and the

deficiency of electrons are known as holes [4]. Figure 3 shows the simplified arrangement of electrons

in Boron doped Silicon. When p-type and n-type materials are placed together the excess electrons

will diffuse from the n-type into the p-type to occupy the holes. “The resulting junction then contains

practically no mobile charge carriers” [4]. When a photon with energy greater than the bandgap is

absorbed by the semiconductor, it displaces a bound valence electron into the conduction band

creating an electron-hole pair. A stream of electron hole pairs allows the semiconductor to conduct

electrical current.

Figure 2: N-type Phosphorous doped Silicon Figure 3 P-type Boron doped Silicon

[6] [7]

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 5

Table 1: Energy gap for typical solar cell semiconductors

[4]

3.3 Current Voltage (I-V) Characteristic Curve The performance of a photo voltaic cell or array is traditionally ascertained by obtaining and analysing

its I-V curve. Due to parasitic resistive losses and changing environmental conditions, “only the

experimental measurement of the I–V curve allows us to know with precision the electrical

parameters of a PV cell” [2]. The I-V characteristic curve (figure 4) depicts the current/voltage

relationship of a solar cell, over varying loads, from the short circuit current (Isc) to the open circuit

voltage (Voc). This curve can be used to find the cell’s maximum power point (MPP); the point at which

the product of the current and voltage is at a maximum [3]. Using the Fill Factor (1), which is defined

as the ratio of the MPP with the product of Voc and Isc, the incident maximum power can be calculated

and is then used to determine the efficiency (2) of the solar cell. [8]

(1)

(2)

[8]

Figure 4: Typical Current Voltage Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 6

3.4 Accuracy of Mathematical Models Solar cell models rely upon approximations to determine their operating characteristics. The accuracy

of the model’s predictions are highly contingent upon the quality of the model, and the concomitant

approximations used within it. For example, when using the simplified one diode model (Equation 3)

the ideality factor, n, is often set to one [8]. “The ideal diode equation assumes that all the

recombination occurs via band to band or recombination via traps in the bulk areas from the device

(i.e. not in the junction)” [8]. More accurate models contain more than one diode [9] and will also alter

the ideality factor to compensate for the differing methods of recombination (Table 2). Furthermore,

the cell may harbor slight material impurities or be subject to degradation, which can be difficult to

quantify, and will ultimately effect the operation of the cell. For these reasons obtaining the I-V curve

experimentally is often the preferred and most accurate method to determine the operating

characteristics, fill factor, and parasitic resistances of a solar cell (see Figure 5).

Table 2: Ideality factors for varying recombination methods

[10]

(3)

𝐼𝑚 = 𝐼𝐿 − 𝐼𝑂 ⌈𝑒

𝑉𝑀𝑛𝑠

+𝐼𝑀𝑅𝑆

𝑛𝑘𝑇/𝑞 − 1⌉ −

𝑉𝑀

𝑛𝑠+ 𝐼𝑀𝑅𝑆

𝑅𝑆𝐻

Where,

IO is the diode saturation current

VM is the PV module voltage

IM is the PV module current

n is the diode ideality factor

k is Boltzmann’s constant

T is the cell temperature

q is the charge on an electron

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 7

RSH is the modules shunt resistance

RS is the modules series resistance

ns is the number of series cells

3.5 Parameters effecting the Current Voltage Curve Figures 6 & 7 were obtained from [11], and are based upon the “SIMULINK “pvarraysimulation”

program as designed by Benjamin Wichert” [11]. The figures depict the effects of irradiance and

temperature on an I-V curve. Figure 5 is based upon I-V curve data from a SR-4M 4W Silicon Solar

Panel obtained using a Prova 210 Solar Module Analyser. Using this data, the single diode model

(Equation 3), and Excel’s solver function to find IO, IL, RS and RSH a new approximated Im data set was

created and graphed against the measured curve to illustrate the models accuracy. Figure (8) utilises

the SR-4M data and Equation 3 to approximate the effect of varying shunt and series resistance.

Figure 5: Comparison of Modelled & Measured IV Curves

0

0.2

0.4

0.6

0.8

1

0 2 4 6 8

Cu

rre

nt(

A)

Voltage(V)

I-V Curve ComparisonModelled/Measured

Actual

Modelled

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 8

Figure 6 IV Curves with varied irradiance

Figure 6 confirms the proportional relationship between the short-circuit current and irradiance

depicted in Equation 4. The open-circuit voltage Voc also increases logarithmically in accordance with

Equation (6)

(4)

𝐼𝐿𝐺 = 𝐼𝑆𝐶𝑅 × 𝐺𝑁 + 𝐼𝑡(𝑇𝑐 − 𝑇𝑟)

Where,

𝐼𝑆𝐶𝑅 = 𝑠ℎ𝑜𝑟𝑡 𝑐𝑖𝑟𝑐𝑢𝑖𝑡 𝑐𝑢𝑟𝑟𝑒𝑛𝑡

𝐺𝑁 = 𝑛𝑜𝑟𝑚𝑎𝑙𝑖𝑠𝑒𝑑 𝑖𝑟𝑟𝑎𝑑𝑖𝑒𝑛𝑐𝑒

𝐼𝑡 = 𝑠ℎ𝑜𝑟𝑡 𝑐𝑖𝑟𝑐𝑢𝑖𝑡 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 = 1.7 × 10−3𝐴/°𝐾

𝑇𝑐 = 𝑐𝑒𝑙𝑙 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑜𝑢𝑡𝑝𝑢𝑡

𝑇𝑟 = 𝑐𝑒𝑙𝑙 𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 = 300°𝐾

[11]

(5)

𝐺𝑁 =𝐺

1000 𝑊/𝑚2

∴ 𝐺 = 𝐺𝑁 × 1000 𝑊/𝑚2

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20

Cu

rre

nt

(A)

Voltage (V)

I-V Curve: Varying IrradianceI=1000 I=700 I=300

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 9

(6)

𝑉𝑜𝑐 =𝑛𝑘𝑇

𝑞𝑙𝑛 (

𝐼𝐿𝐺

𝐼𝑜+ 1)

[11]

Figure 7 IV curves for varied Temperature

An increase in ambient temperature results in a decrease in the open circuit voltage and a slight

increase in the short circuit current: “the bandgap energy decreases and more photons have enough

energy to create electron hole pairs. However this is a small effect” [3].

0

1

2

3

4

5

6

0 2 4 6 8 10 12 14 16 18 20

Cu

rre

nt

(I)

Voltage (V)

I-V Curve: Varying Ambient Temperature

Temp=45C Temp=25C Temp=0C

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 10

Figure 8 Effects of Series and Shunt Resistance on an IV Curve

The parasitic resistive elements of a solar cell result in ohmic losses, causing a reduction in the fill

factor [8]. The two main resistive elements are referred to as the series (RS) and shunt (RSH) resistance

(Figure 1). A low fill factor is easily identifiable in an IV curve characteristic, as the fill factor is “a

measure of the "squareness" of the IV curve” [12] . The fill factor represents the diode’s junction

quality and represents the impact of the effective series resistance of the cell [3]. The effective series

resistance is a combination of the resistances due to: the bulk resistance of the semiconductor

material and the contact resistances between the devices interconnections. [3]

The main impact of the series resistance is upon the fill factor. At Voc the series resistance has no effect

as there is no current flow in the circuit, but as the curve approaches the open-circuit voltage the

series resistance has a significant impact upon the curves gradient [5]. Near the open-circuit voltage

the slope of the IV curve can be used to estimate the series resistance [5].

Similarly, the main effect of the shunt resistance is a reduction in the fill factor, but should the shunt

resistance be too low current may deviate from the load resulting in significant power losses. “The

effect of a shunt resistance is particularly severe at low light levels, since there will be less light-

generated current” [5]. The effect of a low shunt resistance, depicted in Figure 8, manifests itself as a

noticeable slope between the short circuit current and the maximum power point.

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 2 4 6 8

Cu

rre

nt

(A)

Voltage (V)

I-V Curve ComparisonEffects of Resistance

Estimated Rsh & Rs

Rsh: 2

Rs: 10

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 11

3.6 I2C Bus I2C is a bidirectional 2-wire bus developed by Phillips semiconductor [13]. A real-time-clock (RTC) and

a digital-to-analogue converter (DAC) communicate with the Arduino using the Inter Integrated Circuit

Control (I2C) bus. The two wires are known as the serial data line (SDA) and the serial clock line (SCL)

[13]. Both SDA and SCL require pull-up resistors to a positive supply voltage [13]. Every device on the

bus is addressable by a unique address using a simple master-slave relationship [13]. The protocol

uses 8-bit bidirectional serial data transfer and supports 5 modes: Standard – 100 kbit/s, Fast – 400

kbit/s, Fast mode plus – 1 Mbit/s, High-speed 3.4 Mbit/s and Ultra-Fast unidirectional mode – 5 Mbit/s.

[13]

3.7 ZigBee

ZigBee is a radio frequency data transmission protocol based on the Institute of Electrical and

Electronic Engineers (IEEE) 802.15.4 industry standard [14]. The standard defines a maximum over-

the-air data rate of 250kbps allowing point-to-point or point-multipoint configuration [14].The ZigBee

protocol provides additional networking and routing functionality to the 802.15.4 base known as mesh

networking [15]. Essentially a mesh network is comprised of a network of distributed sensors and RF

modules that share and relay information across the network. A mesh network can significantly

increase the transmission range as data can be transmitted through intermediary points [15]. The

ZigBee protocol automates the routing process through the mesh network to ensure the data reaches

its specified radio destination [15].

3.8 IEEE 802.15.4

The 802.15.4 IEEE standard for wireless communication was developed with “lower data rate, simple

connectivity and battery application in mind” [14]. It defines three transmission frequency bands

known as the Industrial Scientific and Medical (ISM) bands: 868-868.8 MHz, 902-928 MHz, and 2.4-

2.4835 GHz [14]. The standard specifies the physical and media access control (MAC) layer of the Open

System Interconnection (OSI) model defined by the International Organisation for standardisation

(ISO) in (ISO/IEC 7498-1) [16]. The physical layer is responsible for the particulars of the raw data

transmission including the data signal modulation [16, p. IEEE 802.15.4]. The standard employs offset

quadrature phase-shift keying (OQPSK) to modulate the data signal [14]. Phase shift keying is a form

of digital modulation involving phase modulation of a reference signal [16, p. IEEE 802.15.4]. OQPSK

modulates two bits at once “selecting one of four possible carrier phase shifts (0 90 180 or 270

degrees)” [17]. This allows the signal to carry double the information without increasing the

bandwidth [17]. The MAC layer manages access to the physical channel and itself is a sub-layer within

the data-link layer of the OSI model [16].

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 12

3.9 XBEE MODULES

Xbee modules are radio frequency (RF) transceivers that communicate using the ZigBee

communications protocol. When operating in their default “transparent mode” the modules “act as a

serial line replacement” [15]. The modules contain a Universal Asynchronous Receiver Transmitter

(UART), which transmits serial data as a 2.4 GHz radio frequency signal between the transceiver pair

[15]. Each module is interfaced “to a host device through a logic-level asynchronous serial port” [15].

Through this port the XBEE can communicate with any UART or serial device with a compatible voltage

range [15]. Devices such as the Arduino, that have a UART, can connect directly to the RF module pins

[15]. Figure 9 illustrates the straight forward connection between micro-controllers and Xbee

modules. The devices are configured using AT commands (see appendices), and require compatible

transmission parameters (baud rate, Parity, Flow control etc.) for successful communications. Data

received from the serial host is stored for transmission in the DI buffer until either the buffer reaches

its 100 byte maximum, or the UART registers a default period of silence on its receive line [15] . This

period of silence is configurable using the ATRO AT command, and if it is set to ‘0’ RF data will be

transmitted as soon as it enters the DI buffer [15]. Data in the DI buffer is arranged into an RF packet

before transmission [15]. Received data is stored in the DO buffer before being passed onto the serial

port for the host device. If the DO buffer reaches capacity, and there are no active flow control

provisions, all additional transmitted data is rejected [15].

Figure 9 Xbee UART data Flow

[15]

3.10 Arduino Micro-Controller Board Arduino micro-controller boards provide an open-source electronic prototyping platform for

designers to create interactive projects and objects. The first Arduino board was released in 2005 by

Massimo Banzi at the Interaction Design Institute Ivrea in Italy [18]. Massimo’s intention was to create

an approachable, easy-to-use platform that would promote the “democratization of engineering”

[18]. The boards are programmed in Arduino’s integrated development environment (IDE), based on

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 13

Processing (processing), with a C/C++ like programming language based on Wiring [19].The early

boards are based on ATMEL micro-controller chips and most feature hardware including: digital and

analogue inputs/outputs (including pulse width modulation pins), flash memory, electrically erasable

programmable memory (EEPROM), static random access memory (SRAM), two wire interface

communication (I2C) pins, a serial peripheral interface (SPI) communication header, an In Circuit Serial

Programming (ICSP) header, transistor-transistor logic (TTL) serial data pins, and universal serial bus

(USB) connectivity. [19]

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 14

4 Module Design The following section describes the core components used in the design, their basic function, and their

purpose. The Data Logger was specifically constructed to be modular, allowing critical components to

be removed easily. This was achieved by soldering headers and dip sockets to the circuit board. This

design makes the module easily configurable, and quickly repairable should any component

malfunction. As the Data Logger is expected to be used with a range of solar panels, the configurable

components needed to be easily removable.

4.1 Principle of Operation

The MOSFET electronic load method has been used to generate the characteristic curves of photo-

voltaic panels. This method involves modulating the gate voltage of a MOSFET to simulate a varying

load. The measurements taken using this method supply us with a comprehensive view of the solar

panel’s behaviour from its short circuit current to its open circuit voltage. The MOSFET’s gate voltage

is controlled by the output of an operational amplifier (op-amp). The non-inverting input of the

amplifier is controlled by a DAC, which is in turn controlled by a micro-controller. The inverting input

is connected to the source of the MOSFET, and a feedback capacitor is placed between the output and

the inverting input. In this configuration the amplifier performs as an analogue proportional integral

controller. The op-amp will take the error between its two inputs, and drive the output in order to

make the difference zero. An op-amp will “do whatever is necessary to make the voltage difference

between its inputs zero” [20]. By changing the set point, and exploiting the natural behaviour of the

op-amp, we can control how much power is dissipated in the MOSFET. A current shunt is used to

determine the current for each respective load, while a potentiometer reads the corresponding

voltage. These measurements are stored on an SD card which is connected to the micro-controller

using the SPI bus. A low current pathway is used to determine the short circuit current, with a Hall

Effect sensor capturing the measurement. A temperature measurement is also recorded for each

respective set point change. The resulting I-V curve data is transmitted via a set of RF transceivers to

a LabVIEW program, which stores the data in an archive, and displays the I-V curve as it is received.

The hardware design schematic is depicted by figure 10.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 15

Figure 10 Design Schematic

4.2 Temperature Sensor

The TMP36GZ is a 3-pin, precision, low voltage, linear temperature sensor [21] that has been fitted to

the testing panel. The sensor is fixed to the panel’s glass cover using aluminium thermal tape to ensure

constant thermal contact. The sensor is accurate to ± 2°C over a -40 to 125°C temperature range,

outputs 10mV/°C, and costs less than $2 [21].

A set of 10 samples are read from the sensor then averaged and scaled. For every step in the DAC

loop (see 6.2 I-V Curve) a temperature reading is recorded and stored to a log file, before it is written

to the SD card.

4.3 MCP4725 Digital-to-Analog Converter

The MCP4725 is a 12-bit Digital-to-Analogue (DAC) converter, which is utilised to modulate the gate

voltage of the load MOSFET by altering the voltage present at the non-inverting input of the

operational amplifier (op-amp). The Arduino communicates with the DAC using the two wire interface

(TWI) bus, also known as I2C. All I2C devices are connected in parallel and require a unique 7-bit

address (Arduino, 2013). To initiate communications with a specific slave the master must transmit a

start bit followed by the devices unique address (Wikipedia, 2013). A library obtained from the

Adafruit website [22] has been used to control the DAC set point voltage using the dac.setVoltage

function pictured in Figure 11 [22]. The function requires two inputs: the set point and a Boolean

value. A Boolean true will write the set point to the device’s EEPROM. Writing a value to the EEPROM

will set the default output value for the device after a power reset.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 16

Figure 11 MCP4725 Voltage Output Function

The MCP4725 was sourced to enable full control over the MOSFET’s three operating regions. The

MOSFET gate requires signals from 0 – 10 V to operate correctly. Originally, the micro-controller’s

on-board DAC was utilised to modulate the gate voltage, but its DAC output is restricted from 1/5th

to 5/6ths of the 3.3V output voltage. As the DAC signal is amplified by the controller op-amp, the 1/5th

of 3.3V input signal resulted in the MOSFET drain-source connection remaining partially open. An

alternate solution, involving a diode, was explored to drop the voltage at the non-inverting input to

0V. This option further reduced the operating range of the DAC output. For this solution to be viable

the DAC output would have required another stage of amplification prior to the MOSFET controlling

op-amp. The breakout board mounted MCP4725 satisfied the hardware requirements while also

remaining cost-effective, simple, and occupying very little space.

Tests revealed the MCP4725 operated fairly slowly: a 0.25Hz period for a 0-5V sawtooth wave with

4096 (12-bit) steps. Research was conducted to increase this speed on the Arduino Due. The Arduino

Wire library sets a default value of 100 kHz for the TWI clock frequency [23] . An unsigned 32 bit

integer constant in the wire library writes to the TWI register of the Atmel SAM3x8e processor

setting the default TWI clock speed [24].Changing the TWI register from the 100 kHz default to 400

kHz enabled the creation of 12-bit, 0-5V, 1.2 Hz triangle wave. This was considered ample speed as

the DAC is only required to output a sawtooth wave from 3.25-0V; more than doubling the triangle

wave test frequency.

4.4 LMC6482 Data Acquisition Amplifier

4.4.1 Input Buffer

A LMC6482 op-amp configured as a voltage-follower (figure 12) [25] was used to provide input

buffering functionality. The LMC6482 contains two Rail-to-Rail input and output amplifiers. Basically

this means that the common-mode input range can extend to either supply rail. The output range is

also guaranteed to extend to within 20mV of the amplifier’s supply [26]. This amplifier has

performed adequately as a buffer for the Arduino inputs and also as an amplifier for the load

MOSFET. Another LMC6482 needs to be soldered to the circuit board to buffer the potentiometer

voltage signal.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 17

Figure 12 Voltage Follower Buffer

[27]

4.4.2 Op-Amp Integrator/ Analogue PI Controller

A feedback arranged [25] op-amp, shown in figure 13, ostensibly acts as a high gain proportional

controller. Proportional only controllers often require significant offset to perform satisfactorily – “The

inability to eliminate offset is one of the limitations of proportional only controllers” [28, p. 476]. While

configured in a pure proportional control feedback arrangement the op-amp entered saturation while

trying to force the original 0.1Ω current shunt to reach the 0-4.5V set-point range. Significant

overshoot was discovered while reviewing the I-V curve data and the design was reconsidered with

greater focus upon measurement accuracy. The current shunt was replaced by a precision 1% 1Ω

mp915 current shunt, and a feedback capacitor was added to the op-amp (Figure 10). This capacitor

arrangement is known as an integrator [25] and adds an integral element to the controller. The

capacitor reduces the output signal’s offshoot and produces an output voltage that is the integral of

the input voltage with respect to time [25]. An early hardware design used a 100nF capacitor to

smooth the op-amp output, but after thorough investigation this value was changed to 220μF.

Multiple factors influenced the transition to this capacitance value. Even with multiple design

amendments erratic measurements were observed while using the 100nF capacitor. A significant

amount of oscillation was observed in the system, which was suspected as the primary cause of the

corrupted data. The op-amp ringing was investigated in greater detail by capturing the ringing signals

with a TPS2012 Digital oscilloscope. A thorough investigation into the op-amp ringing ensued, which

resulted in the aforementioned 220μF capacitor and a parallel 5kΩ load resistor being incorporated

to the design.

Figure 13 Op-Amp Integrator Configuration

4.4.3 Op-Amp ringing

Operational Amplifiers can exhibit oscillatory behaviour, overshoot and ringing under numerous

operating conditions [29]. Even internally compensated op-amps “can be made unstable… by driving

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 18

capacitive loads, adding capacitance to the inverting input lead, and by adding in phase feedback

with external components” [29]. The gate of the Power MOSFET appears as a capacitive load to the

amplifier, and it is this capacitance that is suspected to be driving the op-amp’s instability.

Furthermore, when the amplifier becomes saturated the output begins to behave nonlinearly [30].

“Now the circuit can do two things: first, it could become stable at the power supply limit, or second,

it can reverse direction…and head for the negative power supply rail.” [30].

The following section outlines the methods that were investigated to combat the amplifier’s

oscillatory output. The performance of each solution was gauged by monitoring the amplifier’s

output with an oscilloscope. Each prospective solution was tested using the same input conditions;

the DAC performed a sweep from 0-3.3V, which was input to the non-inverting input of the

amplifier. Initially the feedback capacitance was increased by a factor of 10, which yielded little

impact (figure 14). A resistor arranged in parallel with the amplifier’s output was then introduced.

Various combinations of resistance (2-10kΩ) and capacitance (0.1-20μF) were trialled with

unsatisfactory results. A 10mH inductor in series with the resistor was also tested in an attempt to

counteract the phase shift caused by the gate capacitance, but this also failed to remove the

oscillations. During these tests an inverse relationship was identified between the capacitance, and

the amplitude and duration of the oscillations; the greater the capacitance the smaller the

fluctuations (figure 15). Tests with larger capacitors were conducted until the response was

satisfactory. This optimised combination consists of a 220μF capacitor and a 5kΩ parallel resistor.

The op-amp’s transient behaviour with these optimised values is shown by figure 16.

Figure 14 Op-Amp Oscillations with 0.1uF Capacitor

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 19

Figure 15 Op Amp Oscillations with increased feedback capacitor

Figure 16 Op amp transient with 220uF capacitor

4.5 Alternate Input Buffers Multiple buffering devices were considered to provide circuit protection for the micro-controller. For

isolation and measurement accuracy, the buffer’s output needs to be isolated from and equal to the

input signal. The CD4050BC non-inverting hex buffer, provided by Murdoch University, was

investigated and discovered to be unsuitable for the intended application. Datasheet consultation

confirmed this investigation; the CD4050BC buffer only outputs low or high signals. [31]

An op-amp configured as a voltage-follower was used to provide the buffering functionality. LM324N

[32], OP07cp [33], and ua741C [34] operational amplifiers were all tested and found to perform

inadequately. These op-amps, although cheap and versatile, require significant offset adjustment to

perform as accurate voltage followers. Trimming potentiometers (trim-pots) were purchased and

utilised to adjust the aforementioned offset. With the inputs receiving signals of equal magnitude the

user adjusts the trim-pot until the output is zero [35]. Even after offset adjustment all of the previously

listed op amps failed to output signals within a suitable tolerance of the input signal. After extensive

research for data-acquisition grade amplifiers the LMC6482 [26] CMOS dual amplifier was ordered.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 20

4.6 DS1307 Real Time Clock

Two different DS1307 modules were tested. A real time clock library by JeeLabs was utilized to set the

time on the integrated circuit(IC) and to gain knowledge of polling the device over I2C. The Adafruit

data logging shield RTC module originally malfunctioned, but operated reliably after the battery

housing was adjusted. A second RTC module was tested and successfully operated. After the module’s

EEPROM has been programmed with the correct time, and an external battery is present to maintain

power to the IC, the device can be polled using the RTCLIB function Datetime [36]. This function

contains 9 different time related items including: year, month, day, hour, minute, second, current day

of the week represented numerically, the seconds since 1/1/2000, and the seconds since 1/1/1970.

After polling, the real time clock returns the previously stated timing values. These values are then

“arranged” and printed to a log file. For example, the date is separated by backslash’s – “/”. Print

statements are also used to embed commas in the log file enabling spread sheet software to

differentiate between data entries. For every DAC decrement the RTC is polled to create a timestamp

entry. Every completion of the program’s outermost loop ends with this log file being written to the

SD card.

4.7 Adafruit Data Logging Shield

The Adafruit data logging shield features an SD card module and a DS1307 real time clock. The SD

card module communicates using the serial peripheral interface (SPI) bus protocol. Unfortunately

the data logging shield was not immediately Due compatible and obscures access to the DUE’s (SPI)

header, which is necessary for communications. A tutorial on the Adafruit website [37] indicated

that although the shield was not immediately Due compatible modifications “should” make it

theoretically possible. A 6 pin SPI stackable header was obtained and modified to breakout the Due’s

SPI pins through to the prototyping space on the Adafruit shield. Initial progress with this shield was

arrested due to incorrect connections posted on the Adafruit site and the existence of multiple non-

Due-compliant libraries. Multiple libraries were tested with and without library coding

amendments. To maintain project momentum initial tests were conducted on the Arduino Uno as

the shield is completely Uno compatible. After sourcing SD-FAT, a Due compliant library, and

thoroughly investigating SD-SPI communications the shield was made Due compatible. Using the SD-

FAT [38] library for communications the SD card was recognised as available and successfully written

to using the DUE. The Adafruit SD card shield ties two of its analogue inputs to its I2C pins

immediately reducing the analogue inputs from 6 down to 4.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 21

4.8 Arduino Due The Arduino Due (figure 17) is a micro-controller board with a 32-bit SAM3X8E ARM Cortex-M3 CPU

[39]. Unlike many previous Arduino iterations the board runs at 3.3V. It boasts an 84MHz clock rate,

96Kb SRAM, 512Kb of flash memory, 54 Digital I/O, 12 Analogue inputs, 2 DAC outputs, and 4

Hardware serial ports among many other features [39]. This project was initially developed and

coded on an Arduino Uno, but after encountering memory issues and a lack available analogue

inputs, the project was ported to the Due. When the code modules for the I-V curve generation were

combined and tested on the Uno the program behaved bizarrely or failed to run at all. A library,

known as memoryFree [40], was utilised to check the available RAM on the Uno. The Uno has a

mere 2kB of available SRAM with which to store variables and serial print statements. Although the

memoryFree library indicated the program had approximately 10% of remaining RAM, all variables

and print statements were reviewed. Declared variables sizes were reduced wherever possible and

only essential serial print statements included. Variable consistency was reviewed and appropriate

variable conversions used where necessary. The program was re-written and tested in small code

fragments. These revisions fixed this problem and the program resumed its expected behaviour.

Despite this fix the lack of available analogue inputs, as well as memory considerations, motivated

the move to the Arduino Due. During this project the Due’s IDE was in beta release and

unreliable/partially complete libraries posed a significant hurdle during the prototyping phase. For

example, multiple SD libraries were unsuccessfully trialled before SD-Fat was found. Conflicting

information on forums and re-distributors websites also hindered progress on multiple occasions.

Figure 17 Arduino Due Micro-controller

[39]

4.9 I2C Design Revision During transition from the Uno to the Due an I2C problem was identified. With insufficient time to

investigate the cause of this problem, a quick solution was posited. This solution involved porting the

RTC to the Due’s second I2C bus (SDA1 and SCL1). The second I2C bus, unlike the primary I2C bus, has

no internal pull up resistors. A set of 1.2kΩ resistors were tied to the Due’s 3.3V pin and used to pull-

up the SDA and SCL lines to 3.3V to facilitate I2C communications on the second bus. Devices on the

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 22

second I2C bus communicate using the wire.2 library. This solution solved the communications issue

for both I2C devices.

4.10 TTL MOSFET A transistor-transistor logic (TTL) IRL530N MOSFET was used in the design to switch in a low

resistance pathway to ascertain the short circuit current. As a TTL MOSFET the ON threshold voltage

VGS(Th) is lower than that of a regular MOSFET. Using a low RDSon TTL MOSFET provides a simple

switching option, as the MOSFET’s gate threshold voltage can be driven high by a digital output from

the Due. The 3.3V output voltage from the Due is not enough to drive a regular MOSFET gate high,

and thus further circuitry would have been required should a regular MOSFET have been used as a

switch. The IRL530N has a gate threshold voltage VGS(Th) of a mere 2.0V, a drain-source ON resistance

RDS(on) of 100mΩ , is rated for a drain-source breakdown voltage V(BR)DSS of 100V and a drain-source

continuous current IS of 17A [41]. A digital 3.3V output is used to control the TTL MOSFET’s gate

voltage. Prior to activating the TTL MOSFET, the DAC output is set to 0 to ensure the load MOSFET

drain-source channel is disconnected. Having a low resistance pathway extends the I-V curve’s

range and more accurately represents the short circuit current. The current flows through the TTL

MOSFET and then through the current sensor to ground. The current through the 10kΩ trim-pot is

considered negligible.

4.11 Current Sensor

The ACS712 Low Current Sensor Breakout is responsible for detecting the short-circuit current.

When approaching the short circuit current measurements become complicated. A common current

measuring mechanism involves the use of a precision current shunt resistor to make voltage

measurements, and then inferring the current from the voltage measurement using Ohm’s Law. This

method is suitable for most applications, but becomes problematic when measuring the short circuit

current. By introducing a resistive element to measure the short-circuit current you have slightly

diverged from the short-circuit current. By definition the short circuit current occurs when the

current path has no resistance. As a design trade-off the current shunt resistance value can be

reduced, but this alternative reduces the measurement resolution. If we use a 100mΩ shunt and are

expecting a current of 1A the voltage reading will be 0.1V. This corresponds to an ADC reading of

124.1. Using this current-sensing configuration, a meagre 3% of the available 12 bit measurement

resolution is used. If we increase the current shunt resistance then we also increase the voltage drop

and consequently reduce the span of the I-V curve.

For the reasons stated above the ACS712 Low Current Sensor Breakout was nominated to detect the

short-circuit current. A Hall Effect sensor doesn’t require a current shunt resistor to perform current

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 23

measurements, and the output is isolated from the circuit being measured. The break out board

uses Allegro’s AC712 IC which harnesses the Hall Effect principle to output a voltage signal that is

linearly proportional to the sensed current [42]. The AC712 is a surface mount IC capable of

measuring ±5A. The breakout-board contains an amplifier to increase the IC’s gain to facilitate low

current measurements. Using a trim-pot the gain can be set from 4.27-47 [43].A reference trim-pot

is used to calibrate the sensor’s range for the intended application. The sensor was calibrated to

output 0.8V with a 0 amp input. With a 1.0 amp input the gain pot was adjusted until the sensor’s

output became 3.3V. This is the micro-controller’s voltage limit and represents the maximum ADC

reading of 4095. The calibration was set using these values to utilise a larger range of the micro-

controller ADC resolution. A Zener diode, placed across the sensor’s output and ground, provides

over-voltage protection for the micro controller should the current exceed 1 Amp. The module is

expected to be tested with panels whose short circuit voltage ratings are well below 1 Amp,

although the design is not restricted by this value. The appendix contains calibration instructions for

this sensor.

4.12 Power MOSFET A NTP18N06G Power MOSFET acts as a switch and a variable resistor whose resistance is modulated

through the output of the op-amp. The Due controlled DAC signal, scaled up by the gain of the

amplifier, provides access to the full range of MOSFET operational regions; Cut-Off, Triode and

Saturation [25]. Operating in these three regions the MOSFET simulates a load varying from Isc to Voc

allowing the full I-V curve to be captured. The MOSFET is the primary power dissipating element in

this design, and as such the device becomes hotter when more power is dissipated through it. A large

heat-sink has been attached to the MOSFET to overcome this issue. A layer of silicon heat transfer

compound was used between the contacting surfaces of the heat-sink and the MOSFET to maximise

heat dissipation. Initial tests involving sustained current exceeding 1 Amp generated significant heat

in the MOSFET. Testing with a 4 Watt panel with current less than an amp generated very little heat

in the MOSFET. The heat-sink has been included so that the module can be confidently used with

Panel’s whose short circuit current well exceeds 1 Amp.

4.13 Voltage Division Potentiometer

A 25 turn 10kΩ potentiometer is used as a voltage divider to allow the Due to measure the solar

panel’s voltage. The required resistance between the trim-pot’s wiper and ground is determined

using the panel’s Vmax rating and the Due’s 3.3V maximum input rating. The voltage at the wiper

node is connected to the micro-controller. Previously a fixed resistor combination of approximately

1.6MΩ was used but was revised during a period of design refinement conducted to improve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 24

measurement accuracy. It was discovered that the Arduino’s analog-to-digital converter: “is

optimized for analog signals with an output impedance of approximately 10kΩ or less. If such a

source is used, the sampling time will be negligible. If a source with higher impedance is used, the

sampling time will depend on how long time the source needs to charge the S/H capacitor, with can

vary widely” [44, p. 257]. The potentiometer’s 10kΩ resistance value was thus chosen to reduce the

ADC capacitor’s charging delay. Equation 9 is used to determine the panel’s voltage for the I-V curve

while equation 8 is used to calibrate the potentiometer’s wiper resistance.

Where: Vμc≤ 3V (reduced from 3.3V to introduce a safety margin) Rwiper + R2= 10kΩ Vmax = solar panel’s maximum rated voltage Vs = Panel’s operating voltage Vin= Voltage at trim-pot’s wiper

𝑉𝑖𝑛 = 𝑅𝑤𝑖𝑝𝑒𝑟

𝑅𝑤𝑖𝑝𝑒𝑟 + 𝑅2𝑉𝑠

(7)

𝑅𝑤𝑖𝑝𝑒𝑟 = 10𝑘𝛺𝑉𝜇𝑐

𝑉𝑚𝑎𝑥

(8)

𝑉𝑠 = 𝑉𝑖𝑛 ∗ 10𝑘𝛺

𝑅𝑤𝑖𝑝𝑒𝑟

(9)

4.14 XBEE Transceivers Two Xbee PRO 2.4 GHz 60mW (18 dBm) Radio Frequency modules, shown by figures 18 and 19, have

been utilised to achieve wireless data transmission [15]. The modules claim a 1500m (line of sight)

range, although the practical range is far less [15]. One module is connected to the Arduino via the

Serial.3 pins while the other is mounted on a USB dongle that manages the TTL UART conversion. A

unique communications protocol was devised to manage the transmission of data between the

modules (see Control Algorithm 7.7). Data is read from the SD card and written to the Serial.3 pins to

be transmitted as an RF signal. The USB XBEE receives the serial data, converts it into an RF packet,

and writes it to the USB port where a LabVIEW program receives and processes the data. Every data

payload begins with a checksum and delimiter character (see 6.6 SDlineFetch) before being

transmitted from the Arduino. The checksum allows the data-receiver to verify that the data hasn’t

been corrupted during transmission. As previously mentioned, the XBEE modules are configured using

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 25

AT commands. The modules were configured using HyperTerminal. An optimal Baud rate of 38400 has

been configured as it was found to balance transmission time with minimal data corruption. This rate

was determined experimentally by tabulating the amount checksum errors over varying distances and

Baud rates. A correlation between increased checksum errors and increased baud rate was observed

during testing. While keeping the baud rate constant the transmission distance was reduced and a

concomitant reduction of checksum errors was observed. With a baud rate of 38400, the modules can

communicate with approximately 10 checksum errors at a distance of approximately 80m through

obstacles and a double-brick wall.

Figure 18 USB mounted XBEE module

Figure 19 Arduino connected XBEE module

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 26

5 Design Strategy

Each hardware component was tested individually and coded with separate software modules to

reduce fault finding time. Once each device operated successfully, the respective operational software

“modules” were refined and saved for future integration. The modules were progressively combined

and tested until all modules were incorporated into a single program. A typical fault solving procedure

would involve echoing several diagnostic variables to the serial monitor using the Arduino Serial.print

function.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 27

6 Control Algorithm

6.1 Simplified Arduino Control Algorithm Flow-Chart

Figure 20 Arduino Control Flow Chart

The following provides a short description of the control algorithm (figure 20) that has been

programmed into the Arduino Due. The program is designed to only record I-V curves during the day

at 5 minute intervals. To accomplish this, the real time clock is polled until the appropriate time is

registered. If the time is greater than dawn and less than dusk, the time and date are used to create a

log file for the I-V curve data (see 6.3 File Naming System). Firstly, the short circuit MOSFET is activated

so the short circuit current can be read by the Hall Effect sensor. This MOSFET is deactivated and the

electronic load MOSFET is then used to measure the I-V curve over varying loads. Once this data has

been obtained, the Arduino sends a ready-to-send character (*) to the LabVIEW control VI via the Xbee

RF transceiver. If the LabVIEW program responds with the ‘$’ character, the current SD file is opened

and the SDlineFetch function is executed. Once LabVIEW receives the current data line it verifies the

checksum and sends a checksum validation character (‘&’) back to the Arduino. The SDlineFetch

function will not proceed to retrieve and send the next line until it receives the checksum valid

character from LabVIEW. Once all lines in the SD data file have been read the whole process restarts.

6.2 IV curve

The following describes the software process used to generate and assess the measurements used to

create the I-V curve. Two separate consecutive loops within the main control loop are responsible for

decrementing a variable which is sent to the DAC module. Powered by a 5 V supply and having a 12-

bit resolution, a single unit decrease in the DAC results in an output voltage decrease of approximately

1.22mV. The two loops cycle the DAC output from 4-0 V. The first loop decreases in steps of 20; as the

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 28

current stays fairly uniform until the “knee” of the I-V curve. During this loop the two analogue inputs

are read to calculate the voltage and current of the solar panel. For each successive decrease in the

DAC output 10 analogue measurements are made and stored in an array. By taking 10 samples the

data can be averaged to reduce the impact of any anomalous samples. Within the DAC loop another

inner loop structure is used to step through and check that each measurement in the measurement

array is within ± 50 % of the previous measurement. This array is expected to contain fairly constant

measurements as the DAC output is constant for all 10 sample measurements. If a measurement is

found to exceed the tolerance band then that measurement is retaken and replaces the old

measurement in the array. Once data consistency has been confirmed the array elements are

summed, averaged, and scaled. The final single measurement is then printed to the log file. The

process is identical for the second loop but the DAC is decremented in smaller steps to increase the

resolution for the knee of the I-V curve. The code used to generate a “tuned” DAC step size only utilises

one loop to decrement the DAC. It is recommended that each panel be tuned individually.

Furthermore, it is recommended that the DAC step size be larger while the short circuit current

remains fairly constant, and be significantly reduced when the current starts to reduce around the

“knee” of the I-V curve. The I-V CSV files need to be analysed in order to determine these DAC step

sizes. By altering the step size, and monitoring the CSV files for redundant data points, the DAC step

size loops can be “tuned”.

6.3 File Naming System The data files stored on the SD card are named according to the 8.3 filename convention used by FAT

file systems. The file names must be ≤ 8 characters long and have a filename-extension no greater

than 3 characters [45]. The filename and extension are separated by a full stop. For example,

testing.txt conforms to the 8.3 convention. Every file created has a filename consisting of the month,

day, hour and minute. The filename is changed every loop cycle by polling the real-time clock to

update the date and time. This ensures each filename is unique and is easily identifiable in an archive.

A default character array called filename is declared and used as the mechanism for updating the data

file’s filename every loop (char filename [] = "00000000.csv";). By using a character array one can use

the array index to change each individual character within it. Figure 21 illustrates a typical excel file

created using the 8.3 naming convention as well as the array index manipulations used to generate

the filename.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 29

Figure 21 Log File Naming Code

The now.day function returns a 2 digit integer. By dividing this number by 10, and inserting into the 0

position of the character array, we can represent days of the month ≥ 10 in this array position. The +

‘0’ appends the ASCII null character to the character. This is done so functions like Serial.print() are

able to recognize the end of the character [19] . By using modulus (%) 10 we capture only numbers

between 0-9 to insert into the requisite array position.

6.4 getCheckSum The getCheckSum function (figure 22) creates hexadecimal checksums based on the lines read from a

file on the SD card. The function converts the line to a string of characters and XORs the ASCII values

of each character in the string until it reaches the end of the string (strlen). Table 3 illustrates the XOR

process for the word testing. To generate a checksum based on the word “testing”, the ASCII

(American standard code for information interchange) values for each letter are used. These ASCII

values are converted to their binary equivalent, and the first bit of each letter’s binary byte undergo

the exclusive OR operation. The process is repeated for every bit and the resulting byte is the

checksum. The final checksum value is the hexadecimal equivalent of the byte.

Figure 22 Custom Checksum Function

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 30

Table 3 Checksum Example

6.5 SD operations The following section describes the software operations and custom functions used to read from, and

write to, the SD card module. The SD module is part of the Adafruit shield and the Due communicates

with it via the SPI bus. The SPI bus uses 4 lines for communications: MISO (Master In Slave out), MOSI

(Master Out Slave In), SCK (Serial clock), and SS (Slave select) [46]. The slave select pin allows multiple

devices to be connected to the SPI bus; only the slave with a low SS pin is able to communicate with

the master [46]. The SD-FAT library [38] was used to manage SD communications and to design custom

functions. The SD module is initialised in the Arduino Setup function, which runs only once after every

power-up. The initialisation sets the SPI communication speed, verifies SD card communications,

checks the SD volume, and the root directory [38]. If the initialisation procedure is a success the

Sd.begin function returns a true. If initialisation fails (returns a 0) the SD card is halted before the error

message –“SD Access Failed” is echoed to the serial monitor, and then written to LabVIEW via the

XBEE modules. Within the main program loop a new log file is created each cycle. Each log file is named

according to the time and date as read from the real-time clock. After all the I-V curve data has been

recorded to the log file it is written to the SD card using SD-FAT’s flush function [38].

6.6 SDlineFetch

The SDlineFetch function uses the fgets function from the SdFat library to read the current data file

line by line. A significant portion of the Arduino-side communications protocol exists within the

SDlineFetch function. The function operates until it has read every line from the data-file. Each line in

the file is scanned until the ‘\n’ characters are encountered. After each line is retrieved the

getCheckSum function is called to create a checksum based on that line. The checksum and a ‘#’

delimiter character are appended to the line before it is sent to the Serial.3 port to be transmitted by

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 31

the XBEE module. The SDlineFetch function can only retrieve the next line from the file after it receives

the checksum valid character ‘&’ from LabVIEW. This ensures the XBEE buffers are always emptied

and that every line is successfully transmitted.

6.7 Communications Protocol

A unique communications protocol was devised to coordinate the data transfer from the Arduino to

a LabVIEW VI. The protocol begins with the Arduino sending the ‘*’ character to signify the start of a

data transfer. When LabVIEW receives the ‘*’ character it responds with the ‘$’ character indicating

that it is ready to receive the data payload. When the Arduino receives the ‘$’ character it launches

the SDlineFetch function to open, read, and transmit the latest data file. LabVIEW reads each RF packet

and splits the contents using the # delimiter in order to separate the checksum from the data string.

LabVIEW then runs its own checksum generator sub VI with the data string to compare the received

checksum with its own. If the checksums match LabVIEW appends the line to a .csv file and transmits

the checksum valid character ‘&’ to the Arduino. If the checksums are not equal LabVIEW sends the

‘@’ character to request the same line to be resent. A while loop in the SDlineFetch function prevents

the next line from being processed until one of the checksum validation characters have been

received.

6.8 LabVIEW Program

The LabVIEW VI performs three essential tasks: Cooperatively manage the flow of data, re-create the

complete csv data file from the line-by-line transmission, and display the transmitted waveform as it

receives each respective current and voltage point. The communications protocol was specifically

designed with the send – pause - verify - send next line sequence, to ensure any corrupted packet is

retransmitted. Communication speed is slightly reduced using this “handshaking” verification

method, but data consistency is greatly increased. The alternative situation, where the data is

streamed through continuously, complicates the processing procedure. A list of corrupted lines would

need to be compiled and a retransmission request lodged. The Arduino would need to re- open the

data file, and another custom function would be required to locate and resend those specific

corrupted lines. This retransmission itself may fail, causing the cycle to repeat ad infinitum. Another

alternative would be to have no data verification, which would result in incomplete I-V curves. Neither

of these options were considered viable designs.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 32

6.8.1 Front Panel

Figure 23 LabVIEW Program HMI

6.8.1.1 VISA settings

The visa resource inputs must be set with the parameters present in figure 23. The Xbee modules have

been configured using these parameters and if they are changed communications will cease. To

change these parameters one must change both Xbee modules parameters using appropriate AT

commands. Only then can the Labview parameters be changed.

6.8.2 Initial Path Folder

The current file path contains the destination that the LabVIEW created CSV file will be stored in. The

filename is the first line sent by the Arduino after the ready-to-send handshake has occurred. The

current filename is appended to the Initial Path Folder location in order to determine the final file

path. Because the 8.3 filename convention is restricted to 8 characters this feature allows a more

meaningful archive to be setup. As indicated by the Front Panel screen capture, the data is currently

being stored within the set of folders – Desktop\ThesisPVData\2013\.

6.8.3 The Status Window

The current line being received is pictured in this window as well as the length of that line in bytes.

You can see the typical format the data is received in: the checksum, delimiter, date, time, voltage,

current, and temperature.

6.8.4 Miscellaneous Indicators

A Boolean indicator shows you the outcome of the checksum equality check. The CTS (clear to send)

character represents the checksum valid character (&). The power is calculated by multiplying the

voltage and current, and is also plotted together with the I-V data. The temperature is also displayed

as well as the maximum power point (MPP).

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 33

6.8.5 IV/PV Graph

A received line that has been given a valid checksum is then passed into the “String search for Graph”

sub VI. The voltage and current measurements are split from the rest of the string and passed into an

array to be graphed. The graph generates the current I-V curve as well as the PV curve in real time as

it receives each data point.

6.9 General Block Diagram Description

The following section describes the LabVIEW control algorithm shown in figure 24. It is recommended

that this section be read while referencing the LabVIEW VI block diagram. The serial communication

parameters are set using the Visa Configure Serial Port Virtual Instrument (VI) block. Data is read from

the serial port using the Visa Read block, while data is written to the serial port using the Visa Write

blocks. A set of Select blocks act as filters for incoming data. A Search and Replace String block

monitors the data from the Visa Read Block and compares it to a .csv input string. If the Search and

Replace string block detects a string containing .csv characters it will output a number indicating that

it has found a match in the string. A not equal to 0? block generates a Boolean value depending on the

result from the Search and Replace String block. This value activates a Case Structure, which contains

a Write to Spreadsheet File VI. The initial path folder is appended to the received filename and input

into a Write to Spreadsheet File VI to create the CSV file. A Search/Split String block divides incoming

serial data into two sub string using the ‘#’ delimiter. The remainder of the line after the ‘#’ symbol is

fed into the checksum sub VI. An Equal? block compares the output of the Checksum sub VI with the

Arduino checksum that was split from the input string. The Equal? block’s Boolean output connects to

a front panel indicator, a Select block, and the Boolean input of a Case Structure. If the Equal? block

returns a true value, meaning the checksums were validated, the Select block writes a ‘&’ string to the

serial port using a Visa Write block. A true from the Equal? block also activates the true case of the

Case Structure, which contains a second Write To Spreadsheet VI, that is set to append information to

the previously created csv file. Serial data that has a valid checksum, and that is greater than 15

characters long, is passed to the String Search For Graph sub VI. This sub VI returns 3 separate strings:

the current, voltage and temperature. These strings are then converted to numbers using the

Fract/Exp String to Number blocks, built into arrays using Build Array blocks, and bundled into a cluster

using Bundle blocks. The resulting cluster is connected to a XY graph chart. Two parallel wires take the

current and voltage data from the output of the Fract/Exp String to Number blocks and multiply them

together to determine the power. The power values are built into an array, and clustered with the

voltage data to create the Power Voltage (PV) curve. The PV and IV curves are displayed on the same

XY graph. An Array Max and Min block determines the Maximum Power Point (MPP) from the array

of Power values, and displays it on a front panel indicator.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 34

The original VI was not registering the ready-to-send character ‘*’ sent from the Arduino. The cause

of this problem was identified by viewing the read string status bar. The received string contained

carriage return and line feed characters. A parallel branch from the Visa Read block data string output

connects to one of the inputs of an Equal? block. A ‘*’ character constant is concatenated with a line

feed and a carriage return constant, and fed into the other input of the Equal? block. The output of

the ready-to-send Equal? block activates the true case for a Case structure. Within the case structure

a Visa Write block is set to send the ‘$’ string to the Arduino. These measures fixed the initial ready-

to-send handshake problem.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 35

Figure 24 LabVIEW Block Diagram

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 36

6.9.1 String Search for Graph sub VI

This sub VI is used to sift through each I-V curve data line and remove the current, voltage, and

temperature strings. The VI uses the Search/Split string and the String Subset blocks. An offset value

removes the commas from the final output strings. Figure 25 illustrates the LabVIEW logic used to

create this VI.

Figure 25 String Search for Graph Sub VI

6.9.2 Check Sum sub VI

Figure 26 Check Sum Sub VI

This sub VI converts the input strings into an unsigned byte array which is auto-indexed into a for loop.

The numbers are converted into a Boolean array so they can undergo the XOR operation. A shift

register holds the previous loops XOR output so the XOR block can operate on the current ASCII value

and the previous XOR result. The final XOR Boolean array is converted to a number and then to a

Hexadecimal value. Figure 26 pictorially represents the LabVIEW logic.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 37

6.10 Error Handling A robust error communications system was integrated with the design to expedite problem diagnosis,

and reduce module downtime. Errors are sent to the LabVIEW control VI so they can be logged

remotely. Hardware errors, such as SD access and log file creation, have the ability to halt the Arduino.

Without a log file, or SD access, data cannot be stored or transmitted, and therefore the I-V curve

tracing procedure becomes futile. The cause of this type of hardware error is usually fairly benign; the

SD card may not be inserted correctly (or at all), SPI wires may be loose, or the previous log file failed

to close. More serious problems may occur: such as SD card failure, which may require a simple format

and reset or more drastically a new SD card may be required. Failure of the Real-time clock also

generates an error message.

Provisions have also been made for extended RF failures. As the SDlineFetch function relies upon

checksum validation to proceed through the current data file, it is conceivable that consistent RF

interference could suspend the SDlineFetch in a continuous send/fail/resend loop. For this reason a

specific communications error management provision was included within SDlineFetch. If the same

line fails to send 30 times an RF error message is generated and the loop is broken. If LabVIEW doesn’t

respond to the Arduino’s initial ready-to-send request a timeout error is logged, and the Arduino will

continue on to generate the next I-V curve. Using this procedure, if RF communications fail the I-V

curve data will still continue to be generated and logged on the SD card until a user is able to address

the communications issue.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 38

7 Results

The following section discusses a range of I-V curves obtained using the remote data logger (RDL). A

Prova 210 solar module analyser (SMA) was used as a benchmark to gauge the accuracy of the created

module. The Prova 210 claims an accuracy of ± 1 %±( 1% of Vopen/Isc) on voltage and current

measurements respectively, a 1mv resolution on a 0-10V range, and a 1mA resolution on 0.01-10A

range. The main aim of these comparisons is to gauge the reliability of the created module as

compared to a commercial product. Considerable care was taken to ensure the test conditions were

kept constant while taking comparison curves. All of the characteristic curves depicted below are

taken from a SR-4M 4W Silicon solar panel illuminated by an ARLEC HL110 500W Halogen flood lamp

at a distance of approximately 20cm. The temperature of the panel was left to stabilise before the

curves were taken, as the open circuit voltage is noticeably affected by changes in temperature.

Another panel was provided for testing but was found to be faulty. Two anomalous data points

persistently occurred in the I-V curves taken with the soldered circuit board module (see figure 28).

The RDL produces remarkably similar results to the Prova Solar Module Analyzer, provides extra data

transmission functionality, and its manufacturing cost is considerably less than the price of the SMA.

While the Prova 210 can cost upwards of $1500 dollars [47], the components that are used for the

RDL cost around $300. The similarity of the two curves is evidenced by comparing figure 27 and 28.

Figure 27 Remote Data Logger I-V Curve

0.1, 0.91

6.04, 0.010

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 1 2 3 4 5 6 7

Cu

rre

nt(

A)

Voltage(V)

RDL IV Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 39

Figure 28 Prova 210 I-V Curve

Table 4 I-V Curve Data Comparison

The bread-board RDL module produced remarkably similar results to the Prova 210 SMA. From table

4 we can see that the module produced short circuit current, and open circuit voltage measurements

within < ± 0.5 % of the commercial solar analyser. A slightly steeper gradient (-0.0153 to – 0.0123) is

observable in the SMA curve between the 0-4V range. The fill factor and the gradient are indicative of

the effects of the parasitic shunt and series resistances of the panel. The fill factor suggests that there

are considerable ohmic losses, which are reducing the efficiency of the test panel. As discussed in the

background, the fill factor is a measure of the “squareness” of the IV curve; an ideal lossless panel

should have a fill factor of 1. The “thickness” of the I-V curve illustrated in Figure 26, particularly in the

short circuit current region, is caused by an excess of measurements in extremely close proximity. The

RDL bread-board curve contained over 1000 data points with a large number of them being repeated.

The RDL bread-board curve was made with DAC decrements from 2660-900 in steps of 20 and then

6.022, …

0, 0.907

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 1 2 3 4 5 6 7

CU

RR

ENT(

A)

VOLTAGE(V)

SMA IV Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 40

from 895-0 in single steps. A single DAC decrement results in a 1.22mV output decrease. The curve’s

thickness is thus attributable to slight variations in the 4095 bit ADC readings, which cascade into

rounding differences, resulting in two slightly different voltage/current measurements for a constant

corresponding voltage/current measurement. To produce “smoother” curves the DAC step size needs

to be “tuned”. The process of tuning is unique to each panel and requires an iterative approach

involving I-V curve analysis and step size modulation. Figure(29) depicts the final “tuned” circuit board

I-V curve.

Figure 29 Remote Data Logger Step size Tuned I-V Curve

Figure 30 Prova 210 Comparison I-V Curve

1.15, 0.57

0

0.1

0.2

0.3

0.4

0.5

0.6

0 1 2 3 4 5 6 7 8 9

Cu

rre

nt(

A)

Voltage(V)

RDL Tuned I-V Curve

0

0.1

0.2

0.3

0.4

0.5

0.6

0 1 2 3 4 5 6 7 8 9

Cu

rre

nt(

A)

Voltage(V)

SMA I-V Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 41

Table 5 I-V Curve Data Comparison

The circuit board RDL model consistently produced two bizarre and unexpected measurements (see

figure 31). These measurements did not affect the acquisition of the key I-V parameters (see table 5),

but were nonetheless curious. After reviewing the entire CSV file it was established that approximately

2 successive unexpected voltage measurements were being taken. As the DAC sweep lowers the gate

voltage, and the MOSFET RDS on value increases, we expect the voltage to increase accordingly. While

the corresponding current measurements were decreasing as expected these two voltage

measurements persistently reduced. A raft of measures were trialled to remove these two outlying

voltage measurements. A new operational amplifier, MOSFET, and current shunt were trialled with no

success. After considering the effect of the MOSFET switching oscillations, the feedback capacitance

value was again adjusted to try remove these outliers. First, the sampling rate was increased, but the

outliers persisted. Then the sampling rate was modified to be greater than the combined slew rate of

the MOSFET and the op-amp. This approach was successful in removing the two outlying voltage

measurements.

Figure 31 Remote Data Logger tuned I-V Curve with outlier

0

0.1

0.2

0.3

0.4

0.5

0.6

0 2 4 6 8 10

Cu

rre

nt(

A)

Voltage(V)

RDL Tuned I-V Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 42

Figure 32 Prova 210 Comparison I-V Curve

Note* DAC Step size of 28

Table 6 I-V Curve Data Comparison

The figures above have been included to corroborate the relationship between temperature and open

circuit voltage, as well as illustrate the performance of the RDL with respect to the SMA. We can see

from Tables 5 and 6 that as the temperature increases from 52.4 to 58.4 the open circuit voltage

decreased from 8.54 to 8.22. Furthermore the slope of the curve between 0 and 6 V also clearly shows

the effect of the shunt resistance reducing the fill factor. “Low shunt resistance causes power losses

in solar cells by providing an alternate current path for the light-generated current. Such a diversion

reduces the amount of current flowing through the solar cell junction and reduces the voltage from

the solar cell.” [8]

0

0.1

0.2

0.3

0.4

0.5

0.6

0 2 4 6 8 10

Cu

rre

nt(

A)

Voltage(V)

SMA I-V Curve

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 43

Figure 33 Final Tuned I-V Curve with Slew Delay

The final design, with a tuned DAC sweep, produces smooth current voltage characteristic curves with

minimal redundant data points, and no identifiable outliers (figure 33). It is suspected that the outliers

that were detected by the sensors represented the transient switching behaviour of the op-amp, and

did not represent the actual behaviour of the solar panel. By trialling different combinations of

feedback capacitance and resistance the duration of the transient switching signal was minimised. For

each DAC set point decrease a coding delay that is slightly longer than the output slew time was

introduced. These provisions removed the measurements that were not indicative of the real solar

panel’s characteristic curve.

0

0.1

0.2

0.3

0.4

0.5

0 2 4 6 8 10

Cu

rre

nt(

A)

Voltage(V)

Tuned RDL I-V Curve with optimised op-amp Feedback, DAC Tuning and op-

amp slew delay

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 44

8 Future Recommendations

8.1 Reduce Noise

The MCP4725 DAC and the Hall Effect current sensor output signals could both be improved. The Hall

Effect sensor produces large noise spikes that can affect the initial current measurement. It is

suggested that bypass capacitors and or filters be investigated to address this issue.

8.2 Automate Communications Parameters

The baud rate could be automatically optimised every time the Arduino is reset. During an initialisation

procedure a test file could transmitted at varying baud rates to optimise the transmission speed. By

monitoring the amount of checksum errors for each change in baud rate an optimised setting could

be determined. The baud rate can be easily manipulated using the AT commands found in appendix

A.

8.3 Automate the DAC step size

The DAC step size could be automatically optimised for each new panel that is connected to the

module. An initial I-V curve would be obtained and sent to LabVIEW where the data points could be

analysed in detail. LabVIEW could send updated DAC step size values to the Arduino until it minimises

the amount of repeated data-points in the I-V curve.

8.4 Determine the Parasitic Resistances

Using I-V curve data it is possible to estimate the series and shunt resistance values [5]. The LabVIEW

control VI could analyse the I-V data files to determine these parasitic resistance values, and display

them on a front panel indicator.

8.5 Banana Sockets

The device currently uses alligator clips to connect both the solar panel and the power source for the

op-amp. To prevent accidental disconnection it is recommended that banana plug sockets be attached

to the circuit board to increase the security of the connections.

8.6 Improved Sample Analysis

Currently the curves data measurement samples are averaged to provide a single measurement for

each step of the DAC sweep. A statistically superior method could be used to improve the accuracy of

the final measurement. A leaky-bucket integrator was suggested by Dr Gareth Lee, but due to time

restrictions was not investigated.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 45

9 Conclusion The remote data logger successfully satisfies all design specifications. The module is able to produce

I-V curves that consistently match those taken with a commercial solar analyser. The I-V curves

produced by the remote data logger have been compared to those taken with the Prova 210 Solar

Module Analyzer to measure the success of the device. The key parameters of the remote data

logger’s I-V curves are consistently within 1-3 % of the same parameters obtained using the Prova 210.

The circuit board could be refined by adding signal conditioning elements to improve measurement

precision, and connection security improved by the addition of banana plug sockets. Extra software

functionality could be introduced to further automate the system and to analyse the gathered I-V

curve data. The module is ready to be deployed in the field for its intended application.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 46

10 Works Cited

[1] G. Lee, “Engineering Thesis Projects,” 2013. [Online]. Available:

http://chad.murdoch.edu.au:6168/Projects.

[2] E. Aranda, “Measuring the I-V curve of PV generators,” Industrial Electronics Magazine, 2009.

[3] S. R. Wenham, M. A. Green, M. E. Watt and R. Corkish, Applied Photovoltaics, Cornwall:

Earthscan, 2007.

[4] T. Markvart, Solar Electricity, Chichester: John Wiley and Sons, 1994.

[5] C. Honsberg and S. Bowden, “PVEDUCATION,” [Online]. Available: http://pveducation.org/.

[6] Wikimedia Commons, “Wikimedia N-Doped_Si.svg,” 28 10 2013. [Online]. Available:

http://commons.wikimedia.org/wiki/File:N-doped_Si.svg. [Accessed 2013].

[7] Wikimedia Commons, “Wikimedia P-Doped_Si,” 28 10 2013. [Online]. Available:

http://commons.wikimedia.org/wiki/File:P-doped_Si.svg. [Accessed 2013].

[8] C. Honsberg and S. Bowden, “PVEDUCATION,” [Online]. Available:

http://www.pveducation.org/pvcdrom/solar-cell-operation/ideality-factor. [Accessed 2013].

[9] National Instruments, “Photovoltaic Cell I-V Characterization Theory and LabVIEW Analysis

Code,” 10 May 2012. [Online]. Available: http://www.ni.com/white-paper/7230/en/. [Accessed

10 2013].

[10] C. Honsberg and S. Bowden, “PVEDUCATION,” [Online]. Available:

http://www.pveducation.org/pvcdrom/solar-cell-operation/ideality-factor. [Accessed 2013].

[11] M. Chapman, T. Hasny and M. Sharpe, “ENG352: Energy Supply Systems, Week 6 Laboratory

Report,” Perth, 2012.

[12] C. Honsberg and S. Bowden, “PVEDUCATION Fill Factor,” [Online]. Available:

http://pveducation.org/pvcdrom/solar-cell-operation/fill-factor. [Accessed 2013].

[13] NXP semiconductors, “I2C-bus specification and user manual,” 9 10 2012. [Online]. Available:

http://www.nxp.com/documents/user_manual/UM10204.pdf. [Accessed 2013].

[14] Digi Internation Inc, “Demystifying 802.15.4 and ZigBee,” 2007-2008. [Online]. Available:

http://www.digi.com/pdf/wp_zigbee.pdf. [Accessed 20013].

[15] Maxstream inc, “XBee™/XBee-PRO™ OEM RF Modules,” 10 13 2006. [Online]. Available:

http://ftp1.digi.com/support/documentation/90000982_A.pdf. [Accessed 2013].

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 47

[16] Wikipedia, “IEEE 802.15.4,” 2013. [Online]. Available: http://en.wikipedia.org/wiki/802.15.4.

[17] Maxim Integrated, “Maxim Integrated,” 2013 . [Online]. Available:

http://www.maximintegrated.com/glossary/definitions.mvp/term/qpsk/gpk/244. [Accessed

2013].

[18] D. Kushner, “The Making of Arduino,” 26 10 2011. [Online]. Available:

http://spectrum.ieee.org/geek-life/hands-on/the-making-of-arduino. [Accessed 2013].

[19] Arduino, “Arduino,” 2013. [Online]. Available: http://arduino.cc/. [Accessed 2013].

[20] R. Nave, “Hyperphysics Operational Amplifiers,” [Online]. Available: http://hyperphysics.phy-

astr.gsu.edu/hbase/electronic/opampi.html#c1.

[21] Analog Devices, “Low Voltage Temperature Sensors,” 2010. [Online]. Available: Low Voltage

Temperature Sensors. [Accessed 2013].

[22] Adafruit, MCP4725 Library, 2012.

[23] C. Maglie, TWI/I2C Library For Arduino Due, 2011.

[24] Atmel, “AT91SAM ARM-based flash MCU,” San Jose, 2012.

[25] A. R. Hambley, Electrical Engineering Principles and Applications, Pearson , 2011.

[26] National Semiconductor , “LMC6482 CMOS dual Rail-To-Rail Input and Output Operational

Amplifier,” 1997.

[27] Wikimedia Commons, “OpampFollowing,” 10 9 2009. [Online]. Available:

http://upload.wikimedia.org/wikipedia/commons/c/c3/Opampfollowing.png?uselang=en-gb.

[Accessed 2013].

[28] W. H. R. Babatunde A.Ogunnaile, Process dynamics, modelling, and control, New York: Oxford

University Press , 1994.

[29] Texas Instruments, “Op amp stability and input capacitance,” Analog Applications Journal,

2005.

[30] Texas Instruments, “Stability Analysis of Voltage-Feedback Op Amps,” Texas Instruments, 2001.

[31] Fairchild Semiconductor, “CD4050BC-CD4049UBC-Hex Inverting Buffer,” 1987.

[32] Phillips Semiconductors , Low Power Quad Op Amps, 1995.

[33] Texas Instruments, OP07C, OP07D, OP07Y Precision Operational Amplifiers, 1998.

[34] Texas Instruments , General Purpose Operational Amplifiers, 2000.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 48

[35] Texas Instruments , “OP07C,OP07D, OP07Y Precision Operational Amplifiers,” 1998.

[36] JeeLabs, “Real Time Clock Library”.

[37] Adafruit, “Adafruit Shield Compatibility guide,” [Online]. Available:

http://learn.adafruit.com/adafruit-shield-compatibility/data-logging-shield-assembled.

[38] W. Greiman, “SDFat Library,” 2012.

[39] Arduino, “ArduinoBoardDue,” 2013. [Online]. Available:

http://arduino.cc/en/Main/ArduinoBoardDue. [Accessed 2013].

[40] GitHub, MemoryFree, 2013.

[41] International Rectifier, “IRL530N,” 1 9 2004. [Online]. Available: http://www.irf.com/product-

info/datasheets/data/irl530n.pdf. [Accessed 2013].

[42] Allegro, “Fully Integrated, Hall Effect-Based Linear Current Sensor,” 2007. [Online]. Available:

https://www.sparkfun.com/datasheets/BreakoutBoards/0712.pdf. [Accessed 2013].

[43] Sparkfun Electronics, “ACS712 Low Current Sensor Breakout,” 2013. [Online]. Available:

https://www.sparkfun.com/products/8883. [Accessed 2013].

[44] Atmel , “Atmel 8-bit Microcontroller with 4/8/16/32KBytes,” San Jose, 2012.

[45] Wikipedia, “8.3_filename,” 30 October 2013. [Online]. Available:

http://en.wikipedia.org/wiki/8.3_filename. [Accessed 2013].

[46] Arduino, “Arduino Reference SPI,” 2013. [Online]. Available:

http://arduino.cc/en/Reference/SPI. [Accessed 2013].

[47] DHgate, “ Solar Module Analyzer PROVA-210(12A,60V) Solar Meter,” 2013. [Online]. Available:

http://www.dhgate.com/product/solar-module-analyzer-prova-210-12a-60v-

solar/174814063.html.

[48] Arduino, “Arduino,” 2013. [Online]. Available: http://arduino.cc.

[49] Wikipedia, “I2C,” 2013. [Online]. Available: http://en.wikipedia.org/wiki/I2C.

[50] Digi International Inc., “Zigbee,” 1996-2013.

[51] J. Boxall, “Tronixstuff,” 2013.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 49

Appendix A

*Please Note: The Labview Control VI and Arduino Control .ino Files are not included in the

appendices. These files are available on the USB lodged with this Thesis.

The following section relates to device setup and configuration

Instructions for Device Use

Using the Clips provided attach the solar panel to be tested to the circuit board. The panel is

attached on the side of the circuit board that has the blue potentiometer. The circuit board wires are

colour coordinated. Trace the red wire from the blue pot to the metal header pin to attach the

positive clip. Similarly, trace the green wire from the blue-pot to the other metal header pin and

attach the ground clip.

Op-Amp Connections

The Op-amp power source header pins are located next to the electronic load Mosfet. (refer to

diagram schematic). Again, trace the red wire to the header pin to attach the positive lead, and the

green wire to the other header pin to attach to negative lead.

USB mounted XBEE

Before Starting the LabVIEW control VI or turning the RDL on insert the USB XBEE dongle into an

available USB port.

Use Device Manager to determine the com port the XBEE module is occupying

Note the com port and set the LabVIEW visa resource com port to the same port.

Labview Serial Settings

LabVIEW must also be configured with the same baud rate and flow control settings as the XBEE

LabVIEW VISA Settings

Baud Rate: 38400

Data Bits: 8

Parity: None

Stop Bits: 1

Flow: None

Configuring XBEE modules

THe Xbee modules are currently configured at 38400 baud. The baud rate has been chosen to

minimise checksum errors over a transmission distance of approximately 80-100meters through

double brick walls/glass. USE AT commands to change the configurable parameters.

Both XBEE modules must be configured with exactly the same settings

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 50

XBEE Baud Rate

Attach the Xbee Module to the USB dongle

Insert the USB Dongle into an Available USB port

Use Device Manager or Devices and Printers to Determine the XBEE com port

Use a terminal program ( Putty, Telnet, HyperTerminal) to connect to the XBEE making sure

to use the same settings as the Labview Parameters listed above.

The following Table Provides a list of Baud Rate Numbers

0 1200

1 2400

2 4800

3 9600

4 19200

5 38400

6 57600

7 115200

Sourced From: http://www.ladyada.net/make/xbee/ref.html

Type the following commands followed by the enter key.

-> represents a command being entered

<- represents the XBEE module Response

-> AT

< - OK

-> ATBD

< - 3

-> ATBD 4

< - OK

-> ATBD

< - 4

-> ATWR

< - OK

Sourced From: http://www.ladyada.net/make/xbee/ref.html

Hall Effect Current Sensor Calibration

A sketch included with the additional thesis documentation is used to calibrate the current sensor.

The process for calibrating the sensor can be found here:

http://www.energino-project.org/tutorials/how-to-build-energino

Note* After increasing the gain the original offset value has been known to shift.

Adjust the parameters of the Arduino Map function in the Hall Effect current sensor sketch

to fine tune the sensor.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 51

map(ADC read variable ,0 Current ADC reading, 4095.0, 0 , Maximum Calibrated current

value );

Change the 0 current ADC reading to the ADC value you measure when you have set the

OFFSET pot to output the desired voltage output with 0 current input.

The maximum ADC reading is 4095 which represents 3.3 volts and this should remain

constant.

The 0 value is the start of the mapped value and it too should remain constant

Ensure that the sensitivity of the sensor is calibrated so the rated short circuit current of the

panel DOES NOT produce a voltage that exceeds 3.3V. A Zener diode prevents voltages

above 3.3 Volts being input to the Arduino, but configuring the device with voltages above

3.3 V will give you inaccurate readings as the ADC maximum is 4095 @ 3.3 V.

After setting the offset, gain and configuring the MAP function test the current reading

accuracy using the Hall Effect current sensor sketch and a multimeter arranged in series with

the sensor.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 52

Appendix B Proof of Concept Results

An ICAP simulation was undertaken to verify that an operational amplifier could be used as a

proportional or proportional integral controller to effectively control the gate voltage of a power

MOSFET. The uC power supply represents the DAC signal from the micro-controller, which is input to

the non-inverting input of the op-amp to control the set-point voltage of the R1 resistor. The uC

power supply (the blue line) is ramped from 3V down to 1V and then back to 3V over a period of 12

seconds. The op-amp ensures that its inverting input (vinv – black line) is equal to the set-point (uC)

by modulating its output (Vo – green line). We can see that as the set-point is decreased the op-amp

“sets” the voltage at R1 to the uc set point. Furthermore, by reviewing y6 (red line - the voltage drop

on the MOSFET) we can see that the MOSFET voltage drop increases as less voltage is dropped

across the R1 resistor. This simulation successfully demonstrated the viability of the proposed

control circuitry.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 53

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 54

Appendix C Detailed Arduino Control Algorithm

This flow chart indicates the sequence of the control algorithm programmed on the Due. The chart

details the loop structures and the sub processes carried out within them. The chart is meant to give

a detailed view of the sequence of the program while remaining simple to follow. The chart is not an

exhaustive list of every line within the program but covers the sequences comprehensively. The

complete code is available on the CD deposited with this thesis. The flow chart is intended to act as

an aid to understanding the actual Arduino code.

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 55

M a r c P u r v i s E N G 4 6 0 : E n g i n e e r i n g T h e s i s P a g e | 56