Problem and Solution Overview:
In 2018, a fire broke out on the roof of a Walmart in Beavercreek, Ohio due to Tesla`s unmaintained solar panels suffering from hot-spots. These hot-spots resulted in the cracking of the back sheets of the solar modules and compromised their electrical insulation. There was no protection system to detect this type of unwanted behavior and shut down the system before a fire broke out. As a result, Walmart sued Tesla over the flaws present in their solar panels and an overall lack of system protection.
A smart interface box attached to each solar panel that has the ability to shut off the entire operation in the event certain failure conditions (over-current, over-voltage, and overheating) are met and allows users to remotely monitor system behavior/parameters could help prevent a disaster like Walmart`s. In addition, the ability to remotely configure the number of cells on the solar panel delivering power to the load would be particularly useful to researchers.
High Level Requirements:
- The output of the interface box will be configurable to be connected to either 32 cells, 64 cells, or 128 cells on the solar panel.
- The output of the interface box will be disconnected from the load in the event a solar panel failure condition occurs (over-voltage, over-current, or overheating), or the isolated 12 V supply powering the interface box is no longer connected.
- The end user will be able to remotely monitor system parameters (e.g. output configuration, output current, voltages on all solar panel partitions, output power, and temperatures) and will also be able to remotely configure various system parameters (e.g. set output configuration and set failure condition thresholds).
Block Diagram:
The interface box for the solar panel consists of seven important subsystems: the Voltage/Current Monitoring Subsystem, Ethernet Interface, Micro-controller/Processing Subsystem, Power Subsystem, Switching Subsystem, LED’s, and Manual Configuration Switches.
The Power Subsystem is responsible for generating from a 12V power source all of the voltage rails necessary for the interface box to operate as expected as well as toggling power to the interface box in general.
The Switching Subsystem connects the appropriate solar panel cell combination (32 cells, 64 cells, or 128 cells) to the output of the interface box, and this subsystem is controlled by the Microcontroller Subsystem.
The Voltage/Current Monitoring Subsystem is responsible for measuring the voltages of all possible output configurations and the current delivered to the load, as well as reporting that information when requested by the Microcontroller Subsystem.
Thermocouples are mounted directly on the solar panel and feeds temperature data directly into the Microcontroller Subsystem.
The Ethernet Interface is necessary for ensuring that the interface box is able to connect to a network/server and, additionally, allows a remote user to monitor and configure the interface box. When the Ethernet Interface is not being utilized, users can control the output configuration and toggle the output via the Manual Configuration Switches which are mounted on the interface box.
LED’s aid in manual configuration by indicating interface box power, whether the output is enabled, and whether the Ethernet interface is being used.
Lastly, the Microcontroller Subsystem acts as the central processing unit of the system and is responsible for carrying out commands sent through the Ethernet Interface by the user (or the Manual Configuration Switches if Ethernet is not being used), monitoring for failure conditions that occur, setting the appropriate output configuration, and setting the LED’s to their appropriate states.
Mechanical Design:
The design does not require any extensive mechanical components, but does require a weatherproof enclosure and cable glands to protect it from outside elements (e.g. rain and water).
Block Descriptions:
Solar Panels:
Before delving into each subsystem contained in the interface box, it is important to discuss the inner workings and specifications of the solar panel that this system is designed for.
As a part of requirements laid out above, the interface box needs to be able to control the output configuration such that the load is connected to one of three different solar cell combinations: 32 cells, 64 cells, and 128 cells. From the structure of the solar panel, it was determined that there were three partitions of cells wired in series on the panel: two 32 cells partitions, and one 64 cell partition. There are also bypass diodes between each of these partitions to ensure none of the partitions are consuming power if they are shaded. For the purposes of the design, this information was used to create a voltage source model of the panel as shown in the figure below. V32 and V64 are the voltages across the 32 cell and 64 cell partitions, respectively. Using the open circuit voltage in the specifications above and assuming that each cell generates the same voltage, we can calculate the expected voltages of the sources: V32=21.4V and V64=42.8V.
Knowing that the output of the interface box must be connected to either 32 cells, 64 cells, or 128 cells, the possible output configurations chosen to satisfy this requirement are A-D (128 cells), B-C (64 cells), C-D (32 cells), or simply not connected at all.
Switching Subsystem:
After defining the four required output configurations of the interface box above, we can discuss the implementation of this in the Switching Subsystem. The figure below shows the schematic of the Switching System. The primary switching components responsible for setting the output configuration are two double pole double throw (DPDT) relays that are controlled by two I/O pins on the microcontroller. The choice of relays was determined by the maximum voltages and currents they would encounter in any mode of operation. The output of the Switching Subsystem (denoted by RELAY_OUT+ and INTERFACE_OUT-) will be connected to some combination of solar panel connections depending on which relays are actuated. For the purposes of ensuring that the solar panel is ground referenced when the output of the interface box is disconnected, PANEL_D is connected to GND.
The relays are driven through a simple MOSFET control circuit. To avoid high currents being drawn through the 5V voltage rail, the 12 V source was chosen to actuate the relays; however, in this configuration, the microcontroller’s digital I/O pins, connected through the RELAY_0 and RELAY_1 pins, can still control the state of the relays. When one of these I/O pins is HIGH, the N-channel MOSFET turns on allowing current to flow through the relay coil thereby actuating the device. Because relay coils are largely inductive, sudden changes in current can lead to voltage spikes that can potentially damage the MOSFET. To diminish this effect, a Schottky diode was placed in parallel to the relay coil such that it is reverse biased when the relay is on and forward biased immediately after turning off the MOSFET. The pull down resistor at the gate of the MOSFET ensures that even if the microcontroller turns off (e.g. if the 5V regulator fails or the 12V supply is disconnected), the relays will remain off and the output disconnected.
To ensure that the voltage spikes generated by suddenly changing the current through the relay coil are not damaging to the MOSFET, the driver circuitry was simulated in LTspice. The first figure below shows the circuit simulated. The relay coil was modeled as an inductor in series with a resistor. These values were chosen based on the datasheet of the relay. The second figure below shows the drain voltage when the relay is turned off. This voltage spike is less than 13 V and is suitable for the MOSFET chosen.
Voltage/Current Monitoring Subsystem:
Connecting directly to the output of the switching subsystem, the Voltage/Current Monitoring Subsystem is responsible for measuring current delivered by the solar panel to the electrical load as well as the voltage across the three sources in the solar panel. The schematic of the Voltage/Current Monitoring Subsystem is shown in the figure below. The subsystem has two outputs: one that communicates current/voltage data to the microcontroller via an I2C bus (labeled SDA and SCL on the schematic) and another that passes power generated by the solar panel through the Switching Subsystem to the output of the interface box. The subsystem is powered by the 5V line from the Power Subsystem.
Because these solar panels are going to be used by researchers, having more accurate measurements for voltages and currents will be beneficial so long as costs are reasonable. Given that the solar panels have an open circuit voltage of 85.6V and a short circuit current of 6.21A, it was determined that a 10mV and 10mA resolution on voltages and currents would be suitable for this application.
To achieve accurate voltage and current sensing and provide this information back to the microcontroller, a four channel 16-bit analog to digital converter (ADC) with an input range of 0-5V was utilized. This IC has an I2C interface which it can use to communicate the voltage at any of its channels to the microcontroller. Three of the four channels are used for voltage sensing and the fourth is for current sensing.
To sense voltage in a safe manner, the voltages present at each of the partitions of the solar panel need to be stepped down first. This was achieved using three sets of voltage dividers attached to PANEL_A, PANEL_B, and PANEL_C to ensure that the voltage at the input pins of the ADC were within the 0-5V range. The resistors of voltage dividers were chosen to be high impedance to minimize power dissipation in this subsystem. They were also chosen such that when the solar panel is open circuited, the output of the voltage dividers will be approximately 4.5V. Doing so allows for the detection of any rise in voltage and the opportunity to shut down the entire system if a failure condition occurs. Knowing the bit resolution of the ADC and the values of resistors in the voltage dividers, we can calculate the voltage resolution that can measured at the solar panel terminals for each ADC channel. Equation 1 shows the voltage resolution of the first channel. Equation 2 shows the voltage resolution of the second channel. Equation 3 shows the voltage resolution of the third channel. All of these are within the 10mV specification.
There were two primary topologies considered for the high-side current sensing portion of the design. The first used a low resistance shunt resistor in series with the primary current path. As current is delivered to the electrical load a small voltage is generated across this resistor. This can then be amplified using an instrumentation amplifier and then connected directly to the fourth channel of the ADC. This method did not make it into the design because of the difficulty of finding differential amplifiers able to withstand high common-mode voltages on the order of 90 V.
The second method is to use a hall effect current sensor. These types of sensors do not require a shunt resistor in series with the primary current path. Rather, they detect the strength of the magnetic field generated when current is flowing. These sensors are more suited for high voltage current sensing because the primary current path and any associated voltages are isolated from the internal circuitry used to sense the magnetic field. In the current sensor chosen for the design, the isolation is suitable up to 420 Vpk. The output voltage of this sensor (I_SENSE) rises linearly up to 5V as the sensed current rises from 0-20A with an overall sensitivity of 200 mV/A. Given these specifications we can calculate the current measurement resolution. This is shown in Equation 4 and meets the10mA specification defined above.
Any current flowing from the solar panel to the electrical load flows through the current sensor. The input current coming from the Switching Subsystem is given by RELAY_OUT+ and the output of this subsystem is given by INTERFACE_OUT+. This is also the positive terminal of the power output of interface box. The negative terminal is given by INTERFACE_OUT- which was shown in the last section.
Temperature Monitoring Subsystem:
One of the most important sensors for safety are the thermocouples used to measure the temperature on various areas of the solar panel. Because these devices are external to the interface box, they are represented by headers on the schematic as shown in the figure below. This subsystem is powered by the 5V voltage rail and only communicates with the Microcontroller Subsystem.
A critical issue that needed to be overcome in the design of the interface box was the amount of I/O pins available on the microcontroller of choice (ATmega328P). There were three interfaces available for communicating temperature data to the microcontroller. Not including all of the components of the Temperature Monitoring Subsystem, there is one digital I/O pin available for use without sacrificing features of the other subsystems. An I2C bus is available because it is already being used by the Voltage/Current Monitoring Subsystem, and an SPI bus is available to communicate with the Ethernet Interface. The SPI bus was not a good choice because each device on the bus requires a Slave Select pin. This would be problematic when multiple temperature sensors are added. The I2C bus was not a suitable option because it is meant for short distance communication. As a result a 1-wire digital interface was determined to be the most ideal.
In regard to the temperature accuracy, these measurements are mostly used as a protective measure. If a general upward trend in the temperature of the panel is detected and it is increasing to knowingly damaging levels, we wish to disconnect the panel until it cools down enough for use again. Because of this, individual temperature measurements do not need to be extremely accurate.
For this portion of the design, it was decided that an accuracy of ±5F would be sufficient to detect this behavior and shut off the system if necessary. Because the Temperature Monitoring Subsystem only consists of off the shelf temperature sensors, it was just a matter of finding the correct part to fit this need and have the ability to interface with the system.
Keeping this in mind, the temperature sensor chosen was the DS18B20 which has a ±2.9F temperature accuracy over a temperature range of 14F-185F. This is more than suitable for our temperature accuracy needs. Even though this accuracy is only valid with a lower bound of 14F, temperatures at this level are not damaging to the panel and do not pose a danger, so slight larger inaccuracies are fine.
The chosen sensor is packaged in a waterproof housing at lengths of 3 meters. The sensor also uses the 1-wire Dallas protocol for communication which means that all of the sensors could be connected to a single digital I/O pin of the microcontroller. In the schematic, all the data lines of the temperature sensor are tied together and are connected to the microcontroller through the T_SENSE net. A 4.7k pull up resistor was necessary as specified by the datasheet of the sensor. Ten headers were attached to schematic in the event the user wishes to add more sensors.
Microcontroller Subsystem:
The Microcontroller Subsystem operates as the central processing unit in the interface box. This subsystem interfaces with every other subsystem and controls the general operation of the overall system. This subsystem is powered by the 5V voltage rail.
For the microcontroller itself, the ATmega328P was chosen because it is the same microcontroller used in an Arduino development board and because it contains all of the pins and interfaces needed in the system being built. By burning the Arduino bootloader into the microcontroller, one can program it using the Arduino programming language as well as retain access to useful libraries used to communicate with other subsystems such as the Ethernet Interface and the temperature sensors.
On the right side of schematic there are two headers used to connect to the manual configuration switches. Each position on both of those switches is connected to a digital I/O pin for reading. An LED is connected to pin 12 and is responsible for indicating if the output of the interface box is enabled. Pins 13 and 14 are used to control the relays as discussed in the Switching Subsystem section. Pin 15 is used to communicate with the temperature sensors as discussed in the previous section. Pins 16-19 make up the SPI bus necessary for communicating with the Ethernet Interface. Pins 27 and 28 make up the I2C bus needed to communicate with the Voltage/Current Monitoring Subsystem. The device is being operated at a 16 MHz clock speed in the same way the Arduino is. An oboard tactile switch connected to pin 1 allows a developer to reset the microcontroller if necessary.
Three additional headers on the left side of the schematic were added for debugging purposes. A 6 pin SPI header allows developers to program the microcontroller without removing it from the board. Another 6 pin header is connected to the microcontroller’s serial data lines. This will be very useful in debugging as developers can write to the serial port and debug as long as a USB-to-Serial converter is attached. Lastly, a 7 pin header contains other miscellaneous or unused pins. These headers do not need to be populated; however, during the debugging process, they may prove to be useful.
LEDs:
Several LED`s visible to the end user will be present to show information about the status of the Ethernet connection, status of interface output connection (whether or not the interface box has connected the solar panel to the electrical load), and status of interface box power (whether or not the isolated 12V supply is powering the interface box).
The interface output connection and Ethernet connection LED’s will be controlled by the micro-controller while the interface box power LED will be powered by the 5V line from the Power Subsystem.
Manual Configuration Switches:
In the case of loss of connection to the network and the server is unable to access the interface box, there will be manual switches mounted on the enclosure to control the configuration of the solar panel and shutoff the system entirely. One will be an SP3T switch with three outputs (one for each pole) responsible for changing the output configuration and the another will be an SPST switch with a signal output responsible for enabling the output of the interface box. The circuit configuration is shown in the microcontroller schematic as headers JP5 and JP6 and their corresponding pull up resistor. Each output is connected to a digital input on the microcontroller for processing. The subsystem receives power from the 5V line from the Power Subsystem.
Ethernet Interface:
The Ethernet Interface is responsible for facilitating communication via Ethernet between a server/PC and the micro-controller installed in the interface box. This is essential for allowing users to remotely control and monitor the interface box and the solar panel. In achieving this, the Ethernet Interface must utilize one of available data buses on the microcontroller. Primarily, this means that it must use I2C or SPI.
The interface was implemented using WizNet W5500 IC. This IC was primarily chosen because it allows the system to be connected to the network, it can easily connect to a microcontroller’s SPI bus (which is available), and because it is the Ethernet controller used in the Arduino Ethernet Shield 2. This means that any libraries already developed for this will be accessible during the firmware implementation. The circuit of the Ethernet Interface can be found on page 4/5 in the schematic at the end of this document.
Power Subsystem:
The power subsystem is responsible for generating all of the necessary supply rails for the interface box. In this system, 12V, 5V, and 3.3V are required for the various subsystem. The interface box as a whole will be supplied with an isolated 12V power supply. Given the current requirement of all of the subsystems, this supply will need to have current carrying capacity of at least 1.725A. The system is not expected to be drawing this current continuously; however, this will be the maximum.
The 3.3V and 5V voltage rails will be generated using two 800 mA linear voltage regulators. Additionally, another switch accessible to the end user will completely shut off the 12V supply to the box. Doing so will automatically disconnect the solar panel from the output of the interface box and disconnect the Ethernet interface. The circuit for the Power Subsystem is shown in figure below. The header JP1 represents the SPST switch used to control the interface box power. Additionally, a series diode is present to prevent damage due to a reverse polarity at the 12V input. Each regulator, also has an LED attached to indicate their respective voltage rails are active.
Conclusion
The project was a great success and allowed for a lot of really testing to be done with live solar panels. Although there is much to be added to the software and subtle tweaks needed in the hardware, the project works very well. I feel that another iteration over the design will greatly improve the application.