Design and Control of a Low-Cost Tracked Solar Panel Cleaning Robot

In this work, I present a comprehensive design and control approach for a low-cost tracked cleaning robot specifically developed for solar panel maintenance. The accumulation of dust, sand, and other particulate matter on solar panel surfaces can significantly reduce power generation efficiency. Through my experimental studies, I found that even a thin layer of dust can cause substantial energy losses, and in extreme desert environments, the efficiency drop can reach up to 80%. My goal was to create a practical, affordable, and autonomous solution that could be deployed on various solar panel installations without requiring expensive sensors or external infrastructure.

The proposed robot is built around a tracked chassis, which provides excellent traction and stability on inclined solar panel surfaces. The entire system is controlled by a low-cost STM32 microcontroller, which processes real-time data from various sensors and executes control algorithms. I implemented a dual closed-loop PID control strategy to regulate the robot’s heading, speed, and cleaning brush rotation. One of the key innovations of my design is the edge detection method based on monitoring the PWM duty cycle of the cleaning brush motor. This approach eliminates the need for additional proximity sensors at the front of the robot, thereby reducing hardware cost and complexity.

1. Overall Robot Architecture

My robot prototype has a length of 27.5 cm, a width of 27 cm, and a height of 12.5 cm, with a total mass of 4 kg. The mechanical structure consists of three primary subsystems: the tracked locomotion module, the cleaning brush assembly, and the anti-fall protection system. The following table summarizes the main components and their specifications.

Component Specification Function
Main controller STM32F103C8T6 (72 MHz) Data processing and control
Track motors DC geared motor, ratio 1:30, rated torque 0.25 N·m Drives the left and right tracks
Brush motor DC geared motor, ratio 1:34, rated torque 0.15 N·m Rotates the cleaning brush
Cleaning brush Industrial roller brush, nylon bristles, 170 mm brushing length Mechanical removal of dust
Battery 12 V, 2550 mAh Li-ion Power supply
IMU MPU6050 Yaw angle measurement
Infrared sensors 4 units, detection range 9 cm Side and rear edge detection
Motor drivers TB6612 H-bridge modules PWM motor control

Figure 1 (from the original manuscript) illustrates the overall structure of the robot. The tracked chassis is made of metal plates and hard plastic tracks, with silicone strips attached to each track link to enhance friction on solar panel surfaces. The cleaning brush assembly is mounted at the front of the robot, supported by two 3D-printed arms. The brush is driven by a separate DC motor through a synchronous belt, allowing precise speed control and adequate torque for removing stubborn dirt.

2. Electronic Hardware Design

The electrical system is organized into several functional blocks: the power management unit, the main controller, the motor drivers, the sensing modules, and the communication interfaces. The power unit starts with a 12 V Li-ion battery. A DC-DC buck converter (RT8289) steps down the battery voltage to 5 V for the motor drivers, Bluetooth module, and other peripherals. A low-dropout regulator (RT9013) further converts 5 V to 3.3 V for the microcontroller, OLED display, and IMU.

For voltage monitoring, I used two high-precision resistors as a voltage divider connected to an ADC pin of the STM32. This allows real-time battery voltage monitoring, which is essential for the edge detection algorithm discussed later. The motor drivers receive PWM signals and direction commands from the microcontroller to control the speed and direction of the two track motors and the brush motor.

The sensing module includes Hall encoders integrated into the motors, which provide feedback for closed-loop speed control. The MPU6050 IMU is used to measure the robot’s yaw angle. I enabled the DMP (Digital Motion Processor) library to reduce yaw drift. The infrared sensors are mounted on the rear and both sides of the chassis, positioned perpendicular to the ground plane, to detect whether the robot is still supported by the solar panel surface.

3. Software Algorithm Design

3.1 Control Logic

The robot operates in two modes: manual and automatic. In manual mode, the user sends commands via Bluetooth from a smartphone or PC. In automatic mode, the robot executes a pre-programmed cleaning path algorithm. The state machine transitions are illustrated in the original paper’s flow chart. When the automatic cleaning command is received, the robot initializes its IMU and begins longitudinal back-and-forth cleaning. It uses the yaw angle as a reference to maintain a straight trajectory, while the infrared sensors and the brush PWM edge detection method prevent falls.

