The Ultimate Floor Cleaning Robot (v2.0)

by Saiyam in Circuits > Robots

41120 Views, 161 Favorites, 0 Comments

The Ultimate Floor Cleaning Robot (v2.0)

The Ultimate Floor Cleaning Robot (Version 2.0) | How To Make
Untitled design (6).png
IMG_20211220_180410.jpg
IMG_20211220_180604.jpg
vlcsnap-2022-02-07-18h34m45s112.png
vlcsnap-2022-02-07-18h35m50s626.png
vlcsnap-2022-02-07-18h36m21s796.png
vlcsnap-2022-02-07-18h37m02s192.png
vlcsnap-2022-02-03-20h22m40s986.png

Around 5 years back I made a Floor Cleaning Robot (CleanSweep) from scratch, which was a hit and a lot of people followed the guide and tried making their own robot. But that design actually had some flaws. So last year I had to make my Engineering Mini Project and I decided to work on the same idea but with some improvements. However, it is quite ironical that even after 3 years of university I worked on the same project that I built when I was in school (lol).

In this instructable, I will present you Version 2.0 of the Floor Cleaning Robot, with some improvements over the previous version. This one is also controlled from a phone app via bluetooth but here I have also added autonomous control (which a lot of people requested). I used 3 ultrasonic sensors- one looks at the front, one looks left and one looks right. A latching switch is used to switch between Autonomous and Manual Mode. The roller at the back was useless so I removed it. The 2 rotating mops at the front obstructed movement so I replaced that with a single fixed mop. Apart from that I also added an LCD display (which is optional) for displaying commands or debugging. I also used lithium-ion batteries instead of a bulky lead acid battery which gives us more capacity and smaller size. We can also control the flow of water for which I used glucose drip infusion mechanism.

In short here are the changes I made compared to the previous version:

  • Added Autonomous Mode
  • Fixed mop instead of rotating ones
  • Removed roller and servo motor
  • Added LCD Display
  • Used Lithium-ion Batteries instead of lead acid
  • Used Arduino Nano (cheaper and smaller in size) instead of Uno
  • Added Water Flow Control

I have tried to make the instructions as clear as possible. I hope you find this guide useful.

Also, Subscribe to my YouTube Channel if you haven't.

____________________

Thanks to NextPCB for helping me with this project.

NextPCB is one of the most experienced PCB manufacturers globally. It has specialized in the PCB and assembly industry for over 15 years. Not only could NextPCB provide the most innovative printed circuit boards and assembly technologies in the highest quality standards, the fastest delivery turnaround as fast as 24 hours.

If you have a PCB project, please visit their website and get exciting discounts and coupons!

Only 0$ for 5-10pcs PCB Prototypes: https://www.nextpcb.com/?code=Kumar

Register and get $100 from NextPCB: https://www.nextpcb.com/register?code=Kumar

See more info about PCB Assembly Capabilities: https://www.nextpcb.com/pcb-assembly-services

Supplies

IMG_20210524_164521.jpg
IMG_20210524_165129.jpg
IMG_20210524_164816.jpg
IMG_20210524_165824.jpg
IMG_20210607_212128.jpg
IMG_20210524_165015.jpg
IMG_20210524_165234.jpg
IMG_20210524_170857.jpg
IMG_20210524_171009.jpg
IMG_20210524_172454.jpg
IMG_20210524_171131.jpg
IMG_20210524_171405.jpg
IMG_20210524_171608.jpg
IMG_20210524_171849.jpg
IMG_20210524_170450.jpg
IMG_20210524_172254.jpg
IMG_20210524_172351.jpg
IMG_20210524_172622.jpg
IMG_20210524_192327.jpg
IMG_20210609_012207(1).jpg
IMG_20210609_012415.jpg
IMG_20210611_213933.jpg
IMG_20210612_015742.jpg
IMG_20210526_143846.jpg
IMG_20210527_013807.jpg
IMG_20210526_011743.jpg
IMG_20210608_012838.jpg

