Final Project Journal
" Mop Pop "
" Mop Pop "
I was inspired by the idea of automating everyday household chores to save time and effort. Cleaning floors manually can be tedious, especially for busy individuals or those with mobility challenges. Seeing robotic vacuum cleaners like Roomba and industrial cleaning machines motivated me to create a simpler, more accessible version that integrates both sweeping and mopping functions.
Mop Pop is designed to detect obstacles using an ultrasonic sensor, navigate efficiently, and operate a spinning mop to clean surfaces. The goal is to develop an affordable and functional robotic assistant that can help maintain cleanliness in homes and small spaces.
Here are some similar projects for inspiration:
Robotic Vacuum Cleaners like Roomba, which navigate autonomously.
DIY Arduino Cleaning Robots, which use simple electronics to automate floor cleaning.
Industrial Floor Cleaning Machines, which use rotating mops for deep cleaning.
For designing Mop Pop, I used Fusion 360 to create the CAD model and ensure all components fit together before fabrication. my Inspiration in this design was the walk down robot.
Step 1: Creating the Sketch
I started by opening a new sketch in Fusion 360 and saved the file as "Final Project." I began by drawing a 25 cm diameter (250 mm) circle for the base. After sketching, I made sure that all parts were fully defined to avoid any unexpected changes in dimensions during modifications.
Step 2: Designing Openings & Slots
Base Layer: Added cutouts for wheels, the coaster wheel, and slots for the motor extension to hold the mop.
Top Layer: Included holes and slots, along with a circle cutout for the power switch.
Front Side: Created two holes for the ultrasonic sensor and a circular opening for battery recharging.
Back Side: Added a rectangular opening to accommodate the motor extension.
Left & Right Sides: Designed T-slots for extra structural support.
Step 3: Extrusion & 3D Assembly
Each part was extruded to 3mm thickness to match the wooden sheet used for fabrication.
I uploaded electronic components (Arduino, motor driver, gearbox, wheels, etc.) into Fusion 360 to check their mounting positions and ensure proper alignment.
Screw and nut placements were projected for accurate hole positioning.
Changed the appearance to wood to visualize the final structure.
Assembled all components in Fusion 360 to preview the final design.
By completing these steps and ensuring all sketches were fully defined, I guaranteed that Mop Pop's design was precise, functional, and ready for fabrication.
Preparing the Design File:
I saved my design as a DXF file and transferred it to a flash drive.
Then, I uploaded it onto the FAB Lab’s PC for processing.
Setting Up in RD Works:
I opened the DXF file in RD Works to adjust the design.
To minimize material waste, I carefully arranged the parts.
I set the laser cutting power to 45 and speed to 40, optimized for my wooden sheet.
Laser Cutting Process:
I sent the final design to the laser cutter by clicking Download in RD Works.
I turned on the laser cutter and its vacuum system.
I placed my wooden sheet on the laser bed and secured it with clips.
Using the Frame function, I checked the placement of the design.
I ensured the laser focus was correctly adjusted.
Executing the Cut:
I closed the laser cutter door for safety.
Pressed Start, and the cutting process began.
The entire cutting process took approximately 2 minutes.
This method ensured precision and minimized material waste, making the fabrication process efficient.
The Mop Pop robot is a smart cleaning system that integrates multiple electronic components to enable autonomous movement, obstacle detection, and floor mopping. Below is a breakdown of its circuit design, input and action components, and integration.
Software: Arduino IDE (for coding), Fusion 360 (for 3D design), Fritzing (for simulation)
Hardware Components:
Microcontroller: Arduino Uno
Motor Driver: L298N
Motors: Two gearbox motors for movement, one DC motor for mopping
Sensors: HC-SR04 ultrasonic sensor
Switch: Manual ON/OFF control
Power Source: Lithium battery (7.4V or 12V)
These components provide data or user input for the system to function.
1.Ultrasonic Sensor (HC-SR04) → Obstacle Detection
Measures distance using ultrasonic waves.
Helps the robot avoid obstacles and navigate.
Connected to Arduino (Trigger & Echo pins).
2. Switch (Manual ON/OFF Control) → Activates/Deactivates System
Turns the circuit on or off manually.
Connected to the battery or Arduino power input.
These components perform the physical actions based on input data.
1.Motor Driver (L298N) → Controls Movement Motors
Sends power to two gearbox motors based on Arduino signals.
Allows forward, backward, left, and right movement.
Connected to Arduino and battery.
2.Gearbox Motors + Wheels → Robot Movement
Drive the wheels for autonomous navigation.
Receive signals from the motor driver.
3. Mop DC Motor → Spins the Mop
Cleans the floor while the robot moves.
Controlled via motor driver or relay module.
4. Battery (Lithium 7.4V or 12V) → Powers the System
Supplies energy to Arduino and motors.
1.Power ON:
User flips the switch ON, activating Arduino and motor driver.
2. Obstacle Detection:
The ultrasonic sensor continuously measures distance.
If no obstacle is detected → The robot moves forward.
If an obstacle is detected → The robot stops, reverses, and turns.
3.Mopping Action:
When the robot moves, the mop motor turns ON.
If movement stops, the mop motor turns OFF.
4.Continuous Navigation:
The process repeats, ensuring autonomous cleaning.
+12V
Lithium Battery Positive
GND
Arduino GND & Battery Negative
5V
Arduino 5V (L298N’s onboard regulator supplies 5V)
ENA
Arduino PWM Pin 9 (Speed control for Left Motor)
ENB
Arduino PWM Pin 10 (Speed control for Right Motor)
IN1
Arduino Pin 5 (Left Motor Forward)
IN2
Arduino Pin 6 (Left Motor Backward)
IN3
Arduino Pin 3 (Right Motor Forward)
IN4
Arduino Pin 4 (Right Motor Backward)
OUT1
Left Motor Terminal 1
OUT2
Left Motor Terminal 2
OUT3
Right Motor Terminal 1
OUT4
Right Motor Terminal 2
Mop Motor
Connect to L298N OUT3 & OUT4 OR directly to Arduino Pin 7 (with MOSFET or relay)
Arduino Pin 7
Controls mop motor (on/off)
Middle Pin → Arduino Pin 2 (Input)
One Side → GND
Other Side → 5V (if using INPUT_PULLUP in code)
VCC
Arduino 5V
GND
Arduino GND
Trig
Arduino Pin 9
Echo
Arduino Pin 10
Connect the battery’s positive (+) to L298N’s +12V.
Connect battery’s negative (-) to L298N’s GND.
Connect L298N’s 5V output to Arduino’s 5V pin (if using onboard regulator) or VIN.
For Mop Pop, I used a 5V adapter to charge a lithium battery, which is designed to be charged at 5V and outputs 7.5V.
Why I Chose This Power Source:
The 5V adapter ensures safe and efficient charging of the lithium battery.
The 7.5V output from the battery provides sufficient power for the motors and other electronic components in my robot.
Lithium batteries are lightweight, rechargeable, and provide a stable power supply, making them ideal for mobile robots.
Components and Tools Used:
Power Source: 5V Adapter + Lithium Battery (5V input, 7.5V output)
Microcontroller: Arduino
Motor Driver: To regulate power for the motors
Motors: DC motors for movement and mop rotation
Ultrasonic Sensor: For obstacle detection
Software: Arduino IDE for coding and RD Works for laser cutting
This setup ensures that Mop Pop operates efficiently while maintaining a balance between power consumption and performance.
The project was programmed using Arduino IDE, with the code written in C++ to control the movement, obstacle detection, and mop activation. The main functions include motor control, ultrasonic sensor readings, and switch operation.
The Code was taken from different open source websites for each component in order to customize the code for my project. also, I already test my components before using them to make sure that they are working properly using www.instructables.com and Arduino websites to code the components.
1. Initial Setup
The first step was defining the pins for each component, including the motor driver, ultrasonic sensor, mop motor, and switch.
#define SWITCH_PIN 2 // Main power switch
#define TRIG_PIN 9 // Ultrasonic sensor trigger
#define ECHO_PIN 10 // Ultrasonic sensor echo
#define LEFT_MOTOR_FORWARD 5
#define LEFT_MOTOR_BACKWARD 6
#define RIGHT_MOTOR_FORWARD 3
#define RIGHT_MOTOR_BACKWARD 4
#define MOP_MOTOR 7 // DC motor for mop
In the setup function, I initialized all the components as inputs or outputs:
void setup() {
pinMode(SWITCH_PIN, INPUT_PULLUP); // Switch input
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
pinMode(LEFT_MOTOR_FORWARD, OUTPUT);
pinMode(LEFT_MOTOR_BACKWARD, OUTPUT);
pinMode(RIGHT_MOTOR_FORWARD, OUTPUT);
pinMode(RIGHT_MOTOR_BACKWARD, OUTPUT);
pinMode(MOP_MOTOR, OUTPUT);
}
2. Obstacle Detection Using Ultrasonic Sensor
To avoid collisions, the ultrasonic sensor measures distance and helps the robot change direction when needed.
long getDistance() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH);
long distance = duration * 0.034 / 2; // Convert time to cm
return distance;
}
3. Motor Control Functions
To control movement, I created separate functions for moving forward, backward, and stopping.
void moveForward() {
digitalWrite(LEFT_MOTOR_FORWARD, HIGH);
digitalWrite(RIGHT_MOTOR_FORWARD, HIGH);
digitalWrite(LEFT_MOTOR_BACKWARD, LOW);
digitalWrite(RIGHT_MOTOR_BACKWARD, LOW);
}
void moveBackward() {
digitalWrite(LEFT_MOTOR_FORWARD, LOW);
digitalWrite(RIGHT_MOTOR_FORWARD, LOW);
digitalWrite(LEFT_MOTOR_BACKWARD, HIGH);
digitalWrite(RIGHT_MOTOR_BACKWARD, HIGH);
}
void stopMovement() {
digitalWrite(LEFT_MOTOR_FORWARD, LOW);
digitalWrite(RIGHT_MOTOR_FORWARD, LOW);
digitalWrite(LEFT_MOTOR_BACKWARD, LOW);
digitalWrite(RIGHT_MOTOR_BACKWARD, LOW);
}
4. Mop Motor Control
The mop motor is activated when the robot is moving and stopped when the robot stops.
void activateMop() {
digitalWrite(MOP_MOTOR, HIGH);
}
void stopMop() {
digitalWrite(MOP_MOTOR, LOW);
}
5. Main Loop with Switch & Obstacle Avoidance
The loop function checks if the switch is ON and moves the robot while avoiding obstacles.
void loop() {
if (digitalRead(SWITCH_PIN) == HIGH) { // If switch is ON
long distance = getDistance();
if (distance > 20) { // No obstacle detected
moveForward();
activateMop();
} else { // Obstacle detected
stopMovement();
stopMop();
moveBackward();
delay(500);
}
} else { // If switch is OFF, stop everything
stopMovement();
stopMop();
}
}
The switch turns the robot on or off.
The ultrasonic sensor measures the distance in front of the robot.
If the path is clear, the robot moves forward and activates the mop motor.
If an obstacle is detected, the robot stops, reverses, and then tries again.
When the switch is OFF, the robot completely stops, conserving battery power.
To bring Mop Pop to life, I carefully connected and programmed each module to work together:
Power System:
The 5V adapter charges the lithium battery, which provides 7.5V to the system.
The battery powers the Arduino, motor driver, and sensors.
Motor Control:
Two gearbox DC motors with wheels are connected to the motor driver, controlled by Arduino to move the robot forward, backward, and turn.
A separate DC motor drives the mop mechanism, activated by Arduino when cleaning mode is on.
Obstacle Detection with Ultrasonic Sensor:
The ultrasonic sensor detects obstacles and sends signals to the Arduino.
The Arduino processes the data and adjusts movement accordingly, preventing collisions.
Arduino Programming:
The code was written in Arduino IDE to coordinate the movement, obstacle avoidance, and mop activation.
Testing Results
Movement Test: The wheels and motors responded correctly to programmed commands, allowing Mop Pop to navigate smoothly.
Obstacle Avoidance Test: The ultrasonic sensor successfully detected objects and redirected the robot.
Mopping Function Test: The DC motor-powered mop rotated as expected, effectively cleaning the surface.
Power Efficiency Test: The lithium battery provided sufficient power for continuous operation.
Yes, I asked Ahmed and Farida for their feedback during the design process. Initially, I planned to flip the two front gearbox motors to support two mop disks while having two wheels at the back. However, Ahmed pointed out that this setup wouldn't allow the robot to move properly.
Based on this feedback, I modified the design to include:
One mop disk instead of two.
Two wheels for movement and one coaster wheel for balance.
One DC motor to power the mop.
This change improved stability and maneuverability, ensuring that Mop Pop could move and clean efficiently.
During the project, I faced a few challenges that required problem-solving and research.
When I got stuck, I turned to Ahmed and Farida for feedback, especially when designing the wheel and mop placement. I also referred to online resources, Arduino forums, and tutorials to troubleshoot wiring and motor control issues.
One major challenge was deciding on the best wheel configuration. Initially, I planned to flip the two gearbox motors to support two mop disks, but after testing and discussing with Ahmed, I realized this setup would prevent the robot from moving properly. This led me to redesign the structure with one mop, two wheels, and a coaster wheel for balance.
Another issue was adjusting the laser-cut design. I had to ensure precise measurements to avoid material waste and rework. Learning how to properly set up RDWorks and the laser cutter settings (power 45, speed 40) helped me get clean and accurate cuts.
Test your motor and wheel placement early to avoid redesigning later.
Double-check power requirements to ensure components receive the correct voltage.
Research different navigation methods if you're adding sensors for movement.
Be precise with laser cutting
If I had more time, I would definitely use a 3D printer to create a ring-shaped enclosure between the two wooden sandwich layers. This would add height, protecting internal components and giving Mop Pop a more stable and polished design.
Additionally, I would:
Add a Water Spray System: Integrating a servo motor to control a water spray nozzle, allowing Mop Pop to dispense water before mopping for better cleaning.
Improve Navigation: Using line-following sensors or an IMU for smoother movement and obstacle detection.
Optimize Power Efficiency: Upgrading to a higher-capacity lithium battery for longer runtime.