Week 12. Mechanical Design, Machine Design¶
Group Assignment¶
During our Machine Building week, Gevorg and I, upon the suggestion of our instructor Onik Babajanyan, decided to build a solar tracker—a device that follows the movement of the sun and helps determine its position throughout the day.
The study and creation of this device are especially relevant in Armenia, as there are nearly 300 sunny days throughout the year.
A solar tracker is a system composed of mechanical and electronic components that automatically changes its position by following the sun’s movement in the sky. It constantly monitors the sun’s position and accordingly rotates or tilts itself to remain correctly aligned.
We began exploring the different types of solar trackers, which are quite numerous. However, it was not possible to find complete and accurate information about all of them. Nevertheless, we identified five types that are currently among the most widely used and relevant worldwide.
We divided the work into several stages to make the project more organized and efficient. In the initial stage, Gevorg worked on sketching the device design, developing early concepts for the overall appearance and main structural solutions. Two different sketches were created, which allowed us to compare ideas, evaluate their advantages and disadvantages, and select the most suitable and practical option based on functionality, usability, and manufacturability.
After that, Gevorg continued with the more technical part of the design process by developing the PCB (Printed Circuit Board) and schematic design. In this stage, the electronic circuits were defined, the necessary components were selected, and the PCB layout was designed, with special attention given to correct component placement and optimized routing to ensure reliable system operation.
After completing the design phase, we moved on to the mechanical and motion system of the project. Since the solar tracker needed to move along two axes, it was necessary to select appropriate motors and ensure that they could provide the required movement while also handling the structural load. For this purpose, we studied different servo motors, compared their technical specifications, and carried out several tests.
Motor Testing¶
We needed to ensure both vertical and horizontal rotation of the system, so we considered two different types of servo motors to achieve the required movements.
| Feature | HK-15138 Servo Motor | Corona DS-939MG Servo Motor |
|---|---|---|
| Image | ![]() |
![]() |
| Motor Type | Standard analog servo | Digital metal gear servo |
| Operating Voltage | 4.8V – 6V | 4.8V – 6V |
| Torque | ~4.3 kg.cm | ~2.5–2.7 kg.cm |
| Current | ~0.7–1 A (load dependent) | ~0.2–0.24 A (normal operation) |
| Speed | ~0.17 sec/60° | ~0.13–0.14 sec/60° |
| Gear Type | Plastic gears | Metal gears |
| Weight | ~38 g | ~12.5 g |
| Rotation Angle | ~180° | ~180° |
| Control Signal | PWM | PWM |
Since our microcontroller was an Arduino Uno, we also had to ensure that the combined current consumption of both motors would not exceed 500 mA.
Taking these constraints into account and after studying the technical specifications, we selected the CORONA CS-939MG servo motor as the most suitable option for our project. Although its torque is lower than that of the HK-15138, it offers significantly lower current consumption, allowing the system to operate within the power limitations of the Arduino Uno. In addition, its metal gears provide better durability and reliability under continuous operation and mechanical load, which is important for the moving mechanism of the solar tracking system.
After selecting the servo motor, we performed a series of tests to evaluate its ability to support the weight of the upper part of the system. The motor was tested both with and without load by rotating it from 0° to 180° and back while observing its stability, smoothness of motion, and responsiveness.
For this test, we used the official Arduino example code from the Arduino documentation on servo motors.
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
This code continuously rotates the servo motor from 0° to 180° and back, allowing us to observe its behavior during repetitive motion.
After confirming the basic operation of the motor, we carried out additional load tests to simulate real operating conditions. The total weight of the upper structure was measured to be approximately 805 grams.

Considering that the selected servo motor can support a load of up to approximately 250 grams at a lever length of 10 cm, we evaluated whether it would be sufficient for our structure.
In addition, we investigated another load configuration in which the load was positioned vertically in a hanging state.
The results of these experiments showed that the servo motor was able to operate stably and provide the required motion even under load conditions. These findings formed the basis for the final motor selection and confirmed its suitability for use in our solar tracking system.
3D Modeling and Printing¶
After clarifying all of the above, we moved on to the 3D modeling phase of the system. In this stage, we divided the work to make the process more efficient: I was responsible for designing the lower housing, while Gevorg worked on modeling the upper part of the system.
The first servo motor, which is responsible for the horizontal axis rotation, had to be placed together with the Arduino Uno inside the lower compartment. This was due to dimensional limitations and component placement requirements, which led to the design of the lower part being developed based on this structural solution, while also aligning it with our PCB design.
However, there was one important aspect in this process: the dimensions and hole placements of both my and Gevorg’s designed parts were interconnected with a single key structural element of the housing. Therefore, the accuracy and proper alignment of the entire system depended on the correct design of this component.
To begin the modeling work, we first downloaded the 3D models of the main components used in the system, specifically the Arduino Uno board and the servo motor. This step was important because it allowed us to accurately calculate the internal dimensions of the enclosure and the placement of the components from the early stages of the design.

