Sei sulla pagina 1di 29

instructables

CleanSweep: the Floor Cleaning Robot!

by Saiyam

CleanSweep (couldn't think of better name :P) is a couldn't due to shortage of time.
smartphone controlled robot that cleans your house's
floor! The rotating mops on the front of the robot along It took me around 4-5 days to complete this thing,
with a foam roller (used to paint walls, not here) at the simultaneously making videos of the process. I hope
back can do the job perfectly. There's also a water you like it.
pump and water reservoir which can be switched on
when required to throw water on the floor and make Videos will be published as soon as I am done with
the mops moist for a proper clean. The foam roller is the editing!
movable, which means you can lift it when not in use.
I've also added speed controls for the driver motors. _______________________

The project uses bluetooth communication via an HC- I know this project is awesome xD. So please vote for
05 bluetooth module to send the commands to the it in the 'Robotics' and 'Microcontrollers' contests at it
most commonly used microcontroller- Arduino UNO. fits well in both the categories. Also, don't forget to
The robot is powered on a 12V lead acid battery, the follow me.
ideal voltage for all motors used here.. The driver
motor pair are 100rpm ones while for the mops I've As always, Questions and Suggestions are always
used 75rpm plastic ones. welcome in the comment box (or you could drop me a
mail).
The best part is that the mops used were homemade,
from old CDs and rags and they clean just perfectly. Subscribe to my YouTube channel for more such
This is a smaller version so might not be suitable for a projects! ;)
large area. There can be tons of other features
added, like making it completely autonomous, which I

CleanSweep: the Floor Cleaning Robot!: Page 1


CleanSweep: the Floor Cleaning Robot!: Page 2
Step 1: Parts and Tools

The following parts and tools are required for building this project:

Parts:

2x 100rpm Geared motors


2x Wheels for motors
2x 75rpm Plastic geared motors w/ wheels
1x Arduino UNO
1x HC-05/06 bluetooth module
1x L293D motor driver board
1x Standard servo motor (180 degree rotation)
1x 12V Sealed lead acid rechargeable battery
1x 12V Water pump
2x TIP31C/TIP122 NPN power transistors
2x Old CDs
A paint roller w/ shaft
Wiping cloth/ napkin/ old rags
A needle and thread
Vinyl tubing
Rainbow wire
Male-male/ female-female/ male-female jumper wires
Male/female headers
Perforated board
Nuts and Screws
Plywood base
Paint roller w/ shaft
A 600ml plastic bottle

Tools:

Soldering iron w/ solder


Hot glue gun w/ glue sticks
Drill
Rotatory tool
Pliers
Wire cutter/stripper
Paper cutter
Tape
Safety equipment while working (Important!)

Total cost of the parts: $30 approx. (2000 rupees)

CleanSweep: the Floor Cleaning Robot!: Page 3


CleanSweep: the Floor Cleaning Robot!: Page 4
Step 2: Get the Base Ready

The first step is to prepare the base on which the After this, drill two holes each at the back for both the
parts will be placed. For this, first get a piece of motor clamps. Make proper measurements such that
plywood cut, measuring 12x9 inches. The base both should be parallel to each other. Fix them in
wasn't looking great at all, so to make it look a bit place using some screws then attach the motors to
attractive, I painted it in white and orange stripes with the clamps.
black at the borders with acrylic paints.

CleanSweep: the Floor Cleaning Robot!: Page 5


CleanSweep: the Floor Cleaning Robot!: Page 6
Step 3: Make the Floor Moppers and Attach Them to the Base

I found this idea on one of the YouTube videos (click After you're done with all the folds, make 2-3 knots at
here). To make cheap DIY circular floor moppers, you the end and cut the left over thread.
can use old compact disks along with a piece of cloth.
Repeat the same for the second CD.
First mark a circle on the cloth which should be bigger
than the CD. Cut it using a pair of scissors. Attach wheels to both the plastic geared motors. Hot
glue the wheels to the CDs.
Take a needle and thread and start sewing and
making folds to the cloth in such a way that it The moppers have to be placed in the front. Hot glue
surrounds the entire CD. (something I am very bad at) the motors in such a way that the cloth stays away
from each other and the motors are at an equal
Refer to the images above or have a look at this distance from the sides. Make sure the cloth properly
video, or maybe this one. touches the floor

