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

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
- LDR sensors (8): Measure sunlight intensity to automatically determine the optimal panel position.
- Inductive proximity sensor: Detects the zero (reference) position of the solar panel.
- Current and voltage sensor (INA219): Measures current and voltage to calculate energy production.
- Button: Used to safely turn off the Raspberry Pi.
Actuators
- Stepper motor: Rotates the solar panel to the ideal angle based on sensor input.
- LED strip: Acts as a load for the battery.
- Potentiometer: Controls the brightness of the LCD screen.
Display
- LCD display: Shows real-time data such as voltage, current, and panel position.
Regulators / Interfaces
- MCP3008: For reading multiple LDRs.
- MCP3008: For monitoring battery voltage.
- PCF8574: For connecting the LCD via I²C.
Power Sources
- External breadboard power supply
- Solar panel
- Solar charge controller
- 12V battery
Controller
- Raspberry Pi 5: Controls the entire system, processes sensor data, and runs the web interface.
Extra Components
- Wooden enclosure: Houses and protects all electronics.
- Micro SD card: Contains the Raspberry Pi OS and all project code.
- Jumper wires: Connect all components.
- 2 Breadboards: For easy prototyping and temporary connections.
- 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


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

Create a database to store data:
- 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.
- 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).
- 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




Above is the technical drawing of my enclosure.
Photos of the Enclosure




























































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