Table of Contents

Embedded system for autonomous solar panels

Author Miruna-Alessandra Prunoiu
Series and Group 331 CB

Introduction

This project implements an embedded system that automatically orients a small solar panel toward the strongest light source using two servo motors and two KY-018 light sensors. The system is built around the ATmega328P Xplained Mini development board and also includes an energy-monitoring subsystem composed of a solar panel, a voltage conditioning stage, a 1S2P battery pack, a powerbank charging module, a battery status indicator, and an external PWM-controlled LED.

The main purpose of the project is to demonstrate how a microcontroller-based system can combine light sensing, actuator control, and basic energy management in a single practical application. More specifically, the project tracks the light source, adjusts the panel position accordingly, monitors the battery that is charged from the solar panel, and uses PWM to control the brightness of an LED depending on the detected light intensity.

The initial idea started from the concept of a small solar tracker that could maximize light exposure by adjusting the orientation of the panel in real time. From this starting point, the project was extended with an energy-related component, in order to show not only the movement of the panel, but also how harvested solar energy can be monitored and used inside an embedded system.

This project can be useful for other people because it is a simple and accessible example of how renewable energy concepts can be combined with embedded systems, sensors, and actuators. It can be used as a starting point for educational projects, small solar tracking prototypes, or introductory automation systems based on light detection. For the development team, the project is useful because it offers hands-on experience with hardware integration, analog sensor reading, PWM control, power distribution, and structured firmware development in PlatformIO.

General Description

The system is split into two major subsystems:

From the software point of view, the firmware developed in PlatformIO is responsible for reading the analog values provided by the two KY-018 sensors, comparing the measured light intensity, and generating PWM control signals for the LED.

The solar panel provides energy to the system through a voltage regulation / conditioning stage. The regulated output is connected to the charging input of the powerbank module. The powerbank module charges the 1S2P battery pack and also provides a stable 5V rail used to power the microcontroller board, the sensors and the servo motors.

The ATmega328P Xplained Mini reads the analog outputs of the two KY-018 sensors and compares the light levels. Based on these values, the firmware controls the two servos in order to orient the solar panel toward the light source. The LED is controlled through PWM and its brightness reflects the measured light intensity.

A separate battery status module is connected to the battery pack and provides a visual indication of battery charge level.

Block Diagram

The image presents the block diagram of the system. The charging path starts from the solar panel, continues through the voltage regulator and the powerbank module, and stores energy in the 1S2P battery pack. The control subsystem receives analog data from the light sensors and generates PWM control signals for the actuators and for the LED.

Hardware Design

Components List

Electrical Design

The system uses the ATmega328P Xplained Mini as the main controller. The powerbank module is responsible for battery charging and for generating a stable 5V output rail for the entire system.

Electric Diagram

Software Design

Results

Conclusions

Bibliography / Resources