Built to order

Automatic Floor Cleaning Robot using Arduino with Ultrasonic Sensors

This project builds an autonomous floor cleaning robot using an Arduino Uno and two HC-SR04 ultrasonic sensors that sweeps dust with a rotating brush and collects it in a removable bin while it navigates a room on its own. The robot senses obstacles ahead, turns away from them, and keeps cleaning in a random-bounce and wall-follow pattern without any remote control. It demonstrates embedded sensing, motor control and autonomous navigation in one working prototype. Suitable for B.E./B.Tech final-year projects in Electronics & Telecommunication, Electrical and Robotics.

Chat on WhatsApp — get a quotation

Electronics / E&TC Arduino UnoHC-SR04 ultrasonic sensorL298N motor driverDC gear motorsArduino IDE · C++12 V rechargeable battery packRotating brush suction fanAcrylic chassis breadboard wiringHardware
Automatic Floor Cleaning Robot using Arduino with Ultrasonic Sensors — project thumbnail preview
More project photos (3)

The problem

An automatic floor cleaning robot using Arduino with ultrasonic sensors is a small mobile robot that sweeps and collects dust from a floor by itself, without a person pushing it or steering it with a remote. The robot carries an Arduino Uno, two HC-SR04 ultrasonic sensors at the front, a rotating brush bar, a small suction fan and a dust bin on a round chassis driven by two DC gear motors. While it moves, the sensors keep measuring the distance to walls and furniture, and the Arduino changes direction whenever an obstacle comes too close. Sweeping floors by hand is repetitive and time-consuming in homes, classrooms and small offices, and commercial robot vacuums are expensive and closed systems that students cannot open, modify or explain. This project gives students a working autonomous cleaner they can build, test and demonstrate, while teaching the embedded concepts behind real service robots: distance sensing, decision-making in code, motor driving and power management.

This is a built-to-order hardware project: the working prototype, firmware, wiring documentation and the complete viva kit (report, PPT, Q&A) are prepared fresh for you.

Feature This cleaning robot A manual vacuum cleaner An obstacle-avoiding robot without cleaning
Moves on its own Yes — autonomous navigation No — pushed and steered by a person Yes — but it only drives, it cleans nothing
Cleans the floor Yes — rotating brush plus suction into a dust bin Yes — suction only, with human effort No cleaning mechanism at all
Avoids obstacles Yes — two HC-SR04 ultrasonic sensors No — the user steers around furniture Yes — ultrasonic sensing, same principle
Needs a person during cleaning No — runs after one button press Yes — for the whole session No — but the floor stays dirty
What a student learns Sensing, motor control, navigation and cleaning mechanism together Nothing — it is a household appliance Sensing and driving only

SYSTEM FLOW

5 components 4 connections

Live flow
Drag to explore
100%
sensorHC-SR04 Sensors

Two ultrasonic sensors measure distance ahead and to the side.

Follow the working sequence

How it works

The automatic floor cleaning robot works as a continuous sense-decide-drive-clean loop. The two HC-SR04 ultrasonic sensors each fire a 40 kHz sound pulse and listen for its echo; the Arduino Uno measures how long the echo takes to return and converts that time into a distance, since sound travels at approximately 340 m/s and the pulse covers the distance twice, out and back. The Arduino compares both distances with the configured obstacle threshold every cycle, and when either reading falls below it, the robot stops, reverses briefly, turns toward the clearer side and resumes cleaning. While it drives, the brush motor spins the brush bar and the suction fan pulls loosened dust into the bin, so sensing, navigation and cleaning happen together rather than in separate phases. The loop repeats several times per second, so the robot reacts to a chair leg or a doorway almost as soon as the sensors see it.

  1. The user presses the start button; the Arduino Uno initialises the sensors, the L298N motor driver and the brush and fan motors.
  2. Each HC-SR04 sensor sends a 10 µs trigger pulse, emits a 40 kHz ultrasonic burst, and the Arduino times the returning echo to measure the distance ahead.
  3. The Arduino converts the echo time to distance in centimetres (echo time in µs divided by 58, per the HC-SR04 datasheet formula) and compares it with the configured obstacle threshold.
  4. If the path is clear, the L298N drives both DC gear motors forward with PWM speed control while the brush bar rotates and the suction fan collects dust into the bin.
  5. If an obstacle is within the threshold, the robot stops, reverses for a short distance, then turns toward the side with the larger clear distance and continues.
  6. Along a wall, the side sensor reading keeps the robot tracking parallel to the wall, so edges and corners get swept instead of being skipped.
  7. Pressing the button again stops the motors and the brush; the dust bin is lifted out, emptied and refitted for the next run.

