solar tracker with gps fall 2018 - california state...

10
Solar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer Engineering California State University Northridge [email protected] Diana Bocanegra School of Electrical and Computer Engineering California State University Northridge [email protected] Hiram Higareda School of Electrical and Computer Engineering California State University Northridge [email protected] Faculty Advisor: Professor Bruno Osorno Abstract—The purpose of this project is to take an inherited Solar Panel with Tracker System and integrate several added components to make the system fully able to work outside using its own battery source. In addition, the purpose of this project is also to finalize the display capabilities of the REACH screen to include all of the newly added sensors. Finally, this project was overall improved from cabling, hardware, and coding while maintaining the original plan and purpose of tracking the sun efficiently and autonomously. The solar tracker system in which this solar panel is operating will be powered by a deep cycle 12V lead acid battery, an AC-DC voltage inverter, and a 12-24 voltage step-up converter. The panel will be moved mechanically by two high-torque DC motors and a Maximum Power Point Tracking (MPPT) system to track the suns position throughout the day. The two motors move the panel in the azimuth and zenith directions while an actuator moves the panel in the vertical direction. The Arduino MEGA will get its readings from a wind, irradiation ,voltage, and current sensors and send the values of collected data to be displayed by a REACH screen. The motors will also be connected to the Arduino MEGA which will move them every five minutes in accordance with the position of the sun throughout the day. This motion will increase the efficiency of the solar panel, in comparison to a stationary solar panel. Index Terms—Solar panel; DC Motor; Arduino MEGA; Anemometer; Sensors; REACH Technology; LCD; Converter; Inverter; Lead-Acid Battery; GPS; Voltage Controller I. I NTRODUCTION The increase of human population has directly increased the need for energy and new ways to harvest it. In recent history, the most popular methods of energy generation have been burning fossil fuels and nuclear fusion. These methods, although effective, can be replaced with alternatives that are less expensive and cause less harm to the environment. Since fossil fuels are a limited, nonrenewable resource, they will eventually deplete and will not be recovered for millions of years. According to research and data collected by the CIA world fact-book a good estimation of the time that coal, natural gas and crude oil would be depleted by 2088, which is only seventy years from now. However, the statistical review of World Energy as shown below in Figure 1 shows that both coal and oil have about 50 years left while coal has an estimated 114 years left. The impact made on the environment by the burning of these fossil fuels is also something that needs to be taken into consideration when innovating new energy generation methods. The best alternative to these methods is renewable energy. Renewable energy comes from natural sources that are are infinitely replenished, such as wind, ocean waves, geothermal energy, and solar rays. Figure 1: Estimation of Years Left for Fossil Fuels This report focuses on solar rays and how they can be used to generate electricity. More specifically, a system has been developed and put into practice that detects the suns location through global positioning system (GPS) and turns the panel using motors in order to gain the maximum amount of solar rays possible. These solar rays translate directly into energy, therefore the higher amount of solar rays that are received by the solar panel, the higher amount of energy that will ultimately be produced. This design can be proven to be more efficient, in terms of energy generation, than a stationary, flat solar panel.

Upload: others

Post on 19-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

Solar Tracker with GPSFall 2018

Apekshya KhanalSchool of Electrical andComputer Engineering

California State University [email protected]

Diana BocanegraSchool of Electrical andComputer Engineering

California State University [email protected]

Hiram HigaredaSchool of Electrical andComputer Engineering

California State University [email protected]

Faculty Advisor: Professor Bruno Osorno

Abstract—The purpose of this project is to take an inheritedSolar Panel with Tracker System and integrate several addedcomponents to make the system fully able to work outside usingits own battery source. In addition, the purpose of this projectis also to finalize the display capabilities of the REACH screento include all of the newly added sensors. Finally, this projectwas overall improved from cabling, hardware, and coding whilemaintaining the original plan and purpose of tracking the sunefficiently and autonomously. The solar tracker system in whichthis solar panel is operating will be powered by a deep cycle12V lead acid battery, an AC-DC voltage inverter, and a 12-24voltage step-up converter. The panel will be moved mechanicallyby two high-torque DC motors and a Maximum Power PointTracking (MPPT) system to track the suns position throughoutthe day. The two motors move the panel in the azimuth andzenith directions while an actuator moves the panel in the verticaldirection. The Arduino MEGA will get its readings from a wind,irradiation ,voltage, and current sensors and send the values ofcollected data to be displayed by a REACH screen. The motorswill also be connected to the Arduino MEGA which will movethem every five minutes in accordance with the position of thesun throughout the day. This motion will increase the efficiencyof the solar panel, in comparison to a stationary solar panel.

Index Terms—Solar panel; DC Motor; Arduino MEGA;Anemometer; Sensors; REACH Technology; LCD; Converter;Inverter; Lead-Acid Battery; GPS; Voltage Controller

