Case Study: Autonomous Vacuum Cleaner Robot Prototype Development Vacuum cleaner robot prototype development. Open-source DIY robotic vacuum with Arduino Mega 2560 and Raspberry Pi Zero W hybrid architecture, custom PCBs, 3D-printed chassis, encoder-based odometry, and custom centrifugal blower.

Autonomous Vacuum Cleaner Robot Prototype Development

The Vacuum Cleaner Robot is an open-source DIY robotic vacuum cleaner developed by the IoT App Development Company, representing a departure from the drone platforms previously explored in this series.

Introduction

The Vacuum Cleaner Robot is an open-source DIY robotic vacuum cleaner developed by the IoT App Development Company, representing a departure from the drone platforms previously explored in this series.

This project recognized the market potential of home service robotics and decided to work with the autonomous robot vacuum cleaner, arguably already one of the most established consumer robotics products.

The project had both practical and educational aims, as although robotic vacuum cleaners by providers like Xiaomi and iRobot are available on the market, making such a machine from scratch provides invaluable knowledge regarding the entire set of technologies that are relevant to creating autonomous mobile systems, from motor system to navigation algorithms and power supply.

The robot has a shape of 385 × 99 mm and a weight of about 3 kg, it is equipped with two side and one main brush working for approximately half an hour, the robot is both Wi-Fi and Bluetooth enabled.

This platform uses hybrid architecture, i.e. the working principle of this robot is based on the use of both Arduino Mega 2560 for managing hardware in real time and Raspberry Pi Zero W for controlling navigation and communication in order to combine the reliability of microcontrollers with versatility of single board computers.

autonomous-vacuum-cleaner-robot-prototype-development

Mechanical Design and 3D-Printed Chassis

autonomous-vacuum-cleaner-robot-prototype-development

Design Approach

The entire structure was developed utilizing Autodesk Fusion 360 for parametric designing and subsequently sliced using Cura for FDM printing, with all components manufactured with PLA plastic material. It focuses on serviceability and modular assembly, enabling the interchange of specific parts without the disassembly of the entire robot.

The rounded shape ensures both functionality and practicality, preventing the robot getting stuck in corners and providing a sleek and easy shape that can be manufactured through FDM printing processes.

Essential Features of the Airframe

The design of the mechanical system embodies several intentional technical decisions. Its rounded dimensions of 385 × 99 mm yield a small but stable form suitable for cleaning smaller environments like flats. A total weight of 3 kg ensures that traction on the driven wheels is achieved without making the system too heavy for the motors.

The cleaning system utilizes a set of three brushes, of which two are side brushes delivering cleaning of corners and borders, while one is the main brush responsible for removing debris from the cleaning area, with each brush controlled by its own motor. The airframe is 3D-printed, enabling rapid iteration and adaptation of the system should any modifications in the specifications, such as motor sizes, power packs, or sensor capabilities arise.

autonomous-vacuum-cleaner-robot-prototype-development

Electronics and Custom PCB Architecture

Overview of Custom PCBs

The electrical subsystem revolves around two printed circuit boards made for a specific purpose, which are the power controller and the motherboard.

By separating the tasks performed by each of the boards, the electrical management functions remain in operation even when the core computing units are turned off, which is crucial from the safety point of view for equipment relying on lithium-ion batteries.

Motherboard Architecture

The motherboard is the central electronics board, integrating both the A1 hardware controller and the Core processing unit while serving as the primary communication hub for all sensors, actuators, motors, and peripheral modules.

The system architecture follows a layered hierarchy: the Raspberry Pi Zero 2 W (Core) communicates with the Arduino Mega 2560 (A1) over a serial interface, sending high-level movement commands and receiving sensor data in real time.

The A1 module handles all time-critical hardware operations requiring deterministic performance: drive motor control, vacuum motor control, brush motor control, encoder processing, sensor acquisition, battery monitoring, power management, and hardware diagnostics.

