Sanzhar Askaruly Nazarbayev University, School of Engineering
Solar Tracking System
1. Requirement Specification
The aim is to build a solar tracking system based on the direction of the light intensity. The motors should be
controlled such that they point the light sensors towards the direction of the light source so as to maximize the
light sensor readings.
AT89S51
L293D
DC motor
IR Sensor
MAX232 and COMPIM
USB I/O interface
Wires
2. Block diagram of the system
3. Hardware block diagram
Sanzhar Askaruly Nazarbayev University, School of Engineering
4. Software block diagram
5. Schematic Circuit
6. Brief description and originality
The system takes input from the data obtained from IR sensor, which is responsible for detection of light. IR
sensor responds with 1 or 0 according to the intensity of light. The threshold value is preconfigured. The motor
rotates towards light until IR sensor detects light. And when it detects, the motor stops. This procedure repeats
again and again. Based on this principle, if more IR sensors and motors are added, actual precise PID controller
can be made. Our system works without serial connection with PC, and it does not exploit ADC. Nevertheless,
there are a few advantages. One of them is, doubtlessly, simplicity. The software part is straightforward, since
there are no commands for receiving and transmitting signals. In future, the proposed system can be developed
further for complex functions. Practically, the system can be implemented for solar panels to catch more light.
Sanzhar Askaruly Nazarbayev University, School of Engineering
7. Video and Code of the Working System
The link to the video:
[Link]
# include <reg51.h>
sbit t = P0^0; //define port0 bits for variables
sbit c = P0^1; //t and c bits show the polarity of motor
sbit a = P0^2; //a for IR sensor
void wait_a_second() // delay1
{
unsigned int x;
for(x=0;x<90;x++);
}
void wait() // delay2
{
unsigned int x;
for(x=0;x<60;x++);
}
void main ()
{
t=0; //pin inputs initialized
c=0;
for(;;){ //forever
while(a==0){ //if light detected
t=~t; //invert for motor output
wait_a_second(); //delay1
t=~t; //invert for motor output
wait(); //delay2
}
}
}