SOLAR POWER TRACKING & PREDICTION SYSTEM USING IOT

Aswin Raj
9 min readJul 25, 2023

--

Abstract

The project explores solar tracking prediction in IoT, which optimizes solar panel positioning using real-time data, historical weather patterns, and machine learning algorithms. By integrating IoT sensors and advanced analytics, solar tracking systems can dynamically adjust panel orientation for maximum energy generation. Machine learning algorithms enhance
prediction accuracy, while IoT enables remote monitoring and proactive maintenance. This approach improves efficiency, reduces shading effects, and extends panel lifespan, contributing to a sustainable energy future.

Introduction

In our relentless pursuit of sustainable and clean energy solutions, solar power has emerged as a frontrunner in the race towards a greener future. As we continue to explore innovative ways to enhance solar energy efficiency, the integration of Internet of Things (IoT) technology has ushered in a new era for solar power tracking and prediction systems. In this article, we delve into the exciting world of IoT-enabled solar power tracking, how it maximizes energy generation by accurately capturing sunlight, and how data analysis and machine learning are utilized to forecast power generation for upcoming days.

Solar tracking systems are commonly used in large-scale solar power installations, such as solar farms or commercial solar projects, where maximizing energy production is crucial. By utilizing solar trackers, these systems can increase their energy output by up to 30% compared to fixed-tilt solar installations. It is important to note that solar tracking systems require additional components, such as sensors, motors, and controllers, to detect the sun’s position and adjust the panels accordingly. These systems are more complex and expensive than fixed-tilt systems but can provide higher energy yields in locations with high solar insolation.

  1. SOLAR POWER TRACKING SYSTEM
    A solar power tracking system, also known as a solar tracker, is a device or mechanism that adjusts the position of solar panels or photovoltaic (PV) modules to optimize their orientation towards the sun. The purpose of a solar tracker is to maximize the amount of sunlight that solar panels receive throughout the day, thereby increasing their energy output. Solar trackers are designed to follow the path of the sun as it moves across the sky, adjusting the angle and tilt of the solar panels accordingly. By continuously aligning the panels perpendicular to the sun’s rays, solar trackers can ensure that the panels receive the maximum amount of solar radiation.
  2. TYPES OF SOLAR TRACKING SYSTEMS
    Single-axis trackers: These trackers move the solar panels along a single axis, typically from east to west. They adjust the tilt angle of the panels throughout the day to optimize sun exposure.
    Dual-axis trackers: These trackers can move the solar panels along two axes, typically both horizontal and vertical. Dual-axis trackers offer more precise solar panel positioning and can track the sun’s movement throughout the day and year.
  3. OBJECTIVE
    The objective of solar power tracking systems is to maximize the capture of solar radiation by continuously adjusting the orientation and tilt of the solar panels. By tracking the sun’s movement across the sky, these systems can ensure that the solar panels receive the highest possible level of sunlight throughout the day. This optimized alignment allows for increased energy production and improved overall system
    performance.
  4. Problem Statement : The problem is that existing solar panel systems lack the ability to autonomously track the sun’s movement, resulting in suboptimal energy generation. Additionally, without accurate solar irradiance predictions, it is challenging to optimize the position of the
    solar panels in real-time. By developing a solar tracking system that can autonomously adjust the position of the solar panels, and integrating it with machine learning algorithms for solar irradiance prediction, the project aims to optimize energy generation and increase the efficiency of solar panel systems.

PROPOSED METHODOLOGY

This proposed methodology provides a step-by-step approach to design and implement
a solar power tracking system using IoT.

It considers various aspects such as system requirements, sensor selection, IoT platform integration, data acquisition and processing, control mechanisms, communication and connectivity, user interface and
monitoring, integration and testing, optimization and fine-tuning, as well as evaluation and validation.

  1. Identify sensors and components needed for power generation forecasting.
    2. Check pin compatibility and connect sensors/components to Arduino board.
    3. Acquire data from sensors using Arduino code.
    4. Preprocess and engineer features from the sensor data.
    5. Split the data into training and test sets.
    6. Select a suitable forecasting model (e.g., ARIMA, regression).
    7. Train and evaluate the model using the training set.
    8. Use the trained model to forecast future power generation.
    9. Visualize and interpret the forecasted results.
    10. Refine the model, if necessary, based on evaluation.
    11. Continuously monitor and update the model as new data becomes available.

Components used:

  1. Solar Panel:

A solar panel, also known as a photovoltaic (PV) panel, is a device that converts sunlight into electrical energy using the photovoltaic effect. It is a key component of solar power systems and is used to generate clean and renewable electricity from the sun’s energy. The construction of a solar panel typically involves multiple solar cells connected together. Solar cells are made of semiconductor materials, such as silicon, which have the ability to convert sunlight directly into electricity. When sunlight strikes the solar cells, photons (particles of light) excite electrons in the semiconductor material, creating an electric current.

2. LDR sensor:

An LDR (Light Dependent Resistor) sensor is an electronic circuit that uses a light-dependent resistor to detect or measure the intensity of light. Also known as a photoresistor, an LDR is a passive component whose resistance changes with the variation in light levels. The basic LDR circuit consists of an LDR and a resistor connected in series or parallel. The LDR’s resistance decreases when exposed to light and increases in darkness. This property allows it to be used as a sensor for light levels.

3. Arduino Uno :