CleanSweep: the Floor Cleaning Robot!: Page 7


CleanSweep: the Floor Cleaning Robot!: Page 8
Step 4: The Water Supply Mechanism

This consists of a 12V water pump which carries the connected to the inlet of pump to take water from the
water from the reservoir and spills it near the mops on reservoir from the pump and the second one will be
the floor. First mark, drill and fix your pump in place. used to take water from the pump to the floor. Adding
straws to the outlet will be done later.
Take a 600ml empty plastic bottle and cut it into half
using a paper cutter. Use the lower half and place it The pump can be switched on/off via your
on the robot base using some hot glue. smartphone just like other controls.

Take two pieces of rubber tubing. One will be

CleanSweep: the Floor Cleaning Robot!: Page 9


CleanSweep: the Floor Cleaning Robot!: Page 10
CleanSweep: the Floor Cleaning Robot!: Page 11
Step 5: Roller Mechanism

The purpose of roller here is to stick small dust handle as well. Use a screw to tighten the attachment
particles to itself. It will not be needed everytime the and the roller.
robot is moving so I decided to make a simple
mechanism which can lift it up or down via a servo The motor will have to be placed at a height so the
motor. roller touches the floor and can be lifted easily. Use
two 7x2.5 centimetres wooden pieces and hot glue
First you need to drill a hole on the servo attachment. the servo to their top.
Drill another hole of almost same size on the roller

CleanSweep: the Floor Cleaning Robot!: Page 12


CleanSweep: the Floor Cleaning Robot!: Page 13
Step 6: Solder the Circuits

For the mop geared motors and the water pump to be Also, I soldered some male and female headers to
controlled via arduino, there has to be an external make +5V and Gnd power rails as these pins are
circuit as both of them need 12V to run but arduino limited on the arduino and we need plenty of them for
can only provide a 5V output. I used TIP122 NPN each component to be connected. Follow the pictures
power transistors and soldered them on to a piece of above and solder two rails, one for each +5V and
perfboard. The circuit is simple and is provided Gnd.
above.

CleanSweep: the Floor Cleaning Robot!: Page 14


CleanSweep: the Floor Cleaning Robot!: Page 15
Step 7: Connections

Now this is always the typical part. You have to be accurate. For making it a bit easier, I always use jumper wires
which can be swapped or removed any time.

Before that, drill some holes and fix your arduino in place using some screws.

Start by connecting the geared motors to the driver board. Solder some wire to the motor terminals and then
connect them to the screw terminals of the driver circuit. The rest of the pins have to be connecting as per the
following:

Signal 1 ---- D6 on Arduino


Signal 2 ---- D9 on Arduino
Signal 3 ---- D10 on Arduino
Signal 4 ---- D11 on Arduino
+5V ---- +5V on Arduino
Gnd ---- Gnd on Arduino
+12V (motors will move at this voltage) ---- to be connected to battery later

Next comes the bluetooth module. Connections are:

Vcc ---- +5V on Arduino


Gnd ---- Gnd on Arduino
Rx ---- Tx on Arduino
Tx ---- Rx on Arduino

Add a voltage divider to signal pins if you're afraid that the signal pins on arduino might burn.

The two mop motors have to be connected in parallel such that the left one runs anticlockwise and the right one
turns clockwise when seen from the front. Use heat shrink tubes to keep the connections safe. Solder the motor
wires to the transistor circuit as per the schematic given above. Similarly connect the water pump wires as well.

We will be supplying the 12V from the battery directly to the transistor circuit and then this 12V will go to the Vcc of
arduino and the motor driver circuit.

Connect the base of transistor two, controlling the mops to D5 on arduino and transistor one, controlling the pump
to D4 on arduino. The common ground wire from all the motors has to be connected to the Gnd on arduino.

What remains now is the servo motor. The connections are:

Vcc ---- +5V on Arduino


Gnd ---- Gnd on Arduino
Signal ---- D3 on Arduino

You can always have a look at the schematic.

CleanSweep: the Floor Cleaning Robot!: Page 16


