RustFlower
A smart solar tracker that moves a photovoltaic panel towards light, mimicking a sunflower's natural inclination to follow the sun.
Author: Baccela Radu-Costin
GitHub Project Link: https://github.com/UPB-FILS-MA/project-RaduRadel
Description
The RustFlower project is designed to develop a solar tracker system that dynamically aligns a solar panel towards the brightest light source to maximize energy absorption. Using a set of photoresistors, the system detects light intensity from various angles and adjusts the panel's orientation accordingly. Additionally, the project incorporates an LCD display to provide real-time information on the amount of energy the solar panel produces. This functionality not only optimizes the energy efficiency of the solar panel but also serves as an educational tool to demonstrate the principles of photovoltaic energy generation and automated mechanical alignment.
Motivation
I chose the solar tracker project after reviewing a variety of engaging projects from previous years. This project stood out to me not only because of its intrinsic interest but also because it presents a well-balanced challenge involving both hardware construction and software development.
Architecture
The architecture of the RustFlower consists of the following main components:
-
Control Unit:
- Function: Processes input from the sensing unit to determine the optimal positioning of the solar panel.
- Components: Includes the Raspberry Pi Pico W which runs the control algorithms.
-
Sensing Unit:
- Function: Detects the intensity and direction of sunlight.
- Components: Consists of multiple photoreceptors positioned to capture light data from different angles.
-
Actuation Unit:
- Function: Executes the positioning commands from the control unit.
- Components: Comprised of servomotors that adjust the angle of the solar panel based on the processed data.
-
Photovoltaic Panel:
- Function: Captures solar energy and converts it into electrical power.
- Components: The panel captures solar energy, which is then measured by the INA219 sensor and displayed.
-
Display Unit:
- Function: Provides real-time feedback on the system’s performance, including the current power output.
- Components: An LCD display connected to the Raspberry Pi Pico W to show calculated data.
Connectivity of the main components:
- From Sensing to Control: The photoreceptors are connected to the Raspberry Pi Pico W via analog inputs, where the light intensity data is converted into digital signals for processing.
- Control to Actuation: The Raspberry Pi Pico W sends PWM (Pulse Width Modulation) signals to the servomotors, directing the necessary adjustments in panel positioning.
- Display of Information: The Raspberry Pi Pico W also sends data to the LCD display, updating it in real-time with information about the energy captured and system status.
Log
Week 6 - 12 May
Ordered all necessary components for the project.
Week 7 - 19 May
Uploaded files for 3D printing and received the printed parts. Created the KiCad schematic diagram for the project. Assembled the hardware components of the project.
Week 20 - 26 May
Created the software for the project. Gave the final touch to the project hardware by fixing the supports for the servo motors and replace any cardboard with plastic.
Day 27 May
Presented the project at PM Fair.
Hardware
The primary hardware foundation of the RustFlower project centers around the Raspberry Pi Pico W, a central processing unit known for its low power consumption and ability to manage multiple inputs and outputs simultaneously. Servomotors are integrated to adjust the photovoltaic panel’s orientation for optimal solar alignment, enhancing energy efficiency. Photoresistors serve as the main sensory apparatus, detecting sunlight intensity from various angles to guide the servomotors' adjustments. The MCP3008 provides additional ADC ports necessary for the project. The photovoltaic panel captures solar energy, central to demonstrating the conversion process. The INA219 current sensor measures voltage and current from the photovoltaic panel, crucial for calculating real-time power production. Finally, a small LCD display provides immediate feedback on the system’s performance, including energy generation and system status.
Schematics
KiCad schematic of the RustFlower project:
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico WH | The microcontroller | 39 RON |
Photovoltaic Panel | Converts light into energy | 20 RON |
Breadboard | Prototyping and organizing electronic circuits without soldering | 10 RON |
Photoresistors | Detects changes in light intensity | 1.9 RON |
Servomotors | Converts electrical signals into precise movement | 12 RON |
INA219 Current Sensor | monitor and calculate the power output of the photovoltaic panel | 20 RON |
LCD Display | Displays visual information | 16 RON |
Male-Male Wires | Establishes electrical connections | 7 RON |
Male-Female Wires | Connects components to the breadboard | 5 RON |
Female-Female Wires | Used for extending connections between components | 3 RON |
Resistors | Controls current flow and voltage levels | 15 RON |
MCP3008 | Created aditional ADC ports | 15 RON |
Software
Library | Description | Usage |
---|---|---|
rp-hal | Hardware Abstraction Layer for RP2040 microcontrollers. | Manages GPIO, I2C, SPI, and other peripherals on the Raspberry Pi Pico W. |
embedded-hal | Hardware Abstraction Layer traits for embedded systems. | Provides abstractions for digital I/O and analog readings, crucial for interfacing with sensors and actuators. |
cortex-m-rt | Runtime for ARM Cortex-M microcontrollers. | Facilitates low-level device initialization and setup for real-time operations. |
INA219 | Library for interfacing with the INA219 sensor over I2C. | Used to measure voltage, current, and calculate power production from the photovoltaic panel. |
hd44780-driver | Library for interfacing with HD44780 LCD displays. | Used to control the LCD display over I2C. |
embedded-hal-async | Asynchronous Hardware Abstraction Layer traits for embedded systems. | Enables async operations for embedded-hal traits. |
defmt-rtt | Real-time transfer logging for embedded systems. | Provides efficient logging capabilities for debugging. |
fugit | Timing library for embedded systems. | Provides abstractions for time-based operations. |
embassy-executor | Async executor for embedded systems. | Manages asynchronous tasks in the project. |
embassy-time | Time abstractions for Embassy async framework. | Provides timing utilities for async tasks. |
embassy-rp | Embassy support for RP2040. | Provides async drivers and peripherals specific to the RP2040. |
log | Logging facade for Rust. | Enables logging in the application. |
embassy-usb-logger | USB logging for embedded systems. | Provides USB-based logging capabilities. |
panic-halt | Halts the microcontroller on panic. | Used as a panic handler in no_std environments. |
panic-probe | Probe panic handler for debugging. | Provides detailed panic information for debugging. |
embedded-alloc | A heap allocator for no_std environments. | Manages dynamic memory allocation in the project. |