After additional research on the circuit model for solar cells and panels and the characteristics of panels in series-parallel arrays, I've decided the use of more than one sensing resistor is impractical unless a major electronic design change is made.
Panels in series have a voltage that is the sum of the individual voltages and a current equivalent to the smallest current. If several panels are in series and all but one have current of ten amps, and the remaining panel has a current of eight amps, the string current will be eight amps.
Panels in parallel have a voltage equal to the average of all the individual voltages and a total current equal to the sum of individual currents.
Placing all panels in parallel will allow measuring the individual currents but the charge controller requires three times the voltage for optimum performance, hence the series connection.
A electro-mechanical, or solid state, switch/relay could be placed in series with each panel and each panel electrically isolated in turn, for measurement. This would take a few milliseconds. The need for the data does not warrant such a step. Panels generally carry an industry wide warranty of twenty five years with derating. I may use one sensing resistor for the array in its entirety to check on the accuracy of the charge controller and as a general indicator of the array's status.
The equivalent circuit for a solar cell:
Sunday, April 2, 2017
Wednesday, March 1, 2017
Sensing resistor calculations; solar energy variation
As a precursor, let me reiterate, these blogs are for intelligent people with a university background and courses in mathematics, engineering, physics and other of the hard sciences.
The use of a charge controller, generally, obviates the need for blocking diodes, but not always.
Their installation is a safety measure.
Along with blocking diodes, bypass diodes need to be installed. Bypass diodes allow energy to flow around panels in series-parallel. If one panel in a string gets shaded, the diodes allow energy to flow around the panel, leaving the other panels in the string operational. If three panels are connected in series, and there are several such strings connected in parallel, shade can reduce the output of an entire string when only one panel is shaded.
Current sensing resistors allow detection and measurement of each panels output. They serve to measure and verify the efficiency of the charge controller. An additional wire also lets the voltage be measured for each panel and the power can then be calculated.
Knowing what's going on with each panel, and not just the array as a whole, improves safety and reliability. If a panel starts dropping in power under full sun, then operator can do a manual inspection for stray objects, leaves, or snow. If no objects are responsible, then the panel is wearing out or going bad and needs to be replaced. Each panel varies from specifications to some degree. Panels can be better matched if their real parameters can be measured.
The current sensing resistors used need to be of a very low value. A value less than one is common. In my case, i'll be using 0.01 ohm 5 watt resistors. The maximum current for the type of panels I'm using is around 8 amps. The typical power output for a fully illuminated panel is 100 watts at 12 vdc. The resistor power rating can be calculated : 8 amps x 0.01 ohm = 0.08vdc. And 0.08vdc x 0.08 amps is 0.64 watts. My choice of 5 watt resistors will allow me to use the same resistor for an overall measure of the array output of about 600 watts. The array is composed of two parallel strings of three panels, in series, each, for an array voltage of 36 vdc. Two parallel strings results in a typical current of 8 amps per string, therefore, 16 amps for the array as a whole. Given 16 amps x 0.01 ohms, the power dissipated is calculated: 16 amps x 0.01 ohms = 0.16volts; 0.16 vdc x 16 amps = 2.56 watts, leaving enough headroom to insure the resistor does not burn up during surges.
The output of a solar panel will vary throughout the year since the highest position of the sun in the sky during the day, changes with the seasons. My array is at a geographic latitude of 36.34 degrees. This means the sun will never be directly overhead, and therefore, at its hottest. The energy of the sun's rays is reduced by the atmosphere and the light has to pass through more atmosphere when the sun illuminates the panels from an angle. The amount of atmosphere the light rays pass through is least when the sun is directly overhead. The adjustment of the position of the panels with respect to the sun, ameliorates the effect to some degree. The effect of the combination of incident light angles for the sun and the panel can be minimized. The only way to reduce the effect of the sun's lower zenith in winter, is to move to the equator. Even then, the sun is further from the earth and that, too, will reduce the intensity of the sun's rays. If the nutations of the earth are taken into account, the sun will, still not reach a point directly overhead at thie latitude mentioned.
The use of a charge controller, generally, obviates the need for blocking diodes, but not always.
Their installation is a safety measure.
Along with blocking diodes, bypass diodes need to be installed. Bypass diodes allow energy to flow around panels in series-parallel. If one panel in a string gets shaded, the diodes allow energy to flow around the panel, leaving the other panels in the string operational. If three panels are connected in series, and there are several such strings connected in parallel, shade can reduce the output of an entire string when only one panel is shaded.
Current sensing resistors allow detection and measurement of each panels output. They serve to measure and verify the efficiency of the charge controller. An additional wire also lets the voltage be measured for each panel and the power can then be calculated.
Knowing what's going on with each panel, and not just the array as a whole, improves safety and reliability. If a panel starts dropping in power under full sun, then operator can do a manual inspection for stray objects, leaves, or snow. If no objects are responsible, then the panel is wearing out or going bad and needs to be replaced. Each panel varies from specifications to some degree. Panels can be better matched if their real parameters can be measured.
The current sensing resistors used need to be of a very low value. A value less than one is common. In my case, i'll be using 0.01 ohm 5 watt resistors. The maximum current for the type of panels I'm using is around 8 amps. The typical power output for a fully illuminated panel is 100 watts at 12 vdc. The resistor power rating can be calculated : 8 amps x 0.01 ohm = 0.08vdc. And 0.08vdc x 0.08 amps is 0.64 watts. My choice of 5 watt resistors will allow me to use the same resistor for an overall measure of the array output of about 600 watts. The array is composed of two parallel strings of three panels, in series, each, for an array voltage of 36 vdc. Two parallel strings results in a typical current of 8 amps per string, therefore, 16 amps for the array as a whole. Given 16 amps x 0.01 ohms, the power dissipated is calculated: 16 amps x 0.01 ohms = 0.16volts; 0.16 vdc x 16 amps = 2.56 watts, leaving enough headroom to insure the resistor does not burn up during surges.
The output of a solar panel will vary throughout the year since the highest position of the sun in the sky during the day, changes with the seasons. My array is at a geographic latitude of 36.34 degrees. This means the sun will never be directly overhead, and therefore, at its hottest. The energy of the sun's rays is reduced by the atmosphere and the light has to pass through more atmosphere when the sun illuminates the panels from an angle. The amount of atmosphere the light rays pass through is least when the sun is directly overhead. The adjustment of the position of the panels with respect to the sun, ameliorates the effect to some degree. The effect of the combination of incident light angles for the sun and the panel can be minimized. The only way to reduce the effect of the sun's lower zenith in winter, is to move to the equator. Even then, the sun is further from the earth and that, too, will reduce the intensity of the sun's rays. If the nutations of the earth are taken into account, the sun will, still not reach a point directly overhead at thie latitude mentioned.
Thursday, February 23, 2017
Remote RPi and power supply
I received a buck converter in the post today. The unit has a 17vdc range input and a regulated 5vdc output. The unit will allow me to place the Raspberry Pi outdoors and use a sealed lead-acid battery as power source for day and overnight operation. The battery will have a Xantrex PWM 50W charge controller charging the battery from a single solar panel dedicated to powering the RPi, alone.
The RPi has a micro-B USB connector that is used for power input connection. I will take a matching connector and attach the other end to the buck converter.
A buck converter is a voltage converter that drops and input voltage to a lower level. A boost converter is a voltage converter that raises an input voltage level to a higher level.
The RPi is mounted on a circuit board along with a couple of other devices.
The RPi has a micro-B USB connector that is used for power input connection. I will take a matching connector and attach the other end to the buck converter.
A buck converter is a voltage converter that drops and input voltage to a lower level. A boost converter is a voltage converter that raises an input voltage level to a higher level.
The RPi is mounted on a circuit board along with a couple of other devices.
Monday, February 20, 2017
Sample graph chart produced by software
Here is a sample chart created by my software in the form of a webpage in HTML and javascript.
Click on the image for a full size view.
This is of the current data for February 20 2017 up to about 2:00PM.
Note the PV power never reaches the 600W potential for the array, but hovers around 350W, maximum.
Click on the image for a full size view.
This is of the current data for February 20 2017 up to about 2:00PM.
Note the PV power never reaches the 600W potential for the array, but hovers around 350W, maximum.
![]() |
| Just click for a view of a full size image. |
Tracking and angles
One of the most unused options in residential solar power stations is the concept of tracking. A solar panel array can be mounted in such a way as to be adjustable. An adjustable array can have it's position adjusted periodically, to follow the sun, resulting the maximum exposure of the array to the sun's light/radiation. If an array is fixed in position, there will be one period in the day when the amount of power generated will be greatest. Before and after, the power will grow or decay with decreasing exposure. When sunlight shines on a panel at an angle, there is less energy than when illuminated from a position directly above the panel. Tracking positions the array so the sun is directly above the array and not at an angle off to one side.
One of the major obstacles to tracking is mounting technology. There is no shortage or difficulty in acquiring the electronics or software use in tracking. Placing an array high in the air and on pivoting points is difficult since most hardware for the task is not in the hands of the consumer. Companies that specialize in medium to large installations can install such a system, but the cost is usually much more that the average consumer can afford. Retail, turn-key solar power stations are not cheap. My knowledge and experience in electronic engineering and advanced mathematics gives me an edge in such a pursuit. I can find out what I don't know and need to, then learn. Slow, maybe, but successful.
My background in personal computing devices and programming has prepared me for the task of assembling or writing software and hardware for the task. Like anyone else, however, I'm stumped when it comes to mounting an array for tracking. I've considered many, many possibilities, both conventional, and not. For example, I considered finding the largest automotive universal joint possible (think Hum-V or tractor trailor, possibly a tank) and using that as my primary pivot point.
I also considered a popular option version used by installation companies based on worm gears or slew drives. Affordable and accessible by the consumer. The steel pipe/post which holds those devices is another matter. The closest I've come to locating that resource is one of the basketball posts found in many school yards or church yards. A steel pipe is mounted on another piece of pipe embedded in concrete and having a flange welded/molded to the top. The flange is circular and has several bolt holes to match with a similar flange on the bottom of the pipe with the basketball goal.
The approach I finally decided on uses a device known as a linear actuator, effectively, a motorized arm. The unit resembles the pneumatic lift in the rear hatch of a hatchback automobile or the shock absorber in a car. The one I picked is designed for use in rugged conditions, including outdoors, and can push or pull 10,000 Newtons. That's approximately one ton. The array consists of 6-12 solar panels of about 20 lbs. each, two steel struts about 20 lbs each and a steel pipe about 20 lbs. Eventually, the array will weigh about three or four hundred pounds. Fortunately, the linear actuator will only have to push/pull the vertical vector from a 45 degree angled array. This means that only part of the weight of the array will need to be accommodated by the actuator. The linear actuator rod extends/retracts ten inches. The unit will have to be placed close enough to the center of the array that the ten inch push/pull will result in a change in angle of the array of at least 120 degrees. That will be close to the center. Given the closeness of the position, the force required to move the array will be greater than if the rod extended longer and could be placed further from the center of the array.
The array can track the sun using one or both of two methods: sensor detection of the sun; and calculated sun position. The expected position of the sun at a given date and time can be calculated and used to position the array. Small solar cells, about an inch or more in size, can be used to detect the sun's position by the comparison of the power produced by each of the cells when they are mounted at relative positions corresponding to a cross. One high, one low, one left, and one right of center and mounted on the array to increase reliability and accuracy.
One can serve as a check or verification of the other.
The amount of energy acquired by tracking, compared to a fixed, unmoving array is worth the extra cost and work.
Currently, I have 600W in six panels that produce only 350W at sun's highest point at my latitude (something else to consider when setting up an array). The time of year is the middle of winter, so the sun does not rise very high in the sky, and is never directly overhead, even in summer, due to the effect of latitude. By tracking the sun, I can point the array directly at the sun in the morning and keep the array pointed at the sun throughout the day. This will move my solar power production closer to the 600W@10hours per day I can achieve.
One of the major obstacles to tracking is mounting technology. There is no shortage or difficulty in acquiring the electronics or software use in tracking. Placing an array high in the air and on pivoting points is difficult since most hardware for the task is not in the hands of the consumer. Companies that specialize in medium to large installations can install such a system, but the cost is usually much more that the average consumer can afford. Retail, turn-key solar power stations are not cheap. My knowledge and experience in electronic engineering and advanced mathematics gives me an edge in such a pursuit. I can find out what I don't know and need to, then learn. Slow, maybe, but successful.
My background in personal computing devices and programming has prepared me for the task of assembling or writing software and hardware for the task. Like anyone else, however, I'm stumped when it comes to mounting an array for tracking. I've considered many, many possibilities, both conventional, and not. For example, I considered finding the largest automotive universal joint possible (think Hum-V or tractor trailor, possibly a tank) and using that as my primary pivot point.
I also considered a popular option version used by installation companies based on worm gears or slew drives. Affordable and accessible by the consumer. The steel pipe/post which holds those devices is another matter. The closest I've come to locating that resource is one of the basketball posts found in many school yards or church yards. A steel pipe is mounted on another piece of pipe embedded in concrete and having a flange welded/molded to the top. The flange is circular and has several bolt holes to match with a similar flange on the bottom of the pipe with the basketball goal.
The approach I finally decided on uses a device known as a linear actuator, effectively, a motorized arm. The unit resembles the pneumatic lift in the rear hatch of a hatchback automobile or the shock absorber in a car. The one I picked is designed for use in rugged conditions, including outdoors, and can push or pull 10,000 Newtons. That's approximately one ton. The array consists of 6-12 solar panels of about 20 lbs. each, two steel struts about 20 lbs each and a steel pipe about 20 lbs. Eventually, the array will weigh about three or four hundred pounds. Fortunately, the linear actuator will only have to push/pull the vertical vector from a 45 degree angled array. This means that only part of the weight of the array will need to be accommodated by the actuator. The linear actuator rod extends/retracts ten inches. The unit will have to be placed close enough to the center of the array that the ten inch push/pull will result in a change in angle of the array of at least 120 degrees. That will be close to the center. Given the closeness of the position, the force required to move the array will be greater than if the rod extended longer and could be placed further from the center of the array.
The array can track the sun using one or both of two methods: sensor detection of the sun; and calculated sun position. The expected position of the sun at a given date and time can be calculated and used to position the array. Small solar cells, about an inch or more in size, can be used to detect the sun's position by the comparison of the power produced by each of the cells when they are mounted at relative positions corresponding to a cross. One high, one low, one left, and one right of center and mounted on the array to increase reliability and accuracy.
One can serve as a check or verification of the other.
The amount of energy acquired by tracking, compared to a fixed, unmoving array is worth the extra cost and work.
Currently, I have 600W in six panels that produce only 350W at sun's highest point at my latitude (something else to consider when setting up an array). The time of year is the middle of winter, so the sun does not rise very high in the sky, and is never directly overhead, even in summer, due to the effect of latitude. By tracking the sun, I can point the array directly at the sun in the morning and keep the array pointed at the sun throughout the day. This will move my solar power production closer to the 600W@10hours per day I can achieve.
Friday, February 17, 2017
Software continued
Among the difficulties encountered, are the coordination of tasks among several different languages. The timeline begins with data being read from hardware, a file is opened and the data written to the file. The file name is taken from the current date, the reasoning is, the current date constitutes a unique identifier that insures no two files will have the same name. The script reading the data is initiated by a service script used by the computer operating system to schedule tasks. The 'service' calls the data reader script. That script runs another script that gets the calculated solar azimuth and elevation for the current time. There is an option in that script to get previous and next sunrise and sunset times used in setting the schedule. A service timer script may eventually be used instead of rise and set times. The azimuth and elevation data are written to the opened data file along with the hardware derived data. The data reader also calls another script that creates a webpage that gives a brief overview of the station's current activity. Another webpage, pre-written, opens the day's data file and draws a line graph chart based on that data. Two data reader scrips/services run simultaneously. One collects all 22 variables every 30 seconds. The other collects four variables' data. The latter is the brief form and is the one from which the line graph is drawn.
All of this is done with several scripts and 5 languages. An additional modification will create a permanent image of the line graph chart for long term storage, a snapshot of that day's activity.
With all of this, there still remains the programming of the linear actuator(s) that will position the array for maximum exposure to the sun. Some improvements in the area of charting and data storage may be in the future. The computer uses a 16gb SD card for main storage. A packing program could reduce the amount of storage space used by the accumulating data files, by 80%. The amount of storage space used by, even a year's, data, is so small as to make the amount almost negligible.
Changes made in the computer include downloading and installing many programs. The computer is programmed for wi-fi, both as a client, and as a server. This makes remote collection of accumulated data easier than going to the station and physically hooking a laptop or other device, to the computer to get the files. The languages have to be installed. Programs associated with several pieces of externally added hardware have to be installed and configured. Periodic tests have to be run during the computer setup to insure each program is installed correctly, before moving on to the next stage. One mis-configured application can cause, seemingly, mysterious problems later on.
Once the computer is setup, a system test is needed to make sure everything is running together smoothly. Hardware tests improve reliability. Among the additional hardware are the analog-to-digital converters that convert voltage and current readings to the binary language usable by computers. The current sensing resistors, bypass diodes, sun sensor cells, fuses/breakers, all have to be tested and calibrated.
All of this is done with several scripts and 5 languages. An additional modification will create a permanent image of the line graph chart for long term storage, a snapshot of that day's activity.
With all of this, there still remains the programming of the linear actuator(s) that will position the array for maximum exposure to the sun. Some improvements in the area of charting and data storage may be in the future. The computer uses a 16gb SD card for main storage. A packing program could reduce the amount of storage space used by the accumulating data files, by 80%. The amount of storage space used by, even a year's, data, is so small as to make the amount almost negligible.
Changes made in the computer include downloading and installing many programs. The computer is programmed for wi-fi, both as a client, and as a server. This makes remote collection of accumulated data easier than going to the station and physically hooking a laptop or other device, to the computer to get the files. The languages have to be installed. Programs associated with several pieces of externally added hardware have to be installed and configured. Periodic tests have to be run during the computer setup to insure each program is installed correctly, before moving on to the next stage. One mis-configured application can cause, seemingly, mysterious problems later on.
Once the computer is setup, a system test is needed to make sure everything is running together smoothly. Hardware tests improve reliability. Among the additional hardware are the analog-to-digital converters that convert voltage and current readings to the binary language usable by computers. The current sensing resistors, bypass diodes, sun sensor cells, fuses/breakers, all have to be tested and calibrated.
Wednesday, February 1, 2017
Software
I've been working with the software. I use a combination of PHP, Python, Bash, and HTML-javascript.
The reason for so many languages is some things are done more easily in one language than another. Python is better with the hardware end of things and PHP is better with the web and HTML/Javascript.
The situation is:
A bash script run as a systemd service/daemon calls a PHP script which collects data from the hardware, namely, the charge controller charging the batteries using energy from the solar array. The charge controller contains a UART that performs communications tasks with the external world. The PHP script calls a Python script to calculate astronomical data for determining the current location of the sun by calculation. The PHP script then modifies the data and stores the end product in a file along with data to be plaotted, from the charge controller. A HTML file runs Javascripts to open the data file and read the contents. A chart is then drawn on the web page and a line of the activity of several variables, is plotted. The chart is a real time data provider.
The plot is updated each minute with additional data. Another Python script calculates the times for sunrise and sunset and uses that information to run the data collection process between sunrise and sunset, and suspend data collection and storage from the hardware.
The charge controller hardware collects data 24/7 using a UART to communicate in RS-485 protocol with a RJ45 connector plugged into the Raspberry Pi's USB port using a RJ-45 to USB cable.
A hardware clock module has been added to the Raspberry Pi (RPi) to maintain accurate and consistent, system time. The module uses a small lithium battery to maintain settings storage during times when the RPi is shutdown (off). The battery will run down, though, if left un-refreshed long enough. I need to add a larger lithium battery. I have one from an old iPhone that should last several weeks, if not months, offline.
I'm going to add sensing resistors in the return loop ( in the case of the Chinese charge controller, the positive line). This will allow me to keep a separate record of the detailed activity of the solar array. A side benefit exists of allowing me to examine the efficiency of the charge controller. The controller uses the positive line for ground return. This is not the way most Western systems are configured. This will work since the inverter output is lfoting (unugrounded). Without grounding, both lines from the array float about 16vdc above ground. This is more than the Analog to Digital converters I will be using can stand. When I ground the positive line of the arry, The differentials, less than 1 vdc, will be close to ground (0vdc) and easy to measure with a voltage divider on the ADC inputs.
The charge controller uses a mathematical algorithm to estimate the state of charge of the battery bank. I will be able to determine if I need to find a better device.
Eventually, I will move all of the electronics outside and into a weatherproof container, including one or more small batteries for the RPi. I will use a buck converter to convert the 12 volts D.C. from the batteries to the 5 volts D.C. needed by the RPi.
A linear actuator will rotate the array to a position optimum for collecting solar energy. Relays will be programmed by the RPi to engage the actuator motor. The actuator is capable of moving 10,000 Newtons, or about one ton. The array will weigh about 500 pounds and have 12 panels mounted on a steel pipe using something similar to U-bolts. The 'tracking' will be in two dimensions at first, and later, in three.
The reason for so many languages is some things are done more easily in one language than another. Python is better with the hardware end of things and PHP is better with the web and HTML/Javascript.
The situation is:
A bash script run as a systemd service/daemon calls a PHP script which collects data from the hardware, namely, the charge controller charging the batteries using energy from the solar array. The charge controller contains a UART that performs communications tasks with the external world. The PHP script calls a Python script to calculate astronomical data for determining the current location of the sun by calculation. The PHP script then modifies the data and stores the end product in a file along with data to be plaotted, from the charge controller. A HTML file runs Javascripts to open the data file and read the contents. A chart is then drawn on the web page and a line of the activity of several variables, is plotted. The chart is a real time data provider.
The plot is updated each minute with additional data. Another Python script calculates the times for sunrise and sunset and uses that information to run the data collection process between sunrise and sunset, and suspend data collection and storage from the hardware.
The charge controller hardware collects data 24/7 using a UART to communicate in RS-485 protocol with a RJ45 connector plugged into the Raspberry Pi's USB port using a RJ-45 to USB cable.
A hardware clock module has been added to the Raspberry Pi (RPi) to maintain accurate and consistent, system time. The module uses a small lithium battery to maintain settings storage during times when the RPi is shutdown (off). The battery will run down, though, if left un-refreshed long enough. I need to add a larger lithium battery. I have one from an old iPhone that should last several weeks, if not months, offline.
I'm going to add sensing resistors in the return loop ( in the case of the Chinese charge controller, the positive line). This will allow me to keep a separate record of the detailed activity of the solar array. A side benefit exists of allowing me to examine the efficiency of the charge controller. The controller uses the positive line for ground return. This is not the way most Western systems are configured. This will work since the inverter output is lfoting (unugrounded). Without grounding, both lines from the array float about 16vdc above ground. This is more than the Analog to Digital converters I will be using can stand. When I ground the positive line of the arry, The differentials, less than 1 vdc, will be close to ground (0vdc) and easy to measure with a voltage divider on the ADC inputs.
The charge controller uses a mathematical algorithm to estimate the state of charge of the battery bank. I will be able to determine if I need to find a better device.
Eventually, I will move all of the electronics outside and into a weatherproof container, including one or more small batteries for the RPi. I will use a buck converter to convert the 12 volts D.C. from the batteries to the 5 volts D.C. needed by the RPi.
A linear actuator will rotate the array to a position optimum for collecting solar energy. Relays will be programmed by the RPi to engage the actuator motor. The actuator is capable of moving 10,000 Newtons, or about one ton. The array will weigh about 500 pounds and have 12 panels mounted on a steel pipe using something similar to U-bolts. The 'tracking' will be in two dimensions at first, and later, in three.
Subscribe to:
Posts (Atom)
Battery bank wiring modification
The battery bank has been wired in parallel with system connections at the closest battery. This creates an unbalanced load on the bank. ...
-
In a recent post I presented the equation for energy incident on a solar panel (Sm). Here I present the set of equations used to calcu...
-
This java script makes sure the date is correctly interpreted between PHP and HTML. I found this on the web: CODE //<script> /** ...
-
A python script to calculate solar position without use of ephemeris library. The script is imperfect. When the sun goes down, the posit...