Following are the parts that we will need for this project:

  • Arduino Nano (or any other compatible board) (Buy on Amazon)
  • HC-05 Bluetooth Module (Buy on Amazon)
  • L293D Motor Driver Board (L293 or any other motor driver will also work) (Buy on Amazon)
  • 3x HC-SR04 Ultrasonic Sensors (Buy on Amazon)
  • 3x Clamps for Ultrasonic Sensors (optional)
  • 16x2 LCD Display (Buy on Amazon)
  • Single Channel 5V Relay Module (Buy on Amazon)
  • 2x 100 RPM Geared Motors (or anywhere between 50-500 RPM) (Buy on Amazon)
  • 2x Wheels for Motors (Buy on Amazon)
  • 2x Clamps for Motors (Buy on Amazon)
  • 12V Diaphragm Water Pump (Buy on Amazon)
  • 3x 18650 Lithium-ion Batteries (Sparkfun)
  • 3 Cell Holder or 3x Single Cell Holders (Sparkfun)
  • 7805 Voltage Regulator
  • 1K, 2K, 10K resistors (1 each)
  • Male/Female Headers
  • Screw Terminal
  • Latching Push Button
  • On/Off Switch
  • Perf Board
  • Female to Female Jumper Wires
  • Wire
  • Nuts & Bolts
  • Spinning Mop attachment (found in spin mop & bucket kit) (Buy on Amazon)
  • Vinyl Tubing
  • Glucose Drip Pipe (can be found in medical stores)
  • A Small Water Bottle (as water reservoir)

Apart from this, you will also need some basic tools like Soldering Iron, Drill, Wire Cutter, Screwdriver, Pliers etc.

Prepare the Base

Screenshot (231).png
IMG_20210517_141705.jpg
IMG_20210524_222748(1).jpg

We start by preparing the chassis or base of the robot. I used 6mm thickness plywood as the material. I have attached a very basic 2D CAD layout so you can follow that.

First, the plywood was cut using hacksaw. Then I used a flat file to round the two corners at the front. After that I sanded all the corners with some sand paper and finally spray painted the base black.

Mount Motors to Base

vlcsnap-2022-02-01-23h51m57s651.png
IMG_20210525_003431.jpg
vlcsnap-2022-02-01-23h54m00s221.png
vlcsnap-2022-02-01-23h55m27s127.png
vlcsnap-2022-02-01-23h55m46s919.png
vlcsnap-2022-02-01-23h56m51s793.png
vlcsnap-2022-02-01-23h57m11s392.png
vlcsnap-2022-02-01-23h57m53s934.png
vlcsnap-2022-02-01-23h58m12s205.png
vlcsnap-2022-02-01-23h58m29s696.png
vlcsnap-2022-02-01-23h59m06s689.png
IMG_20210526_015815.jpg

I used mounting brackets to mount the motors to the base. First, measure and mark where to place the the motors. Don't forget to take wheels into consideration when measuring.

Then drill some holes for the mounting bracket and put them in place with some nuts and bolts. Now attach the motors to the mounting brackets.

Before attaching the motors, solder two wires to both the motors as it will be difficult to solder them later.

Attach Wheels

vlcsnap-2022-02-02-17h24m49s709.png
vlcsnap-2022-02-02-17h25m12s012.png
vlcsnap-2022-02-02-17h26m01s726.png
vlcsnap-2022-02-02-17h26m17s266.png
vlcsnap-2022-02-02-17h26m34s336.png
vlcsnap-2022-02-02-17h26m39s897.png
vlcsnap-2022-02-02-17h26m48s621.png
vlcsnap-2022-02-02-17h27m07s438.png
IMG_20210606_192511.jpg

First drill a hole for the motor wires to pass through.

Then attach the wheels to motor by fastening the screw on wheel with the motor shaft.

Drill a Hole for Mop & Place Sensor Clamps