The Core module, based on the Raspberry Pi Zero 2 W, gets its power from the software that plays a significant role in robot navigation, cleaning operations, behavior controls, communication processes, and application interface.

The Core consists of the independent firmware projects, Arduino firmware employed for the A1 system and Pi programming for the Core, meaning that any software system could be programmed and redesigned without creating any issues for the other system.

Power Controller

The Power Controller is an independent board controlled by a microcontroller that monitors the power system of the robot and interacts with the A1 controller through I²C.

One of its main aims is to make safe disconnection possible. When the user hits the power button, the Power Controller sends a signal to the A1 controller, and the A1 controller sends a signal to the Raspberry Pi that it should disconnect the main power supply only after performing a standard termination of the Linux operating system.

This sequence prevents filesystem corruption and protects the SD card from unexpected power loss. The Power Controller also continuously monitors total battery voltage, individual cell voltages, charging state, charger health, and power state, making these values available to the A1 via I²C requests.

Battery System

The power system is a 4-cell (4S) lithium-ion battery pack built using high-capacity 18650 cells with a built-in Battery Management System (BMS). With a nominal voltage of 14.8 V and a capacity of about 5 Ah, the battery is well-suited for supplying the current needed for drive motors, vacuum motors, onboard electronics, and wireless communications.

The BMS provides cell balancing, over-charge protection, over-discharge protection, short-circuit protection, over-current protection, and battery monitoring. The voltage of the individual cells is measured through the analog inputs connected to the balance connector while the microcontroller calculates the individual voltages using the adjacent cumulative measurements.

The firmware continuously monitors total battery voltage, individual cell voltages, low battery conditions, critical battery levels, charging state, and battery health, enabling low battery warnings, deep discharge prevention, automatic shutdown, and battery lifespan improvement.

Drive System and Encoders

Wheel Motor Choice

In order to achieve quick development without losing reliability, we have opted for the wheel assemblies of the Xiaomi Mijia 1T (STYTJ02HZM) robot vacuum cleaner to be used as part of our drive assembly. These units are made up of a DC motor, a high-torque gearbox, and a dual Hall-effect encoder in a compact OEM package suitable for differential drive robots.

On account of the integrated encoders, closed-loop control of the motor is now possible, which allows the robot to keep track of wheel speed and travel distance as well as the direction of movement for correct navigation.

Integration of Encoder and Odometry

The wheel module was reverse-engineered to identify the various pin connections such as MA, MA for the motor terminals, VCC for the Hall sensor power supply, GND for ground, H1 and H2 for the outputs from the quadrature encoder.

The signals from H1 and H2 are the quadrature encoder signals that are used for determining the speed of the wheel, its rotation direction, and the distance traveled. Testing confirmed that one rotation of the wheel produces about 237 pulses, which is the ideal number of pulses needed for accurate odometry.

Pulses from the encoder are read by the Arduino through external interrupts, which allow the A1 module to know the position of the robot via dead reckoning.

Vacuum System Development

Custom centrifugal blower

Instead of utilizing a standard vacuum assembly, the project proposes the use of an almost fully custom centrifugal blower driven by a brushed DC motor.

The vacuum system has been developed with the following criteria: compact size, high suction capacity, low power consumption, lightweight design, use of 3D printed elements, easy maintenance requirements, low production cost, and modular approach for future upgrades to the system.

Design Iterations

The first version of the prototype comprised six important parts, most of which were made using a 3D printer. It used a 12 volt brushed direct current motor with a speed of 12000 revolutions per minute and torque of 0.425 kg•cm.

Despite having a simple mechanical design and good suction power, testing unveiled a number of weak aspects of this prototype; in particular, it turned out to be about 130 mm long and consumes about 3.9 amps at 12 volts, too heavy for the robot in focus, and lacked speed feedback.

The focus of the second version of the design was on accomplishing efficiency improvements and, at the same time, considerable decrease of its size.

