Skip to content

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.

These are:

  • Single Axis Solar Tracker
  • Dual Axis Solar Tracker
  • LDR Based Solar Tracker
  • GPS Based Solar Tracker
  • Hybrid Solar Tracker

More detailed information about these types can be found on Gevorg’s page.

Schematic Design and Analysis

In this project, we used 4 photoresistors (LDRs) to measure light intensity from different directions. Each photoresistor is connected in a separate circuit, meaning we have 4 independent sensor channels. This is important because we need to compare light coming from different directions, not just measure it at a single point.

Each channel is built using the same principle, with a fixed resistor (R2, R4, R6, R8) and a photoresistor (R3, R5, R7, R9). These two components together form a voltage divider. The fixed resistor is connected to the 5V power supply (PWR_5V), while the photoresistor is connected to GND. The voltage at the junction between them is used as the output signal.

This output voltage is sent to the microcontroller inputs (pin1, pin2, pin3, pin4). The microcontroller reads these voltages as analog values, which can then be processed in software.

The main characteristic of a photoresistor is that its resistance changes depending on light intensity. When the light level increases, its resistance decreases, and when the light level decreases, its resistance increases. Since the photoresistor is part of a voltage divider, this change directly affects the output voltage. As a result, we get a variable voltage that reflects the amount of light falling on the sensor.

Because the sensors are placed in different directions, the microcontroller receives four different values. By comparing these values, it is possible to determine which direction has the highest light intensity. For example, if one sensor gives a significantly higher value than the others, it means that direction is more illuminated.

The circuit also includes 0Ω resistors (R1, R10, R11), which are used as jumpers. They help provide flexible connections and make it easier to modify the circuit if needed without adding extra wires.

Overall, this type of connection is simple but effective. It allows us to obtain stable and clear analog signals that are easy to process with a microcontroller. That is why this method is widely used in solar tracker systems, where the goal is to detect the sun’s direction and adjust the mechanism toward the most illuminated side.

PCB Design

After checking the schematic, the team moved on to the PCB design stage, which was done by Gevorg. The goal was to turn the schematic into a real board that could be manufactured and used.

First, all components were transferred to the PCB environment and matched with their correct footprints, making sure everything would fit properly on the board.

Special attention was given to the photoresistors, since their placement is important for measuring light from different directions accurately. They were also positioned with enough distance between them so that divider walls could be added in between, preventing light from mixing.

Next, the components were arranged on the board to achieve a compact and practical layout. The sensors were placed symmetrically so that measurements from all directions would be consistent. The microcontroller connections were also organized in a way that made routing easier.

After that, routing was done by connecting all the components. The traces were kept as short and simple as possible, especially for analog signals, to reduce noise.

The power lines were also properly organized by distributing 5V and GND across the board to ensure stable operation.

Finally, the whole design was checked to make sure there were no incorrect connections or unconnected pins. After that, the PCB design was ready for manufacturing.

After that, we prepared the board and carried out the soldering stage by placing all the electronic components. In this stage, it was very important to ensure correct connections and avoid mistakes, since this directly affects the performance of the sensors.

After the PCB design, we understood that for the full operation of the system it was necessary to choose a suitable motor that could provide the movement of the solar panel and change its direction.

Motor Testing

After completing the PCB design phase, we moved on to the motor selection. 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

After completing the PCB design phase, we moved on to the motor selection stage. We needed to ensure both vertical and horizontal rotation of the system, so we considered two different types of servo motors for the required movements. Since our microcontroller was an Arduino Uno, we also had to make sure that the current consumption of both motors would not exceed 500 mA in total.

Taking these constraints into account, after studying the technical specifications, we decided to go with the Servo drive CORONA CS-939MG as it was more suitable for our project. It was more appropriate because it had higher torque (~2.5–2.7 kg/cm) and a metal gear, which was important for keeping the weight of the upper part of our system stable. In addition, its structure was more durable under long-term operation and load, which was important for the movement part of the solar tracker.

After selecting the servo motor, we carried out a test to evaluate its ability to carry the weight of the upper part of our solar tracker system. First, we tested the motor both without load and under load conditions, rotating it from 0° to 180° and observing its stability, smoothness, and response.

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 allows the servo motor to rotate from 0° to 180° and then return back to its initial position continuously, which helped us observe its behavior during repetitive motion cycles.

After verifying basic movement, we began applying different weight loads to the servo motor in order to simulate real working conditions of our project. By gradually increasing the resistance, we were able to evaluate whether the motor could reliably handle the mechanical load required for our solar tracker system.

After the tests, we measured the weight of the structure using a scale. The measurements showed that the total weight of the upper part is approximately 805 grams.

Considering that the used servo motor can carry up to 250 grams of load at a 10 cm lever length, we evaluated whether it is sufficient for our structure.

In addition, we studied another way of load placement in a vertical (vertical) position, when the load is in a hanging state.

As a result of the studies, it became clear that the servo motor can operate stably and ensure the necessary movement even under load conditions. These results formed the basis for the final selection of the motor and confirmed its applicability in our solar tracker system.

Sketching

Before starting the 3D modeling process, a sketching phase was carried out by Gevorg. During this stage, initial hand-drawn sketches of the system’s structural and mechanical concepts were developed.

In the first sketch, the main focus was on the movement mechanism, particularly the possibility of approximately 90° rotation of the upper part. It also explored the supporting structure, the placement of servos, and the arrangement of components inside the base. The preliminary positions of the Arduino Uno, PCB, and mechanical connections were also indicated.

After discussing the initial sketch and considering the project requirements, it was determined that the model needed to be as lightweight and compact as possible. It was also important to ensure that the wires and mechanical components inside could operate without obstruction and without interfering with each other. At the same time, maintaining a clean external appearance by hiding the wires was essential. As a result of these considerations, the idea emerged to create an additional sketch that would incorporate all these requirements in a unified way.

The second sketch focused on the overall design and visual concept of the device, showing the base, the rotating platform, and the general composition of the upper mechanical structure. This sketch helped to better visualize the final form and proportions of the device. This phase provided a clear foundation and served as a starting point for the transition to the 3D modeling process.

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 modeling of the upper part of the system can be viewed on Gevorg’s page, where the development of the top section is presented in detail.

Moving on to the next stage of the project, we began the printing process, where our models were transformed into real physical parts. The printing was carried out using the Prusa MK4S 3D printer, which ensures high precision and stable results. As a material, we used PETG Vanilla White filament, chosen for its strength, durability, and at the same time its clean and aesthetic white appearance.