The aim of this article is to examine the control mechanism for a cleaning robot employed in public areas, focusing on the development of a controller for the cleaning robot. The motor control system block diagram for the surface cleaning robot is created based on the principle of Pulse-Width Modulation (PWM) for speed control. Each module's functions in the control system are separated and elaborated. The article presents a proposal for software and hardware design, adopting a thinking model based on the AVR microprocessor. By using RS485 and PC communication, following an agreed protocol, the control system facilitates the robot's forward and backward movements, rotation, and operation with a DC or stepper motor. Consequently, it enables the surface cleaning robot to perform its work more effectively.