Key changes included reducing the turbine diameter from 80 mm to 55 mm, reducing the clearance between the turbine and housing from 10 mm to 5 mm, relocating the outlet port closer to the housing corner, reducing the turbine hub diameter from 29 mm to 25 mm, and increasing housing wall thickness to 2 mm for improved rigidity.

The redesigned blower reduced overall height from 130 mm to approximately 75 mm and decreased current consumption from approximately 3.9 A to 2.4 A at 12 V while maintaining satisfactory suction performance.

Communication and Control Systems

Bluetooth Communication Protocol

Bluetooth is mainly used in the initial setup of devices, configuration, diagnostic tests, and short-range communication of devices when they are not connected to a wireless signal.

The communication between the Android app and the Raspberry Pi Zero W uses JSON encoded message via a Bluetooth serial connection to send and receive requests and responses. Each packet consists of a type field such as REQUEST or RESPONSE and a content object.

The REQUEST packet contains the request_name which is different for each request, generates the request_id that is unique to each request and other additional parameters. The RESPONSE packet returns the original request_name along with the request_id, status, and sometimes the error message.

The core has built in Bluetooth API that can receive commands such as test packets, configuration changes, and status requests.

Wi-Fi and Application for Android

Wi-Fi connection allows for manual operation and tracking of cleaning history. Android Native App (SDK level ≥ 22) manages many configurations and functions, such as analysis and manual operation.

The app communicates with the Core through Bluetooth (for configuration and setup) and Wi-Fi (for controlling the operation and monitoring the data).

Development Challenges and Lessons Learned

System Integration Complexity

The greatest difficulty in executing this project was merging two completely different computing environments based on different operational approaches.

While the Arduino Mega 2560 runs on bare-metal technology and has deterministic timing, the Raspberry Pi Zero W works with a full-fledged Linux operating system based on non-deterministic scheduling.

The two platforms needed careful protocol setup for there to be reliable command transmitting and sensor data transmitting via serial communication interface.

Power Management and Safety

The power system design was a challenge and not only a trivial battery choice. The graceful shutdown process, which guarantees that the Raspberry Pi goes through file system-compatible shutdown before breaking the power supply, requires cooperation of three independent processors, namely the Power Controller, the A1 module, and the Core.

The I²C command interface with explicit state machine transitions (TURN_ON, SHUTTING_DOWN, TURNED_OFF) was essential for preventing race conditions and ensuring reliable operation.

Optimization of a Vacuum System

The process of iteratively developing the vacuum with the inherent pitfalls of current technologies was demonstrated in this scenario.

While the first prototype showed a satisfactory performance in suction, it did not meet the size or energy consumption requirements of the robot.

The second prototype demonstrated a reduction in energy consumption (38%) and height (42%) via systematic development based on performance data.

Conclusion

The prototype of the vacuum cleaner robot shows that it is possible to create a complicated autonomous mobile robot from accessible components through systematic and modular engineering.

By separating real-time hardware control from high-level navigation and communication functions, the design ensures deterministic motor control and flexibility of software enhancement.

The development of the custom PCB architecture, that includes a specially designed motherboard and power controller boards, guarantees reliable functioning and battery safety.

The iterative creation of the vacuuming mechanism relates to the necessity to collect the relevant performance data that can help in the improvement of the design.

Above all, the project is a good educational tool, as it showcases all the essential aspects of embedded system and robotics technology and proves that the boundary between DIY projects and commercial products can be overcome through careful engineering and testing.

Project Repository: github.com/IoT-App-Development-Company/vacuum-cleaner-robot

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Leadership That Leads Worldwide

With a physical presence in over 15 countries and a global footprint spanning 25+ countries, we are ready to serve you anywhere. Location, language, or culture is never a barrier, because our global team can work with you in your language. Our strong international team ensures seamless collaboration across borders We have a strong tech team, highly recognized in their domains, with extensive technical expertise.