vlcsnap-2022-02-02-17h10m26s054.png
vlcsnap-2022-02-02-17h11m01s393.png
vlcsnap-2022-02-02-17h11m40s373.png
vlcsnap-2022-02-02-17h11m51s591.png
vlcsnap-2022-02-02-17h12m01s285.png
vlcsnap-2022-02-02-17h12m36s113.png
vlcsnap-2022-02-02-17h13m10s468.png
vlcsnap-2022-02-02-17h13m48s092.png
IMG_20210607_212309(1).jpg
vlcsnap-2022-02-02-17h14m46s378.png
vlcsnap-2022-02-02-17h15m01s608.png
vlcsnap-2022-02-02-17h15m17s372.png
vlcsnap-2022-02-02-17h15m57s345.png
IMG_20210607_215614.jpg
IMG_20210607_215641.jpg
IMG_20210607_215908.jpg

Drill a large hole (depending on your mop size) at the front of the robot for placing the mop.

For the sensors, I got these 3D printed clamps. You can make your own or find them on Amazon or any hobby electronics store. They will enable us to install the sensors very easily.

Now drill some holes for the sensor clamps and install them in place with some nuts and bolts. Place the clamps in such a way that one sensor in the middle will face forward and the other two will face left and right at an angle of 45 degress.

Circuit Diagram

Floor Cleaning Robot Schematic.png

I have attached the complete circuit diagram with all the parts. You will have to follow it for the next few steps. Have a look at it very carefully. If the above image is not clear, you can download the high quality pdf version from below.

1K and 2K resistors are conneced to Tx pin on arduino to create a voltage divider, since the HC-05 bluetooth module works on 3.3V logic level but arduino would give 5V signals which might damage the bluetooth module.

If you don't want to use an LCD, just don't connect it. The project will still work perfectly without any changes in wiring or code.

The circuit was designed using Fritzing.

Circuit Assembly

IMG_20210608_014925.jpg
vlcsnap-2022-02-02-01h17m16s017.png
IMG_20210527_001439.jpg
vlcsnap-2022-02-02-01h16m09s730.png
vlcsnap-2022-02-02-01h18m14s221.png
vlcsnap-2022-02-02-01h18m44s729.png
IMG_20210527_024349(1).jpg
vlcsnap-2022-02-02-01h26m02s194.png
vlcsnap-2022-02-02-01h26m41s399.png
vlcsnap-2022-02-02-01h27m07s716.png
vlcsnap-2022-02-02-01h28m30s593.png
vlcsnap-2022-02-02-01h27m48s113.png
IMG_20210608_015510.jpg
IMG_20210608_015514.jpg

Get a piece of perf board (zero PCB). To place the arduino first solder some female headers and then connect male headers parallely to each of the female header which corresponds to each pin on arduino. All external components will be connnected to these male headers.

To connect the LCD, again solder some female headers.

Add a screw terminal (to connect power supply from battery), latching switch and voltage regulator to the PCB. Solder some male headers in front of the voltage regulator.

Now add all the resistors as well and connect everything as per the schematic using wires.

Why use an external voltage regulator if arduino already has one in-built? Since we are using a lot of components that need to be powered at 5V (3 ultrasonic sensors, a bluetooth module, a motor driver, a relay, an LCD), powering so many of them using arduino's in-built voltage regulator can overheat and damage it. So, we will be connecting some of the components to an external 5V voltage regulator. However, this is completely optional.


Connect All Components to Main Circuit Board

vlcsnap-2022-02-02-01h58m16s586.png
vlcsnap-2022-02-02-01h58m45s787.png
vlcsnap-2022-02-02-01h59m14s545.png
vlcsnap-2022-02-02-01h59m37s227.png
vlcsnap-2022-02-02-01h59m56s649.png
vlcsnap-2022-02-02-02h00m24s379.png
vlcsnap-2022-02-02-02h00m55s849.png
vlcsnap-2022-02-02-02h01m14s328.png
vlcsnap-2022-02-02-02h01m21s246.png
vlcsnap-2022-02-02-02h01m28s347.png
vlcsnap-2022-02-02-02h01m40s437.png
vlcsnap-2022-02-02-02h01m50s940.png
vlcsnap-2022-02-02-02h03m17s645.png
vlcsnap-2022-02-02-02h03m28s172.png

