anderoid mobile phone controlled … · pin 7 = logic 1 3. pin 2 = logic 0 and | idle [no rotation]...

5
www.ijeee-apm.com International Journal of Electrical & Electronics Engineering 9 IJEEE, Vol. 2, Issue (April, 2015) e-ISSN: 1694-2310 | p-ISSN: 1694-2426 OBSTACLE AVOIDANCE AND ANDEROID MOBILE PHONE CONTROLLED BLUETOOTH ROBOT USING ARDUINO 1 Ashima, 2 Rajan Kumar, 3 T. Nikhil, 4 Paramdeep Singh 1,2,3 B.Tech ECE, Student, Lovely Professional University 4 Assistant Professor, Lovely Professional University 1 [email protected], 2 [email protected], 3 [email protected], [email protected] 4 Abstract- This project is focused to make mobile robots as the target application and problems that will be covered include: how to design - wheeled ground robots avoid collisions while reaching target locations, by using Arduino Uno R3. The robot is made of L293D interface circuit Arduino board and a motor driving system. The robot controlling devices are connected to the Arduino board. The Arduino board transmits signals to the interfacing board L293D which controls the motor driving system. Robots can also be utilized as an obstacle avoiding robot. IR sensor is used for obstacle avoidance of robot in which we insure that Robot doesn’t have to stop in front of an obstacle which allows to navigate smoothly in unknown environments, avoiding obstacles. Index Terms- Arduino Uno R3, DC Motor, HC-05, IR Sensor, L293d. I. INTRODUCTION Today the android has become very familiar in the world. Google Android OS is running Millions of devices and millions are being developed daily for common use of people. There are millions of developers of the Google and it has made the Android development platform open to everyone around the world. Some developers just focus on building the apps or games for the android devices, but these apps are having numerous possibilities as well in this field. [1] Now a days Smartphones are becoming more powerful with reinforced processors, larger storage capabilities, richer entertainment functions and more communication methods. It is especially useful in a home environment. With the use of Bluetooth technology and other similar techniques, the concept of Smart Living has offered better opportunity in convenience, comfort and security which includes centralized control of air conditioning, lighting, heating and cooling at home, and service robots [2][3] . Now with the excessive use of smartphone users, smartphones have gradually turned into an all-purpose portable device and provided people for their daily use [4] . An open- source platform Android has been widely used in smartphones[5] [6]. Arduino Uno R3- Arduino is an open-source electronics prototyping platform which is based on flexible, more easy-to- use hardware and programing software. If anyone interested in creating interactive objects or environments this is intended for artists, most of the designers, and hobbyists. Arduino can affect its surroundings by controlling lights, motors, and other actuators and can sense the environment by receiving input from a variety of sensors. Fig-1 Arduino Uno R3 Specifications TABLE 1 SL NO NAME SPECIFICATIONS 1. μC ATmega328 2. Operating Voltage 5V 3. Input Voltage 7-12V (recommended) 4. Input Voltage (limits) 6-20V 5. Digital I/O Pins 14 (of which 6 provide PWM output) 6. Analog Input Pins 6 7. DC Current per I/O 40 Ma Pin 8. DC Current for 3.3V 50 Ma Pin 9. Flash Memory 32 KB and 0.5 KB is

Upload: lykhue

Post on 04-Apr-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

www.ijeee-apm.com International Journal of Electrical & Electronics Engineering 9

IJEEE, Vol. 2, Issue (April, 2015) e-ISSN: 1694-2310 | p-ISSN: 1694-2426

OBSTACLE AVOIDANCE ANDANDEROID MOBILE PHONE

CONTROLLED BLUETOOTH ROBOTUSING ARDUINO

1Ashima, 2Rajan Kumar, 3T. Nikhil, 4Paramdeep Singh1,2,3B.Tech ECE, Student, Lovely Professional University

4Assistant Professor, Lovely Professional [email protected], [email protected], [email protected],

[email protected]

Abstract- This project is focused to make mobile robots asthe target application and problems that will be coveredinclude: how to design - wheeled ground robots avoidcollisions while reaching target locations, by using ArduinoUno R3. The robot is made of L293D interface circuit Arduinoboard and a motor driving system. The robot controllingdevices are connected to the Arduino board. The Arduinoboard transmits signals to the interfacing board L293D whichcontrols the motor driving system. Robots can also be utilizedas an obstacle avoiding robot. IR sensor is used for obstacleavoidance of robot in which we insure that Robot doesn’t haveto stop in front of an obstacle which allows to navigatesmoothly in unknown environments, avoiding obstacles.

Index Terms- Arduino Uno R3, DC Motor, HC-05, IRSensor, L293d.

I. INTRODUCTION