The system continuously checks for sensor faults or abnormal states. If the operator sends a manual override command, the robot immediately switches to manual control to handle unexpected situations. This safety feature is essential for real-world deployment.

3.2 Controller Design

I used an incremental PID controller for all closed-loop control tasks. The control law is given by:

$$\Delta U(t) = K_p [e(t) – e(t-1)] + K_i e(t) + K_d [e(t) – 2e(t-1) + e(t-2)]$$

where \(e(t)\) is the current error, \(e(t-1)\) and \(e(t-2)\) are the previous errors, and \(K_p\), \(K_i\), \(K_d\) are the proportional, integral, and derivative gains. The incremental PID algorithm avoids integral windup and provides smooth transitions, making it suitable for embedded systems with limited computational resources.

For the chassis control, I implemented a cascaded dual closed-loop structure, as shown in Figure 7 of the original paper. The outer loop compares the desired yaw angle with the measured yaw angle from the IMU, producing a differential speed command. The inner loop controls the speed of each track motor based on encoder feedback. The motor speed is measured as the number of encoder pulses per unit time, denoted by \(N\). The conversion between motor speed \(R_p\) (in r/min) and \(N\) is:

$$N = \frac{R_p \times P_r \times 4 \times R_d \times T}{1000 \times 6}$$

Here, \(P_r\) is the encoder line count (13 for my motors), the factor 4 arises from quadrature decoding, \(R_d\) is the gear reduction ratio, and \(T\) is the control period (20 ms). The yaw error calculation requires special handling because the yaw angle range is \([-180^\circ, +180^\circ]\). I define the error as:

$$\text{Err\_Yaw} = \text{Cur\_Yaw} – \text{Tar\_Yaw}$$

and then normalize it to the range \((-180^\circ, 180^\circ)\) using conditional adjustments. If the error is positive, the robot must rotate clockwise (right turn); if negative, counterclockwise (left turn). The output of the yaw PID controller is added to the base speed commands for the left and right motors, but I limited the correction to \(\pm 40\) to avoid excessive side-slip.

The cleaning brush motor also uses a PID controller to maintain a constant rotation speed. The speed reference is set to \(-154\) r/min (negative denotes the forward rotation direction). The brush motor draws a PID-adjusted PWM signal based on the encoder pulse count. The controller gains were tuned experimentally: for the speed loop, \(K_p = 25\), \(K_i = 12\), \(K_d = 16\) for the track motors, and \(K_p = 16\), \(K_i = 5\), \(K_d = 2.5\) for the brush motor. The yaw loop gains were \(K_p = 0.8\), \(K_i = 0.006\), \(K_d = 0.1\) for the left motor channel, and \(K_p = 1.0\), \(K_i = 0.005\), \(K_d = 0.1\) for the right channel.

3.3 Edge Detection Using Brush PWM Duty Cycle

One of the most important contributions of my research is the development of a low-cost edge detection method that requires no external sensors at the front of the robot. The idea is based on the observation that when the cleaning brush is in contact with the solar panel surface, the frictional load causes the PID controller to output a relatively high PWM duty cycle to maintain the desired speed. When the robot reaches the edge of the solar panel, the brush becomes suspended in the air, the load drops sharply, and the duty cycle decreases abruptly. By continuously monitoring the PWM duty cycle of the brush motor, I can detect the edge transition and immediately stop the robot to prevent a fall.

To establish a reliable threshold, I conducted extensive experiments under various conditions. Figure 14 in the original manuscript shows a typical transition: at \(t = 13\) s, the robot reaches the edge and the duty cycle drops below 1900, while the motor speed remains controlled. I measured the average duty cycle and standard deviation for both loaded (on the panel) and unloaded (at the edge) conditions, as summarized below.

