Skip to main content

RustFlower

A smart solar tracker that moves a photovoltaic panel towards light, mimicking a sunflower's natural inclination to follow the sun.

info

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

Solar Tracker System Diagram

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.

First image of the assembled hardware

Second image of the assembled hardware

Schematics

KiCad schematic of the RustFlower project:

KiCAD schematic

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico WHThe microcontroller39 RON
Photovoltaic PanelConverts light into energy20 RON
BreadboardPrototyping and organizing electronic circuits without soldering10 RON
PhotoresistorsDetects changes in light intensity1.9 RON
ServomotorsConverts electrical signals into precise movement12 RON
INA219 Current Sensormonitor and calculate the power output of the photovoltaic panel20 RON
LCD DisplayDisplays visual information16 RON
Male-Male WiresEstablishes electrical connections7 RON
Male-Female WiresConnects components to the breadboard5 RON
Female-Female WiresUsed for extending connections between components3 RON
ResistorsControls current flow and voltage levels15 RON
MCP3008Created aditional ADC ports15 RON

Software

LibraryDescriptionUsage
rp-halHardware Abstraction Layer for RP2040 microcontrollers.Manages GPIO, I2C, SPI, and other peripherals on the Raspberry Pi Pico W.
embedded-halHardware Abstraction Layer traits for embedded systems.Provides abstractions for digital I/O and analog readings, crucial for interfacing with sensors and actuators.
cortex-m-rtRuntime for ARM Cortex-M microcontrollers.Facilitates low-level device initialization and setup for real-time operations.
INA219Library for interfacing with the INA219 sensor over I2C.Used to measure voltage, current, and calculate power production from the photovoltaic panel.
hd44780-driverLibrary for interfacing with HD44780 LCD displays.Used to control the LCD display over I2C.
embedded-hal-asyncAsynchronous Hardware Abstraction Layer traits for embedded systems.Enables async operations for embedded-hal traits.
defmt-rttReal-time transfer logging for embedded systems.Provides efficient logging capabilities for debugging.
fugitTiming library for embedded systems.Provides abstractions for time-based operations.
embassy-executorAsync executor for embedded systems.Manages asynchronous tasks in the project.
embassy-timeTime abstractions for Embassy async framework.Provides timing utilities for async tasks.
embassy-rpEmbassy support for RP2040.Provides async drivers and peripherals specific to the RP2040.
logLogging facade for Rust.Enables logging in the application.
embassy-usb-loggerUSB logging for embedded systems.Provides USB-based logging capabilities.
panic-haltHalts the microcontroller on panic.Used as a panic handler in no_std environments.
panic-probeProbe panic handler for debugging.Provides detailed panic information for debugging.
embedded-allocA heap allocator for no_std environments.Manages dynamic memory allocation in the project.
  1. Solar Tracker Using Arduino and Raspberry Pi 3
  2. Raspberry Pi Solar Tracker on GitHub
  3. DIY Solar Tracker