Smart Solar: Panel With Automatic Tracking

by Vince Marginet in Circuits > Raspberry Pi

27 Views, 0 Favorites, 0 Comments

Smart Solar: Panel With Automatic Tracking

20250616_112250.jpg

I made Smart Solar, a system that automatically adjusts the position of a solar panel based on the sun’s location to maximize energy output.

I built a responsive web dashboard where I can see real-time data like panel position and energy output, view historical data, and even manually control the panel. I created this project to help households and businesses improve the efficiency of their solar panels and lower their energy costs.

In this Instructable, I'll guide you through the steps to build it yourself. If you get stuck along the way, you can always check out my GitHub page, where I’ve shared all the code and design files.

https://github.com/howest-mct/2024-2025-projectone-mct-MarginetVince

Supplies

Sensors

  1. LDR sensors (8): Measure sunlight intensity to automatically determine the optimal panel position.
  2. Inductive proximity sensor: Detects the zero (reference) position of the solar panel.
  3. Current and voltage sensor (INA219): Measures current and voltage to calculate energy production.
  4. Button: Used to safely turn off the Raspberry Pi.

Actuators

  1. Stepper motor: Rotates the solar panel to the ideal angle based on sensor input.
  2. LED strip: Acts as a load for the battery.
  3. Potentiometer: Controls the brightness of the LCD screen.

Display

  1. LCD display: Shows real-time data such as voltage, current, and panel position.

Regulators / Interfaces

  1. MCP3008: For reading multiple LDRs.
  2. MCP3008: For monitoring battery voltage.
  3. PCF8574: For connecting the LCD via I²C.

Power Sources

  1. External breadboard power supply
  2. Solar panel
  3. Solar charge controller
  4. 12V battery

Controller

  1. Raspberry Pi 5: Controls the entire system, processes sensor data, and runs the web interface.

Extra Components

  1. Wooden enclosure: Houses and protects all electronics.
  2. Micro SD card: Contains the Raspberry Pi OS and all project code.
  3. Jumper wires: Connect all components.
  4. 2 Breadboards: For easy prototyping and temporary connections.
  5. Compass: Used to find true north.


If you are interested in where you can buy all of this and how much it costs, take a look at my bill of materials.

Make the Circuit

20250616_110447.jpg
Screenshot 2025-06-18 134548.png

Below you’ll find two PDFs showing what the circuit looks like. Please replicate it.

Creating Database

EERD.png

Create a database to store data:

  1. Device: This table contains information about the different devices. Each device has a unique DeviceId, a Name, a Type (sensor or actuator), and a MeasurementUnit.
  2. History: This table stores measurements or actions linked to a device. It includes a unique HistoryId, references to a DeviceId and an ActionId, a Value (the measured value or performed action), and an ActionDate (the timestamp when the value was recorded).
  3. Action: This table contains possible actions or states. Each action has a unique ActionId and an ActionDescription.


Code

Check the files 1_kickoff.md and 2_Configuration.md in the docs folder on my GitHub. Then, clone the repository to your Raspberry Pi to get all the code locally.

https://github.com/howest-mct/2024-2025-projectone-mct-MarginetVince

Constructing the Housing

Smart_Solar_3D_schets.jpg
Bovenaanzicht_Smart_Solar.jpg
Linkerzijaanzicht_Smart_Solar.jpg
Vooraanzicht_Smart_Solar.jpg

Above is the technical drawing of my enclosure.

Photos of the Enclosure

IMG-20250503-WA0000.jpg
20250607_120123.jpg
20250607_120154.jpg
20250607_120202.jpg
20250607_120213.jpg
20250607_120222.jpg
20250607_121101.jpg
20250607_121113.jpg
20250607_121119.jpg
20250607_121127.jpg
20250607_124742.jpg
20250607_124809.jpg
20250607_133709.jpg
20250607_134823.jpg
20250607_135207.jpg
20250607_135358.jpg
20250607_141134.jpg
20250607_144905.jpg
20250607_155456.jpg
20250607_160147.jpg
20250607_160356.jpg
20250607_160626.jpg
20250607_161912.jpg
20250607_161917.jpg
20250607_162056.jpg
20250607_162543.jpg
20250607_163245.jpg
20250607_164851.jpg
20250607_165155.jpg
20250607_165340.jpg
20250607_165535.jpg
20250607_165631.jpg
20250607_165846.jpg
20250608_095158.jpg
20250608_095549.jpg
20250608_095818.jpg
20250608_095934.jpg
20250608_100410.jpg
20250608_102935.jpg
20250608_103006.jpg
20250608_104651.jpg
20250608_111709.jpg
20250608_111733.jpg
20250608_111822.jpg
20250608_112838.jpg
20250608_113050.jpg
20250608_114243.jpg
20250608_114344.jpg
20250608_115037.jpg
20250608_115115.jpg
20250608_115844.jpg
20250608_115849.jpg
20250608_120455.jpg
20250608_142614.jpg
20250608_181539.jpg
20250608_182632.jpg
20250608_182757.jpg
20250616_110447.jpg
20250616_112250.jpg
20250616_130423.jpg

I took a photo of each step, follow them in order. The measurements can be found in the technical drawing above.