I. INTRODUCTION

The increase of human population has directly increasedthe need for energy and new ways to harvest it. In recenthistory, the most popular methods of energy generation havebeen burning fossil fuels and nuclear fusion. These methods,although effective, can be replaced with alternatives that areless expensive and cause less harm to the environment. Sincefossil fuels are a limited, nonrenewable resource, they willeventually deplete and will not be recovered for millions ofyears. According to research and data collected by the CIAworld fact-book a good estimation of the time that coal, naturalgas and crude oil would be depleted by 2088, which is onlyseventy years from now. However, the statistical review ofWorld Energy as shown below in Figure 1 shows that both coaland oil have about 50 years left while coal has an estimated114 years left. The impact made on the environment by theburning of these fossil fuels is also something that needs

to be taken into consideration when innovating new energygeneration methods. The best alternative to these methodsis renewable energy. Renewable energy comes from naturalsources that are are infinitely replenished, such as wind, oceanwaves, geothermal energy, and solar rays.

Figure 1: Estimation of Years Left for Fossil Fuels

This report focuses on solar rays and how they can be usedto generate electricity. More specifically, a system has beendeveloped and put into practice that detects the suns locationthrough global positioning system (GPS) and turns the panelusing motors in order to gain the maximum amount of solarrays possible. These solar rays translate directly into energy,therefore the higher amount of solar rays that are receivedby the solar panel, the higher amount of energy that willultimately be produced. This design can be proven to be moreefficient, in terms of energy generation, than a stationary, flatsolar panel.

Page 2: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

A. Panel

The panel used for this Solar Tracker system is a KyoceraPoly-crystalline (Multicrystalline) Solar Panels (p-Si) Model- KD140GX-LFBS- with maximum operating voltage 17.7 Vand maximum operating current 7.91 A. The panel is 59.06in height by 26.30 in in width and 1.8 in for the depth.(1500mm/668mm/46mm). Figure 2 below shows a comparisonbetween some of the most used types of solar cells for solarpanels:

Figure 2: Comparison Between 4 Industrial Solar Cell Types

Since it is a poly-crystalline panel it has limitation of efficiencywith temperature levels; at temperatures above 45(113) itsefficiency decreases by approximately 10 percent for voltageand 20 percent for current. This is shown in the specifications,due to the fact that operating voltage outputted at 25 is 17.7V while at 45 it is 16 V. Similarly the current goes fromoperating amps outputted at 25 is 7.91 A while at 45 it is6.33 A. In other words the threshold the voltage is affectedby -0.52 percent/ and the threshold current percent of loss perdegree celsius is -1 percent/ .

The output power is 140 W which can be confirmed by theequation P=V*I*pf where pf=cos-1() . The angle for powerfactor is dependent on the load. If the load is inductive thepower factor becomes more reactive meaning that the ratio ofWatts to Vars changes, and if it is capacitive the power factoris affected inversely. Another common way that utilities definepower factor in the practical sense is by measuring apparentpower in VARS and taking the inverse cosine of apparentpower over real power. Inputting the specs from the solar panelthat is used for the system it results in:

P=17.7V*7.91A= 140.007 W

In the case of this system, the solar panel outputs a DCvoltage which acts as a power factor of 1 since the phasefor DC power is always 0 therefore cosine of 0 is 1. That iswhy the output of this Solar Panel can be assumed to give amaximum 140 W with no variation due to impedance. The

output power that this solar panel generates will first passthrough an MPPT Voltage regulator which will be making surethe battery doesnt overheat while recording the data of powerproduced and stored per hour in terms of voltage, current andpower. The solar panel is the source of the generated powerbut it wouldnt be as efficient in its power collection if it wasntfor the tracking system.

The panels weight is 28.4 lbs or 12.9 kg which can becomea constraint for the motors it uses because they need to beable to move the panel in a dual axis with enough torque tomove them efficiently. This brings into light the importanceof choosing the most efficient motors.

B. Motors

There are two high torque stepper motors and an actuatorthat are used provide the mechanical movement for the solarpanel. The Solar tracker system is a dual-axis system; it has theability to move in the zenith (vertical) and azimuth (horizontal)direction in order to more efficiently track the sun. Due tothe weight distribution of the panel the best option was hightorque motors because they provide with enough torque tonot only move the panel, but to hold the panel in a set anglefor long amounts of time. Since this system is designed tooperate over very long periods of time and most of the timeat which it is operating it is holding the panel still at differentangles, torque is more important than smooth mobility. Themotors work through motor drivers. The motor drivers usedfor the motors are 2-Phase stepper motor driver ST-M5045which require an input of 24 V DC in order for them to workand a logical input of 5V DC from the Arduino to determinethe amount of steps and in which direction.