Today the android has become very familiar in the world.Google Android OS is running Millions of devices and millionsare being developed daily for common use of people. There aremillions of developers of the Google and it has made theAndroid development platform open to everyone around theworld. Some developers just focus on building the apps orgames for the android devices, but these apps are havingnumerous possibilities as well in this field. [1] Now a daysSmartphones are becoming more powerful with reinforcedprocessors, larger storage capabilities, richer entertainmentfunctions and more communication methods. It is especiallyuseful in a home environment. With the use of Bluetoothtechnology and other similar techniques, the concept of SmartLiving has offered better opportunity in convenience, comfortand security which includes centralized control of airconditioning, lighting, heating and cooling at home, and servicerobots[2][3]. Now with the excessive use of smartphone users,smartphones have gradually turned into an all-purpose portabledevice and provided people for their daily use [4]. An open-source platform Android has been widely used insmartphones[5] [6].

Arduino Uno R3- Arduino is an open-source electronicsprototyping platform which is based on flexible, more easy-to-use hardware and programing software. If anyone interested increating interactive objects or environments this is intended for

artists, most of the designers, and hobbyists. Arduinocan affect its surroundings by controlling lights,motors, and other actuators and can sense theenvironment by receiving input from a variety ofsensors.

Fig-1 Arduino Uno R3

SpecificationsTABLE 1

SL NO NAME SPECIFICATIONS

1. µC ATmega328

2. Operating Voltage 5V

3. Input Voltage 7-12V(recommended)

4. Input Voltage (limits) 6-20V

5. Digital I/O Pins14 (of which 6 providePWMoutput)

6. Analog Input Pins 6

7. DC Current per I/O 40 MaPin

8. DC Current for 3.3V 50 MaPin

9. Flash Memory 32 KB and 0.5 KB is

International Journal of Electrical & Electronics Engineering 10 www.ijeee-apm.com

used bythe Boot loader

10. SRAM 2 KB

11. EEPROM 1 KB

12. Clock Speed 16 MHz

II. COMPONENT USEDL293D- It works on the concept of H-bridge. H-bridge is a

circuit which allows the voltage to be flown in eitherdirection. As you know voltage need to change its directionfor being able to rotate the motor in clockwise oranticlockwise direction, hence H-bridge IC are ideal fordriving a DC motor. In a single l293d chip there two h-Bridge circuit inside the IC which can rotate two dc motorindependently.

Fig-2 L293D

Pins and directions SpecificationsTABLE 2

SL NO PINS DIRECTION

1. Pin 2 = Logic 1 and Clockwise DirectionPin 7 = Logic 0

2. Pin 2 = Logic 0 and Anticlockwise DirectionPin 7 = Logic 1

3. Pin 2 = Logic 0 and | Idle [No rotation] [Hi-Pin 7 = Logic 0 Impedance state]

4. Pin 2 = Logic 1 and Idle [No rotation]Pin 7 = Logic 1

HC Serial Bluetooth -HC Serial Bluetooth product Consistsof Bluetooth serial interface module and Bluetooth adapter.Bluetooth serial module is used for converting serial port toBluetooth. This module has two modes: master and slaverdevice.HC-05 Specifically includes:Master device: HC-05-M, M=MasterSlaver device: HC-05-S, S=SlaverDC Motor-Every mechanical movement that which we seearound us is accomplished by an electric motor. Since Motorstake electrical energy and produce mechanical energy. [27]

Here electric motors are broadly classified into two differentcategories: Direct Current and Alternating Current. These

categories are numerous types, each offers uniqueabilities that suit them well for specific applications.Robot chasse and Components- The chassis or thevehicle base, which can support a circuit board, 12Vbattery and wheels, is casted out of steel as shown.

Fig-3 Chasse Parts

IR Sensor

Fig-4 SensorDescription

PIN CONNECTION DESCRIPTIONNO

1. Output Digital Output (High orLow)

2. VCC Connected to circuitsupply

3. GND Connected to circuitGround

III. WIRE CONNECTIONS ANDBLUETOOTH PLACEMENT

Fig-4 Connections

www.ijeee-apm.com International Journal of Electrical & Electronics Engineering 11

1. The L293D is connected to power supply which suppliespower to the Arduino board.

2. Left Motor is connected to 11 and 14 Pin of the L293Dboard.

3. Right Motor is connected to 6 and 3 Pin of the L293Dboard.

4. Pin 4 of the Arduino is connected to input PIN 15in theL293D board.

5. Pin 5 of the Arduino is connected to input PIN 10 in theL293D board.

6. Pin 6 of the Arduino is connected to input PIN 7 in theL293D board.

7. Pin 7 of the Arduino is connected to input PIN 2 in theL293D board

8. TX of HC-05 is connected to RX of Arduino.

9. Pin 9, 1, 8, 16 of L293d and VCC of HC-05 is connectedto +5V of Arduino.

