CHAPTER NO. 4
IMPLEMENTATION AND TESTING
With the complete
designing work from the previous chapter, hardware implementation is carried
out in this chapter to finalize the project work, constructing a design for
dual axis such that a metal gear is designed in the door hook which is then
attached with the shaft of the motor. As shown in figure 15,
Figure 15. Motor for
East, West rotation
And the other motor is
attached such that its rotation causes the PV module to move up and downward
for the rotation of north and south as shown in figure 16,
Figure 16. Motor for
North, South rotation
the development of device’s tracking algorithm could be carried out, the
circuit for mbed microcontroller and other components needed to be correctly
set up. The diagram in figure 17 shows how mbed microcontroller was connected
to other components. As introduced from section 3.3, the microcontroller sent
outputs to DRV8825 motor drivers through digital output pins. Each driver required
one enabling input, we left enabling pin open and four controlling inputs. To
connect stepper motors to their drivers, extending cables were used, because
they were already mounted to the base of device. The sensor circuit was
connected to microcontroller by simply feeding its voltage divider outputs to
four analogue inputs of mbed.
All components were
operating using power from the PSU unit, including the mbed microcontroller.
Additionally, when the development board was connected to a computer, USB power
could be conveniently used for testing the functionality of the system.
Figure 17. Configuration
of pins and connections
diagram in figure 19 only describes the overview of controlling circuit. The
detailed and comprehensive diagram with correct pinout connections can be found
at appendix 1 of this document.
Implementation for Prototype
With the help of
information picked from the website of pololu, and the library of the stepper
motor driver which can be downloaded online, stepper motor was driven, and the
coding for prototype was then initialized.
A problem was faced when loading the library
That was, motor was not
rotation in the other direction. Since we need to rotate the motor in both direction,
then only solution was to load actual library which is built specially for
drv8825 pololu driver.
In that library command
to rotate the motor was in degrees not in steps as that was in stepperMotor
standard library. Driver’s command to rotate motor in either direction was
initializing the library, we had to name out the pins for our easiness.
Four pins were used for analog read
Two pins for each driver those were ‘step’
and ‘direction’, other c1, c2 and c3 could also be used if we were willing to
step up the motor in micro stepping angle (1/32).
simple main program was created to
test and adjust the movement of stepper motor. Creating an instance for stepper
motor driver is straightforward, by declaring an object of type stepper, and specifying its five control
outputs from mbed microcontroller. As it has been initialized, it is available
to use any function of the stepper
class that was included in its module code. I decided to add other advanced
features only in later versions of the program. At this stage of the
implementation, it was only necessary to use the essential feature of motor
drivers to test the functionality of stepper motor, and how it performed with
the hardware design of the system.
next step of software implementation was reading the inputs signal from photo
sensors. Instead of creating modular library, photo sensor inputs can be easily
read by creating four AnalogIn
variables in the main program, which
corresponds to the analogue inputs p0 to p5 of mbed, as shown in figure 17.
Prior to the coding task of sensor, the photo sensor circuit needed to be
correctly configured and installed to the top mount of the device. The photo
sensors used in this project are of Light-Dependent Resistor (LDR) type, which
have resistance value in outdoor daylight condition of 50 to 60 ?, and dark
condition of more than 1 K?. As displayed in figure 18, each LDR was connected
in series with a 47 k? resistor, to form a voltage divider circuit, where
resistor voltage outputs Vout were
fed into analogue inputs of mbed microcontroller. With selected value of components,
Vout can have voltage values
approximately from 0 V to 3.3 V, which are compatible with analogue input
voltage of the mbed.
18. Circuit diagram for photo sensor circuit.
reading the value of those analogue input, decision for the rotation of stepper
motor were made by using if
statements and appropriate functions from stepper
module keeping in mind the tolerance values will also be affected so that we
have to test the module until the results come somehow satisfactory. Detailed
coding for decision making was done in accordance with the logic defined in
figure 11. By adding different variables for LED indicators into the code, and
compiling the program to mbed microcontroller, we can check whether stepper
motors can rotate in the expected direction and photo sensors can correctly
read light intensity.
4.2.2 Testing of Device Functionality
LDR photo sensor can work with any kind of visible light, testing process for
the initial prototype was completed indoor using table lamp as source of light.
In the first test, the device was able to detect the movement of light source
and rotate to align with it. Light detection had some small delay, due to the
characteristic of LDR photo sensor, but that is acceptable for solar PV
applications, because the sun moves slowly and gradually during device’s
the first version of the DAT system did not have enough stability. The weight
of all the components mounted on top of secondary stepper motor put a strain on
it, which cause improper and incorrect rotation from time to time. Also, in
practical, the stepper motors only worked properly with 12 steps per rotation,
which resulted in imperfect alignment of photo sensors, causing repetitive
realignments. Under the scope of this project, it was hard to circumvent these
drawbacks without replacing stepper motors with better ones.
main purpose of this stage was to perform a quantitative evaluation of how much
the designed TTDAT improves over normal fixed mount PV systems. In order to do
that, an identical solar PV panel was used on a fixed mount at equal height
with TTDAT. PV panel of in fixed mount configuration was placed horizontally.
The two systems were placed outside, under the same weather condition, with the
same setup of measuring equipment, which are shown in figure 20 below.
Variable Resistor 1
Variable Resistor 2
20. Device setup for measuring PV modules output power.
each system, the solar PV panel consisted of two PV modules in series
connection. Each module had rated power output of 0.6 W at voltage 6 V, giving
the total rated output of 1.2 W at voltage 12 V. With the way of set up
measuring equipment as in figure 20, the variable resistor provided a more
detailed result of performance of two systems with different loads. The
evaluation had been carried out on a winter day in Dec 2017, with the following
are done in multiple sessions during different time of the day.
each session, it is important that two systems are measured simultaneously,
under the same solar radiation.
open-circuit voltage, short-circuit current, output voltage and current at
different loads in the range 10 ? to 10 K?.
Table 4. Open-circuit
voltages and short-circuit currents of PV modules
goal of the project was to design and implement a small scale prototype of
dual-axis solar tracker with basic tracking functions. Designing and
implementing processes have been accordingly completed for the work of the
project. The final result was a complete design of such a system, with
functionality that met the design requirements.
the project has succeeded in creating a device with basic required features,
there are still considerable drawbacks and limitations with the performance of
the device, as discussed in the implementation work of the project. It is
possible to overcome these limitations and to improve the performance of the
device in future development.
project was a successful effort in fulfilling the purpose when I started it,
that is to research and catch up with current technologies in this field of
energy exploitation. It is a useful reference for those who needs to develop
similar systems. The knowledge and information from this project can also
become the starting point for future development of a various of applications.