The Arduino Uno is a popular microcontroller board widely used in electronic prototyping and DIY projects. It is based on the ATmega328P microcontroller and is part of the Arduino family of open-source hardware and software platforms. Its simplicity, extensive community support, and availability of libraries and example codes make it a popular choice for both beginners and experienced electronics enthusiasts.

4. Voltage Sensor:

A voltage sensor, also known as a voltage detector or voltage sensor module, is an electronic device used to measure and detect the voltage level in an electrical circuit. It provides an indication or output that corresponds to the magnitude of the voltage being measured. They can measure different voltage ranges, from a few volts to kilovolts, depending on their design and intended application.Voltage sensors are used in various applications, including power distribution systems, electronic circuit testing, energy monitoring, battery charging, and voltage monitoring in industrial and residential settings. They play a crucial role in ensuring safe and efficient operation by providing accurate voltage information for control, monitoring, and protection purposes.

5. Servo Motor:

A servo motor is a type of rotary actuator that is widely used in various applications, including robotics, automation, RC vehicles, and electronics projects. It is known for its ability to precisely control angular position, speed, and torque. Servo motors are available in different sizes and power ratings to suit various applications. They can be controlled by microcontrollers, Arduino boards, or dedicated servo motor controllers. Servo motors are widely used for their precise control, compact size, and versatility in applications requiring accurate positioning and control of angular motion.

6. Current Sensor:

The ACS712 is a hall-effect-based current sensor module that can measure both AC and DC currents. It is commonly used in various applications to measure and monitor electrical current. The ACS712 sensor module provides a convenient way to measure current without the need to break the circuit being measured. The sensor provides an analog voltage output that is proportional to the measured current. The output voltage varies linearly with the current, allowing for easy interfacing with microcontrollers or other analog devices.

IMPLEMENTATION

Step 1: Hardware Setup

● Connect the LDR circuit to the Arduino Uno’s analog input pins.

● Connect the voltmeter and temperature sensor to the appropriate digital or

analog pins of the Arduino Uno.

● Connect the servo motor to the Arduino Uno’s digital output pins.

● Ensure proper wiring and connections between all the hardware components.

Step 2: Software Development

· Install the required libraries for the LDR circuitry, WiFi module, voltmeter, temperature sensor, and machine learning algorithms (such as scikit-learn or TensorFlow).

· Develop firmware for the Arduino Uno using the Arduino IDE or a suitable programming environment.

· Write code to read LDR values, voltage, and temperature from the sensors at regular intervals.

· Implement machine learning algorithms for time forecasting using historical data and real-time sensor readings.

· Control the servo motor to adjust the panel orientation based on the predictions from the machine learning model.

Step 3: User Interface Development

· Develop a web-based or mobile application to receive data from the solar power tracking system.

· Set up a server or use a cloud platform to host the application.

· Implement real-time data visualization of sunlight intensity, panel orientation, voltage output, temperature, and predictive analysis results.

· Provide options for manual control of the panel orientation or set automated tracking modes based on the predictions.

Step 4: Data Collection and Model Training

· Collect historical data on sunlight intensity, voltage, temperature, and panel orientations.

· Preprocess the data by cleaning, normalizing, and splitting it into training and testing datasets.

· Train the machine learning algorithms using the training dataset to develop accurate time forecasting models.

· Validate the models using the testing dataset and fine-tune them if necessary.

Step 5: Integration and Deployment

· Connect the Arduino Uno to the WiFi module for wireless communication with the PC or mobile device.

· Deploy the developed user interface application to the server or cloud platform.

· Ensure seamless integration between the hardware components, firmware, machine learning algorithms, and user interface.

· Test the system’s functionality by collecting real-time data and validating the accuracy of the predictive analysis and time forecasting models.

Step 6: Continuous Monitoring and Optimization

· Continuously monitor the solar power tracking system’s performance, including sunlight intensity, voltage output, temperature, and panel orientation.

· Collect real-time data and periodically update the machine learning models to improve their accuracy and performance.

· Implement system maintenance and calibration procedures to ensure accurate sensor readings and optimal system efficiency.

· Monitor the system for any issues or take appropriate actions for troubleshooting.

Step 7: Importing data into excel

· The data of LDR reading, Angle of Servo motor, Voltage sensor reading, Current Sensor Reading, Power generated in Kilowatts (Kwh) were captured using Arduino serial monitor and imported to Excel for further analysis.

Step 8: Model building

· 80% of the data is taken for training and the remaining 20% is for testing.

Linear Regression is used for model fitting.

Step 9: Evaluation

· Mean Squared error, mean absolute error and R2 score evaluation metrics are found and get 0.98 as R2 Score which shows the best fit for the model to predict unseen data.

Step 10: Prediction

· The predicted power to be generated for the next day is 2 Kwh.

RESULTS AND DISCUSSIONS

Arduino Output:

The data of LDR reading, Angle of Servo motor, Voltage sensor reading, Current Sensor Reading, Power generated in Kilowatts (Kwh) were captured using Arduino serial monitor and imported to Excel for further analysis.

Machine Learning Output:

An R-squared (R2) value of 0.98 can be considered a very good performance and R2 value of 0.98 suggests a strong fit of the regression model to the data, indicating that the model is able to explain a large portion of the variance in the power generation data. The predicted power to be generated for the next day is 2 Kwh.

Hey guys,

While I may be new here, I am excited to contribute my thoughts, experiences, and perspectives to this wonderful platform.Please feel free to reach out, connect, or share your valuable insights with me. I’m open to feedback and eager to be a supportive member of this thriving community.

--

--