Battery voltage (V) Panel tilt (°) Loaded duty cycle (mean ± std) Unloaded duty cycle (mean ± std)
12.2 0 2150 ± 45 1845 ± 30
12.2 10 2160 ± 42 1850 ± 28
12.2 20 2175 ± 50 1855 ± 32
11.5 10 2240 ± 55 1910 ± 35
10.5 10 2360 ± 60 1995 ± 38
9.5 10 2510 ± 70 2110 ± 42
9.2 10 2575 ± 75 2160 ± 45

The data show that the duty cycle increases as the battery voltage decreases, because the motor requires a longer PWM on-time to maintain the speed. However, the separation between loaded and unloaded values remains significant across all voltage levels. I further analyzed the effect of dust density on the duty cycle. The experiments were performed at a fixed battery voltage of 12.3 V and a panel tilt of \(10^\circ\). The results are shown below.

Dust density (g/m²) Loaded duty cycle (mean ± std) Unloaded duty cycle (mean ± std)
0 2158 ± 44 1848 ± 29
10 2190 ± 50 1852 ± 30
20 2235 ± 55 1855 ± 31
30 2280 ± 60 1853 ± 30
40 2330 ± 65 1856 ± 32
50 2385 ± 70 1850 ± 29
60 2440 ± 78 1854 ± 31

It is evident that the unloaded duty cycle remains almost constant regardless of dust density, while the loaded duty cycle increases with dust accumulation. This makes the edge detection strategy robust under different contamination levels. For practical implementation, I employed a statistical approach to determine a threshold. I collected duty cycle data from both states and constructed a probability density distribution, which showed two distinct Gaussian peaks. Using the “six sigma” criterion, I calculated the \( +6\sigma \) upper bound of the unloaded state distribution as a dynamic threshold. The threshold was then fitted as a function of battery voltage \(V\) using a cubic polynomial:

$$y = -3V^3 + 143.31V^2 – 2175.89V + 12455.16$$

where \(y\) is the duty cycle threshold. During operation, the controller compares the real-time brush duty cycle with this threshold. If the duty cycle falls below the threshold for a few consecutive control cycles, the robot immediately brakes and disables forward motion commands until the duty cycle rises again (indicating the brush is back on the solar panel). Figure 18 in the original manuscript demonstrates a successful edge detection event at \(t = 18.3\) s, where the duty cycle drops from about 2200 to below 1850 and the track motor speed quickly reduces to zero.

3.4 Automatic Cleaning Path Planning

Given the limited sensor suite, my path planning strategy relies on the combination of yaw control, infrared edge detection, and the brush-based front edge detection. The robot starts at the lower left corner of the solar panel. The workflow is as follows:

1. The robot initializes its IMU and records the current yaw as the reference heading. It turns on the cleaning brush and begins moving upward (longitudinal direction) along the solar panel.

2. During the upward motion, if the left infrared sensor detects the edge of the solar panel, the robot makes a small rightward correction to return to the safe area. This ensures that the robot does not drive off the left side.

3. When the robot reaches the top edge, the brush PWM duty cycle drops suddenly, triggering the front-edge detection. The robot stops, then reverses direction and moves downward. While reversing, the brush rotation direction is reversed to help the robot detach from the edge smoothly and also to perform a more thorough cleaning of the same strip.

4. When the rear infrared sensors detect that the robot has reached the bottom edge, the robot stops. At this point, if one of the rear sensors sees the edge earlier than the other, the robot performs a small rotation to correct its orientation, using the infrared feedback to align itself parallel to the solar panel bottom edge.

5. After alignment, the robot moves forward slightly, then rotates clockwise by an angle \(\theta\) (I used \(\theta = 45^\circ\)). It then moves forward for a time duration \(T_s\), corresponding to a lateral displacement \(L\). The relationship between the motor speed \(R_p\), the drive wheel radius \(r\), and the moving time is:

$$L = \frac{R_p \times T_s \times 2\pi r}{60}$$

In my setup, \(R_p = 24\) r/min, \(r = 2\) cm, and \(T_s \approx 3.4\) s, giving \(L \approx 17\) cm. To ensure full coverage, the lateral spacing \(L\) must be smaller than the brush length \(L_c = 17\) cm. In fact, I intentionally set \(L\) slightly less than the brush length to create overlap, which guarantees that no area is missed even if the actual trajectory deviates slightly due to slip or yaw error.

