Site icon Microcontroller Based Projects

Solar Tracking System

Solar Tracking System Featured Image

This post is about designing a simple PIC microcontroller based Solar Tracking system. It requires some basic electronics skills and good motor coordination. This design uses 2 unipolar stepper motors and 4 IR-850nm LEDs as sensors to follow the sun  in effort to maximize solar energy received by solar panel.


The entire prototype frame was built from simple, cheap and widely available strip board. Just cut it to a required size, widen the holes with screwdriver to fit connecting bolts and you’re done. If you want to build a similar circuits or use current configurations as a basis for more advanced design follow the pictures, hopefully it will give you some ideas. Here are some of the steps taken from a standard strip board to a final design.

The firmware is a modified version of the code from my other design Stepper Motor Interface PIC16F post. 2 step motors can independently rotate to any direction according to amount of light received by each IR LED. For example if Upper LED receives more light than the Lower LED the microcontroller will move the platform with mounted solar panel in the direction of stronger light source. Motor control is done by outputting coil switching sequence through ULN2003A. During the development a few limitations or “bugs” of current design were discovered. Although the platform can move in 2 axis,(UP, Down, Left, Right) the solar cell attached to it is too heavy for stepping motors that were used to rotate it. If I had to build a new solar tracker  I would change the center of mass or use counterweights for better balancing thus reducing the motor load, also direct frame connection to a platform rotating motor without some sort of reducer mechanism was a mistake, again the final design with solar cell attached weights too much and the motor doesn’t have enough torque to rotate it properly  even with max allowed voltage supply of 24V.UP/Down axis movements are working OK. For MCU programming I recommend using simple programmers like PICKIT2PICKIT3 or compatible devices . Assembly/hex files available here. Flashlight was used to test the prototype indoors and verify correct response from the MCU. In a short video below you can see the actual operation of the system.

 

Exit mobile version