0% found this document useful (0 votes)
258 views54 pages

CleanSweep 11

CleanSweep is a smartphone-controlled robot that cleans floors using rotating mops at the front and a foam roller at the back. It has a water pump and reservoir to moisten the mops. Speed controls allow adjusting the driver motors. The robot uses Bluetooth to receive commands from an Arduino microcontroller. It is powered by a 12V lead-acid battery and uses 75rpm plastic mops and 100rpm driver motors. The project aims to design and implement an autonomous or manual phone-controlled vacuum cleaner robot.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
258 views54 pages

CleanSweep 11

CleanSweep is a smartphone-controlled robot that cleans floors using rotating mops at the front and a foam roller at the back. It has a water pump and reservoir to moisten the mops. Speed controls allow adjusting the driver motors. The robot uses Bluetooth to receive commands from an Arduino microcontroller. It is powered by a 12V lead-acid battery and uses 75rpm plastic mops and 100rpm driver motors. The project aims to design and implement an autonomous or manual phone-controlled vacuum cleaner robot.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Abstract

CleanSweep is a smartphone controlled robot that cleans your house's floor!


The rotating mops on the front of the robot along with a foam roller (used to
paint walls, not here) at the back can do the job perfectly. There's also a
water pump and water reservoir which can be switched on when required to
throw water on the floor and make the mops moist for a proper clean. The
foam roller is movable, which means you can lift it when not in use. I've also
added speed controls for the driver motors Households of today are
becoming smarter and more automated. Home automation delivers
convenience and creates more time for people. Domestic robots are entering
the homes and people’s daily lives, but it is yet a relatively new and
immature market. However, a growth is predicted and the adoption of
domestic robots is evolving. Several robotic vacuum cleaners are available
on the market but only few ones implement wet cleaning of floors. The
purpose of this project is to design and implement a Vacuum Robot
Autonomous and Manual via Phone Application. Vacuum Cleaner Robot is
designed to make cleaning process become easier rather than by using
manual vacuum. The main objective of this project is to design and
implement a vacuum robot prototype by using Arduino Mega, Arduino Shield,
LDR Sensor, Real Time Clock, Motor Shield L293D, Ultrasonic Sensor, and IR
Sensor and to achieve the goal of this project. Vacuum Robot will have
several criteria that are user-friendly.

The benefits of robots has increased their flexibility with being capable
of performing a variety of tasks and applications. They are more precise and
consistent than human workers. Robots also allow for increased production
and profit margin because they can complete tasks faster

SYSTEM SPECIFICATION

Hardware Requirements:

• System : Pentium IV 3.4 GHz (Min)or Later versions.


• Hard Disk : 40 GB.
• Monitor : 14’ Colour Monitor.
• Mouse : Optical Mouse.
• Ram : 1 GB.(Min)
Software Requirements:

• Operating system : Windows Family.


• Coding Language : C#.net (asp.net)
• Data Base : Sql Server.
• IDE : Visual Studio
TABLE OF CONTENTS
Particulars Page No.
Page No.
ABSTRACT .........................................................................................
................................. 4
TABLE OF CONTENTS
...........................................................................................................
.................... 5
LIST OF TABLES
...........................................................................................................
.................... 6
Ch-1 Introduction
...........................................................................................................
... 7
Ch-2 Design Methodology
................................................................................................. 8
2.1 Microcontroller: Arduino Mega 2560
....................................................................................................
................ 8
2.2 Motor Driving IC L239D
....................................................................................................
................ 9
2.3 DC Motor
....................................................................................................
.............. 10
2.4 Bluetooth (HC - 06)
....................................................................................................
.............. 10
2.5 IR Sensor
....................................................................................................
.............. 10
2.6
LDRSensor....................................................................................
............. 10
2.7 Ultrasonic
Sensor .........................................................................................
.......................... 10
2.8 Real Time Clock
....................................................................................................
............... 11
2.9 LCD 20X4 Module
....................................................................................................
............... 11
Ch-3 Application Software
............................................................................................... 12
Ch-4 Result and Analysis
...........................................................................................................
................... 13
Ch-5 Conclusion
...........................................................................................................
................... 14
References ........................................................................................
...................................... 15

6
LIST OF FIGURES

Figure No.
Figure Title
Page No.
1.1
Title Block Diagram of the system
8
2.1
Arduino Mega Front
9
2.2.1(A)
Pin configuration of L293D
9
2.4
Bluetooth Module
10
4.1
Full Development System
11

LIST OF TABLES

Table No.
Table Title
Page No.
2.2
Behaviours of motor for different input conditions
9
4.1
Operation of components in different modes

13
7

Ch-1 Introduction
CleanSweep is a smartphone controlled robot that cleans your house's floor!

The rotating mops on the front of the robot along with a foam roller (used to

paint walls, not here) at the back can do the job perfectly. There's also a

water pump and water reservoir which can be switched on when required to

throw water on the floor and make the mops moist for a proper clean. The

foam roller is 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-05 bluetooth module to

send the commands to the most commonly used microcontroller- Arduino

UNO. The robot is powered on a 12V lead acid battery, the ideal voltage for
all motors used here.. The driver motor pair are 100rpm ones while for the

mops I've used 75rpm plastic ones.

The best part is that the mops used were homemade, from old CDs and rags

and they clean just perfectly. This is a smaller version so might not be

suitable for a large area. The research and development of an autonomous

mobile robot and a Manual Phone Application Control prototype able to

vacuum cleaning a room or even an entire house is not a trivial challenge.

 Obstacle avoidance
 Floor detection
 Collision detection
 Fan motor monitoring
 Light Sensing
 Real Time Clock
 System on automatically

Ch-2 Design Methodology

A number of software and hardware implementation techniques


were used to design and develop the system.
Fig. 1 shows the block diagram of system. We used a 12VDC
motor, L293D IC, Different Sensors, Real
Time Clock, Vacuum mechanism and Arduino to develop our
system.
The operation of the robotic vacuum is going to be based on
retrieving data from an array of inputs
that will tell the condition of the floor space around the vacuum.
These inputs include sonar, touch sensors,
and a digital compass. Each of these parts will be described
in further detail further on later in the
documentation. The data from these inputs will be fed into the
chip(s) which through its software program
will decide which direction the vacuum should move by sending
the control signals out to the drive motors.

Figure 1.1 The initial block diagram for the Autonomous/Mannual


Robotic Floor Cleaner

Components:

2.1 Microcontroller: Arduino Mega 2560

The Arduino Mega is a microcontroller board based on the


ATmega1280 (datasheet). It has 54 digital
input/output pins (of which 14 can be used as PWM outputs), 16
analog inputs, 4 UARTs (hardware serial
ports), a 16 MHz crystal oscillator, a USB connection, a power
jack, an ICSP header, and a reset button. It
Switch
Auto/
Manual
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
-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
9

contains everything needed to support the microcontroller; simply


connect it to a computer with a USB cable
or power it with a AC-to-DC adapter or battery to get started.

Figure 2.1: Arduino Mega Front


2.2 Motor Driving IC L239D
A very easy and safe is to use popular L293D chip. It is a 16- pin
chip. The pin configuration of a L293D
along with the behaviours of motor for different input conditions is
given in fig. 4. The L293D is designed to
provide bidirectional drive currents of up to 600-mA at voltages
from 4.5 V to 36 V. When an enable input
is high, the associated drivers are enabled. Also their outputs are
active and in phase with their inputs. When
the enable input is low, those drivers are disabled, and their
outputs are off and in the high-impedance state.
With the proper data inputs, each pair of drivers forms a full-H
(or bridge) reversible drive suitable for
solenoid or motor applications. Table 2.2: Behaviours of motor for different input
conditions

Figure 2.2.1: (A) Pin configuration of L293D

The dc motor and L293D IC has been connected according to the


fig. 9. The circuit schematic as shown has
been designed using Proteus 7.

Figure 2.2.2: Screenshot of DC motor and L293D IC interfacing


circuit
10

2.3 DC Motor
Almost every mechanical movement that we see around us is
accomplished by an electric motor. Electric
machines are means of converting conventional energy.
Motors take electrical energy and produce
mechanical energy. Electric motor is used to power hundreds
of devices we use in everyday life. An
example of motor used in day to day life is automobiles, food
blenders and so is vacuum cleaner.

2.4 Bluetooth (HC - 06)


For the communication of the robot with the cell phone or a
mobile we are using the Bluetooth device. The
Bluetooth device (HC-06) is attached to the robot that receives
the data from the mobile and also it can
transmit the data. It is used for converting serial port to
Bluetooth. It has two modes: Master and Slave.
Bluetooth is a wireless communication protocol running at the
speed of 2.4 GHz with the architecture of
client-server and which is suitable for forming personal area
networks. It is designed for devices such as
mobile phones (low power). Bluetooth protocol uses the MAC
address of the device. Bluetooth gives the
connectivity between two devices using their MAC address.

Figure 2.4: Bluetooth Module

2.5 IR Sensor
The sensor consists of two eyes. One eye sends the infrared light
and the other eye sees the reflection of
that infrared light and measures the distance which is then sent
to the Arduino through analog input to
perform further operations based on the distance. There are three
wires coming from the sensor .i.e. Red,
Black and White or it can be Red, Brown and Yellow. Red is
connected to 5V of Arduino. Black or brown
to Ground of Arduino. White or yellow to analog input pin of
Arduino i.e. in this case to analog pin 0.

2.6 LDR Sensor


The light dependant resistor is an electronic component whose
resistance decreases with increasing light
intensity. It is also called as “Photo Resistor” or “Photo
conductor”. The light dependant resistor uses high
resistance semiconductor material. When light falls on such a
semiconductor the bound electrons [i.e.,
Valence electrons] get the light energy from the incident
photos. Due to this additional energy, these
electrons become free and jump in to the conduction band. The
electron –hole pairs are generated. Due to
these charge carriers, the conductivity of the device increases,
decreasing its resistivity.

12

Ch-3 Application Software

The Android app is generally developed using JAVA language. The


app controlling this vacuum robot can
be built without having the knowledge in java language. It is
called as “VBot211” developed by MIT App
Inventor. Shown below is a diagram which shows the interface of
the app. The app shown below has 5
buttons and all the button gives 5 different bytes in the output
that is to be fed to the microcontroller to
further process. For e.g. if we press Up! Button, the Bluetooth
module will give 1 byte at its output.
13

Ch-4 Result and Analysis


The aim of this project is to design and develop an Autonomous
and Android Application based Vacuum
Cleaning Robot.

Figure 4.1: Full Development System.

Table 4.1: Operation of components in different modes


Components↓ Modes→
Autonomous mode
Manual mode
LCD


RTC


LDR


LED


Switch


Motors


IR Sensors

NA
Ultrasonic

NA
Bluetooth
NA

14

Ch-5 Conclusion

Conclusion:
A cheaper and user friendly Vacuum Cleaner robot can be
developed with two different mode of controlling
(Manual and Autonomous mode) using an Arduino Board with
more electronics functionality. Battery
monitoring, self-charging, lighter body weight and to set alarm
on/off time manually are the future scope of
this project.
15

References

1. L293D datasheet. Website (www.ti.com)


2. S.Muruganandhan, G.Jayabaskaran, P.Bharathi, “LabVIEW-
NI ELVIS II based Speed Control of DC Motor,”
International Journal of Engineering Trends and Technology (IJETT)
Volume 4 Issue 4, April 2013
3. A Technical Analysis of Autonomous Floor Cleaning
Robots Based on US Granted Patents, European
International Journal of Science and Technology Vol. 2 No. 7
September 2013. Liu, Kuotsan1, Wang, Chulun
4.
http://web.stevens.edu/ses/me/fileadmin/me/senior_design/2007/
group01/DesignFinal.pdf
5.
http://eng.najah.edu/sites/eng.najah.edu/files/robotic_vacuum_pre
_1.pptx
6.
http://www.ecs.umass.edu/ece/sdp/sdp05/preston/sdp_data/Draft
%20System%20Specification.doc
7. http://letsmakerobots.com/node/40288
8. http://www.intorobotics.com/build-diy-roomba-style-robot-
vacuum-cleaner/
9. http://www.irobot.com/For-the-Home/Vacuum-
Cleaning/Roomba.aspx
10.
http://eprints2.utem.edu.my/4710/1/Design_And_Implementation_
Of_Vacuum_Robot_-_24_pages.pdf
11. http://www.instructables.com/id/Floor-vacuum-cleaner-robot-
controlled-by-Arduino-w/
12. http://www.scribd.com/doc/231094704/Automatic-vacuum-
cleaner-project#scribd
INTRODUCTION

CleanSweep is a smartphone controlled robot that cleans your house's

floor! The rotating mops on the front of the robot along with a foam

roller (used to paint walls, not here) at the back can do the job

perfectly. There's also a water pump and water reservoir which can be

switched on when required to throw water on the floor and make the

mops moist for a proper clean. The foam roller is 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-05 bluetooth

module to send the commands to the most commonly used

microcontroller- Arduino UNO. The robot is powered on a 12V lead acid

battery, the ideal voltage for all motors used here.. The driver motor

pair are 100rpm ones while for the mops I've used 75rpm plastic ones.

The best part is that the mops used were homemade, from old CDs and

rags and they clean just perfectly. This is a smaller version so might

not be suitable for a large area. There can be tons of other features

added, like making it completely autonomous.


Step 1: Parts and Tools
9 More Images

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


Step 2: Get the Base Ready
3 More Images

The first step is to prepare the base on which the parts will be placed.

For this, first get a piece of plywood cut, measuring 12x9 inches. The

base wasn't looking great at all, so to make it look a bit attractive, I

painted it in white and orange stripes with black at the borders with

acrylic paints.
After this, drill two holes each at the back for both the motor clamps.

Make proper measurements such that both should be parallel to each

other. Fix them in place using some screws then attach the motors to

the clamps.

Add TipAsk QuestionCommentDownload


Step 3: Make the Floor Moppers and Attach Them to the Base
15 More Images

I found this idea on one of the YouTube videos (click here). To make

cheap DIY circular floor moppers, you can use old compact disks along

with a piece of cloth.

First mark a circle on the cloth which should be bigger than the CD.

Cut it using a pair of scissors.


Take a needle and thread and start sewing and making folds to the

cloth in such a way that it surrounds the entire CD. (something I am

very bad at)

Refer to the images above or have a look at this video, or maybe

this one.

After you're done with all the folds, make 2-3 knots at the end and cut

the left over thread.

Repeat the same for the second CD.

Attach wheels to both the plastic geared motors. Hot glue the wheels

to the CDs.

The moppers have to be placed in the front. Hot glue the motors in

such a way that the cloth stays away from each other and the motors

are at an equal distance from the sides. Make sure the cloth properly

touches the floor

Add TipAsk QuestionCommentDownload


Step 4: The Water Supply Mechanism
12 More Images

This consists of a 12V water pump which carries the water from the

reservoir and spills it near the mops on the floor. First mark, drill and

fix your pump in place.

Take a 600ml empty plastic bottle and cut it into half using a paper

cutter. Use the lower half and place it on the robot base using some

hot glue.

Take two pieces of rubber tubing. One will be connected to the inlet of
pump to take water from the reservoir from the pump and the second

one will be used to take water from the pump to the floor. Adding

straws to the outlet will be done later.

The pump can be switched on/off via your smartphone just like other

controls.

Add TipAsk QuestionCommentDownload


Step 5: Roller Mechanism
14 More Images

The purpose of roller here is to stick small dust particles to itself. It

will not be needed everytime the robot is moving so I decided to make

a simple mechanism which can lift it up or down via a servo motor.

First you need to drill a hole on the servo attachment. Drill another

hole of almost same size on the roller handle as well. Use a screw to

tighten the attachment and the roller.

The motor will have to be placed at a height so the roller touches the
floor and can be lifted easily. Use two 7x2.5 centimetres wooden

pieces and hot glue the servo to their top.

Add TipAsk QuestionCommentDownload


Step 6: Solder the Circuits
6 More Images

For the mop geared motors and the water pump to be controlled via

arduino, there has to be an external circuit as both of them need 12V

to run but arduino can only provide a 5V output. I used TIP122 NPN

power transistors and soldered them on to a piece of perfboard. The

circuit is simple and is provided above.

Also, I soldered some male and female headers to make +5V and Gnd

power rails as these pins are limited on the arduino and we need

plenty of them for each component to be connected. Follow the


pictures above and solder two rails, one for each +5V and Gnd.

Add TipAsk QuestionCommentDownload


Step 7: Connections
24 More Images

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.

Add TipAsk QuestionCommentDownload


Step 8: Finishing
11 More Images

Keep all the circuit boards, wires, tubings in place with hot glue. It

should look neat, the wires shouldn't entangle and the connections

shouldn't break, which can be irritating.

Next, take two straws and cut them about 7cm in length. Crush and

squeeze one end of both into the outlet pipe of the water pump. Bend

both of them in opposite directions and glue them in place such that

water flows from both the straws and falls just a little ahead of the

rotating mop (look at the pictures). Don't forget to put some tape
where the straws are connected so the water doesn't leak.

Add TipAsk QuestionCommentDownload


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);
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':
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>

Attachments

 Code_for_CleanSweep.ino
Download
Add TipAsk QuestionCommentDownload
Step 10: Attach the Battery
3 More Images

For the power source, it's your choice about the type of battery to use.

The voltage should be 12V. I would recommend a single lead acid

battery or 3x Li-ion 18650, 3.7V each connected in series.

Use some double sided tape or hot glue to keep the battery pack in

place. +Ve terminal will go to the transistor circuit from where it will

go to Vcc on arduino and to the motor driver circuit. -Ve terminal will

be connected to the common Gnd. Use proper battery connectors.

You can even add an On/Off main switch.


If the power LED on the arduino glows, it's all good. Immediately

remove the source if LEDs dim rapidly and recheck all the connections.

Do not use a very high voltage else the regulator on the board may

overheat.

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.

Add TipAsk QuestionCommentDownload


Step 12: The End!
So that's the end of my 29th instructable. Go ahead and and try other

projects as well.

This can still have a lot of modifications. I was thinking to make it fully

autonomous with ultrasonic/IR sensors but couldn't due to shortage of


time. You can try this feature. Make it avoid rugged surfaces and walls.

Add a vacuum cleaner or a moving wiper connected to a servo.

You might also like