6. After the lateral move, the robot rotates counterclockwise by the same angle \(\theta\) to restore its heading parallel to the solar panel length. It then proceeds upward again for the next longitudinal cleaning pass.

7. The process repeats until the robot detects the right edge of the solar panel. This can occur in two ways: (a) while performing the lateral shift at the bottom, the robot’s right infrared sensor or brush detects the edge, or (b) during the upward longitudinal cleaning, the right side of the robot approaches the edge. In either case, the robot stops and terminates the cleaning task.

Figure 12 in the original manuscript illustrates the final path trajectory of the automatic cleaning mode. The black dotted line shows the overlapping longitudinal strips, forming a zigzag pattern that covers the entire solar panel surface.

4. Experimental Results and Validation

I performed experiments using a 100 cm × 60 cm tempered glass panel that simulates the surface of a real photovoltaic module. Fine sand particles with diameters between 0.08 mm and 0.3 mm were used to simulate dust accumulation. The glass panel was tilted at various angles to evaluate the robot’s performance under different slope conditions.

4.1 Straight-line tracking performance

The dual closed-loop PID controller was tested in both forward and backward cleaning motions. Figure 13 of the original manuscript shows the yaw angle response over time. In the forward cleaning test, the robot was set to track a reference yaw of \(-8.8^\circ\). Despite disturbances from track slip and brush friction, the yaw angle remained within \(\pm 1.2^\circ\) of the reference. In the backward cleaning test, where the brush rotation opposes the robot’s motion, the yaw error increased slightly but still remained bounded. The controller effectively compensated for the systematic disturbances introduced by the brush contact force.

4.2 Edge detection reliability

To validate the brush-based edge detection, I performed more than 50 runs of the automatic cleaning mode. In every run, the robot successfully detected the top edge of the solar panel and executed the stop-and-reverse maneuver. The edge detection threshold curve proved to be reliable across a battery voltage range from 12.2 V down to 9.2 V. I also verified that the detection mechanism works even when the solar panel surface is covered with a high dust density of 60 g/m². The brush motor was able to maintain its speed while on the panel, and the duty cycle dropped sharply upon reaching the edge.

4.3 Cleaning efficiency

I conducted a realistic cleaning test with a dust density of 60 g/m² spread uniformly over the glass panel. The robot performed two complete automatic cleaning cycles. The first cycle removed most of the dust, leaving only some residual particles near the bottom edge (a known dead zone). A second cycle improved the result significantly, as shown in Figure 19 of the original manuscript. The final cleaning outcome was satisfactory, with nearly all sand particles swept to the bottom edge.

For quantitative analysis, I ran 50 consecutive automatic cleaning experiments on a clean glass panel (no dust) to measure the battery consumption and time required. The results are plotted in Figure 20 of the original manuscript. The average voltage drop per cleaning cycle was 0.0338 V, and the average time was 163.02 seconds. Considering the battery capacity from a full charge of 12.6 V to the cutoff voltage of 9 V, the robot can perform about 106.5 cleaning cycles. The cleaning efficiency was calculated as 27.46 cm²/s, corresponding to about 47.67 m² of total cleaned area per battery charge. The cleaning coverage was approximately 74.6%, primarily limited by the bottom dead zone. This dead zone is a fixed area at the bottom edge of the solar panel that cannot be reached by the brush due to the robot’s geometry. For larger solar panel installations, this dead zone becomes relatively smaller, increasing the overall coverage percentage.

5. Comparison with Other Robotic Cleaning Systems

I compared my robot with several existing similar designs in terms of hardware complexity and cost. The comparison is summarized in the table below.

Feature Vision-based robot Intelligent cleaning robot My robot
Vision sensor Required Not required Not required
Attitude sensor Unknown Required Low-cost MPU6050
Photoelectric sensor Required Required Low-cost IR emitter/receiver
Processor High-performance ARM Ordinary MCU Low-cost MCU
Vacuum chamber Required Not required Not required
Water pump/spray Required Required Not required
Overall size Large Large Small
Relative cost High Medium Low

