Professional Documents
Culture Documents
Chapter 3 (1.0) (19-30)
Chapter 3 (1.0) (19-30)
Fig. 3.1 Block Diagram of the Dual Axis Solar Tracking System
The block diagram is showing that LDR sensors once sensing the sunshine
forward the signal to Microcontroller. The microcontroller is a logical device that’s
enchanting dealings on the root of sensor put in and starting the motor driver’s track
consequently. Assume if the sun changes its individual locality and go from east to
west, it’ll cause light absorption to vary on one sensor as related to different one. On
the base of light intensity feature on sensors, the controller starts driver circuits and
moves DC geared motor to new positions wherever light falling on sensor pairs is
same. The same method can maintain it up with a change in sun’s locality surrounded
by the sky. As a result, this proposed model can capture supplementary sun rays and
system’s solar energy conversion capability is greatly superior. How control
algorithm is performing gesture assessment and is that the key deciding constituent
which shows it in “Fig. 3.2,”. When it collects data from LDR sensors then main
algorithm is started. Sensor’s productivity is analogue that’s stimulated to digital
21
signals. This serviceable task is performed using analogue to digital converter (ADC).
The digitized signals are
20
motor will rotate to the opposite direction and give delay. Since the solar tracker are
working through the whole day, the system is made as endless system. so finally, it
will start again.
Start
Initialize all
inputs equal 0
Center YES
Delay Longer
LDR=0?
NO
Check
Alignment
Vertical NO
avt>avd? Horizontal
NO avr>avl?
YES NO YES
NO
avt<avd? avl<avr?
Rotate Motor 1 Rotate Motor 2
CW CW
YES
YES
Rotate Motor 1 Rotate Motor 2
Delay CCW CCW
Delay
Delay Delay
Delay Delay
eastldr = analogRead(A0);
westldr = analogRead(A1);
topldr = analogRead(A2);
botldr = analogRead(A3);
25
eastbutton = digitalRead(ebuttonPin);
if (eastbutton == HIGH)
{ digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
} // rotate to east side when you push the right button
else {
digitalWrite(IN1, LOW);
}
westbutton = digitalRead(wbuttonPin);
if (westbutton == HIGH)
{ digitalWrite(IN2, HIGH);
} //rotate to west side when you push the right button
else {
digitalWrite(IN2, LOW);
}
topbutton = digitalRead(tbuttonPin);
if (topbutton == HIGH)
{ digitalWrite(IN4, HIGH);
} //rotate to top side when you push the top button
else {
digitalWrite(IN4, LOW);
}
botbutton = digitalRead(bbuttonPin);
if (botbutton == HIGH)
{ digitalWrite(IN3, HIGH);
} //rotate to down side when you push the down button
else {
digitalWrite(IN3, LOW);
}
onoffswitch = digitalRead(switch1Pin);
singledualswitch = digitalRead(switch2Pin);
Serial.println(eastldr);
26
Serial.println(westldr);
Serial.println(topldr);
Serial.println(botldr);
}
After the Manual Rotating, the Program will process the automatically rotating
of the panel. In this part, at first the program checks the east-west orientation first. If
the values of east LDR and West LDR less than 400, the controller will write IN1
HIGH and wait for the delay and after that digitally Write IN1, LOW. While on-off
switch (switch 1) is HIGH and single-dual switch (switch 2) is LOW which means the
Auto mode is on and the single mode is on. So, the analog values of the East, West,
Top and Down LDRs are read.
poserror = abs(error);
if (poserror > 10){
if (error > 0) {
digitalWrite(IN2, HIGH);
// Serial.print("IN2 HIGH");
}
else if (error < 0) {
digitalWrite(IN1, HIGH);
//Serial.print("IN1 HIGH");
}}
And another condition, The error is less or equal to 10, that means the sun
light is fall on the panel in right position. So, the controller write IN1 and IN2 LOW
to make the driver to stop the rotation.
Serial.println(eastldr);
Serial.println(westldr);
Serial.println(topldr);
Serial.println(botldr);
And Read the on-off Switch Pin and single-dual Switch again.
onoffswitch = digitalRead(switch1Pin);
singledualswitch = digitalRead(switch2Pin);}
onoffswitch = digitalRead(switch1Pin);
singledualswitch = digitalRead(switch2Pin);
28
While the on-off Switch is HIGH and single-dual switch is HIGH, read the Analog
values of four LDRs again.
// Serial.print("IN2 HIGH");
}
else if (error < 0) {
digitalWrite(IN1, HIGH);
29
//Serial.print("IN1 HIGH");
}}
else if (poserror <= 10 ) {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
}
Serial.println(eastldr);
Serial.println(westldr);
After that, Top-Down error value is set to the absolute value. If the absolute value of
Top-Down error is greater than 10, check again Top-Down error value is greater than
0 which means the sun on the top of the panel and then write IN4 HIGH to turn motor
to the top. if this error value is less than 0, the sun the in the Down position. So if this
error values is less than 0, write IN3 HIGH to turn the motor Down.
}
}
else if (poserror <= 10 ) {
digitalWrite(IN4, LOW);
digitalWrite(IN3, LOW);
}
Then read the switch values again and wait for the moment to start the program again.
onoffswitch = digitalRead(switch1Pin);
singledualswitch = digitalRead(switch2Pin);}
onoffswitch = digitalRead(switch1Pin);
30
singledualswitch = digitalRead(switch2Pin);
delay(200);
}
3.5 Conclusion
In this chapter, the flowchart, schematic diagram and block diagram of the
system are included. The block diagram is showing the rough idea of this system. The
flowchart will show how this system works inside and Schematic diagram is the
circuit diagram with real components so that it is easy to realize the shape of the
components.
And the last is about the Arduino Program with explanation about how received
signal are calculated and send responds to the motors to make the system right all the
time.