4
2 nd Mediterranean Conference on Embedded Computing MECO - 2013 Budva, Montenegro Physical computing and Android in Robotics Nikola Mitrović Morena Inženjering d.o.o Niš, Serbia [email protected] Nikola Petrović Morena Inženjering d.o.o Niš, Serbia [email protected] Marko Živković Morena Inženjering d.o.o Niš, Serbia [email protected] Ljubica Mijalković Morena Inženjering d.o.o Niš, Serbia [email protected] Abstract – This paper represents research in the area of Physical computing and Robotics with practical realization of remote controlled vehicle. The vehicle is controlled by programmable microcontroller, such as the Arduino or FEZ Mini, running on the Microsoft.NET Micro Framework as a spine and the Android acting as a brain. The connection between a spine and a brain is established via Bluetooth. Key words: Arduino, Android, Microsoft.NET Gadgeteer Micro framework, Physical computing, Robotics, Remote controlled vehicle, Bluetooth I. INTRODUCTION Physical computing [1], in the broadest sense, means building interactive physical systems by the usage of software and hardware that can sense and respond to the analog world. In the broad sense, Physical computing is described as a creative framework for understanding human beings’ to the digital world. Today, microcontrollers such as Arduino [2], Raspberry Pi [3] and Microsoft.NET Gadgeteer [4] are available for common users at a very favorable price. Very practical systems may be built with usage of those microcontrollers and other various sensors and motors. On the other side, software platforms like Android or iOS allow the implementation of mobile applications to control microcontroller based hardware systems. Remotely controlled vehicle has always been interesting topic and got additional boost in recent years. This paper discusses whether the combination of Android and programmable microcontrollers is a good approach for developing those systems. In order to do that, two prototypes have been developed based on this approach. Prototypes are downsized but same princips may be applied to realsized vehicles with combination of stronger and more powerful hardware. Motivation and main goal of this research is to try to develop realsized smart robot which is capable of cleaning tennis court surface, court lines and collecting tennis balls. Firstly, hardware side of the robot must be researched and developed and afterwards Artificial intelligence algorithms [5] for self-localization, path finding and object detection must be implemented. II. SYSTEM ARCHITECTURE The client-server architecture of the system is shown on Fig. 1. The client, named Smarty, is a smart mobile device and the server is a microntroller placed on a vehicle. Smarty establishes connection with the server via Bluetooth. Smarty sends messages called commands to the server and server responds to the Smarty with messages called feedbacks. Commands “tell” to a microcontroller how to manage with attached hardware (e.g. motors, sensors). Every command has zero, one, two or more parameters. Examples of the commands are Move, Head, Stop, etc.... Command Move par1 par2 tells server to start moving the vehicle and par1 and par2 are numeric values that indicate speed of moving and direction. Command Head angle is responsible for moving frame for Smarty ( Figure 6) and has one parameter angle which represents angle from 0 to 360 degrees. The Server side is microcontroller, Arduino or FEZ Mini. Server receives commands from the client and starts processing them and controlling attached hardware. Every server maintaines processing commands in the same way. What does it mean? The Server receives commands from the Smarty and every command must act in a same way. If Arduino receives command for moving the vehicle to the right, also FEZ Mini should do the same processing. Because of that, it is very important to have clear format for every command. Finally, server responds to the Smarty with messages called feedbacks. Examples for feedbacks are values

Physical Computing and Android in Robotics

Embed Size (px)

DESCRIPTION

This paper was chosen for the 2nd conference in Embedded Computing - Meco 2013, Budva - http://embeddedcomputing.me/en/products-services/meco

Citation preview

2nd Mediterranean Conference on Embedded Computing MECO - 2013 Budva, Montenegro

Physical computing and Android in Robotics

Nikola Mitrović Morena Inženjering d.o.o

Niš, Serbia [email protected]

Nikola Petrović Morena Inženjering d.o.o

Niš, Serbia [email protected]

Marko Živković Morena Inženjering d.o.o

Niš, Serbia [email protected]

Ljubica Mijalković Morena Inženjering d.o.o

Niš, Serbia [email protected]

Abstract – This paper represents research in the area of Physical computing and Robotics with practical realization of remote controlled vehicle. The vehicle is controlled by programmable microcontroller, such as the Arduino or FEZ Mini, running on the Microsoft.NET Micro Framework as a spine and the Android acting as a brain. The connection between a spine and a brain is established via Bluetooth.