10. Pin 4, 5, 12, 13 of L293d and GND of HC-05 isconnected to GND of Arduino.

Application Instructions1. First make sure your HC-05 Bluetooth module is paired

with your mobile. The default password for pairing is“1234”. Check the manual of Bluetooth module.

2. Click on “SELECT DEVICE” icon to select pairedBluetooth module.

3. When press “up arrow” it sends the data “A” toBluetooth module connected with the circuit.When microcontroller detects “A” the robot/robot carmoves FORWORD.

4. When press “DOWN ARROW” it sends the data “B” toBluetooth module connected with the circuit. Whenmicrocontroller detects “B” the robot/robot car movesREVERSE.

5. When press “LEFT ARROW” it sends the data “C” toBluetooth module connected with the circuit. Whenmicrocontroller defects “C” the robot/robot car turnsLEFT.

6. When press “RIGHT ARROW” it sends the data “D” toBluetooth module connected with the circuit. Whenmicrocontroller defects “D” the robot/robot car turnsRIGHT.

7. When press “STOP” button which is in the center ofremote it sends the data “E” to the Bluetooth moduleconnected with the circuit. When microcontroller defects“E” the robot/robot car gets stopped.

8. Click on “DISCONNECT” icon to disconnect pairedBluetooth module.

Fig-5 Blue Control App

IV. Methodology USED

Fig-6 Flow chart of IR Sensor

The "stopped" state will be for when the robot is notmoving at all. The "moving" state will be for when therobot is moving forward. Finally, the "turning" statewill be used while the robot is turning. The robot willbegin in stateMoving state and will run for a limitedamount of time, after which will change to thestateStopped state. The first two decisions in theflowchart address that part of the logic.If the robot is in stateMoving it will check forobstacles, and if one is found it will turn, whichchanges the state to stateTurning. If no obstacles arefound then it will not change its state. If the robot is instateTurning it will check if it is done turning, atwhich point it will change back to stateMoving. If theturn isn't complete then it will remain in the samestate.

VII. SOFTWAREArduino is a cross-platform IDE that works inconjunction with an Arduino controller in order towrite, compile and upload code to the board. Thesoftware provides support for a wide array of Arduinoboards, including Arduino Uno, Nano, Mega, Esplora,Ethernet, Fio, Pro or Pro Mini, as well as Lily PadArduino. The universal languages for Arduino are Cand C++, thus the software is fit for professionals whoare familiar with these two. Features such as syntaxhighlighting, automatic indentation and brace matchingmakes it a modern alternative to other IDEs. Wrappedinside a streamlined interface, the software features

International Journal of Electrical & Electronics Engineering 12 www.ijeee-apm.com

both the looks and the functionality that appeal to Arduinodevelopers, paving the way to a successful output via thedebugging modules.Arduino Software Interface-The Arduino interface is pretty “bare-bones”. When you load the software, the first screen you will seeis a white window with several different shades of blue and blue-green as border. Arduino projects are called

“sketches” and you start a new sketch, several additional filesare also created. Arduino programs are written in C or C++.The Arduino IDE comes with a software library called"Wiring" from the original Wiring project, which makes manycommon input/output operations much easier. The white area iswhere the program is written. The programming language thatthe Arduino platform uses is called C++ a language that isregarded as very powerful but difficult to learn. C++ programsare written as regular text. Arduino calls these programsSketches. Then a utility called compiler reads the sketch andconverts it to machine instructions that the Arduinounderstands. The black area at the bottom of the Arduinosoftware window is where status information appears.

Fig-7 Arduino IDE

Following are the steps involved to start Software [7]

1. Open Arduino IDE as shown below2. Select the COM Port from tools3. Select the required Arduino board from Tools as shown

below4. Write the sketch in Arduino IDE5. compile and upload the Sketch to Arduino board

The Arduino software toolbar, with the following buttons. Verify: Runs the C++ compiler on your program. If

there are any errors you will see them in black status area.

Upload: Compiles your C++ program like the Verifybutton does, and if compilation is successful it uploads theresulting program to the Arduino board, which must beconnected to the computer through the USB port.

New: Clears the program currently loaded. Open: Shows a dropdown with a long list of example

programs to load or the option to load a sketch from disk. Save: Saves the current program to a file on disk. Serial Monitor: Opens the serial monitor console. This is

used mostly for debugging

RESULTS -A new real-time obstacle avoidance approach formobile robots has been developed and implemented. Theexperiment demonstrated that the system design was effective

– at least as far as its current application goes. Widertests and enhancements need to be carried out toinvestigate its feasibility with many moving agents andobstacles, and conflicting agent goals. The success ofthe initial system, however, is encouraging andindicative that the method is an effective approach totackling the problem.

Fig-8 Block Diagram

Almost all navigation robot demands the some sortof obstacle detection, hence obstacle avoidancestrategy is of utter importance. Obstacle avoidancerobot has a vast field of application. They can be usedas services robots, for the purpose of household workand so many other indoor applications. [8] In thosechallenging environments, the robots need to gatherinformation about their surroundings to avoidobstacles. Nowadays, even in ordinary environments,people also require that robots can detect and avoidobstacles.

Fig-9 Final Output

Fig- 10 Wiring with L293D

www.ijeee-apm.com International Journal of Electrical & Electronics Engineering 13

IX. CONCLUSIONAlmost all navigation robot demands the some sort of

obstacle detection, hence obstacle avoidance strategy is of utterimportance. Obstacle avoidance robot has a vast field ofapplication. They can be used as services robots, for thepurpose of household work and so many other indoorapplications. [49] In those challenging environments, the robotsneed to gather information about their surroundings to avoidobstacles. Nowadays, even in ordinary environments, peoplealso require that robots can detect and avoid obstacles. Forexample, an industrial robot in a factory is expected to avoidworkers so that it won’t hurt them. In conclusion, obstacleavoidance is widely researched and applied in the world, and itis probable that most robots in the future should have obstacleavoidance function. [50]Various techniques have emerged todevelop the science of robotics and robots. One method isevolutionary robotics, in which a number of differing robotsare submitted to tests like obstacle avoidance system. Thosewhich perform best are used as a model to create a subsequent"generation" of robots. There are concerns about the increasinguse of robots and their role in society. Additional features canbe easily incorporated into this module if required, long rangesensors can be used. The speed of the robot can be controlled.A wire-less RF remote can be used to control the robot. Use ofdifferential steering with gradual change in wheel speeds. Useof Hysteresis in sensor circuit using LM339. Increment innumber of sensors to enhance the obstacle detection capability.Incorporation of a camera whose data can be sent throughwireless. Incorporation of robotic hand to remove the obstaclein case there is no way for the movement of the robot.

ACKNOWLEDGMENTFirst of all we want to pay thanks to the Almighty LORD forhis blessings. At the very outset, we are thankful and expressout sincerest and deepest gratitude to Lovely ProfessionalUniversity for providing us all the needed infrastructure andwonderful research environment. We are thankful and expressour sincerest and deepest gratitude to my supervisor, Mr.Paramdeep Singh, Asst. Professor, Department of Electronicsand Communication, Lovely Professional University,Phagwara, Punjab for his vast assistance during the entireproject work in preparing and editing my work, consideratediscussions, constant encouragement, and direction. Then wewould like to express our heartfelt gratitude to IJEEEPublication for allowing us to publish our Research Work.Besides that we also want to thanks our fellow colleagues forbeing there whenever we needed them. We must express oursincere thanks to all the persons who helped directly orindirectly with his/her advice or suggestions. And ultimately,we would like to thank our parents for their constantencouragement when it was most required.

REFERENCES[1] Kishan Raj (2012) Controlling a Robot using Android Interface

and voice, Turku University of applied Sciences, Thesis.[2] Dimitrakopoulos, G., Tsagkaris, K., Stavroulaki, V., Katidiotis,

A., Koutsouris, N., Demestichas, P., Merat, V. and Walter, S.(2008) "A Management Framework for Ambient SystemsOperating in Wireless B3G Environments", Springer MobileNetworks and Applications, Vol. 13, No. 6, pp. 555-568.

[3] Savic, S. and Shi, H. (2011) an Intelligent Object Framework forSmart Living, Procedia Computer Science 5 (2011) 386–393.

[4] Adams, C. and Millard, P. (2003) "Personal Trust Space andDevices: "Geography will not be History" in the m-commercefuture". Hawaii International Conference on Business(HICB2003), 18-21 June 2003, Sheraton Waikiki Hotel,Honolulu, Hawaii, USA.

[5] Chung, C.-C., Wang, S.-C., Huang, C. Y., and Lin, C.-M.(2011) "Bluetooth-based Android Interactive Applications forSmart Living", 2011 Second International Conference onInnovations In Bio-inspired Computing and Applications(IBICA-2011), Shenzhen, China, 16-18December 2011, pp.309-312.

[6] Ming Yan and Hao Shi (February 2013), Smart living usingBluetooth based Android Smartphone, International Journal ofWireless & Mobile Networks (IJWMN) Vol. 5, No. 1.

[7] Arduino Cookbook, 2nd Edition by Michael Margolis.[8] Vivek Hanumante, Sahadev Roy, Santanu Maity, (September

2013), Low Cost Obstacle Avoidance Robot, InternationalJournal of Soft Computing and Engineering (IJSCE) ISSN:2231-2307, Volume-3, Issue-4.