Tech stack:

  • Arduino Uno (ATmega328P)
  • HC-SR04 ultrasonic sensor
  • L298N motor driver
  • DC gear motors
  • Arduino IDE · C++
  • Rotating brush · suction fan
  • 12 V rechargeable battery pack
  • Acrylic chassis · breadboard wiring
Parameter Value
Controller Arduino Uno — ATmega328P, 16 MHz clock, 5 V operating voltage (datasheet values)
Sensors 2 × HC-SR04 ultrasonic sensors, datasheet range 2–400 cm, 5 V supply, 40 kHz, 15 mA working current (datasheet values)
Drive motors 2 × DC gear motors, differential drive
Cleaning motor 1 × DC motor driving the rotating brush bar, plus 1 × small DC suction fan
Motor driver L298N dual H-bridge, datasheet up to 46 V motor supply and 2 A per channel (datasheet values)
Cleaning width Approximately 20 cm (design target, brush-bar width)
Chassis Round acrylic chassis, approximately 30 cm diameter (design target)
Battery 12 V rechargeable battery pack (design target)
Runtime Approximately 30–45 min per charge (expected, load-dependent)
Navigation Random-bounce plus wall-follow, no mapping
Obstacle threshold Configurable in code, approximately 15–25 cm (design target)
Weight Approximately 1.5 kg (design target)

Project features

The automatic floor cleaning robot combines four capabilities that make it a complete embedded project: ultrasonic obstacle avoidance from two HC-SR04 sensors, a real cleaning mechanism built around a rotating brush bar and a small suction fan that deposits dust in a removable bin, autonomous navigation using a random-bounce pattern with wall following, and differential-drive motion from two DC gear motors driven through an L298N module with PWM speed control. The Arduino Uno ties these together, reading distances, deciding when to turn, and switching the brush and fan on and off. A push-button start and stop with LED status indicators keeps the operation simple to demonstrate, and the obstacle-distance threshold is a single value in the code that can be tuned for different rooms. The design stays deliberately simple — no Wi-Fi, no phone app and no mapping — so every behaviour can be explained from the code and the wiring during a viva.

  • [Dual ultrasonic obstacle avoidance] Two HC-SR04 sensors at the front measure the distance to walls and furniture, so the robot turns away before it hits anything instead of relying on bump switches.
  • [Rotating brush and dust collection] A motor-driven brush bar sweeps dust toward a small suction fan that deposits it in a removable transparent dust bin, so the robot cleans while it moves.
  • [Random-bounce and wall-follow navigation] The robot drives forward, turns by a fixed angle when an obstacle is detected, and follows along walls when one sensor reads a close side obstacle, covering a room without a map.
  • [Differential-drive motion] Two DC gear motors driven by an L298N module give independent left and right wheel control, so the robot can drive straight, turn in place and reverse using PWM speed control.
  • [Push-button start and stop with LED status] One button starts a cleaning run and stops it again, while LEDs show power, cleaning and obstacle-detected states for a clear demonstration.
  • [Removable dust bin] The collected dust sits in a lift-out bin that can be emptied and refitted in seconds, so the robot is ready for the next run without tools.
  • [Adjustable obstacle-distance threshold] The distance at which the robot decides to turn is a single configurable value in the Arduino code, so it can be tuned for open halls or furniture-packed rooms.