Key words: Arduino, Android, Microsoft.NET Gadgeteer Micro framework, Physical computing, Robotics, Remote controlled vehicle, Bluetooth

I. INTRODUCTION

Physical computing [1], in the broadest sense, means building interactive physical systems by the usage of software and hardware that can sense and respond to the analog world. In the broad sense, Physical computing is described as a creative framework for understanding human beings’ to the digital world. Today, microcontrollers such as Arduino [2], Raspberry Pi [3] and Microsoft.NET Gadgeteer [4] are available for common users at a very favorable price. Very practical systems may be built with usage of those microcontrollers and other various sensors and motors. On the other side, software platforms like

Android or iOS allow the implementation of mobile applications to control microcontroller based hardware systems.

Remotely controlled vehicle has always been interesting topic and got additional boost in recent years. This paper discusses whether the combination of Android and programmable microcontrollers is a good approach for developing those systems. In order to do that, two prototypes have been developed based on this approach. Prototypes are downsized but same princips may be applied to realsized vehicles with combination of stronger and more powerful hardware. Motivation and main goal of this research is to try to develop realsized smart robot which is capable of cleaning tennis court surface, court lines and collecting tennis balls. Firstly, hardware side of the robot must be researched and developed and afterwards Artificial intelligence algorithms [5] for self-localization, path finding and object detection must be implemented.

II. SYSTEM ARCHITECTURE

The client-server architecture of the system is shown on Fig. 1. The client, named Smarty, is a smart mobile device and the server is a microntroller placed on a vehicle. Smarty establishes connection with the server via Bluetooth. Smarty sends messages called commands to the server and server responds to the Smarty with messages called feedbacks. Commands “tell” to a microcontroller how to manage with attached hardware (e.g. motors, sensors). Every command has zero, one, two or more parameters. Examples of the commands are Move, Head, Stop, etc.... Command Move par1 par2 tells server to start moving the vehicle and par1 and par2 are numeric values that indicate speed of moving and direction. Command Head angle is responsible for moving frame for Smarty ( Figure 6) and has one parameter angle which represents angle from 0 to 360 degrees.

The Server side is microcontroller, Arduino or FEZ Mini. Server receives commands from the client and starts processing them and controlling attached hardware. Every server maintaines processing commands in the same way. What does it mean? The Server receives commands from the Smarty and every command must act in a same way. If Arduino receives command for moving the vehicle to the right, also FEZ Mini should do the same processing. Because of that, it is very important to have clear format for every command.

Finally, server responds to the Smarty with messages called feedbacks. Examples for feedbacks are values

2nd Mediterranean Conference on Embedd

coming from ultrasonic and distance sensorfor purpose of distance measurement anlocalization [6]. Server sends feedbacks to Bluetooth and every feedback is properlyprocessed by the Smarty.

Figure 1 – System architectu

III. HARDWARE IMPLEMEN

The Arduino is used as programmable min the system. In general, hardware realizArduino consists of several components:

• Arduino Mega ADK • Robot chassis ARX-CH09 • Bluetooth module HC-06 • Motor Driver L298 module • Lots of wires

The scheme of the system is shown on Fig.

Figure 2 – Arduino hardware solu

As mentioned, the Arduino is used as cenin the prototype, but beside the Arduino, thother components. Robot chassis ARX-CHcomponent that moves when a vehicle is bthe user via Smarty. It has two motors concontrolled with the L298 Motor Driver [8]. A

ed Computing MECO - 2013

rs that are used nd robot self-the Smarty via

y received and

ure

NTATION

microcontroller zation with the

2.

ution

ntral component here are several H09 [7] is the being driven by nnected to and Also, its power

supply comes from six batteris used to control the movemeL298 driver. The Arduinomodulation [9] (PWM) pins ato digital pin 14. The PWM pone motor, and the PWM pinother motor. Two groups of ththe L298 driver and furthermotors of the ARX chassischassis may use power supplynot recommendable due to theArduino can provide from computer. Arduino digital pirespectively are connected to[10]. Bluetooth module is alsopower supply pin and GND pthe Smarty comes, the Arduinprefered action. Whole softwais implemented in Arduino IDOn Fig. 3 and 4 is shown how

Figure 3 – Arduino r

Figure 4 – Arduino r

The other approach to mcontrolled vehicle is by usin

Budva, Montenegro

ries (1.2 V each). The Arduino ent of the ARX chasis with the o Mega ADK pulse width are the ones from digital pin 2 pins 7 and 8 are used to control ns 9 and 11 are used to control he PWM pins are connected to rmore from the driver to the s. Also, for testing purposes, y from the Arduino, but that is e limited power supply that the the USB connection to the

