Introduction: DIY Vacuum Robot

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
  • 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!

If you like this project please vote for it!

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:

19/05/2017

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

Comments

author
kavish+laxkar made it!(author)2017-06-08

Congrate on your win

author
lpnaunau made it!(author)2017-06-01

Hey !

First, congratulations for this very nice project.

I was also working to do a robot like this but apparently you're faster than I :P

I have a quick question, would you agree to share your solidworks files ? My 3D printer is too small (I can only print up to 20*20*20cm) + I'd like to improve your work by adding a brush, maybe use ultrasound sensors (I will search to see if it's an improvement or not). I'd also like to add the possibility for the robot to charge itself.

Thanks for your answer and again congratulations for this amazing work !

Arnaud

author
gulliverrr made it!(author)2017-05-27

Hey! Cool project. It will be ideal to actually provide a single PCB in the form of an arduino shield to connect all wires in one place. I can help you with this if you want. PM me if you want.

author
CesNieto made it!(author)2017-06-01

That would be awesome. Actually, I'm thinking about adding the encoders for the motors and probably we will need more wires, so the PCB can help a lot. If you want, we can keep on touch to collaborate. Cheers.

author
JDD7 made it!(author)2017-06-01

Congradutions on winning the contest. Well done.

author
CesNieto made it!(author)2017-06-01

Thanks a lot!

author
Ritland+Inc made it!(author)2017-05-20

hi would you be willing to sell this so you could make another better one

author
bcdooley made it!(author)2017-05-02

Regarding Lipo voltage, 3v per cell. that part of the project could be made a little more clear, but I really like your project and may build one for our taekwondo dogang.

author
CesNieto made it!(author)2017-05-19

I have updated this.

Regards!

author
CesNieto made it!(author)2017-05-02

Thanks for the feedback! Yes I will try to explain that much better. Still if you have any doubts please don't hesitate to ask. Cheers!

author
Jonathanrjpereira made it!(author)2017-05-13

Circuit Diagram?

author
CesNieto made it!(author)2017-05-19

Attached!

Let me know if you have any doubts.

author
Martha2606 made it!(author)2017-05-18

Fabuloso y practico

author
Trikachi made it!(author)2017-05-17

Excellent job

author
filou63430 made it!(author)2017-05-11

Very good its posible to have solidworks Attached filethanks

author
khbilen made it!(author)2017-05-04

Well, almost the same robot you got there :) I use 1 A Nema17 step motors and Big Easy drivers. Delta BFB1012VH blower (though not happy with it), and Arduino Mega with 8 homemade IR proximity sensors. Even the tires are homemade. Here is what is "under the cover".

20170504_171156.jpg
author
CesNieto made it!(author)2017-05-04

That looks pretty nice!

Actually is a good idea to consider those step motors to control the position of the robot. Do you use any IR sensor for collision avoidance?

author
khbilen made it!(author)2017-05-04

Thanks. yes with 200 steps per turn and 16 microsteps per step I can control the position of the robot quite accuretaly. I use 8 pairs of IR tx rx sensors for collision avoidance.

author
Sean+Cruse made it!(author)2017-05-04

Thoroughly impressive work. I applaud you. But until they stop designing these things to purposely seek out that one small area in every room where they can trap themselves and beep for help, thus forcing me to hunt them down and rescue them, I'm done with robot vacuums.

author
CesNieto made it!(author)2017-05-04

Thanks for your comments. It is interesting what you've said. Of course they can get trapped and I've experienced that. The beta2.ino code includes a way to avoid being stuck on the corners, for instance. But I will actually take that as a challenge and see what I can do to avoid that. Maybe a camera to detect possible dangers? measuring if the robot fits?

Could you please share with us under what conditions did your robot get trap themselves? That would be amazing.

Regards!

author
Sean+Cruse made it!(author)2017-05-04

I sold my robot vacuum a couple of months ago because it was just more trouble than it was worth. It would often get stuck and mostly in the worst possible locations like under the bed or in the corner behind a piece of furniture. The main things it would get stuck on are electrical cords, such as one for the heating blanket under the bed. Another place it would get stuck was right at the transition between carpet and hardwood (bedroom to hall) or hardwood to tile (hall to kitchen). Because of the little transition piece in these areas the vac would often get stuck down and teeter on that transition pieces. From what I understand that newer robots are much better adept and handling those transition pieces. And finally, I have floor vents in one particular room and I swear the thing would purposely seek out one of those vents and just change directions but it could never seem to get off of that vent without assistance.. Thanks Usually if I heard the thing vacuuming but didn't hear it moving about that room I knew just where it would be...spinning happily around on that floor vent. Thanks!