What is included

  • Working floor cleaning robot prototype (Arduino Uno, 2 HC-SR04 sensors, L298N driver, 2 drive motors, brush and suction assembly, dust bin)
  • Complete Arduino firmware with commented code and the adjustable obstacle-distance threshold
  • Circuit and wiring documentation with pin connections for every module
  • Component list with part names and ratings
  • Project report PDF (background, working, methodology, results, limitations)
  • PPT presentation for final review
  • Viva Q&A preparation document (ultrasonic ranging, motor driving, navigation logic)

Limitations & prerequisites

  • Navigation is random-bounce plus wall-follow; the robot does not build a map of the room, so full coverage of a large room is not guaranteed in one run.
  • The HC-SR04 has a datasheet minimum range of 2 cm, so objects closer than that fall in its blind spot and are handled by the firmware treating a missing echo as an obstacle.
  • Soft, angled or sound-absorbing surfaces can return weak echoes, so the robot may approach them more closely than hard flat walls.
  • The brush and suction suit dust and light debris on hard floors; it is not designed for wet cleaning, carpets or large objects.
  • Runtime of approximately 30–45 min per charge is an expected value that varies with battery condition, floor friction and brush load.
  • The prototype is a student-built academic model, not a commercial vacuum cleaner, and its cleaning performance is not comparable to one.

Frequently Asked Questions

How is this different from an obstacle-avoiding robot?

An obstacle-avoiding robot only drives around without hitting things — it cleans nothing. This robot adds a complete cleaning mechanism on top of the same sensing and driving: a motor-driven rotating brush bar that sweeps dust toward a small suction fan, which deposits it in a removable bin. The navigation exists to serve the cleaning, not as the end goal.

How is this different from the blackboard cleaning machine?

The blackboard cleaner is a fixed rail-mounted wiper carriage that slides along guide rails on a classroom blackboard using felt pads and limit switches. This project is a free-moving mobile robot with differential drive that roams a floor, avoids obstacles with ultrasonic sensors, and cleans with a rotating brush and suction — a different machine, a different mechanism and a different task.

How does the HC-SR04 measure distance?

The sensor sends a 10 µs trigger pulse and a 40 kHz burst, and the Arduino times the returning echo. Distance in centimetres equals echo time in microseconds divided by 58, per the datasheet formula, since sound travels at about 340 m/s. Builder note: below the 2 cm minimum range no echo returns, so the firmware treats a missing echo as an obstacle and turns away.

What power supply does the robot need?

A 12 V rechargeable battery pack powers the motors through the L298N driver, while the Arduino Uno and sensors run from the regulated 5 V rail. The pack is sized as a design target for the drive motors, brush motor and suction fan together, and the expected runtime is approximately 30–45 min per charge depending on floor friction and brush load.

Does it need Wi-Fi or a phone app?

No. The robot is fully autonomous and runs offline after a single button press — no Wi-Fi, Bluetooth or phone app is involved. All sensing, decision-making and motor control happen on the Arduino Uno itself, which keeps the build simple and reliable for a demonstration. Bluetooth remote control is listed as an optional customization if a college wants it.

Is this project suitable for a final-year project?

Yes — for Electronics & Telecommunication, Electrical and Robotics programs. It demonstrates ultrasonic sensing, embedded C++ programming, H-bridge motor driving, differential-drive navigation and a real cleaning mechanism in one working prototype, with enough depth for a confident viva and a live cleaning demonstration that shows the whole system working end to end.

Get this project To order this project, message Projectech on WhatsApp for a quotation — share your branch, college deadline and any customizations you need (such as Bluetooth control, a larger dust bin or auto-docking), and you will receive a scope, price and delivery timeline before any payment.

Components & software requirements
  • Arduino Uno (ATmega328P)
  • HC-SR04 ultrasonic sensor
  • L298N motor driver
  • DC gear motors
  • Arduino IDE · C++
  • Rotating brush · suction fan
  • 12 V rechargeable battery pack
  • Acrylic chassis · breadboard wiring
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides
Get a quotation