ins 0 and 1, the RX and TX o the Bluetooth module HC-06 o connected to the Arduino 5V pin. When the command from no processes it and establishes are on the Arduino server side

DE programming environment. w system looks like.

remote controlled vehicle

remote controlled vehicle

make server side for remote ng other platform. That other

2nd Mediterranean Conference on Embedded Computing MECO - 2013 Budva, Montenegro

platform is the GHI Electronics FEZ Mini [11] running on the Microsoft.NET Micro Framework. Applying that, components required for the realization are:

• FEZ Mini Board • FEZ Mini Robot Kit (this inculdes Fez Mini Board) • Bluetooth module HC-06 • Lots of wires

Fez Mini Robot Kit comes as a collection of parts that can be easily connected (Figure 5). Software for receiving and processing commands is implemented in Microsoft.NET Micro Framework as part of the Microsoft Visual Studio. Commands are received with Bluetooth module HC-06. Fig. 6 and 7 show remote control vehicle system in which server is Fez Mini.

Figure 5 – Fez Mini Robot Kit parts

Figure 6 – Fez Mini remote controlled vehicle

Figure 7 – Fez Mini remote controlled vehicle

IV. SOFTWARE IMPLEMENTATION – ANDROID

Application running on the Smarty is the Android [12] application and this is the client side in architecture. All system’s logic is placed in the application, the microcontrollers are just components that process commands and send feedbacks while the Smarty is directly connected to the user.

The application is capable of:

• Connecting to both platforms via Bluetooth • Selecting prefered action on both platforms

Buttons controller Compas controller Orientation controller TestJob – Manual command controller

Images of the application with this properties are shown in Fig. 8 and Fig. 9.

Figure 8 – Arduino selection and Bluetooth

2nd Mediterranean Conference on Embedded Computing MECO - 2013 Budva, Montenegro

Figure 9 – Button control screen and manual command

Described prototypes show that same princips may be applied for realsized vehicles. Based on current development progress, authors maintained to develop the realsized prototype shown on Fig. 10. Although a lot of work needs to be done in the future, especially for Artificial intelligence algorithms, vehicle has been successfully controlled by the Smarty. All properties show good results when robot control is being done by the user over Smarty.

Figure 10 – Realsized prototype - Smart tennis robot

V. CONCLUSION

Downsized prototypes controlled with programmable microcontrollers and smart mobile devices can be very easily expanded to large real-size systems. Area of embedded robotics has been developing very fast and with appearance of a cheap microcontrollers has become very popular for both programming and business. The Android is open-source platform and probably most popular mobile platform beside the iOS. The Arduino is also open-source, with very low price for common user and very popular for programming because of similarity with C programming language. Solutions presented in this paper show that is

possible to develop a remote control system with the combination of the Android and the other microcontroller platforms and because of that it is very important to follow development of Physical computing and robotics in the future. Many practical projects, like personal remote assistants, or remote house cleaners, can be made by combining those platforms. General idea is to lower development costs of robotic vehicles dedicated to duties at sport fields, residential homes, courtyards or manufacturing plants by using readily available, commercial products, rather than specialized, custom designed parts.

VI. LITERATURE [1] Phycical computing http://en.wikipedia.org/wiki/Physical_computing [2] Arduino http://www.arduino.cc/ [3] Raspberri Pi - http://www.raspberrypi.org/ [4] Net Gadgeteer - http://www.netmf.com/gadgeteer/ [5] Robot localization -https://www.udacity.com/file?file_key=agpzfnVkYWNpdHl1ckcLEgZDb3Vyc2UiBWNzMzczDAsSCUNvdXJzZVJldiIHZmViMjAxMgwLEgRVbml0GPGNCwwLEgxBdHRhY2hlZEZpbGUYmc4NDA [6] Robot localization - https://www.udacity.com/course/viewer#!/c-cs373/l-48739381 [7] Robot chassis - http://custobots.lako.ca/products/simple-robot-chassis-arx-ch09 [8] L298 Motor Driver - http://www.ghielectronics.com/docs/84/motor-driver-l298-module [9] Pulse width modulation - http://arduino.cc/en/Tutorial/PWM [10] Bluetooth module - http://www.emartee.com/product/41915/ [11] Fez Mini http://www.ghielectronics.com/catalog/product/297 [12] Android - http://www.android.com/