DIY Vacuum Robot

175,887

755

187

Introduction: DIY Vacuum Robot

About: I studied Digital Systems and Robotics Engineering. Currently I'm working as a Software Engineer. I love to do special projects on my spare time. After being waiting for the chance to buy a 3d printer I finall…

This is my first Vacuum Robot, which it's main purpose is to allow anyone to have a cleaning robot without paying so much money, to learn how they work, to build a nice robot that you can modify, update and program as much as you want, and of course to vacuum all that annoying fluff.

This project is intended to be as easy to build as possible since all the elements and parts are easy to find on Digikey, eBay, Amazon, etc.

The whole chassis was designed in Solidworks so that it could be 3d printed.

Currently it uses an Arduino Uno (if you don't like it too much you can easily change it for another micro controller, I decided to use this since my objective is that anyone could actually build it), micro-metal motors, fan propeller, infrared sensors and respective driver modules.

Another one bites the dust!

Step 1: Materials

So, first I will define all the materials that I used and later I will suggest other options with a similar behavior.

Controllers:

  • 1 x Arduino Uno Board (or similar) (DigiKey)
  • 1 x IRF520 MOS FET Driver Module (Aliexpress)
  • 1 x H-bridge L298 Dual Motor Driver (Aliexpress)

Actuators:

  • 2 x Micro Metal Gearmotor HP 6V 298:1 (DigiKey)
  • 1 x Micro Metal Gearmotor Bracket Pair (Pololu)
  • 1 x Wheel 42×19mm Pair (DigiKey)
  • 1 x Fan Blower AVC BA10033B12G 12V or similar (BCB1012UH Neato's motor) (Ebay, NeatoOption)

Sensors:

  • 2 x Sharp Distance Sensor GP2Y0A41SK0F (4 - 30cm) (DigiKey)

Power:

  • 1 x ZIPPY Compact 1300mAh 3S 25C Lipo Pack (HobbyKing)
  • 1 x LiPo Battery Charger 3s (Amazon-Charger)
  • 1 x 1k Ohm resistor
  • 1 x 2k Ohm small potentiometer

3d Printing:

  • 3D printer with a minimum printing size of 21 L x 21 W cm .
  • PLA Fillament or similar.
  • If you don't have, you can print your file on 3DHubs.

Other materials:

  • 20 x M3 bolts with (3mm diameter)
  • 20 x M3 nuts
  • 2 x #8-32 x 2 IN bolts with nuts and washer.
  • 1 x Vaccum bag filter (cloth type)
  • 1 x Ball Caster with 3/4″ Plastic or Metal Ball (Pololu)
  • 2 pushbuttons (Aliexpress)
  • 1 x On/Off Switch

Tools:

  • Screw driver
  • Soldering Iron
  • Pliers
  • Scissors
  • Cable (3m)

Step 2: How Does It Work?

The majority of the vacuums have a motor with a fan. As the fan blades turn, they force air forward, toward the exhaust port. At the exhaust port it has a filter which prevents the dust particles being thrown away again.

How does a vacuum robot work?

The principle is pretty similar but as you can see in the second picture, the fan motor is at the last step which means that the dust is not driven through it. The air that is being sucked is first filtered and then pushed toward the exhaust port.

The main difference between each of the vacuums is that the robot one has a microcontroller and sensors which let the robot make decisions so that it can vacuum your room autonomously. Most of the vacuum robots nowadays have really nice algorithms built-in, for instance, they can map your room so that they can plan a path and perform a faster cleaning. They also have other features like side brushes, collision detection, return to its charging base, etc.

Step 3: About the Ingredients...

As I said at the beginning, I'm going to explain as much as I can so that anyone can understand, but If you already know the basics, feel free to skip this step.

The Fan

The most important thing of a vacuum is to choose the appropiate fan with a decent CFM (Airflow cubic feet per minute), it is the force of this airflow across a surface that picks up the dirt and moves it to the dust bag or container. Therefore, the more airflow, the better the cleaning ability of the vacuum cleaner [BestVacuum.com]. Most of the big vacuums use more than 60 CFM but since we are using a small battery, we are ok with at least 35 CFM. The AVC fan that I will use has 38 CFM [AVC link] and it actually has a lot of power, but you can use any with the same dimensions (See picture 1).

The Fan Driver

Since we need a way to control whenever the Fan is On or Off, we need a Driver. I will use the MOS-FET IRF520 which basically works as a switch, whenever it receives a signal from the microntroller it will supply the input voltage to the output (Fan).(See picture 2)

The H-Bridge

For the motors we'll need something a bit different from the Fan driver since now we will need to control the direction of each motor. The H-bridge is an array of transistros which allows us to control the current flow, and by controlling that, we will be able to control the motors direction. The L298 is a pretty decent H-bridge that can supply 2A per channel so for our motors it will be perfect! Another example is the L293D but that only gives us 800mA per channel. (The picture 3 depicts the concept of an H-bridge)

Step 4: The Design

The design of the robot was done in SolidWorks, it consists of 8 files.

This step was the most time consuming since all the robot was made from scratch considering the bumper, the container, the filter, etc.

The total size of the robot is 210mm x 210 mm x 80mm.

Step 5: 3d Printing

The design was done so that all the parts could be 3d printed. In case you don't have a 3d printer, you can use the 3DHubs wherever you are.

The robot consist of 12 parts (it takes a some time). It was printed on a Robo3d R1 plus using Blue Gray Colorfabb filament.

My printing settings were:

  • 0.2 mm layer height
  • 1.2 mm shell thickness
  • 30% fill density
  • 215 C printing temperature
  • 70 C bed temperature
  • Support type everywhere
  • Retraction (Very important!!) 50 mm/s 0.7mm
  • Printing Speed 60mm/s

Before doing all the prints I recommend to print the test samples that I attached so you can calibrate and modify the parameters. I took me a lot of time since the prints are big.

Note: Remove all the support filament with caution.

Look for the files here: Thingiverse Files

Step 6: Setting the Sensors Up

For each of the two sensors I soldered cables but in case you have the connector, you can skip this step.

Once we have the sensors support, we will assembly them as it is showed on the picture above using the M3 bolts. It is important to mention that one sensor should be flipped because it will help us when we assembly them.

Step 7: Connecting the Motors and H-bridge

The first objects that are going to be mounted, are the motors. Mount them using their brackets.

Once you have set them, you can start mounting the H-bridge as it is showed. After that, we shall start connecting the motors on the dual terminals. Don't worry about how the motors shall be connected, you can connect them in any polarity and we can modify the direction of the motors with the code. They should look like the last image.Mo

Step 8: Mounting the Ball Caster

The ball caster will help the robot to tilt it to the front so that robot can vacuum much better.

The Pololu Ball Caster has already its bolts but unfortunately they're too large. So, we shall cut them for about 3mm. Use a knife or a saw being really careful.

An image above shows the ideal length of the bolt.

Step 9: The Bumper

So what happens when the infrared sensors can't see the object?

Well I have designed a bumper so that it can detect when it touched a close object.

The first image shows the concept and the way it shall be connected.

Mount the push button pushButtonSupport and connect it to the small cilinder (see pictures).

Once both of the buttons are mounted, you can paste the bumper (use a small amount of glue).

Note: I will only use one of the buttons since one push button got broken :( But it still works really nice!

Step 10: Connecting the Sharp Sensors

In order to supply the Sensors I made a small board which will supply the power for each of the sensors.

Cut a small surface 3x3 cm then mount the connectors as it is showed on the second picture. Do the proper soldering being careful. Once it is done, mark the board so that you can know the polarity. I use by convention that the right side is always voltage.

Connect the Grounds of each of the sensors and also one terminal of the push button to GND, and the Red wires from the sensors to VCC (Right connectors).

Once they are all connected, fix the wires and set them nicely.

Step 11: Voltage Divider

We need a way to monitor the battery voltage because the if the voltage of a LiPo cell is dropped lower than 3.0 it can permanently damaged it. Our battery is a 3S LiPo battery which means that it has 3 cells of 3.7V each.

Since we can't connect the battery voltage directly to the Arduino (because you will kill the board), we should find a way to proportionally get the voltage of the battery within the range of the ADC (Analog Digital Converter).

Cut 12cm of wire (Red, Black and White. Use always white or other color for signals but not black nor red)

The Voltage Divider will help us to reduce the voltage proportionally and thus we can connect it to one of the analog inputs.

For this we will need to Resistors. R1 and R2. I recommend to use one fixed and the other one use as a potentiometer so you can manipulate your circuit and calibrate it carefully.

Use an R2 of 1k Ohms and set the Potentiometer to 1536 ohms. See the theory behind that so that you can probe the voltages (Or you can trust me Wiki Theory). I set my desired output to be Vout = 5V and my input was the battery voltage when it was fully charged = 12.68 V.

Once you have finished the circuit, test it! Use a Voltmeter and verify that the Vout is actually 5V when your battery is fully charged, otherwise adjust the potentiometer. (Don't set it above 5V or you can kill the Arduino!)

Step 12: Get Your Hands Dirty

We are going to start connecting a lot of wires right now so we should be really careful or we can make a short circuit.

The Battery will supply 3 different things:

  1. Motors
  2. Fan
  3. Voltage Divider

And everything will be connected to the MOS-FET board (it is not really ideal but it is a thing to improve)

We will need 2 male to male wires one to supply the motors driver and the other for the connector to the switch.

  • 21.5cm Red wire for the motors driver to the MOS-FET
  • 15 cm Red wire with male connector for the switch to MOS-FET

I had to modify the batterys wires since its connector was really big, so I added two new wires, the positive one is a male connector for safety. (see the battery picture)

  1. First we will connect the fan. Cut the wires 12cm length. We will only use the Yellow and the black wires. Connect the Yellow to the V+ and the Black to the V- as it is showed on the picture.
  2. Then we wiil connect 3 red wires to Vin of the MOS-FET: The one of 21.5cm for the H-bridge, the 15cm one for the switch and the Vin for the voltage divider.
  3. Connect the GNDs: Connect the Ground of the battery and the GND of the voltage divider.

See the notes of the pictures for more help.

Make sure everything is well connected! Hold this connection since we are going to use it later.

Step 13: Keep Connecting (Terminals, Fan and Motor Driver)

We can start connecting everything together.

Mount the Arduino first with its respective bolt.

Then follow the steps showed on the picture. Connect the Corresponding wires to the terminals.

Place the Fan.

And connect the Voltage divider wire signal to the A4 analog input of the Arduino.

Step 14: Connecting the Motors Signal Inputs

We will need 4 wires Male to Female 27cm length because they are to be connected from the Motor Driver to the Arduino pins.

They should be connected to the Arduino inputs 3,5,6 and 9 respectively. (See the pictures for help).

Step 15: Connecting the Sensors to the Microcontroller

Start connecting the sensors as following:

  • Left Sharp sensor to A0
  • Right Sharp sensor to A1
  • Pushbutton to Digital pin 10

Using female to mal jumpers, connect the Mosfet Terminasl "Signal" and "GND" pins. The signal must be connected to the digital pin 12 and the "GND" pin to one of the Grounds on the Arduino. (See the pictures)

Step 16: Almost Done

We will need a switch tu turn our robot on so I attached a male and female connectors so that it could be connected to the battery.

I also wanted to use an indicator LED (optional) connected to the digital pin 13 and GND. See the pictures for help.

Step 17: Assembling the Container

Once you have all the Container parts printed we need to assembly it.

Mark the cloth filter to the dimension of the FilterTap then ad 1mm on each side and cut the rectangle.

Joing the pieces as it is showed on the pictures and put the filter inside the containter.

Step 18: Close It!! and Program It!

Close it carefully and make sure everything fits nicely.

You can charge the robot by just pulling the charging cable and connect it directly to the charger without having to take the battery apart from the robot.

I have uploaded an Arduino Code that you can use, it is pretty simple but it works really nice. Download the Arduino IDE, compile the software and program your robot!.

The code includes:

1.- Battery monitor:

* It is constantly measuring the voltage and if the battery voltage is below the threshold it will turn off all the motors and the LED will start blinking.

* When starting it tries to turn on the Fan and if the battery voltage is below the threshold it won't start.

2.- Collision avoidance:

* It measures the distance from the sensors to an object and when it is close it turns to the opposite side.

* It senses when it is on a corner and turn 180 degrees.

* When the bumper touches it turn right.

3.- Fan control

* Turn on/off the fan

4.- Motor control

* With PWM it moves the motors in both directions.

I encourage anyone who wants to improve this to do it and share so that we can enhance our knowledge!

NOTE:

I have added a test code (VaccumCode_test_Motors_1.0.0) to make sure that the motors are wired correctly. If you run this code and the robot is not moving forward you must swap the motor wires on the L298 Driver.

I have also added a Beta Code for side sensors.(VaccumCode_SideSensorsBeta_1.0.0)

I like this project a lot but unfortunately I can't give support forever so I will let the community share their knowledge.

Cheers!

-César Nieto

Step 19: What's Next?

What about adding encoders to the motors so that you can predict the position of the robot?

Adding more sensors? you can follow edges to ensure a better cleaning

Mapping? Once you have the encoders you can save the objects that the sensors see and create a map!

This is a nice project to start building complex codes and complex navigation algorithms so I encourage you to do it!

Any suggestions?

Updates:

04/10/2017

  • Code updated to use Pololu motor encoders with PD controller
  • Almost all the code was modified to be more easy to understand

19/05/2017

  • Code updated (just some comments were erased)
  • Circuit diagram added
  • A better explanation for the battery was written

Step 20: Contribute

The project is now available on Github where you can share all your improvements:

https://github.com/cesnietor/VacuumRobot

If you like the project you can buy me a coffee. You're awesome!
https://www.buymeacoffee.com/cesnietor

Robotics Contest 2017

Grand Prize in the
Robotics Contest 2017

Design Now: In Motion Contest

Second Prize in the
Design Now: In Motion Contest

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

7 People Made This Project!

Recommendations

  • Toys & Games Contest

    Toys & Games Contest
  • Big vs Small Challenge

    Big vs Small Challenge
  • Fix It Challenge

    Fix It Challenge

187 Comments

0
Bob Bowie
Bob Bowie

Question 5 weeks ago

I am looking for a partner to build a robot to pick up litter on public streets and highways. I have a chassis that can be used that is very similar to the one I used on my remote controlled lawnmower. See at: https://www.instructables.com/Remote-Controlled-La...
I have controlled the wheel chair motors via an Arduino board; however, I need help in keeping up with the chassis' direction. Contact me at bbowie@yahoo.com

0
mrx23dot
mrx23dot

3 months ago

We could use a round Tupperware $4 for box

0
veynacal
veynacal

Question 3 months ago


For the post below I confirm that only the V+ -> red / V- -> black setup is working :=)

--
Hi guys,

question about the brushless motor fan:

basically I am using the Neato version "Delta Electronics BCB1012UH" see picture attached
(no the "AVC" one as shown in César original design here),

I was just wondering which cables were the one to use for V+ / V- for powering the fan motor.


I expect the black (V-) and red (V+) but just to be sure because the "AVC" version shown in this post has no red cable.

Thanks!
Alex

AVC_vs_NeatoBrushlessMotor.png
1
I1-yeet
I1-yeet

Question 5 months ago on Step 4

Great vacuum, I don't know if you are still answering questions but can I please get the original 3d CAD file which include the fan, battery, sensor and so on? I just to make a version of the same project.

Thank you in advanse

0
tanyeltuncer1997
tanyeltuncer1997

6 months ago

Hi everyone, I wanted to ask you how much the costs were in total to build a vacuum robot. Unfortunately the production of the case by 3D Hubs costs ca. 300 Euros . . .

What experience do you made and do you have some other experience ?

Kind regards

Tanyel

0
briefer666
briefer666

6 months ago

great desing! I am working in something similar. One question, why not using PWM to control the fan?

0
Largovi
Largovi

Question 7 months ago

Hi! Great project, thanks for sharing it. I'm not sure if you're still answering questions about this project, but I thought I'd ask anyways. I've assembled the robot and tested it, and its moving as expected (:D). However, the fan does not turn on. I'm using a 1300 mAh 45C 3S Lipo battery instead of the 25C used in the guide, I was wondering if this might be the problem? Any ideas what might be going wrong?
This is the first robot I've made myself, and I'd appreciate any help! Thank you!

0
CesNieto
CesNieto

Answer 7 months ago

The C factor shouldn’t affect as long as the value is bigger than 25C (for this project). Some suggestions: try connecting only the mosfet, battery, arduino and fan. Also try to check if you have a different fan since the color cables might change a bit from fan to fan (check fan’s datasheet). If this doesn’t work try with the fan directly to the battery for a short period. It could also be the mosfet is not well connected or damaged (try with another one). Discard all possibilities one by one until you find it. Good luck. If you succeed, please post your findings :)

0
Largovi
Largovi

Reply 7 months ago

The problem was I had been using the wrong V+ wire for the vacuum (it was the red wire, not the yellow one, for the model I'm using). Thank you so much for the help!!

0
plasmohub
plasmohub

10 months ago

Hi there Cesar!
I have a question for you. I have 2 cats, the bigger is 6kg. I bet they will try to stand on that moving robot someday. Can I still do this project the way it is? Cheers

0
CesNieto
CesNieto

Reply 7 months ago

Haha I don’t think so, you might need stronger motors

0
Non rubyT
Non rubyT

2 years ago

I tested the "testmotors" Code on my bot, it worked fine
But when I put vaccum2.0 code, my not gets stuck on moving left iteration
I chcked output value of sensors on output window it remains same and doesn't change at all, I have used 10-80 cm analog sensors
For that I changed the sdsharp value by comparing datasheets of both 4-30 CM and 10-80cm
I found if a use the function "return(dist * 2335.8), i shud get the correct distance (confirmed it analytically)
But output value of sensors is not changing at all it says sd1= 7.01 and sd2=8.6
And tried to put my hand near sensors to check any change in distance but nothing happened

What m I doing wrong, pls help?

0
srivera702
srivera702

Reply 1 year ago

Hi! We’re you ever able to fix the left iteration issue? I’m having the same problem with mine right now. Please any info would be helpful!

0
CandiceC37
CandiceC37

Reply 2 years ago

I've been having the same problem with my robot. Motors worked fine with the "testmotors" code but keeps turning left with "vacuum 2.0" code. Could you please let me know if you figured out the issue?

0
Non rubyT
Non rubyT

Reply 2 years ago

U have to check which loop it is stuck at for that check the program
There are three conditions which make the bot go left
1st if the sensor distance is less than 4.3 for which it turns forward for 100milliseconds then 500 backwards
And 300 left

And next one when bumper hits an object for which it moves backward and then turns left for 300ms
And another which makes it turn for 1000ms
Pls, specify which condition is being fullfilled


Solution-
If 1st then, maybe ur sensors are not working
Of 2nd then, maybe u soldered ur pushbuttons in wrong way, chk on YouTube how to do it
3rd
I m not sure why

0
JeanlouisR
JeanlouisR

Question 1 year ago

Hello
I just installed the latest program with encoder (3.01)
the engines turn quickly, which part of the code I must modify for the reglers
Thank you

0
nithya.anandhp
nithya.anandhp

1 year ago on Step 11

Can we use a power bank instead of lipo battery set

0
CesNieto
CesNieto

Reply 1 year ago

Mhm it is hard to say LiPo batteries can support a fast discharge, we need that in this project since the motor consumes 12V and ~4.5A. I recommend reading about LiPo battery C rating: https://oscarliang.com/lipo-battery-c-rating/#:~:text=C%20Rating%20is%20an%20indicator,safely%20without%20harming%20the%20battery.&text=For%20example%2C%20if%20you%20have,be%201000ma%20x%2020C%20%3D%2020A. If the discharge is to high you can also damage the battery so we need to be careful here. I think that article gives some insight of why I chose that Battery.

0
Staggermeister
Staggermeister

1 year ago

Why would one prefer to use IR sensors (GP2Y0A41SK0F) instead of ultrasonic sensors (HC-SR04)?

0
CesNieto
CesNieto

Reply 1 year ago

I've done some robots with ultrasonic sensors and I found them really noisy and the range spectrum is also really wide that's why I didn't use them, I prefer GP2.. onces the most since also the range is more deterministic. But you can try them and comment your experience :D