author
barbieriv made it!(author)2017-05-04

Parabéns pelo seu projeto. Eu realmente gostei porque é realmente muito útil. Eu também gosto de projetar no SolidWorks, você poderia me dar seus arquivos. Desde agora estou muito grato.

author
CrLz made it!(author)2017-05-04

Excellent, informative write up! Thank you for sharing!

author
kelliott121 made it!(author)2017-05-04

I love this project! The end result looks phenomenal and your design looks great! I've spent the past year working on an open source robot vacuum (https://keithwelliott.com/projects/openadr/), because one didn't already exist. If you have any interest in collaborating let me know! I'd love to share ideas and design thoughts.

author
halciber made it!(author)2017-05-04

This is a really nice instructable. Thank you for sharing this with us. I'm wondering how much (roughly) do the parts cost?

author
CesNieto made it!(author)2017-05-04

Note: The estimation is without considering the printed parts.

author
CesNieto made it!(author)2017-05-04

It cost me around 150 dlls. But I didn't buy them on the cheap web sites. It can cost you 100 dlls if you chase the good prices.

Looking forward to see what you do with this!

Feel free to give me suggestions!

author
dukejustice made it!(author)2017-05-04

You have a sharp mind. I like your instructable. I saw the motor is rated at 4.5A and the battery at 1300mah. Does that mean that the vacuum will only work for about 20 minutes? If so, can I assume 2 batteries in parrallel will nearly double the operating time?

author
CesNieto made it!(author)2017-05-04

Thanks for your comments! It is actually a good math. I does long that time. I'm considering using a more powerful battery and maybe trying a way to charge the robot on a dock! (see other related comments )

Looking forward to see what you do with this!

Feel free to give me suggestions!

Regards!

author
vernh1 made it!(author)2017-05-04

I have been wanting a robo vac for some time - - but too expensive - - would love to build my own. What is the total cost of the build - not including the 3D printer?

author
CesNieto made it!(author)2017-05-04

It cost me around 150 dlls. But I didn't buy them on the cheap web sites. It can cost you 100 dlls if you chase the good prices.

Looking forward to see what you do with this!

Feel free to give me suggestions!

author
duartejm made it!(author)2017-05-04

Awesome project! Your design is very simple and elegant.. As you said adding mappign functions and more sensors would be very nice. If you connect it to the internet for sure you will win the IOT Contest :D Despite the 3D printed parts can you please tell us how much it cost it to build?

author
CesNieto made it!(author)2017-05-04

Thanks a lot! It will be actually nice to build something with the IoT.

It cost me around 150 dlls. But I didn't buy them on the cheap web sites. It can cost you 100 dlls if you chase the good prices.

Looking forward to see what you do with this!

Feel free to give me suggestions!

author
WeMaRu made it!(author)2017-05-04

Hey, great instruction.

This is the most interesting project i have seen here... It would be interesting how long you can use the vacuum robot, till the batteries are empty (based on your prototype).

author
CesNieto made it!(author)2017-05-04

Thanks a lot for your comments!

For the tests that I have run it has last for about 20 minutes. It is good to mention that the fan consumes a lot of power so I will try with my other fan and see its performance.

I might also try to decrease the PWM on the motors. I'm also considering to use a battery with more current and maybe of another class like NiMH so that I can charge the robot on a dock.

It is also easy to charge since the battery wires go outside the robot from a small hole that I designed.

For my room it has done a pretty good job but it can of course be improved in the next iterations. Looking forward to see what you do with this!

Feel free to give me suggestions!

Regards!

author
CesNieto made it!(author)2017-05-04

In addition, the Beta2.ino code monitors the battery and it actually ensures the battery life. When the voltage drops below 11.6 it will turn the motors and fan OFF and will start blinking the led. You can change the limit and expect more vacuuming time but It could be dangerous.

author
fortzero made it!(author)2017-05-03

Nice job ! Your frame design is simple but effective. I really like that.

author
CesNieto made it!(author)2017-05-04

Thanks! It of course can be improved but that will be for the next iterations.

Any recommendations?

author
NathanR124 made it!(author)2017-05-02

I feel like this project is going to win.

author
CesNieto made it!(author)2017-05-02

I hope so :D Thanks!

author
Swansong made it!(author)2017-05-02

Great instructable, It came out really well! :)

author
CesNieto made it!(author)2017-05-02

Thanks ! I'm glad you like it!

About This Instructable

26,145views

472favorites

License:

Bio: 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 ... More »
More by CesNieto:DIY Vacuum Robot
Add instructable to: