กลับไปหน้ารวมไฟล์
cleaner-bot-8cd4cd-en.md

The Inspiration

The Cleaner Bot was born from a desire to help with household chores. Specifically, the author was inspired by their mother, a caterer, who spent significant time cleaning her workspace. This project aims to automate that process, providing a robotic assistant that can handle light dusting and move around autonomously or via smartphone control.

Engineering & Design Choices

Building a functional cleaning robot requires balancing power consumption, weight, and autonomous navigation. In this version, several interesting design choices were made:

  1. Repurposed Hardware: To keep costs low, the author extracted DC motors from an old PS3 controller. While these motors are designed for vibration/haptic feedback, they are capable actuators for a small robot chassis when coupled with the right drive logic.
  2. Navigation Logic: The bot uses three Infrared (IR) sensors (Left, Center, and Right) to detect boundaries or obstacles. This allows the bot to "see" its environment and make decisions: if the left sensor detects a wall, it turns right; if all sensors detect an obstacle, it backs up and rotates.
  3. Drive System: Although the design initially considered an L298N motor driver, a Relay Module was used in some configurations for simplicity and efficient switching of higher current to the cleaning mechanism.
  4. Wireless Control: An HC-05 Bluetooth Module is integrated to allow manual overrides via a custom app built in MIT App Inventor 2. This enables "voice control" by using the smartphone's voice recognition to send serial commands like "start cleaning" to the Arduino.

Component Breakdown

  • Arduino UNO: The brain of the operation, coordinating sensor inputs and motor outputs.
  • HC-05 Bluetooth Module: Facilitates communication between the robot and a smartphone.
  • IR Sensors (3x): Essential for autonomous obstacle avoidance.
  • Relay Module: Used to trigger the high-speed cleaning motor.
  • 18650 Li-ion Batteries (3x): Provides the high-current source required for sustained cleaning operations.

Understanding the Code Logic

The firmware is designed around a state-switching mechanism. It listens for Serial messages:

  • When it receives "start cleaning", it sets a flag and initiates the moveBot() function.
  • In moveBot(), the Arduino reads all three IR sensors (lftIr, ctrIr, rghIr).
  • The logic follows a priority system: if an obstacle is on the right, turn left. If multiple obstacles are detected, execute a backMov() to reset position.
  • The cleaning motor (connected to pin rly) is activated whenever the swtch flag is high.
The repurposed DC motors used for movement and cleaning.

Construction Steps

  1. Chassis Assembly: Mount the recycled DC motors to a lightweight car kit chassis.
  2. Circuit Wiring: Connect the IR sensors to digital pins 12, 4, and 3. Set up the relay on digital pin 2.
  3. App Setup: Import the .aia file into MIT App Inventor 2 to create the voice-command interface.
  4. Calibration: Test the threshold of the IR sensors to ensure they correctly identify walls and dark surfaces.

ข้อมูล Frontmatter ดั้งเดิม

title: "Cleaner Bot"
description: "Make an autonomous voice controlled cleaner bot that can dust around your room."
author: "ayanfeoluwaadekanye1"
category: ""
tags:
  - "iot"
  - "home automation"
  - "robots"
views: 1455
likes: 1
price: 2450
difficulty: "Intermediate"
components:
  - "1x Arduino UNO"
  - "1x Relay Module (Generic)"
  - "1x HC-05 Bluetooth Module"
  - "3x Resistor 1k ohm"
tools: []
apps:
  - "1x MIT App Inventor 2"
downloadableFiles:
  - "https://projects.arduinocontent.cc/373dcd7e-7409-4960-8aa9-ed47fd0a9de0.ino"
  - "https://projects.arduinocontent.cc/373dcd7e-7409-4960-8aa9-ed47fd0a9de0.ino"
documentationLinks: []
passwordHash: "5ffc0b4bfc33ee0ad7f60f7a78f0f7d90da6707c4f30fc43665101237ee6d394"
encryptedPayload: "U2FsdGVkX1+lms5eBlrHwWUpR/OMRLrXvAsYkDaTkxZY/tT/mqTF9puELfKlTlzAgbJA6BvzpzG+4l59tdrcXnsK692zBE3l14Hu5QWsePY="
seoDescription: "Build an autonomous voice-controlled cleaner bot with Arduino to keep your room dust-free automatically."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/cleaner-bot-8cd4cd_cover.jpg"
lang: "en"