By avoiding vision sensors, vacuum systems, and water pumps, I significantly reduced both the material cost and the maintenance burden. The robot is designed to operate in dry conditions, which are typical for many utility-scale solar panel farms in arid regions. The hardware cost of the entire prototype (excluding the battery and chassis) was kept below \$120, making it an economically viable option for distributed solar panel cleaning applications.

6. Discussion and Future Work

The experimental results confirm that my proposed robot can autonomously clean solar panel surfaces with acceptable efficiency while maintaining low hardware costs. The dual closed-loop PID control ensures accurate trajectory tracking, and the brush-based edge detection provides a reliable fall-prevention mechanism without additional sensors. The automatic path planning algorithm successfully covers the entire solar panel area through parallel overlapping strips.

However, there are several limitations and opportunities for improvement. First, the tracks are made of hard plastic with silicone strips. In future versions, I plan to use rubber tracks with better friction and wear resistance. Second, the robot’s cleaning performance depends on the tilt angle of the solar panel. Although my tests showed stable operation up to \(20^\circ\), steeper angles may cause slipping. I am considering adding suction cups or magnetic wheels for vertical or near-vertical installations. Third, the bottom dead zone is an inherent drawback. The future design could include a rear-mounted auxiliary brush or a high-pressure air nozzle to sweep the bottom edge debris after the main cleaning pass. Additionally, a water spray system could be added for wet cleaning applications, though this would increase the cost and complexity.

The edge detection algorithm currently relies on a pre-fitted threshold curve. To make it more adaptive, I am exploring the use of a moving average filter combined with real-time machine learning classification. This would allow the robot to self-calibrate the threshold at the beginning of each cleaning task, accounting for battery aging and brush wear. Furthermore, the path planning algorithm could be optimized to minimize overlap and reduce cleaning time by incorporating real-time velocity control and dynamic obstacle avoidance.

Another possible extension is to coordinate multiple robots for large solar panel arrays. By equipping the robot with a simple wireless communication module, a fleet of robots could share their positions and divide the array into zones, thereby improving the overall cleaning throughput. Since the robot already has a Bluetooth module, adding a low-cost RF transceiver (such as nRF24L01) would enable multitask communication without significant hardware changes.

7. Conclusion

In this paper, I presented a complete design and control framework for a low-cost tracked solar panel cleaning robot. The robot uses a simple hardware architecture based on an STM32 microcontroller, two geared DC motors for the tracks, one geared motor for the cleaning brush, an MPU6050 IMU, and four infrared sensors. My main contributions are:

1. A dual closed-loop yaw-velocity PID controller that ensures stable straight-line motion despite track slip and uneven mass distribution.

2. A novel edge detection algorithm based on the PWM duty cycle of the cleaning brush motor, which requires no additional sensor and is robust to battery voltage variations and dust density changes.

3. A practical path planning strategy that combines yaw control, infrared edge detection, and brush-based edge detection to complete autonomous cleaning of a solar panel surface without external references.

Extensive experiments demonstrated that the robot can achieve a cleaning coverage of about 74.6% in a single automatic run, with an average efficiency of 27.46 cm²/s. The battery life supports more than 100 cleaning cycles, making the robot suitable for daily maintenance of solar panel installations in dusty environments. The low cost and simple construction make it a viable option for residential, commercial, and utility-scale solar panel owners who require an economical cleaning solution.

In future work, I will focus on improving the brush design to eliminate the bottom dead zone, adding adaptive algorithms for variable panel geometries, and integrating a water-assisted cleaning mode for humid environments. I also plan to replicate the experiments on actual solar panel arrays in outdoor settings to verify long-term reliability and performance under real weather conditions.

The successful implementation of this robot demonstrates that advanced cleaning capabilities can be achieved with minimal hardware resources, making autonomous solar panel maintenance accessible to a wider audience. This is particularly important for developing regions where solar panel adoption is growing rapidly but maintenance budgets are limited.

Scroll to Top