CleanSweep: the Floor Cleaning Robot!: Page 17
CleanSweep: the Floor Cleaning Robot!: Page 18
CleanSweep: the Floor Cleaning Robot!: Page 19
Step 8: Finishing

Keep all the circuit boards, wires, tubings in place outlet pipe of the water pump. Bend both of them in
with hot glue. It should look neat, the wires shouldn't opposite directions and glue them in place such that
entangle and the connections shouldn't break, which water flows from both the straws and falls just a little
can be irritating. ahead of the rotating mop (look at the pictures). Don't
forget to put some tape where the straws are
Next, take two straws and cut them about 7cm in connected so the water doesn't leak.
length. Crush and squeeze one end of both into the

CleanSweep: the Floor Cleaning Robot!: Page 20


CleanSweep: the Floor Cleaning Robot!: Page 21
Step 9: Upload the Code

Remove the Rx and Tx cables from arduino before uploading!

Connect the board to a pc and program it with the code given below. You can make necessary changes.

Make sure you set the correct COM port and Board under Tools.

After it's done, replace the Rx and Tx wires. You'll need to remove them everytime you upload the code.

<p>#include <br>Servo myServo;</p><p>int r_motor_n = 10; //PWM control Right Motor +


int r_motor_p = 11; //PWM control Right Motor -
int l_motor_p = 9; //PWM control Left Motor -
int l_motor_n = 6; //PWM control Left Motor +
int pump = 4;
int mop = 5;
int serv = 3;
int speedy = 255;
int incomingByte = 0; // for incoming serial data</p><p>void setup()
{
myServo.attach(3);
myServo.write(0);
pinMode(r_motor_n, OUTPUT); //Set control pins to be outputs
pinMode(r_motor_p, OUTPUT);
pinMode(l_motor_p, OUTPUT);
pinMode(l_motor_n, OUTPUT);
pinMode(pump, OUTPUT);
pinMode(mop, OUTPUT);
digitalWrite(r_motor_n, LOW); //set both motors off for start-up
digitalWrite(r_motor_p, LOW);
digitalWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, LOW);
digitalWrite(pump, LOW);
CleanSweep: the Floor Cleaning Robot!: Page 22
digitalWrite(pump, LOW);
digitalWrite(mop, LOW);
Serial.begin(9600);
}</p><p>void loop()
{</p><p>if (Serial.available() > 0)
{
incomingByte = Serial.read();
}</p><p>switch(incomingByte)
{</p><p>case 'S': // control to stop the robot
digitalWrite(r_motor_n, LOW);
digitalWrite(r_motor_p, LOW);
digitalWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, LOW);
Serial.println("Stop");
incomingByte='*';
break;</p><p>case 'R': //control for right
analogWrite(r_motor_n, speedy);
digitalWrite(r_motor_p, LOW);
analogWrite(l_motor_p, speedy);
digitalWrite(l_motor_n, LOW);
Serial.println("right");
incomingByte='*';
break;</p><p>case 'L': //control for left
analogWrite(r_motor_n, LOW);
digitalWrite(r_motor_p, speedy);
analogWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, speedy);
Serial.println("right");
incomingByte='*';
break;</p><p>case 'F': //control for forward
analogWrite(r_motor_n, speedy);
digitalWrite(r_motor_p, LOW);
analogWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, speedy);
Serial.println("right");
incomingByte='*';
break;</p><p>case 'B': //control for backward
analogWrite(r_motor_n, LOW);
digitalWrite(r_motor_p, speedy);
analogWrite(l_motor_p, speedy);
digitalWrite(l_motor_n, LOW);
Serial.println("right");
incomingByte='*';
break;</p><p>case 'P': // pump on
digitalWrite(pump, HIGH);
Serial.println("pump on");
incomingByte='*';
break;</p><p>case 'p': // pump off
digitalWrite(pump, LOW);
Serial.println("pump off");
incomingByte='*';
break;</p><p>case 'M':
digitalWrite(mop, HIGH); // mopper on
Serial.println("mopper on");
incomingByte='*';
break;</p><p>case 'm':
digitalWrite(mop, LOW); // mopper off
Serial.println("mopper off");
incomingByte='*';
break;</p><p>case 'U': // roller up
myServo.write(0);
Serial.println("roller up");
incomingByte='*';
break;</p><p>case 'u': // roller down
myServo.write(135);
Serial.println("roller down");
incomingByte='*';
break;</p><p>case '1':
speedy = 155;
Serial.println("speed= 10");
incomingByte='*';
break;</p><p>case '2':
speedy = 185;
Serial.println("speed= 25");
incomingByte='*';
break;</p><p>case '3':

