Introduction: Another Cardboard Robot-vacuum-cleaner Controlled With Arduino

This is simple robot-vacuum-cleaner controlled by Arduino.

This can be even simpler if instead of turbine and dust-bin - use a kitchen tissue or a piece of synthetic fabric.

Step 1: Required Components

  • Arduino
  • Motor-shield - controls motors. Also known as H-Bridge. Here motor-shield is YFRobot with L298P. Therae are other models with are controlled with different contacts (like this).
  • Two motors with gears and power wires.Motor with gears has 100-200 RPM (revolutions per minute). It is good to connect ceramic capacitor 1uF to motor power contacts - to reduce electric noise.
  • Two wheels
  • Battery set, or accumulator, or power-bank - on 5 volts
  • Computer cooling turbine on 5 volts. Or on 12 volts - but this require additional 12 volt power or step-up converter 5 volts to 12 volts. A turbine can be found on ebay: "cooling blower fan 5V".

  • A set of strong magnets
  • Wires to connect to battery set. Or USB cable - to connect to power-bank with USB power connector.

  • Cable with power connector for Arduino

  • Wires for Arduino contacts (breadboard wires)
  • Cardboard
  • Glue or melting glue
  • Piece of tin (e.g. from aluminum can)
  • Plastic box - for dust-bin

The program on github

Step 2: Arrange Components on Chassis

Cut the circle from cardboard - chassis of the robot, arrange components on it.

Step 3: Setup Motors

Setup the motors (with gears) and wheels on it - cut out holes for wheels and secure motors on cardboard with ropes, wires or plastic ties.

Step 4: Setup Turbine

Cut the round hole in the chassis for turbine and glue the turbine on the chassis.

Step 5: Turbine and Motors

Turbine is on top of the chassis, motors - below it.

Step 6: Prepare to Set Dust-bin

Mark the place where the plastic box will be fixed - this will be a dust-bin. Pin holes around where the magnets will be located on the top side of the chassis.

Step 7: Fix Magnets

On the top side of the chassis Glue magnets using hols pinned on the previous step as marks.

Step 8: Fix Dast-bin

Put a piece of paper on the place where the dust-bin will be set.

Put the plastic box on top of this paper - this will protect the box to be glued to chassis!

Put magnets around the plastic box. Magnets will stick on the places above magnets glued on the top side - holding the paper below the box.

Fix magnets to the box with glue. When the glue dries - the box will be hold on the chassis by magnets and it can be removed.

Cut away the paper.

Step 9: Fix Arduino Holders

Wooden stick are fixed with glue so Arduino board can be put on these sticks.

Or use another way to fix the Arduino board with motor-shield.

Step 10: Prepare Power Wire

Use wire to connect to the battery set.

Or use USB wire to connect to a power-bank.

Be careful

  • wrong polarity will destroy Arduino and motor-shield
  • shorting of power wires will destroy batteries or power-bank

Step 11: Connect Power Wires

Connect all power wires from Arduino, turbine, motor-shield and battery-set.

Be careful

  • wrong polarity will destroy Arduino and motor-shield
  • shorting of power wires will destroy batteries or power-bank

Check before power on.

Step 12: Make Bumpers

Bumpers are made from the cardboard stripes. They bended and glued in such shape.

Step 13: Setup Bumpers

Bumpers are fixed on the chassis in the way so when they are hit - they bend a bit hitting the chassis.

Chassis is cut a bit if it is needed some space till bumpers.

Step 14: Contacts for Bumper

Clean and scratch tin and wires for better contacts. Pieces of tin are connected to wires and fixed by glue. Be sure the glue is not put between tin and wires.

Step 15: Connect Bumpers

Fix contacts from tin to bumpers with glue - connect them to Arduino inputs (e.g. pins 5 and 8).

Another wires (with contacts on its end) are fixed in-front of such contacts on chassis. Connect these two wires to Arduino GND.

When the bumper is pushed (e.g. it hits the wall) - contacts are connected, a pin gets connected to GND.

No resistors needed - internal pullup Arduino resisters are configured in program.

Step 16: Setup Filter

A piece of synthetic fabric is used as a filter.

Step 17: Rear Support

A plastic or cork is used as a rear support - it is fixed on the box by glue.

The shape or location is fixed in the way that the box is 1 mm above the floor - when the robot is on its wheels.

The thin hole in the box is where the air comes with dust from the floor.

If the box is too high - cut walls and re-glue magnets.

Step 18: Program

The program on github

Step 19: More Details About Connections

Some details about interconnections.

Motor-shield mounted on-top of Arduino board.

Turbine, Arduino and motor-shield are connected to battery by power wires (or a power-bank via USB cable).

Be careful with polarity - wrong polarity will destroy Arduino and motor-shield!

Step 20: Using Arduino Nano

Motor-shield can be connected to the Arduino board with wires. Just connect following contacts between Arduino and motor-shield: 3, 4, 5, 6, 7, 8, GND, +5V

in the way:

pin GND Arduino is connected to pin GND on motor-shield,

pin 5V Arduino is connected to pin 5V on motor-shield,

pin 3 Arduino is connected to pin 3 on motor-shield,

pin 4 Arduino is connected to pin 4 on motor-shield,

etc.

So it's possible to use such board as Arduino Nano - which is smaller than motor-shield.

Step 21: Using Motor-driver HG7881

The motor-driver on HG7881 can be connected to Arduino by wires. It is much cheaper than motor-shield but maximum current is 800mA - which should be enough for most small DIY robots.

The program is a bit different: github

Comments

author
revrekad made it!(author)2016-09-04

Regarding using another shield.

Motor shield I have uses following pis

(Ch.A - is to control one motor, Ch.B - is to control another motor):

Function: Ch.A / Ch.B

Direction: D4 / D7

PWM: D3 / D6

Motor shield ArduinoMotorShieldR3 uses different pins:

https://www.arduino.cc/en/Main/ArduinoMotorShieldR...

Function: Ch.A / Ch.B

Direction: D12 / D13

PWM: D3 / D11

Brake: D9 / D8

Current Sensing: A0 / A1

For bumper I used pins D5 / D8. In MotorShieldR3 the pin D8 is used for break, so it need to be changed - e.g. use D4. Connect bumpers to pins D5 and D4

So constants need to be changed:

//right side

const int pinRightMotorDirection = 12;//"Channel A" on motor-driver

const int pinRightMotorSpeed = 3;//"Channel A" on motor-driver

const int pinRightBumper = 5;

//left side

const int pinLeftMotorDirection = 13;//"Channel B" on motor-driver

const int pinLeftMotorSpeed = 11;//"Channel B" on motor-driver

const int pinLeftBumper = 4;

Probably it is needed to put signal LOW to break pins. In “setup()” method:

pinMode(D9, OUTPUT);

digitalWrite(D9, LOW);

pinMode(D8, OUTPUT);

digitalWrite(D8, LOW);

This should work, but it might not - as I did not test what I wrote above - I do not have such particular motor-shield.

author
AndreasH73 made it!(author)2017-01-03

Hello, Just wondering how much this all cost you to build? Can you supply parts?

author
vishal29 made it!(author)2016-10-20

sir can i use same pin connection of this, with L293D motor shield ??

author
revrekad made it!(author)2016-10-24

You can look at the comments in the following instruction regarding L293D https://www.instructables.com/id/Floor-vacuum-cleaner-robot-controlled-by-Arduino-w-1/

author
vishal29 made it!(author)2016-10-23

sir,can i use this L298 with h bridge as per shown in this link "http://www.amazon.in/Robodo-Electronics-Motor-Driv..."

i cant be upload image on site so i put the link can u pls help me

author
revrekad made it!(author)2016-10-23
author
TeoL2 made it!(author)2016-06-27

Hi, may I know which wires connect to which wires in the USB cable, turbine and the connector to arduino board? I am quite confusing this part..

author
revrekad made it!(author)2016-06-27

Hi, I tried to show this on the step 19: https://www.instructables.com/id/Another-cardboard-...

On wiki there is a USB pinout with wire colors https://en.wikipedia.org/wiki/USB (however wire colors may very at different cable vendors).

I always check wires and contacts before connect and after soldering - with voltmeter (voltage and its polarity) and ohm-meter (to avoid short circuit). Anyway - there is possibility to accidentally damage Arduino and other connected devices.

author
TeoL2 made it!(author)2016-06-27

Because USB cable has 4 wires, is that only +5v and ground wires are connected with the turbine, motor shield and arduino? Sorry for that I cannot see clearly the wire connection in the photo shown in step 19.

author
revrekad made it!(author)2016-06-28

Only ground and +5V wires are used - data wires are not.

author
TeoL2 made it!(author)2016-06-27

Besides that, may I use two 12V motor in this project? Although the battery I used is only power bank with usb cable(5v). Is that any effects?
Actually I am a beginner in using these components. Very thanks for replying me. =)

author
revrekad made it!(author)2016-06-28

It depend on specifications of motor - particularly current. Powerbank has its own specifications - usually 0.5A output current, sometimes 1A (check the label on the powerbank). If it is a low power motor - it may work, but with less torque (with how much force it rotates the shaft). If the current on the motor (and powerbank) exceeds max current of the powerbank - the powerbank would be badly destroyed and may even ingure!
Turbine also consumes some current (check its label) - summer of these currents should be taken under consideration.
There are also step-up modules rising voltage - used on some of my instructions.

author
SYAZREENI made it!(author)2016-03-16

can motor shield L293D work on this?

author
Augute made it!(author)2016-06-01

Hey, it does work with L293D. I made similar project to this one and used L293D

author
revrekad made it!(author)2016-03-16

most likely it should work - but not sure, I did not use it with 5 volts battery.

author
pczw92 made it!(author)2016-03-19

Can the Arduino Motor Shield R3 work for this? Or would you prefer the H-Bridge?

author
revrekad made it!(author)2016-03-19

Arduino Motor Shield R3 has L298 dual full bridge driver:

http://www.st.com/web/en/catalog/sense_power/FM142...

So it should work as well. Just change pins for PWM and DIR - motor-shield I used here used pins 3,4,6,7 to control two motors, Arduino Motor Shield R3 use different pins: https://www.arduino.cc/en/Main/ArduinoMotorShieldR...

author
pczw92 made it!(author)2016-03-20

Thanks!

author
SYAZREENI made it!(author)2016-03-16

can motor shield L293D work on this?

author
SYAZREENI made it!(author)2016-03-15

sir. what type of sensor you use? can i use Arduino UNO for this?

author
revrekad made it!(author)2016-03-16

this project used only bumpers - front panels with contacts. Arduino UNO most likely should work for this.

author
SYAZREENI made it!(author)2016-03-15

sir. what type of sensor you use? can i use Arduino UNO for this?

author
aivie11 made it!(author)2015-03-05

GOOD DAY SIR, THIS IS THE REDESIGNED PROJECT FROM THE ACRYLIC CHASSIS, THE PROBLEM IS WE COULDNT MAKE USE OF THE BUMPER. ILL UPLOAD PICTURE OF OUR MOTOR SHIELD AND THE PINS PLEASE HELP ME GUIDE WHERE TO PUT PINS. THANK YOU.

11004925_992081997486412_673836090_n.jpg
author
jonny89 made it!(author)2016-02-17

Good day sir, i would like to know how do you solve the movements problem of the vacuum. Can you share it with me?

author
revrekad made it!(author)2016-02-22

Hi. Not sure I understand the question. The robot has to driving wheels with motor on each. When both motors are on - robot moves forward, when one of motors is reversed - robot turns, when both motors are reversed - robot moves backward.

author
jonny89 made it!(author)2016-02-17

Good day sir, i would like to know how do you solve the movements problem of the vacuum. Can you share it with me?

author
SyidahD made it!(author)2016-02-04

what is the measurement of the chasis?

author
revrekad made it!(author)2016-02-04

19 cm in diameter, 7 cm in height. This was chosen so all components are fit in it - evaluation shown in step 2.

author
nageshsp made it!(author)2015-07-11

I didn't get the part where you showed a pic about tin and wires connection for the bumpers using glue.. when you connect that to arduino pins than where did you connect ground pin? i dont see ground pin in this pic

author
aivie11 made it!(author)2015-03-05

heres our motorshield looks like sir. you might be able to help us with the connection. and ill add up photos to which our professor asked to add in program. thank you sir. please help us.