After our main circuit board is complete, now we have to connect all the external components to it.

Start by connecting the bluetooth module, followed by relay board and motor driver. Just follow the schematic.

At last, connect both motors to the motor driver as well.

I placed all the components on the robot base with some hot glue.

Connect the Ultrasonic Sensors

vlcsnap-2022-02-02-17h34m09s936.png
vlcsnap-2022-02-02-17h34m27s949.png
vlcsnap-2022-02-02-17h34m33s737.png
vlcsnap-2022-02-02-17h34m57s328.png
vlcsnap-2022-02-02-17h35m20s140.png
vlcsnap-2022-02-02-17h36m20s244.png
vlcsnap-2022-02-02-17h36m59s841.png
vlcsnap-2022-02-02-17h37m31s846.png
vlcsnap-2022-02-02-17h37m52s808.png
vlcsnap-2022-02-02-17h38m29s365.png
IMG_20210608_033122.jpg
IMG_20210608_033146.jpg
IMG_20210608_033638.jpg

Connect all the three ultrasonic sensors to their respective pins using jumper wires, as per the schematic.

Since our sensor clamps are already in place, hot glue the sensors on the clamps.

Water Spraying Mechanism

vlcsnap-2022-02-02-17h52m37s144.png
IMG_20210609_012431.jpg
IMG_20210609_012228.jpg
IMG_20210609_012516.jpg
vlcsnap-2022-02-02-17h48m18s950.png
vlcsnap-2022-02-02-17h48m43s423.png
vlcsnap-2022-02-02-17h48m55s908.png
vlcsnap-2022-02-02-17h49m53s626.png
vlcsnap-2022-02-02-17h50m21s056.png
vlcsnap-2022-02-02-17h50m30s494.png
vlcsnap-2022-02-02-17h51m18s023.png
vlcsnap-2022-02-02-17h51m24s250.png
vlcsnap-2022-02-02-17h51m48s481.png
vlcsnap-2022-02-02-17h51m58s901.png
IMG_20210610_005639.jpg

To spray water on the mop, I used a 12V Diaphragm pump with a very simple mechanism. There are two pipes, one is the inlet pipe that will go to the water reservoir and the other one is the outlet pipe which will go to the mop.

For the inlet pipe, I used 8mm thickness tubing.

