Maker Portal

View Original

Solar Panel Characterization and Experiments with Arduino

“As an Amazon Associates Program member, clicking on links may result in Maker Portal receiving a small commission that helps support future projects.”

See this content in the original post

See this content in the original post

There are many components used in this project, ranging from the solar panel itself to the voltage/current sensor (INA226) and SD module. The full parts list is given below, for reference. We have also developed a kit that contains the most important components used in the project, though all parts can be sourced individually either from our shop or elsewhere.

Parts List:

See this content in the original post

The wiring diagram for the collective system is given below:

Note: we have omitted any explanation of the wiring configuration in order to declutter the tutorial, however, most of the wiring explanations can be found either on our site or in other literature/forums online. We will discuss the solar panel, potentiometer (rheostat), and INA226 current/voltage configuration later in the experimental setup section. The rest are left for the user to explore.

See this content in the original post

See this content in the original post

Solar panels often consist of an array of photovoltaic cells arranged in a way that produces a desired power output at a given voltage and current configuration. This allows users and operators to select the load based on the desired output or the panel based on the load requirement. This is why the characterization of solar panels and PV cells is of utmost importance, for both the assurance of power generation and safety of operation. That being said, sometimes it is more advantageous to model solar panels rather than develop them and characterize them later. Unfortunately, PV array models are complex and involve many co-dependent components, all of which impact the behavior, and thus the output, of the solar panel. The simplest model for a PV cell can be written as the relationship between voltage and current, as follows:

See this content in the original post

If we were to plot this relationship, we would get the following profile:

This is the simplest representation for a solar cell. Notice that there are no numbers on the plot - this is due to the fact that we need to know a bit more about the system before we attach any real-world values to anything.

For any practical application, the solar measurement will include some electrical components which will affect the profile shown in the figure above. Thus, in most models of PV cell power output involve at least shunt and series resistors. The resulting equivalent circuit is as follows:

See this content in the original post

If we were to setup the equation that solves for current as a function of voltage using the circuit above, we arrive at the common and applicable PV expression:

See this content in the original post

And here we have a more complex and difficult to solve implicit equation that relates parameters of the system to the power output potential of the cell (voltage multiplied by current). There are numerous references that have parametrically solved or empirically solved for voltage as a function of current and vice-versa, however, that is surely outside the scope of this tutorial. Often, simplifications are made relating to the series and shunt resistances, which can make the equation above somewhat easier to solve. The equation in almost all circumstances remains an implicit equation, which pushes it just outside our analysis here. We will, however, be able to demonstrate an empirical curve similar to the one shown above, which is part of the final analysis section of this project.

Solar Cell Theory References:

- Dittrich, Thomas. “Basic Characteristics and Characterization of Solar Cells.” Materials Concepts for Solar Cells, 2nd. April 2018. pp. 3-43.

- González-Longatt, Francisco M. "Model of photovoltaic module in Matlab." Ii Cibelec 2005 (2005). pp. 1-5.

- Hamadani, Behrang H., and Brian Dougherty. “Solar cell characterization.” Semiconductor Materials for Solar Photovoltaic Cells. Springer, Cham, 2016. pp. 229-245.

- Lorenzo, Eduardo. Solar electricity: engineering of photovoltaic systems. Earthscan/James & James, 1994. pp. 87-113.

- Maammeur, H., A. Hamidat, and L. Loukarfi. “A numerical resolution of the current-voltage equation for a real photovoltaic cell.” Energy Procedia 36 (2013). pp. 1212-1221.

- Raj, Shubham, Ankit Kumar Sinha, and Ashish K. Panchal. "Solar cell parameters estimation from illuminated I-V characteristic using linear slope equations and Newton-Raphson technique." Journal of Renewable and Sustainable Energy 5.3 (2013): 033105.


See this content in the original post

We will be using the BLExAR app to log the initial solar panel response to the changing rheostat values. The app is not required, however, it allows for real-time monitoring of the rheostat turns to track the voltage and current read by the INA226 meter. The BLExAR app is available for Android and iOS at the links below:

See this content in the original post

The full set of codes used below can be found at the project’s Github page:


See this content in the original post

We first need to characterize the panel’s output range to find the optimal operating voltage. We do this by turning the rheostat (potentiometer) from minimum to maximum in order to vary the load on the solar panel. First, the Arduino code that logs and prints voltage and current must be uploaded to the microcontroller. In our case, we’re using the BLE-Nano, which acts similar to the Arduino Nano and Uno boards (ATmega328P at the center).

The code used to log and print voltage and current is given below (and at the Github repo):

See this content in the original post

A few notes on the experiment:

  • Make sure the solar panel is in full view of the sun. Try to avoid shadowing.

  • Make sure to start from one end of the potentiometer and slowly turn to the other extreme (this will create a nice smooth profile).

  • If an error occurs, such as with clouds or accidental covering of the panel, then just restart the Arduino and try again. The program clears the solar log file after each reset.

  • The rheostat should produce maximum current and minimum voltage when fully turned counterclockwise, and when turned fully clockwise it should produce maximum voltage and minimum current.