Figure 3: Stepper Motor Specifications

Page 3: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

The installation of the drivers connected with the motors wasdone using a breadboard in order to make the connectionsmore efficient and create power and ground lines. One of themajor challenges to the driver requiring 24V input to powerwas that the system is all powered by the 12V lead acid batterywhich is only half of the voltage required for proper operation.In order to solve that problem a DC to DC converter wasimplemented into the system which took the 12V input andconverted it to 24V output serving as the input for the motordrivers. Below are the motor drivers connection diagram:

Figure 4: Motor Schematic

Aside from both of the torque motors the system has anactuator that converts the electrical input of the battery of 12Vand converts it to mechanical power to bring displacementof the panel vertically. The actuator moves the whole panelup and down. The actuators main purpose is to lower thesolar panel when going through a door and to put it up whenoperating on the field. The wiring diagram for the actuator isshown below:

Figure 5: Actuator motor diagram

The actuator is a linear DC machine and without the use ofrelays it would only be able to go one direction and in order tobring it back the wires would have to be physically rearranged.In order to fix that problem the addition of relays that canreverse the polarity of the input of 12V is desired. This is apart of the system that is powered through the inverter for theinput 12V and 6V AC adapters. Since the inverter only hasone output for AC, an extension cord was added to multiplythe inputs that can use the AC output. As seen, the actuatoris a very simple device that requires a 12 V input in orderto provide high torque displacement acting in a way like amachine that pushes heavy weight. This is the muscle of thesystem. It is what carries the weight of the panel.

C. Sensors

Sensors were used for the project to read the data receivedfrom the Panel in order to display it to the REACH screenby interfacing the sensors with the Arduino. The goal was toread the wind speed using a an anemometer, current usingcurrent sensor and lastly, voltage using a voltage sensor. Thiswas done by interfacing the anemometer, current sensor andvoltage sensor with the Arduino Mega.

1) Wind MeterThe anemometer that was used for this project is the Davis

Anemometer. The purpose of the anemometer is to measurethe speed of the wind and the direction in which the wind isblowing. The anemometer can output 0 to 5 analog voltage.

Figure 6: Wiring Connection of the Wind Meter

2) IrradiationThe Davis Solar Irradiation Sensor was used in this project

to measure the radiation received from the Sun. It was inter-faced with the Arduino uno in the project as the sensor has ananalog output. The sensor contains two ground cables whichare colored black and red. Yellow cable is an input voltagecable that detects 3 V DC from the Arduino. The green cableis the output which is received by the Arduino. In order tomake efficient use of the product, the solar irradiation sensormust be held to face the sun in an upward direction.

Page 4: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

Figure 7: Wiring Connection of the Irradiation Sensor

3) Voltage SensorThe Voltage sensor was chosen as an application to this

project in order to read the DC voltage by interfacing it withthe Arduino Mega. In order to choose the most relevant volt-age sensor for the project, specifications of different voltagesensors were closely matched to the specification of the Panel.Referring to the Panel Specifications (Refer to Appendix 8),the maximum power point voltage (Vmpp) required is 30.9V DC. The following voltage sensors were considered for theapplication for the project:

Figure 8: List of Possible Voltage Sensors for the Project

Upon evaluation, among the above mentioned sensors, DCVoltage Sensor with Isolation and DARE DC Voltage Sen-sor had a huge range of maximum power point voltage ascompared to the Phidget Precision Voltage. Thus, PhidgetPrecision Voltage Sensor was chosen since its range of voltageencompassed the system and it was more precise instead ofhaving one that had too big of a range which wasnt as accurate.To connect the voltage sensor, we connect the ground of thevoltage sensor to the ground of the arduino. Next, we connectthe power (+5V) from the sensor to the 5V of the arduino,and lastly, we connect the Data (0-5V) of the sensor to theA2 of the Arduino Uno.

4) Current SensorThe Current sensor was also chosen as an application in

this project in order to read the DC current by interfacingit with the arduino Mega. Referring to the specification ofthe Panel (Refer to Appendix ), the maximum power pointcurrent (Impp) required is 8.32 A. The following sensors wereconsidered for the application of this project:

Figure 9: List of Possible Current Sensors for the Project

Among the above mentioned current sensors, the option Hon-eywell CSNX25 Closed Loop Current Sensor was eliminatedas it has a wide range of current than required for this project.Phidget 30 Amp Current Sensor AC/DC was chosen for theproject. To connect the current sensor, the power supply wasconnected in series to the current sensor and the current sensorto the 2.2k load. The resistor was connected to the ground inthe arduino uno. The Data of the current sensor (0-5V) goesto pin A3 of the Arduino Uno.