CleanSweep: the Floor Cleaning Robot!: Page 23


speedy = 215;
Serial.println("speed= 75");
incomingByte='*';
break;</p><p>case '4':
speedy = 255;
Serial.println("speed= 100");
incomingByte='*';
break;</p><p>delay(5000);
}
}</p>

Download (https://cdn.instructables.com/ORIG/FS2/AQ56/J20PFGE4/FS2AQ56J20PFGE4.ino)

http://www.instructables.com/ORIG/FS2/AQ56/J20PFGE4/FS2AQ56J20PFGE4.ino

(https://cdn.instructables.com/ORIG/FS2/AQ56/J20PFGE4/FS2AQ56J20PFGE4.ino)

Step 10: Attach the Battery

For the power source, it's your choice about the type battery connectors.
of battery to use. The voltage should be 12V. I would
recommend a single lead acid battery or 3x Li-ion You can even add an On/Off main switch.
18650, 3.7V each connected in series.
If the power LED on the arduino glows, it's all good.
Use some double sided tape or hot glue to keep the Immediately remove the source if LEDs dim rapidly
battery pack in place. +Ve terminal will go to the and recheck all the connections. Do not use a very
transistor circuit from where it will go to Vcc on high voltage else the regulator on the board may
arduino and to the motor driver circuit. -Ve terminal overheat.
will be connected to the common Gnd. Use proper

CleanSweep: the Floor Cleaning Robot!: Page 24


CleanSweep: the Floor Cleaning Robot!: Page 25
Step 11: Configure the App and Connect

Go to the google play store and get this app called 'Bluetooth Serial Controller' which lets you set your own control
buttons and commands.

After opening the app, click on 'settings' and then 'visibility'

Turn off visibility for buttons 5, 9, 12 as we won't be needing them.

Next, go on the 'names' icon so set the display names for each button. Make them short, 3-4 letters.

For example, look at the names I set above.

Now under the 'commands' option, set the following commands (without quotes) for each button (they are case
sensitive):

Button 1 (FWD): 'F'


Button 2 (BCK): 'B'
Button 3 (LFT): 'L'
Button 4 (RGT): 'R'
Button 6 (MPON): 'M'
Button 7 (MPOF): 'm'
Button 8 (PMP): 'P'
Button 10 (RUP): 'U'
Button 11 (RDWN): 'u'
Button 13 (S1): '1'
Button 14 (S2): '2'
Button 15 (S3): '3'
Button 16 (S4): '4'

Under the 'stop commands' section in 'commands' itself, you need to set the following stop commands ONLY for
the buttons mentioned below:

Button 1: 'S'
Button 2: 'S'
Button 3: 'S'
Button 4: 'S'
Button 8: 'p'

This means that example if button 2 isn't pressed, the command 'S' will be sent which will stop the robot.

To connect the robot, first pair up the bluetooth module named 'HC-05' or other. Password will be '0000' or '1234'

Then connect the paired up module via the app.

Press and check all the buttons on the app one by one.

CleanSweep: the Floor Cleaning Robot!: Page 26


CleanSweep: the Floor Cleaning Robot!: Page 27
Step 12: The End!

So that's the end of my 29th instructable. Go ahead I hope you liked this one, and if you did, please vote!
and and try other projects as well. Here's my YouTube channel with video tutorials of
such projects.
This can still have a lot of modifications. I was
thinking to make it fully autonomous with ultrasonic/IR Doubts/suggestions are welcome. Comment below or
sensors but couldn't due to shortage of time. You can drop me a mail.
try this feature. Make it avoid rugged surfaces and
walls. Add a vacuum cleaner or a moving wiper Thanks for reading! :)
connected to a servo. As always, possibilities are
endless.

CleanSweep: the Floor Cleaning Robot!: Page 28


CleanSweep: the Floor Cleaning Robot!: Page 29

Potrebbero piacerti anche