For the outlet, I used a thinner pipe I got from drip infusion system which is connected to a small flow control valve to control the flow of water. (since we don't want our mop to be drenched with water)

A small 200ml bottle is used as a water reservoir.

Make sure you connect inlet and outlet pipes as per the marking on the water pump.

Install the Mechanism on Robot

vlcsnap-2022-02-02-23h24m37s455.png
vlcsnap-2022-02-02-23h24m46s068.png
vlcsnap-2022-02-02-23h24m57s466.png
vlcsnap-2022-02-02-23h25m09s056.png
vlcsnap-2022-02-02-23h25m19s865.png
vlcsnap-2022-02-02-23h25m30s840.png
vlcsnap-2022-02-02-23h25m50s111.png
vlcsnap-2022-02-02-23h26m00s682.png
vlcsnap-2022-02-02-23h26m36s561.png
vlcsnap-2022-02-02-23h26m43s148.png
vlcsnap-2022-02-02-23h27m15s915.png
vlcsnap-2022-02-02-23h28m33s386.png
vlcsnap-2022-02-02-23h29m48s422.png
vlcsnap-2022-02-02-23h30m06s992.png
vlcsnap-2022-02-02-23h30m23s060.png
vlcsnap-2022-02-02-23h30m42s864.png
vlcsnap-2022-02-02-23h31m19s699.png
vlcsnap-2022-02-02-23h31m55s338.png

I used some zip ties to place the water pump on robot base.

For the water bottle, first I drilled a hole for the inlet pipe. Then I hot glued the bottle in place.

I also hot glued the flow control valve at the front.

The outlet pipe should be placed as such that water falls directly on to the mop.

Power Supply

IMG_20210612_022424.jpg
vlcsnap-2022-02-02-23h33m01s312.png
vlcsnap-2022-02-02-23h33m11s035.png
vlcsnap-2022-02-02-23h33m19s632.png
vlcsnap-2022-02-02-23h33m25s876.png
vlcsnap-2022-02-02-23h33m42s053.png
vlcsnap-2022-02-02-23h33m50s108.png
vlcsnap-2022-02-02-23h34m02s439.png
vlcsnap-2022-02-02-23h34m24s892.png
vlcsnap-2022-02-02-23h34m32s524.png
vlcsnap-2022-02-02-23h35m20s058.png
vlcsnap-2022-02-02-23h35m52s234.png
vlcsnap-2022-02-02-23h36m51s639.png
vlcsnap-2022-02-02-23h37m22s739.png
vlcsnap-2022-02-02-23h37m31s847.png
vlcsnap-2022-02-02-23h37m56s270.png
vlcsnap-2022-02-02-23h38m24s829.png
vlcsnap-2022-02-02-23h40m19s375.png
vlcsnap-2022-02-02-23h40m44s015.png
vlcsnap-2022-02-02-23h41m38s024.png
vlcsnap-2022-02-02-23h42m18s803.png
vlcsnap-2022-02-02-23h42m54s511.png

For the power supply, I decided to use 3x 18650 Lithium ion batteries, 3000mAh each. This is probably the best option to power our robot since lithium batteries have high energy density so they take up very less space. All the 3 batteries are connected in series so we get roughly 12V which is optimum for our application.

I used 3 single cell holders, hot glued them on a hard board piece and connected them in series since I could not find 3 cell holder.

I connected a switch as well to turn the robot On/Off.

Finally, I connected the supply to the main circuit board.

One thing that you need to take care of is, not to discharge the batteries too much since we are not using a battery management system or any other kind of protection circuit. Also, lithium batteries are dangerous so avoid any short circuits!

To make the robot run longer, you can increase the capacity by adding one more battery system (with 3 batteries in series) in parallel.

Attach the Mop to Base

vlcsnap-2022-02-03-16h36m24s638.png
vlcsnap-2022-02-03-16h36m33s655.png
vlcsnap-2022-02-03-16h36m44s902.png
vlcsnap-2022-02-03-16h37m09s569.png
vlcsnap-2022-02-03-16h37m22s701.png
vlcsnap-2022-02-03-16h37m51s521.png
vlcsnap-2022-02-03-16h42m51s243.png
vlcsnap-2022-02-03-16h43m01s867.png
vlcsnap-2022-02-03-16h43m13s405.png
vlcsnap-2022-02-03-16h43m22s233.png

Attach the mop to the robot via the hole that we drilled earlier and with lots of hot glue.

Place the water outlet pipe on the mop such that water falls directly on it.

Upload the Code

Screenshot (155).png
Screenshot (159).png
Screenshot (160).png
Screenshot (161).png
vlcsnap-2022-02-02-23h44m30s518.png

I have attached the code for this project. You can download it from below.

Before compiling it, you will need to install 2 libraries- one is for the ultrasonic sensors and other for the LCD.

  • So go to Sketch > Include Library > Manage Libraries
  • Under the search bar type 'NewPing'
  • Install the NewPing library by Tim Eckel
  • Similarly search for 'LiquidCrystal'
  • Install the LiquidCrystal library by Arduino (in newer versions of IDE it might be already intalled)

Now, to upload the code, first you will need to remove your arduino from the circuit. Why? Because there should not be anything connected to Rx and Tx wires of Arduino while uploading a code and here we have our bluetooth module connected. So either remove Rx and Tx wires from bluetooth module before uploading or remove the entire arduino from circuit and then upload. After it's done uploading, you can put everything back in place.

Configure App

1643891746529.jpg
1643891746516.jpg
1643894638509.jpg
1643894638498.jpg
1643894638486.jpg
1643894638476.jpg
1643894638465.jpg
1643894638454.jpg
1643894638443.jpg
1643894638431.jpg
1643894638418.jpg
1643894638386.jpg
1643894638403.jpg

For controlling the robot via a phone, we will be using the Bluetooth Serial Controller app. So first download it from Play Store.

Now we need to configure it such that it works with our robot.

  • First go to Preferences, scroll down
  • Under Orientation, select Potrait
  • You can also turn on White Background if you want
  • Now go to Button > Visibility
  • We need button 2, 5, 6, 7, 10 so keep them checked and uncheck others
  • Now go to Button Size and set size under potrait to 100
  • If you go back, you can see 5 buttons in place, but they're not named yet
  • Go to Button > Name
  • Name Button 2 as Forward, Button 5 as Left, Button 6 as Pump, Button 7 as Right and Button 10 as Back
  • Next, go to Button > Command
  • We need to send a character command when we press a button. Each button has it's own command.

Following are the commands (case sensitive):

  • Button 2 (Forward): 'F'
  • Button 5 (Left): 'L'
  • Button 6 (Pump ON): 'P'
  • Button 7 (Right): 'R'
  • Button 10 (Back): 'B'

We also need to set up Stop Commands. These are commands that are sent when the button in unpressed. If we don't add the stop commands and press the forward button for example, the robot will keep on moving forward and won't stop even after we have released the button.

So under Button > Command > Stop Command, check Button 2, 5, 6, 7, 10

Following are the Stop Commands (case sensitive):

  • Button 2: 'S'
  • Button 5: 'S'
  • Button 6: 'p' (for pump off)
  • Button 7: 'S'
  • Button 10: 'S'

There is one more optional feature that you can add, which is robot speed control. I have already added it in the code. There are 3 speed control options- Low, Medium and Maximum. To add them, first make buttons 13, 14, 15 visible. Then name them as Low, Medium and High respectivetly. Lastly, set their respective commands:

  • Low Speed: '1'
  • Medium Speed: '2'
  • Max Speed: '3'

In the above images you can see how our app looks both with and without speed controls.

Testing & Troubleshooting

vlcsnap-2022-02-03-19h51m05s249.png
vlcsnap-2022-02-03-19h47m16s270.png
vlcsnap-2022-02-03-19h47m54s833.png
vlcsnap-2022-02-03-19h48m11s833.png
vlcsnap-2022-02-03-19h48m41s050.png
vlcsnap-2022-02-03-19h48m32s924.png
vlcsnap-2022-02-03-19h49m34s848.png
vlcsnap-2022-02-03-19h50m14s842.png
vlcsnap-2022-02-03-19h50m50s128.png

After everything is done, it's finally time for testing. Turn on your robot and check if the LCD displays 'Welcome' message. If it doesn't, try tuning the trimmer pot or recheck your connections.

On your phone, turn on Bluetooth and search for devices. Pair up with HC-05. Password will usually be '0000' or '1234'.

Now check if on pressing a button on your phone is moving the robot. If it doesn't move, check if the command is displayed on LCD. If the LCD is displaying correctly but there is no movement, that means Arduino is receiving the command correctly. It can then be a problem with your motor driver connections.

If neither does the robot move nor it displays anything on the LCD, then check if your bluetooth module is connected properly. Tx wire on bluetooth module goes to Rx on arduino and vice versa. Also, check if you have set the commands on the app properly (refer Step 14).

Conclusion

vlcsnap-2022-02-03-20h22m40s986.png

You can try further improvements to this project by making it WiFi controlled or maybe making the algorithm more intelligent. The algorithm that I used for autonomous mode is very basic and it fails sometimes which makes the robot move in a loop. You can try making some improvements to the code and probably suggest me as well!

One more problem that I faced was when the mop was drenched with water, it would be so heavy that the wheels would slip wouldn't push the robot. This limits us to only moderately wet the mop. We can probably solve this using some higher power motors or larger wheels, or putting more weight on the robot such that there is more traction and it doesn't slip.

I am always in for any questions or tips.

You can comment below or send me an email: saiyamagr@gmail.com

Follow for more.

Thanks for reading! :)