You are on page 1of 9

Otvoren softvr vo vzdelvan vskume a v IT rieeniach y e a , y s Zilina 6. - 9.

jla 2011 u

USING AN OPEN SOFTWARE FOR ELECTRONICS AND ROBOTICS


Richard BALOGH (SK) Abstract. In our paper we describe several applications used for the design of embedded systems and robots and also for teaching purposes in Robotics. We used the gEDA suite for the design of new electronic controller of the mobile robot. We also mention programming environments Arduino and Processing for the robot programming. We describe the use of powerful computational tool Octave for advanced data analysis in mobile robotics. The same software we use in education of Robotics at the Faculty of Electrical Engineering and Information Technology (FEI) STU in Bratislava. All the mentioned software we use on Windows XP, although they are also available for other platforms. Key words and phrases. computer aided design, simulation software, programming

Introduction

In the area of the mobile robotics it is often necessary to design the electronic control and auxiliary circuits, sensors and actuators. In this paper we show how we designed a new controller for mobile robot Acrob [1] using an open design system gEDA. Improved robot was used to create maps of the environment using ultrasonic distance sensors. For the subsequent analysis and visualization of measured data, we use an open source software GNU/Octave. The mobile robot is used also for teaching Robotics at the FEI STU. For its programming we use an Arduino environment and for visualization a Processing language. All applications are used in Windows XP platform.

gEDA - CAD for electronics

To design a new control unit for the mobile robot, we used several programs from the gEDA package [2]. It is a project that has produced and continues working on a full GPLd suite and toolkit of Electronic Design Automation tools. These tools are used for electrical circuit design, schematic capture, simulation, prototyping, and production. Currently, the gEDA project offers a mature suite of free software applications for electronics design, including schematic capture, attribute management, bill of materials (BOM) generation, netlisting into

over 20 netlist formats, analogue and digital simulation, and printed circuit board (PCB) layout.

Figure 1: Schematic capture editor gschem At the beginning of the project we need to design diagrams using the gschem program. It is a program which creates a graphic form of the connection diagram (Fig. 1). We used version 1.6.0.20091004 compiled for Windows. The application offers many pre-installed component libraries and with an ability to add missing ones. Very helpful was also the shared component database available at the http://www.gedasymbols.org/ (see Fig. 2). Then we were able to connect the components with electric connections and provide them with the necessary attributes.

Figure 2: On-line component database at the gedasymbols.org

After the error-checking of the design according the design rules, we can generate a list of components and assign various parameters to them, e.g. the case information for the purpose of the printed circuit board design as well as the ordering code for component purchase. Then we continued with the layout design of the printed circuit board with the pcb program from the gEDA suite (version 20091103 on win32). It is an interactive printed circuit board editor for the X11 window system. PCB includes a rats nest feature, design rule checking, and can provide industry standard RS-274-X (Gerber), NC drill, and centroid data (X-Y data) output for use in the board fabrication and assembly process. PCB offers high end features such as an auto-router and trace optimizer. For some less-common components we had to prepare a description le with their case dimensions and pinout. Those footprints have been added to the library. Most commonly used elements are already a part of the installed libraries. Newly created components can be shared in the above-mentioned database at the gedasymbols.org.

Figure 3: Printed circuit board editor pcb Design of the board starts with denition of the size and deployment of components, whose positions are important (eg. connectors at the edges, mounting holes, switches, etc.). Then we can import the list of interconnections generated by a schematic editor. These appear as rubber nets rat-nets. It is very helpful during the placement of remaining components, because we can see whether it is not in place with too much connections, which can make interconnection impossible. When all components are on their place we start to interconnect them in several layers of the printed circuit board. Although the program offers also the autorouter, its results were unsatisfactory for us, so we placed all tracks by hand (Fig. 3). The nal design phase includes the labelling, texts placement and other auxil-

iary information for the technological process. Then nally the board can be sent into the production. The production was without problems, a manufacturer did not request any corrections or additional information and printed circuit boards were made in an outstanding quality. Assembled control unit is on Figure 4.

Figure 4: Assembled and populated board.

Arduino and Processing

Important part of the design process was also the decision about the possibility of its programming. Based on our positive experiences with an avr-gcc compiler [5] for Atmel processors, we decided to use popular environment Arduino. It allows an easy programming in C++ and provides the wide users and developers community, so almost for any common task there are already libraries available. Arduino is an open-source electronics prototyping platform based on exible, easy-touse hardware and software. Its intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments [3]. A sample program for a mobile robot is shown in Fig. 5. Its task is to measure the distance ultrasonic sensor and to send the measured value to the master system using the serial line (converter to USB was used). Received data can be monitored directly in a terminal window, which is part of the Arduino environment. When we want to visualize data, it is good idea to use a more specialized program. In our case it was almost ready Peter Daintys

Figure 5: Arduino development environment.

project RadarScreen [6], which was written in Processing [7]. Since the author also provided source code, it was no problem to add and modify it according to our requirements. We added a drop-box with a choice of serial port, on which we expect the measured data. These are then displayed real time on the screen (Fig. 6). The nished project was made available to the students who monitored their own data in the labs. Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context [7].