II. VOLTAGE CONTROLLER (MIDNITE MPPTConnecting the battery source directly to the solar panel

would be sufficient to recharge the battery with the powercollected; however, it would run the risk of losing efficiencyon the power connected (not being able to use the potentialpower it collects) which could possibly lead to failures inthe system. Also, there would not be a way to record andkeep a log on how much energy was produced and collectedwhich is so important for the engineering aspect. This iswhy it is very important to have a voltage regulator that caneffectively regulate the amount of voltage that the solar panelinputs to the battery based on its state of charge and at thesame time keep a log of all the power parameters that it iscollecting. There are two types of solar charge controllers:PWM (Pulse Width Modulation) and MPPT (Maximum PowerPoint Tracker). For this project the Midnite Solar Classic 150MPPT Voltage Regulator charge controller is being used. Asits name suggests, this voltage regulator uses a very complexalgorithm along with an internal microprocessor and softwareto get the maximum power point tracker in order to getthe maximum possible match between power collected andpower used. One of the advantages of having the mppt chargecontroller is that it automatically tracks the optimal ratiobetween voltage and current and varies the output accordinglyto obtain maximum power. A common analogy to the chargecontroller made by the manufacturers of it is that the chargecontroller functions like an automatic transmission system fora car. The solar cells are similar to the motor speed and theyare dependent on solar energy received and temperature whilethe voltage of the battery is similar to the cars tire speed whichis dependent on the load and the current charge in it. Theautomatic transmission in a car would make the right gearshifts in order to obtain a good ratio of motor speed with tirespeed which is what the charge controller does in terms ofkeeping a higher voltage inside the regulator in order to giveit a current boost and therefore charge the batteries faster.

A. Whizbang Jr with Shunt

In order for the charge controller to be able to log Amp-hours, state of charge (SOC) , and temperature it needs anexternal device called the Whizbang Jr. This is a circuitboard that connects through auxiliary cable using a shunt(500A/50mV) tied between the battery negative and the volt-age regulator. The shunt is used to accurately measure currentgoing into and out of the voltage regulator at a level of 500

Page 5: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

Amps with only a 50 mV drop in voltage. This one is themost commonly used in industry today and are very useful tomeasure the battery state of charge in battery monitors. Thisis because it is able to give a current reading with almost novoltage drop in order to not affect the system. The shunt isplaced in series with the conductor on the negative terminal.The way it works is very simple, the Whizbang Jr. alreadyhas been configured to know the very precise resistance ofthe shunt and as it is measuring the voltage drop across it (assmall as it may be) divided by the small precise resistanceit can give very accurate readings of the actual current goingthrough it. Ohms law at its finest! Doing the calculation basedon its ratings of current being 500 A and voltage 50 mV theresistance of the shunt is one hundred of a thousandth of anohm or 0.0001 . This is quite impressive given its size andappearance which makes it seem like it would be consuminga lot more power and dropping a lot more voltage than itactually does. The circuitry of the Whizbang Jr. however isproperty of the company and would not be disclosed to thepublic, however it is known that the charge controller itself hasa setting that makes it read and write to the Whizbang Jr. whichmakes it known that there is communication between the twodevices which works out to provide the extra display capacitiesat the charge controllers home screen. Adding the WhizbangJr. was also done in part to be able to access the website thatthe company Midnite Solar offers in order to remotely monitorthe batteries state of charge (SOC), voltage, current and powerratings. However, there might need to be the addition of arouter in order to connect directly to the charge controller toupload all of its logged data to the internet which is on thegoals for the continuation of the project. What was done untilnow was to obtain the shunt and the Whizbang Jr., install themand become knowledgeable about what it immediately adds tothe project and what it can potentially add to the project aswell.

III. DC-DC CONVERTER

The system has components that need a 12 V input formany of the components; however, the motor drivers need a24 V DC input for them to function properly. This createsa challenge given that the lead-acid battery that powers thesystem is 12 V DC. In light of this a DC to DC boost converter,which is able to take an input of 12V DC and convert it toan output of 24V DC, was added. The DC-DC converter thatis in use for this system is the Victron Orion Non-IsolatedDC-DC converter. This converter has an input voltage with arange of 9 to 18V and an output voltage adjustable from 20to 30 V. Inside of the converter are many capacitors varioussizes along with diodes and resistors that form a circuit thatcan store the energy and release it at a higher voltage witha lower current. The converter contains an adjustable resistorthat is able to serve as a knob to turn the ratio of input tooutput higher or lower. A possible application in real worldfor the DC to DC converter can be seen on Figure 10:

Figure 10: Application of DC-DC Converter and DC-AC Inverter in a SolarPower System

There are a lot of devices that require a DC input such ascameras, electronics, chargers, DC motors and much more.This is why the implementation of a converter is very practicalin any solar panel system. In the case of the solar tracker theDC to DC boost converter from 12V to 24V is used to usethe same battery that is being charged by the solar panel topower its own motors which allow it to move to the maximumefficiency angle to track the sun. This is a closed-loop feedbacksystem in place.

IV. INVERTER

There were many different components in this project thatneeded different levels of voltage input. Some required a DCvoltage, while others required an AC voltage input. In order toensure all of the components were being powered correctly, aDC-AC inverter needed to be used. This inverter took an inputof 12 volts DC, supplied by the battery, and had an output of110V AC 10 percent. The output frequency at the AC socketand USB outlet was a Pure Sine Wave with a frequency 60Hz. It also had a rated power of 500W and a surge power of1000W. This was used to power both the REACH screen andthe Arduino, since they both require AC power to function.In this certain system, the flow of electricity begins at thesolar panel, travels through the voltage controller to the batterywhich is where the inverter is connected to.

Figure 11: Diagram of 12V DC-AC Inverter

Page 6: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

V. BATTERY

It can be argued that the battery used in any renewableenergy generation method is the most important aspect ofthe overall system, as it holds the energy that is generatedand is powering the rest of the system. Therefore, it wasimperative to choose the most optimal battery. There are threemain types of batteries on the market that can be used forthese applications. Among them are lead acid, lithium based,and nickel based. According to an article by the Institute ofElectrical and Electronics Engineers (IEEE), the best optionfor solar powered applications is the lead acid battery.

Figure 12: Battery Composition Comparison

Figure 12 shows critical parameters that are used in helpingdecide which type of electrochemical battery would be bestto use. The solar powered system that is being designed andimplemented would thrive using a battery that requires theleast amount of maintenance, has the longest lifetime, andis most cost effective. Because of the nickel-based batteriescharacteristic of charging most effectively through a constantcurrent, it was ruled out as the best option leaving only thelithium ion and lead acid batteries to be compared. After doingextensive research and reading the article Solar Micro Grid,the best battery for the project was discovered to be the lithiumion battery, as presented in Figure 13.

Figure 13: Comparison of Battery Density

Figure 13 shows how lithium ion batteries are the best onthe market and have a large range of operation. The absorbedglass mat (AGM), gel and flooded batteries are all differenttypes of lead acid batteries. Looking at Figure 13, it is easy to

see how obsolete they are becoming in comparison to newertechnologies. As seen in Figure 14, since lithium ion batteriesare still a relatively new and developing technology, they costconsiderably more than lead acid batteries and did not fit intothe budget.

Figure 14: Price Comparison of Lead Acid and Li-Ion Batteries

Lead-acid batteries have been used in the industry of energygeneration for many years, so going with that option was notthe worst choice. The type of battery that was chosen forthis project is a deep cycle lead acid battery. A deep cyclebattery is a specific type of battery that is mainly used inareas of renewable energy storage due to the fact that theyhave a discharging capacity higher than a regular battery. Thespecific type of battery used in this project is the ConcordeSun Xtender PVX-1040T. It has a voltage of 12V and 104AH.Fortunately, this battery requires very little to no maintenanceat all, contrary to a regular lead acid battery which is what isbeing compared in Figure 12. In the general design of thesystem, the battery is connected through a circuit breaker,directly to the solar panel, DC-AC inverter, DC-DC converter,and the Midnite voltage controller. This circuit breaker protectsthe overall system from any damage that may occur froman overload of current. It also provides for an accessiblemanner of turning on and off the system in general by cuttingoff the voltage that is being applied to the aforementionedcomponents. This circuit breaker can be used in situationswhere there is a malfunction in the system and there is a needfor an emergency shut-off.

VI. ARDUINO MEGA

The Arduino MEGA, seen in Figure 15, is the micro-controller board that was selected to be used in the overallsystem, mainly because of its storage capacity. An ArduinoMEGA uses an 8-bit Atmel Micro-controller, has 54 digitalinput and output pins, and 16 analog input pins.

Page 7: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

Figure 15: Arduino MEGA

The job of the Arduino is to receive and transmit data, aswell as perform calculations, and be the interface betweendifferent components. The Arduino is powered by the DC-AC inverter through a USB power cable and supplies powerfor the different sensors mentioned in the previous sections,including the current sensor, voltage sensor, anemometer, andsolar irradiation sensor. All of these sensors are poweredthrough either the 5V or 3.3V pins, depending on what eachspecific circuit requires.

There were many different functions used in orderto complete all of the necessary actions needed by thearduino. One of the most important functions used wasthe analogRead([pin]) function. The space marked pin

corresponds to the pin number on the actual board. In thecode, the definition of a pin can be seen below:

#define WindVanePin (A4)

This defines the pin Analog 4 (A4) as the WineVanePin.This variable definition was set to be the direction the wind

was blowing the anemometer. Throughout the rest of thecode, this definition can be used in order to refer to the

analog value that is going into pin A4 on the board. Afterdefining the pin, it is easy to call the numerical value thatis being read from the pin. This can be done using the

aforementioned function as follows:

analogRead(WindVanePin);

This code simply takes the value from the pin WindVanePin,which was previously defined as pin number A4. Althoughthis function is easy to use, it doesnt give a complete andaccurate value of what the direction is, and much morecalculations are needed in order to give a value correspondingto a direction. Another fundamental part of using the Arduinowas knowing which libraries to use. Libraries can be userdefined, or predefined by the Arduino software and caninclude various function definitions in order to make codingsimpler. Some of the libraries used in this specific code are:

#include <SPI.h>#include <AdafruitGPS.h> // GPS

#include <SD.h> // SD Card library from ADAFRUIT

#include <avr/sleep.h>#include <TimerOne.h> // Wind meter timer

#include <math.h>

These libraries made it possible to use the GPS, math equa-tions, and interface with the REACH screen.

A. GPSThe overall concept for this dual-axis configuration is that

throughout the day as the sun rises on the east and sets onthe west the zenith motor would be aligned orthogonally tothe rays of the sun and every 5 minutes it would send anotherpulse to move it slightly more until at the end of the day itis facing west completely. The zenith motor would be doingmost of the work. The azimuth motors role would be to changethe angle at the end of the the cycle slightly clockwise inpreparation for the slight shift of the sun for the next day.The way that the system is working with real life data isthrough the Arduino GPS shield which provides the coordinateinformation in order to determine on what part of the worldthe system is at and direct the commands accordingly. TheGPS used is the Adafruit Ultimate GPS Shield which iscompatible with the Arduino Mega. It is able to get globalpositioning from the standard four satellite communicationprocedure to narrow down its accuracy to a few feet. Thelongitude and latitude data, along with the algorithm createdby the Nationally Renewable Energy Laboratory provide withthe logic and commands to direct the motors in the correctdirection as a dynamic system.

It was necessary to include the Adafruit GPS library as theGPS shield, seen in Figure 16 was fixed onto the ArduinoMega. The GPS was instrumental in the functionality of theproject work as it was the most effective way to follow thesun, depending on where the system would be placed on theglobe.

Figure 16: Adafruit GPS Shield

There are certain pins on the board that allow for external com-munication such as receiving and transmitting data, throughmeans of a serial screen. These can be effectively used bythe Serial.print() function, which will be described with moredetail in the next section.

Page 8: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

VII. REACHIn order to neatly and conveniently display certain parame-

ters regarding the efficiency of the solar tracking system, aREACH screen was used. The screen was purchased fromthe company Reach Technologies, which manufactures screensthat are used in many different applications, such as medical,industrial and commercial vehicles. This particular screen wasthe 7 Standard Display module which has a liquid crystaldisplay(LCD) measuring 800 pixels in width and 480 pixelsin height. The screen is manufactured with touchscreen capa-bilities, although those were not used for this current project,and also to have a default landscape orientation.

In order to display images and data on the screen, there werethree main software applications used, including the following:

A. GNU Image Manipulation Program (GIMP)

GIMP was mainly used to create the background imagesthat were to be displayed on the screen itself. Using REACHscreen specific plugins, it was simple to create backgroundimages exactly the correct size of the screen. GIMP was alsoused to track the exact coordinates of where the meters inFigure 17 would be placed, each meter being added as a newlayer.

Figure 17: Background Layer of REACH Display Screen

Figure 18 shows one meter on its own. Each needle had to beadded, using different coordinates relative to the center pointof each circle. There were a total of five meters measuring:current, voltage, power, wind speed, and irradiation.

Figure 18: Individual Meter Layer

GIMP also provided with the macros for each separate meterto be loaded into the REACH screen itself. An example ofthis macro can be seen below:

ss

S ff0000 000000md 1 01 230 21 1 0 30 0 44 314 70 59 -4 1 -4 8 0 41 4 8 9

1NC:ff0000

Sr

The md is an abbreviation for meter define with the follow-ing numbers being the points where the needles will move toin order to display different values for the readings that arecoming from the Arduino.

B. Tera Term

Tera Term is a free open source software that allows forcommunication to serial ports through the computer ports.This software helped greatly in checking that the macros hadsuccessfully uploaded. It was also possible to call a commandto check which bitmaps were loaded into the screen as well.Tera Term also makes it possible to control what is beingdisplayed on the screen, which makes it easier for testing outthe macros that have been downloaded.

C. Bitmap(BMP)Load

BMP Load is the program that allows bitmaps and macros tobe loaded onto the screen. It checks to make sure the picturesare the correct size (24 bits per pixel) and that the macroscompile correctly. The macros that were created needed tofirst be created in a .txt file and then uploaded to the program.A macro definition can be seen below:

#define windf 13B

set s0 ‘0‘wvr 214

t ”‘5.5 s0‘” 155 355mv 3 ‘s0‘

t ”MPH” 200 355#end

The macros would be defined by the order in which they weredefined in the .txt file and in order to call them in the Arduinocode, serial print functions had to be used as follows:

DISPLAY SIO.print(”m2 ”);DISPLAY SIO.print(WindSpeed, DEC);

DISPLAY SIO.println(””);DISPLAY SIO.print(”m3 ”);

There were two different functions used in the Arduino code:DISPLAY SIO.print() and DISPLAY SIO.println(). The firstfunction prints out variables to the screen while the secondfunction is printing out actual text to the screen. Since theREACH screen already has the macros uploaded to it, theArduino can call the macros as variables. In order to connectthe REACH screen to the Arduino MEGA, the schematic inFigure 19 was used.

Page 9: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

Figure 19: Arduino to REACH Wiring Schematic

The TX1 pin on the Arduino is transmitting information tothe RxD3, or receiving end on the REACH screen. Throughonly these three communication connections, the serial screenis able to receive and display information from the Arduino.

VIII. DISCUSSION AND EVALUATION

Figure20: Wiring of the Solar Tracker System

In Figure 20 above, the overall wiring schematic for the systemis laid out. This schematic was used to actually wire the systemtogether, and the order of the cables into the breakers wasfollowed exactly as shown. The purpose for this was to leavea clear and concise guide of what everything is, resemblingan instruction manual for when next generations of studentsfind themselves trying to connect the devices. A great practicefor all work done on this project consisted of documentingchanges done and leaving instructions on how devices wereset-up and troubleshooted. All of the files were left shared onan online drive accessible through sharing from generation ofstudents to the next. The files and known physical manualsand schematics were also organized into a physical folder as aback-up to the digital for any reason. The learning process ingetting into this project, being a part of it, and finally takingcharge of it came with a lot of intentional communication withprevious group members. By the time these past members werealmost done with it they had enough knowledge to advise thenext generation on lessons learned and basics to know forworking on a specific part of the project or at least where tofind that information. This group of three was a particularlysmall one, especially for this project which had a team of

eight last semester, and has a team of eight following it. It wasnecessary for this team, being so compact and being followedby a significantly bigger one, to intentionally invest all the timepossible in teaching the next generation. Most of the work andprogress was done in groups in which this years seniors weregroup leaders and served as mentors and instructors to passon as much knowledge and experience as possible. Much ofwhat got done would have been impossible if it wasnt forthe arduous effort to work as teams. With the 493s directionand the 492s willingness to collaborate, the team was ableto install, configure, troubleshoot and learn about this solartracker system.

Another interesting part of this project was the experienceof researching which parts would be the best fit for the system,getting them approved, and calculating the time of arrival inan efficient way. Project management became a big part of thisproject and prioritizing action items in order of their impactto an overall critical path was considered. A critical pathwould consist of planning the actions that would potentiallytake longer first, so that in the future they wouldnt delay theprogress of the project if their implementation was crucial foradvancement. One such case was the arrival of the DC to DCstep up converter. The lack of this item held last semestersgroup back and the testing of the whole system couldnt bedone without it. The only way to get around it was a temporaryfix which consisted of bringing a power supply outside usingan extension cord or getting two extra batteries and connectingthem in series to provide the stepped up voltage needed butit wasnt too practical to do either of them. Therefore, theresearching, approval, ordering, testing and implementation ofthe step up converter became a very important part of theprogress made for this project.

The display of functional dials on the REACH screen wasalso a challenge at the beginning of the project. A big partof the summer was devoted to working and understanding theArduino code that was left behind by the previous group, inaddition to hardware connection and communication of theREACH screen. At last, through much work and research,all of the desired values were able to be displayed withworking dials. This process was very long but allowed formuch troubleshooting to occur between the group and thegraduating senior. This practice and troubleshooting made itpossible for the up and coming seniors to learn how to usethe different software that are needed in order to properlyprogram the REACH screen. This was an effort done bothin code(software) and in sensors (hardware) which allowedfor a major breakthrough for the progress of the project.

The wiring of all of the system together using circuitbreakers was a major progress as well due to the fact that thesystem has been left in working conditions, able to be instantlyturned on and powered completely by the same battery that thesolar panel is charging. This is the first time this was done inthis system and it was made possible due to the arrival of allof the needed parts, the research and installation of all of thesmall components that would make the practical installationpossible and the hard work and team effort of the senior in

Page 10: Solar Tracker with GPS Fall 2018 - California State …jaf35230/Solar_Tracker_Report_Fall_2018.pdfSolar Tracker with GPS Fall 2018 Apekshya Khanal School of Electrical and Computer

charge of wiring, schematics and hardware installation alongwith the team assigned to them.

IX. CONCLUSION

The solar tracker system is now at a stage where dataacquisition is the next step for its progress. This year wasa very productive one in terms of finalizing the software forthe arduino code, the display of gathered data in real timethrough REACH screen and the finalizing of the whole systemcabling through circuit breakers. Now that the system is ableto work mechanically and provide power electrically thereneeds to be a logging, testing and power consumption vsproduction efficiency study to be done. It is a very promisingstage for this project and there is certainly many differentthings that can be done with the project. It has moved frombeing a project with many different components that neededto be tested individually to a system including all of thosecomponents together that needs to be tested in unison. Manydifferent parts have been acquired that can be mounted asextra displays such as digital Wattmeters, clamp ammetersand instantaneous voltmeters. Those are good for extra displayand would not affect the systems efficiency if they are eachrun on their independent commercial batteries. However themain focus and engineering aspect of this system comes withmaking progress on the gathering and interpreting of datafrom the analog to digital meters which are processed throughthe arduino into the memory card that can be logged intocomputers. Also the engineering work will consist of wellrounded and confident electric power knowledge in case amodification, maintenance or rewiring of the system is done.This system has the potential to cause a cable jacket to startburning within milliseconds and a shock hazard sign would notbe a bad idea for it (many times it happened to the membersthis year) however no one was injured in the process of thisproject and though pretty close, no bodies served as conductingmaterial for the big battery in the cabinet of the system. Thisproject served as a wonderful learning experience involvingaspects of power electrical engineering, digital electronics,communications, computer science, mechanical engineering,project management, testing engineering and practical elec-trician work. The more time invested into it the more thatit proved to cooperate and become better and it potentiallyhas many improvements to be done to it. As undergraduateengineering students it was a great hands on experience andsomething that can be taken into each career path as valuableexperience.

REFERENCES

[1] SOLAR PANEL SPEC. SHEET:https://s3.amazonaws.com/ecodirectdocs/KYOCERA/KD+135+F+Series.pdf

[2] VOLTAGE SENSOR SPEC. SHEET:https://www.gridconnect.com/products/dc-voltage-sensor-with-isolation

[3] VOLTAGE SENSOR SPEC. SHEET:http://www.dareelectronics.com/Files/DC%20Voltage%20Sensor%20data%20sheet.pdf

[4] ”Types of Solar Panels (2018) — GreenMatch”,Greenmatch.co.uk, 2018. [Online]. Available:https://www.greenmatch.co.uk/blog/2015/09/types-of-solar-panels.[Accessed: 09- Nov- 2018].

[5] Ashraf, S. Khan, T. Maqsood, J. Qutab Baig, M. Shah Bukhari,S. Comparison of Characteristics Accessed on Oct. 27, 2018 fromhttp://uksim.info/uksim2015/data/8713a444.pdf

[6] O’Connor, J. Solar Micro Grid Accessed on Oct. 29, 2018from https://medium.com/solar-microgrid/battery-showdown-lead-acid-vs-lithium-ion-1d37a1998287

[7] ”What’s a Shunt? — Home Power Magazine”, Homepower.com,2018. [Online]. Available: https://www.homepower.com/whats-shunt.[Accessed: 09- Nov- 2018].

[8] ”Shunt resistor Resistor Guide”, Resistorguide.com, 2018. [Online].Available: http://www.resistorguide.com/shunt-resistor/. [Accessed: 09-Nov- 2018].

[9] https://www.wholesalesolar.com/solar-information/mppt-article[10] https://www.victronenergy.com/upload/documents/White-paper-Which-

solar-charge-controller-PWM-or-MPPT.pdf ,[11] ”dc to dc converter solar panel systems - Google

Search”, Google.com, 2018. [Online]. Available:https://www.google.com/search?q=dc+to+dc+converter+solar+panel[Accessed: 09- Nov- 2018].

[12] Fossil Fuels: [5]”The end of fossil fuels”, Ecotricity.co.uk, 2018. [On-line]. Available: https://www.ecotricity.co.uk/our-green-energy/energy-independence/the-end-of-fossil-fuels. [Accessed: 09- Nov- 2018].

ACKNOWLEDGMENT

The authors would like to thank Professor Bruno Osorno,Javier Anguiano, and all of the staff from Electrical andComputer Engineering for making this possible and for yourgreat support. They would also like to thank Evan Chidester,Miguel Garay, Janus King, Stephanie Lopez, and Omar Vargasfor being such great helpers and teachers along the way; muchluck to them next year!