The images show the process of integrating the downloaded 3D models into the design environment. The servo motor and Arduino Uno models were placed in the working area of the project to examine their relative positions, mounting possibilities, and the required space inside the lower enclosure.
This approach helped to prevent dimensional mismatches in advance, ensure the correct positioning of mounting holes, and design a more compact and stable structure before moving on to the 3D printing stage.

The image shows the overall structure of the project in a transparent (wireframe) view, where the arrangement of the internal components inside the enclosure is clearly visible. This view makes it possible to see how the Arduino Uno board and the servo motor are positioned in the lower part of the enclosure, as well as to evaluate the spacing between them and their mounting positions.

This image shows the external appearance of the model with the enclosure fully closed. On the top section, the opening for the servo motor is visible, and next to it there is a slot-shaped hole specifically designed for routing the wires coming from the upper component. This solution allows the wires to be guided into the enclosure in an organized manner, avoiding pressure or damage, while also maintaining a clean and neat design.
The openings on the front side are intended for the placement of connection ports and control elements, ensuring convenient use of the device.

This is the main component that connects the 3D models designed by Gevorg and me. It ensures the proper alignment of the two parts by incorporating the appropriate dimensions and precise placement of the holes.
In the first stage, I designed the enclosure lid by adding support feet to it. These feet are intended to keep the enclosure slightly elevated from the surface it is placed on, preventing direct contact. This ensures air circulation underneath the enclosure and contributes to the overall ventilation of the system.

In addition, I created ventilation holes on the lid, which help cool the internal electronics, particularly the Arduino Uno.

In the second stage, I designed the mounting holes for the Arduino Uno. These holes correspond to the board’s mounting positions and allow it to be securely fixed with screws.
The design and development of the upper part of the system were carried out by Gevorg, where more detailed information about his work can be found.
System Assembly¶
After completing the 3D printing process, the next step was to assemble all the manufactured parts and install the electronic components inside the enclosure.
First, we inspected all printed parts to ensure that the dimensions, mounting holes, and connection points matched the specifications defined during the design stage. After confirming that all components fit together correctly, we assembled the upper and lower sections of the structure.
Next, we installed the servo motors in their designated positions. The servo motor responsible for horizontal-axis rotation was mounted inside the lower enclosure, while the servo motor responsible for vertical movement was attached to the upper section. Particular attention was paid to the alignment and secure fastening of the motors to ensure stable and smooth operation during movement.
In the following step, we mounted the Arduino Uno board inside the lower enclosure using the mounting holes designed during the modeling phase. The board was secured with screws to prevent any unwanted movement during operation.
Afterward, we completed the wiring connections and cable management. The wires from the servo motors were routed through the dedicated openings designed in the enclosure, allowing them to pass safely between the upper and lower sections of the system. This arrangement helped maintain an organized internal structure and reduced the risk of cable damage during movement.
Once all mechanical and electronic components had been installed, we performed a final inspection to verify that every part was properly assembled and aligned. As a result, we obtained a fully assembled structure that was ready for the programming and functional testing stages of the project.
After completing the System Assembly phase, we moved on to the Coding phase, where we implemented sensor data reading, servo motor control, and the overall system control algorithm, the detailed description of which is presented on the group page.
And then, based on the implemented code and the completion of the entire system, we carried out the experiment to evaluate the performance of the sensors, servo motors, and the overall control algorithm under real operating conditions, as well as to verify the system’s stability and response accuracy. As a result, the system demonstrated high stability and efficiency; the device was able to quickly and accurately respond to changes in light intensity, smoothly track the direction of maximum light, and maintain stable operation of the servo motors even under load conditions, confirming the successful performance of the entire system.
Finally, the complete overview of the project and group work can be found on the group page.
Conclusion¶
From this work, we understood that the performance of a solar tracking system depends not only on the control algorithm, but also on the precision of the mechanical structure and the correct selection of actuators.
It became clear that even small changes in load can affect the stability of a servo motor, making proper motor selection a critical factor for the overall system performance.
We also learned that a simple sensor-based comparison algorithm can effectively track the light direction, but it requires additional logic to prevent oscillations and unstable behavior.
Finally, the experiments showed that stable real-world operation is only possible when mechanics, electronics, and software are properly integrated as a single system.