Assuming the user was able to follow the directions above closely, we can take the data saved to the SD card and analyze it using the Python script entitled:

solar_rheostat.py

The script is also given below for reference:

See this content in the original post

Notice that we have introduced start and end adjustment points - this is based on the fact that some of the initial and final data may be obfuscated by the user interfering when starting or stopping the data acquisition. If the user carried out the experiment correctly and successfully ran the Python 3 analysis script given above, they should see an output plot similar to the one shown below:

There are quite a few observations one can make regarding the behavior shown in the plot above:

See this content in the original post

Some of these parameters may seem arbitrary, however, they identify many of the common benchmarks cited by manufacturers in solar cell and panel specifications. Some models also develop empirical models and extrapolate them to approximate power output over various scenarios and periods of time. An example empirical model can be found at:

- Durgadevi, A., S. Arulselvi, and S. P. Natarajan. "Photovoltaic modeling and its characteristics." 2011 International Conference on Emerging Trends in Electrical and Computer Technology. IEEE, 2011.

- Petreus, Dorin, Ionut Ciocan, and Cristian Farcas. "An Improvement on empirical modelling of photovoltaic cells." 2008 31st International Spring Seminar on Electronics Technology. IEEE, 2008.

In the next section, we will use the peak power voltage to set the load on the rheostat and investigate a full day’s power output from the solar panel at that load setting.


See this content in the original post

For our specific experiment, we left the entire box outside for a day with the solar panel mounted atop the box. The panel was pointed slightly east at an angle less than 15° (due to the slight opening of the box), but mostly vertical to ensure the highest power output. The box was left outside from 8:00 a.m. June 15th, 2021 until roughly 9:00 a.m. June 16th, 2021 in northeastern San Francisco, CA. The rheostat was tuned to 1.65V based on the peak power point found above. Data points were acquired roughly every 60 seconds, based on the longterm Arduino code on the project’s Github page:

- solar_longterm.ino

After retrieving the box after an entire day’s worth of datalogging, we can then use the Python 3 script for the diurnal analysis:

- solar_diurnal.py

Running the diurnal analysis code results in the following plot:

The top plot shows the raw time-series plot of the power output from the solar panel. There were a few drops in output on the morning of June 16th due to cloud cover, which is noted in the weather log for that morning:

Courtesy of Weather Underground: https://www.wunderground.com/history/daily/us/ca/san-francisco/KSFO/date/2021-6-16

The bottom portion of the plot shows the average diurnal output of the solar panel on an hourly basis. We can sum these values (since they are hourly) and call this value the daily solar output from the panel. Summing these values we get about 1.5W, which can be interpreted as 1.5W/day. Next, if we use the effective area of each solar cell, which in our case is 30mm x 10mm, multiplied by 4x (n = 4) because of the four cells in the panel, we can get the power density per day:

See this content in the original post

Finally, by assuming the panel material is of crystalline silicon, which is common for smaller and cheaper panels, we can predict an efficiency between 20%-25% (see solar efficiency tables for examples). With this efficiency in mind, we can make a very rough calculation of the incident solar insolation. Since solar insolation is fairly well documented, it will give us a decent idea of how the solar cell is performing. Dividing the power density above by an efficiency of 22% results in the following approximation of incident solar energy:

See this content in the original post

As a check, we can find observations of solar insolation for San Francisco across the literature:

- Dey, Sumon, Madan Kumar Lakshmanan, and Bala Pesala. "Optimal solar tree design for increased flexibility in seasonal energy extraction." Renewable Energy 125 (2018). pp. 1038-1048.

- Mitchell, L., et al. "Impact of microclimates on solar resource: Case study of the solar resource in San Francisco." 2010 35th IEEE Photovoltaic Specialists Conference. IEEE, 2010.

- Karis, Robert. “San Francisco Solar Power Map.” (accessed June 16th, 2021).

See this content in the original post

The result calculated above tells us that our solar panel is operating as expected, under the assumption that its efficiency is somewhere around 20% and the solar insolation for the day of observation was somewhere around 4.6 kWh/

See this content in the original post

See this content in the original post

This tutorial focused on a real-world experiment involving a solar panel and Arduino datalogging system. The goal of this work was to explore how the electrical, physical, and solar variables affect the output measured by a solar panel. Using an Arduino board, SD datalogger, LiPo battery, and INA226 power meter - we were able to demonstrate the behavior and identify many of the characteristics of a solar panel. First, we varied the load at (near) peak solar insolation to identify the panel's nominal open-circuit voltage, short-circuit current, max power voltage and current, and max power output. These values helped us understand the optimal region of operation for the panel, while also opening the door for modeling and power prediction. We also conducted a daylong experiment that acquired data points every 60 seconds. Finally, we were able to identify the total daily power production and approximate the incident solar irradiation for the day. The experiment demonstrated the capabilities of Arduino, low-cost sensors, and the approachability of a real-world experiment with widely available hardware.

See this content in the original post

See more in Engineering and Arduino:

See this content in the original post