Figure 6: Radar Screen window.

GNU/Octave

For the measured data analysis it is obvious to use a Matlab a high-level language and interactive environment that enables you to perform computationally intensive tasks. Unfortunately, the price for Matlab doesnt not allow its common deployment in schools. Moreover, the academic license does not allow its use for research. Therefore, we choose the GNU/Octave, even working with it is often more difcult than with Matlab. GNU/Octave is an interpreted language, primarily intended for numerical calculations [8]. Provides functions for the numerical solution of linear and non-linear problems and to implement other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave language syntax tries to follow the syntax introduced in Matlab, so most programs are easily portable. Octave is normally used through its interactive command line interface, but it can also be used to write non-interactive programs. Less experienced users can use the graphical front-end QtOctave [9] for otherwise console application. We already mention that work with Octave is sometimes more difcult than with the Matlab. From our point of view, the main reason is the lack of huge repository of libraries known from the Matlab environment and in our case also the more difcult installing process in the Windows OS. The example below illustrates the use of this package for calculations and displaying of measured data in robotics. The graph in Fig. 7 shows a map generated by a mobile robot based on multiple ultrasonic distance sensor measurements and assigning certain probabilistic value for the area reached by an acoustic sensor cone. Individual measurements are then combined based on recursive form of Bayesian theorem for the conditional probability for each square of the occupancy grid. The calculations are based on ultrasonic sensor model

described in [10] and adjusted to our sensor properties. We used Octave version 3.3.1991 and its front-end QtOctave 0.10.1. Scripts were tested and worked both in an Octave and Matlab environments.

Figure 7: Radar Screen.

Educational use

All results of our research are used also in teaching. The mobile robot Acrob is used for the laboratory exercises at the Robotics course in the 3rd year of the bachelor studies. Students write their programs in the Arduino environment and we provide them with pre-compiled visualisation applications written in Processing. For the data analysis students prefer to use the Matlab (when available). To produce reports of measurements they use an OpenOfce when working in the classroom (because another package was not available). Surprisingly there were no problems for students to use it. For homework students prefer to use a MS Ofce, so documents sometimes have problems with a portability. From the perspective of a teacher the biggest advantage of open source software is the opportunity to offer the software for students wishing to penetrate deeper into the issues. Last, but not least there is a time saving lack of the administration processes associated with the commercial applications (license management, public tenders, registering, updating, etc.).

Conclusion

Although the author of the article is not an uncritical admirer of an open source software, coincidentally in our project we used only this kind of applications. Especially in our geographic region, its price is one of the biggest advantage. On the other hand, there is more complicated installation of such products and solving dependencies between them, which is more time-consuming. Fortunately, in an academic area many of these problems can be solved by the students within the projects. Even the rst (bachelors) degree students can at least explore the possibilities and smooth the paths for further steps in the effective usage of such programs. For the CAD software, we found no major problems standing in the way of their routine use. The largest investment in this type of program depends in the rich component libraries. Even a small error in e.g the dimensional description of single component can result in a deterioration of the whole product. Therefore, precise and proven libraries are valued and highly appreciated. After establishing a reliable and proven libraries the work is easy and enables some automation and also the interoperation with other systems, since the data format is open too. For the Arduino environment we encountered some problems and we can see several opportunities for further improvement of its environment. An Octave environment holds the basic compatibility with the popular Matlab, but some less common requirements are difcult to deal with. In particular, it is a missing equivalent to the graphical environment Simulink known from the Matlab. Also, we were unable to read data in real time from the serial interface, although probably in a different operating system it would work. All around, the open software applications are a promising alternative worth to try, especially in an academic area, offering cheap and open solutions.

Acknowledgement
Publication of this paper was supported by the grant VEGA 1/0177/11.

References
[1] BALOGH, R.: Acrob an Educational Robotics Platform, AT&P Journal Plus, November, 2010. Vol. 10 (2), pp. 6-9. Available online: http: //www.atpjournal.sk/buxus/docs//casopisy/atp_plus/plus_2010_2/ atp_plus_2_2010_pre_web.pdf [2] gEDA project. Available online: http://www.gpleda.org [3] Arduino. Available online: http://www.arduino.cc/ [4] BANZI, M.: Getting Started with Arduino. OReilly, 2009.

[5] GCC, the GNU Compiler Collection. Available online: http://gcc.gnu.org [6] DAINTY, Peter: Arduino + Processing: Make a Radar Screens Visualise Sensor Data from SRF-05. Available online: http://luckylarry.co.uk/arduino-projects/ [7] Processing - an open source programming language. Available online: http://www. processing.org/ [8] GNU Octave Project. Available online: http://www.octave.org [9] ROSADO, Pedro Luis Lucas: QtOctave version 0.10.1 Project page. Available online: https://forja.rediris.es/projects/csl-qtoctave/ [10] MURPHY, Robin: An Introduction to AI Robotics. The MIT Press, November 2000. ISBN 0-262-13383-0.

Contact Richard BALOGH, Faculty of Electrical Engineering and Information Technology, Slovak University of Technology in Bratislava, Ilkovi ova 3, c 812 19 Bratislava, Slovakia, richard.balogh@stuba.sk

You might also like