11020432_996663317028280_296446979_n.jpg
author
revrekad made it!(author)2015-03-11

Different models of motor-shields use different pins from Arduino.

Look at documentation to this data-shield and use any of pins not used by this motor-shield.

Example: motor-shield I used here used pins 3,4,6,7 (for PWM and DIR) to control two motors. So I used free pins 5 and 8.

author
aivie11 made it!(author)2015-03-05

here how she wants the movements of the vacuum be like, when vacuum goes like 90degrees and bumped to edge it faces to either left or right depends on where is the starting point. then do another 90 degrees cleaning and when it ends its cleaning up to last edge it will go back to the starting point. please help sir. thank you

11039469_996666043694674_1846679914_n.jpg
author
aivie11 made it!(author)2015-03-05

author
Dhiban+RajR made it!(author)2015-02-19

can i used arduinos uno for this ang h bridge L293d

author
revrekad made it!(author)2015-02-19

I think this should work.

author
aiviegonzalvo made it!(author)2015-02-04

program works now sir, the motors run, but the only problem is i cant make the bumper work

author
revrekad made it!(author)2015-02-04

Different motor-shields may require different pins.

The motor-shield I use ("YFRobot"):

4-"Dir A", 3-"PWM A", 7-"Dir B", 6-"PWM B"

This motor-shield

http://arduino.cc/en/Main/ArduinoMotorShieldR3

12-"Dir A", 3-"PWM A", 13-"Dir B", 11-"PWM B",
9-"Brake A", 8-"Brake A",
A0-"Current Sensing A", A1-"Current Sensing B"

Check which pins your motor-shield does not use and use any free pins for bumpers - put these pin numbers in the program

const int pinRightBumper = 5;
const int pinLeftBumper = 8;

author
aiviegonzalvo made it!(author)2015-02-04

program works now sir, the motors run, but the only problem is i cant make the bumper work

author
aiviegonzalvo made it!(author)2015-02-04

sir, i got a problem, the program doesnt work at all, please need help

author
revrekad made it!(author)2015-02-04

try following: 1. connect arduino to power supply without motor-shield, open Arduino IDE, select port, select type of the board, open an program example "Blink", upload it to Arduino and check if LED blinks. 2. disconnect power, put motorshield on arduino, connect powersupply to arduino and check LED still blinks. 3.Connect power to motorshield and check LED blinks. 4. disconnect power, connect motors, connect power - check if LED blinks.

author
aiviegonzalvo made it!(author)2015-02-04

i uploaded the program already sir, but when tested it, the turbine is the only one working. :( need help sir.

author
revrekad made it!(author)2015-02-04

turbine works directly from power supply. As I cannot see your project - could you try steps I Putin the respond above - with "blink" example. to be sure arduino not damaged and motor shield does not affect it.

author
aiviegonzalvo made it!(author)2015-02-04

i uploaded the program already sir, but when tested it, the turbine is the only one working. :( need help sir.

author
aiviegonzalvo made it!(author)2015-02-04

i uploaded the program already sir, but when tested it, the turbine is the only one working. :( need help sir.

author
aiviegonzalvo made it!(author)2015-02-04

i uploaded the program already sir, but when tested it, the turbine is the only one working. :( need help sir.

author
aiviegonzalvo made it!(author)2015-02-04

sir, i got a problem, the program doesnt work at all, please need help

author
aiviegonzalvo made it!(author)2015-02-03

is there an alternative switch for the bumper sir?

author
revrekad made it!(author)2015-02-03

I did not catch this . Bumper just connects pin 5 and GND (or pin 8 and GND for second bumper) when it is hit and disconnect these contacts when released.

author
aiviegonzalvo made it!(author)2015-02-03

sir, i got a question for the bumper i have this switch to be used, when i tested it with a multi tester its on, and when i triggered it, it went off, is the switch always have to be on?

author
revrekad made it!(author)2015-02-03

if you mean contacts of bumper - these contacted connected only when the bumper hits some obstacle (this is how the robot "sense" the object it ran on), and contacts get disconnected when the robot turns or move back and bumper got released.
so technically thus is a button - not switch.