Ingenieros Galacticos Team of the Biorobotics Laboratory...

4
Ingenieros Gal´ acticos Team of the Biorobotics Laboratory of UNAM De la Cruz M. Leonardo, Garc´ ıa David Alexis, Mart´ ınez Rosete Karol Joshua, Parrilla Guzm´ an Alejandra, Torres Mart´ ınez Luis Erick Abstract— This is the Ingenieros Gal´ acticos team description paper to enter to the LARC 2017 competition in the category of Robocup Junior-Soccer Lightweight Secondary, explaining how we design build and program two robots, PP17 and HS11, to enjoy the football in other way. Our robots are programmed in C++, have a Galileo Intel Board, is an interesting board because it have a microSD in which we can upload an operative system (GNU/LINUX), it allow to have at the same time simultaneous process. I. INTRODUCTION We are a group of five students one that is candidate to study Physics, Mechanical Enginieer(2), Computer Enginieer(1) and Physics(1). We decide to improve the way we program the robot using the programing language C++, mraa library and the Galileo Gen2 board with yocto, more applications can be developed using this powerfull board instead of the Arduino standard board. TABLE I ROBOT SUBSYSTEMS Mechanic (motors and wheel) - Electric (batteries and power distribution) - Sensing (distance, infrared seeker) - Control (PWM) - Galileo (MicroController) II. MECHANICS The mechanical part consists of a two bases structure, 4 motors, a dribbler and various supports. Both bases are made of copper plates as electronic circuits will be mounted on them; additionally since it is a resistant material, it help us to give more stability to the robot (they were manufactured with a CNC cutter). On the upper base there is a support for a compass; we fitted three distance sensors, the Galileo board and the dribbler. The support was designed and manufactured using a 3D printer. In the bottom base there are the supports for the batteries we use, four motors and the seeker. We had an educational contribution because we learned to design and model pieces in the professional NX8 software and Dremel 3D. We needed a way to control the ball, thus made a dribbler. The dribbler carried the same process that the carriers for the battery and the supports, first was designed in NX, then was manufactured with a 3D printer. Our dribbler has a motor that rotate a cylinder that is what touches to the ball and keep the ball close the robot. Fig. 1. Dribbler We used a LiPO battery and we designed some carriers for them. These have shape of “T” because this shape allows us a better subjection. This part was also manufactured with a 3D printer. Fig. 2. Battery carrier We had to learn how to manufacture the pieces we designed and how to choose the most effective material for them. This knowledge, in addition to be an excellent tool for the robot’s development, can be extend to nearly any proyect out of the academic sector. By means of 3D vizualization, we can see the robot’s parts to select the better components distribution and plan the followings sections (including new features or enhancements). On the other hand we had to apply analytical geometry knowledge to be able to model, to control and finally to automate the various movements of the robot. So we found that at least, analytical geometry, design and manufacturing knowledge are essential to our training. This experience gave us solid foundations, so we can work in the future with more

Transcript of Ingenieros Galacticos Team of the Biorobotics Laboratory...

Page 1: Ingenieros Galacticos Team of the Biorobotics Laboratory ...sistemaolimpo.org/midias/uploads/e894ce4228b58b56e57d5c5ebd6edda6.pdfC++, have a Galileo Intel Board, is an interesting

Ingenieros Galacticos Team of the Biorobotics Laboratory of UNAM

De la Cruz M. Leonardo, Garcıa David Alexis, Martınez Rosete Karol Joshua,Parrilla Guzman Alejandra, Torres Martınez Luis Erick

Abstract— This is the Ingenieros Galacticos team descriptionpaper to enter to the LARC 2017 competition in the category ofRobocup Junior-Soccer Lightweight Secondary, explaining howwe design build and program two robots, PP17 and HS11, toenjoy the football in other way. Our robots are programmed inC++, have a Galileo Intel Board, is an interesting board becauseit have a microSD in which we can upload an operative system(GNU/LINUX), it allow to have at the same time simultaneousprocess.

I. INTRODUCTIONWe are a group of five students one that is candidate

to study Physics, Mechanical Enginieer(2), ComputerEnginieer(1) and Physics(1). We decide to improve the waywe program the robot using the programing language C++,mraa library and the Galileo Gen2 board with yocto, moreapplications can be developed using this powerfull boardinstead of the Arduino standard board.

TABLE IROBOT SUBSYSTEMS

Mechanic (motors and wheel)- Electric (batteries and power distribution)

- Sensing (distance, infrared seeker)- Control (PWM)

- Galileo (MicroController)

II. MECHANICSThe mechanical part consists of a two bases structure, 4

motors, a dribbler and various supports. Both bases are madeof copper plates as electronic circuits will be mounted onthem; additionally since it is a resistant material, it help usto give more stability to the robot (they were manufacturedwith a CNC cutter).

On the upper base there is a support for a compass;we fitted three distance sensors, the Galileo board and thedribbler. The support was designed and manufactured usinga 3D printer. In the bottom base there are the supports forthe batteries we use, four motors and the seeker. We had aneducational contribution because we learned to design andmodel pieces in the professional NX8 software and Dremel3D.

We needed a way to control the ball, thus made a dribbler.The dribbler carried the same process that the carriers for thebattery and the supports, first was designed in NX, then wasmanufactured with a 3D printer. Our dribbler has a motorthat rotate a cylinder that is what touches to the ball andkeep the ball close the robot.

Fig. 1. Dribbler

We used a LiPO battery and we designed some carriersfor them. These have shape of “T” because this shape allowsus a better subjection. This part was also manufactured witha 3D printer.

Fig. 2. Battery carrier

We had to learn how to manufacture the pieces wedesigned and how to choose the most effective material forthem. This knowledge, in addition to be an excellent tool forthe robot’s development, can be extend to nearly any proyectout of the academic sector. By means of 3D vizualization,we can see the robot’s parts to select the better componentsdistribution and plan the followings sections (including newfeatures or enhancements).

On the other hand we had to apply analytical geometryknowledge to be able to model, to control and finally toautomate the various movements of the robot. So we foundthat at least, analytical geometry, design and manufacturingknowledge are essential to our training. This experience gaveus solid foundations, so we can work in the future with more

Page 2: Ingenieros Galacticos Team of the Biorobotics Laboratory ...sistemaolimpo.org/midias/uploads/e894ce4228b58b56e57d5c5ebd6edda6.pdfC++, have a Galileo Intel Board, is an interesting

Fig. 3. Compass

Fig. 4. The complete robot view

complex robots and then do a better job.

III. ELECTRONICS

Our Robots have an Intel Galileo Gen2 board as the maincontroller, this board has 13 digital pin, 5 analaog and amicro SD card with Yocto as operative Linux system. “GNUis operating system which would be put together by peopleworking together for the freedom of all software users tocontrol their computing. rms remains the Chief GNUisancetoday...“(Free Software Foundation, 2017).

Most part of electronics are in the board under. HS11and PP17 cards are different; HS11 needs 3 external H-Bridges for the motors. we dont use an integrated circuitlike L293D because our motors need more current then themaxium possible in the comercial H-bridges.

In each of the 3 H-Bridges we use 3 types of transistorsTIP42C, TIP41C and BC547 and diodes IN4007 to changethe polarity of the motors

For PP17 we don’t need the external H-Bridges becausethe motors include such circuits. Here we have one of themost electrics improves that can help later in these areasbecause we make possible a more powerfull motor.

The cards under the motors include SN754410 H-Bridgeto change the polarity in the Dribbler’s motor that circuithave to LEDS so we can look the change.

Fig. 5. Circuits

The electronic card was redesigned with the objective ofreducing the number of cables, as there were so many and itwas very hard to debug connection problems. This help us torealize the importance of reduce and simplify the connectionsand components in disciplines like nanotechnology, and howmuch you must optimize the space to save production costsand to have more practical, portable, and aesthetic product.

One element necessary for the operation for the robot arethe batteries. We use LiPo batteries (batteries of lithium andpolymer) in our two robots because of the voltage, volumeand weight, those are batteries lighter and the length islonger. Also their useful life is longer because we can chargethem many times and not throw them away.

TABLE IICHARACTERISTICS OF COMMONLY USED RECHARGEABLE BATTERIES.

NiCd Li-ionpolymer

ReusableAlkaline

Gravimetric EnergyDensity

45-80 100-130 80(initial)

Internal Resistance(includes peripheralcircuits) in mΩ

100-2006V pack

200-3007.2V pack

200-20006V pack

Cycle Life 1500 300-500 50 (to50%)

Fast Charge Time 1h typi-cal

2-4 h 2-3 h

OverchargeTolerance

moderate low moderate

Self-discharge/Month

20% ˜10% 0.3%

MaitenanceRequirement

30-60days

not req. not req.

Comercial use since 1950 1999 1992

Electronic learning is very important in changing world.

Page 3: Ingenieros Galacticos Team of the Biorobotics Laboratory ...sistemaolimpo.org/midias/uploads/e894ce4228b58b56e57d5c5ebd6edda6.pdfC++, have a Galileo Intel Board, is an interesting

Technology constantly advances, you can find every day thatthere are more things related with internet and that our livesare surrounded by automation. Many new knowledge shouldbe part of our day to day activities, learning how to handlea 3D printer will be in the future as common as to knowhow to turn on the microwave or make a presentation on thecomputer.

In the Galileo Gen 2 redesign, the result is that it can beinserted above the electronic board giving greater stability,reducing the number of cables, diminishing the requiredspace and added aesthetic to the robot design.

IV. PROGRAMMINGThe mraa library allows a wide selection of programming

languages: C/C++, Java, Python and Node.JS. In addition tosupport various X86 and ARM boards, it simplifies the portmanipulation with a simple group of instructions. For thepython users, also exists a module called wiring-x86 thatimitate the arduino syntax. The main reason of implement alibrary in linux, as opposed to use the Arduino IDE, is thecontrol of simultaneous tasks.

TABLE IIIMRAA C++ API CLASSES

Class DescriptionGpio The GPIO (General Purpose In-

put/Output) ports are used to sendor receive a digital signal. It ispossible write a true (1, switch on)or false value (0, switch off).

I2c Through a serial BUS and a hex-adecimal address, it sends a 8-bitdata to other components.

Aio It use to read a analog value fromthe A0-A5 ports, from a direct cur-rent.

Pwm With the PWM signal (Pulse-widthmodulation), it’s possible simulatean analog write. This function isappropriate to control the speed ofmotors.

Spi Used to control the SPI serial pro-tocol.

Uart Used to control the UART serialprotocol.

Because of the communication with the Galileo board(through the console), the manipulation of text files is doneby terminal text editors like Vim or Nano. Both provideany tools of graphical editors and advanced features: copy,cut, paste, show the line number, split the screen, save, exitwhithout save, etc. The advantage of not work in a graphicalenvironment is a fast movement among the processes.

Thus, the edit, compiling and execution of program can beaccomplished easily, in combination with the g++ compilercommands. Programs may saved in SD card directly, asmuch as possible (8 GB are good to prevent the memorysaturation). Finally, with the github platform, we can con-tribute with the diferent versions of code and transfer it tothe robot (including sensor test versions and prototypes, forthe purpose of detect and fix errors).

A. Advanced data structures and OOP

Owing to C++ is a object oriented language, the manageof lists, queues and stacks is more intuitive. That way,there are native methods for organize the sequence of therobot’s actions and the storage of complex values (accordingto type port, the information of sensors will be processedsequentially with specific instructions).

B. Scripts

Once that the code was compiling and running, it need toopen the program without the user interaction, every time tooperating system starts. The solution for that is a linux script.Basically, in the script is posible save a group of terminalinstructions to avoid write the commands manually.

To create a shell script it is necessary create a text filewith the .sh extension. By convention, the first line has tocontain this header #! /bin/sh (immediately the # symbol ismaybe used to mark a comment line). After this, any validinstruction can be written and the new file must be save inthe route /etc/init.d/. Finally, the file permissions must bechanged with the chmod command.

C. A special case: sds02a Analog Distance Sensor.

In order to calibrate the Arduino for this sensor we mustmeasure the output of the sensor for each distance. Wemeasured the output values from 10cm to 70cm with a 4cmincrement. This allows us to get much more values thereforea better regression. We used a special code to retrieve thevalues from the Arduino. In the code, a mean of 500 readingsis calculated in order to null down the outliers.

After uploading this program, the Arduino will start tosend the mean value of the distance through the serial port.After all of the measures have been made, we used the trend-line options in our excel sheet and see which line was betterfor our values. We used a Power trend-line that correlatesthe numbers.

Fig. 6. sds02a Analog Distance Sensor

After that we put the analogRead values in the X-axis andthe Distance in the Y-axis. Finally we can use the sensorwith the correct values.

Page 4: Ingenieros Galacticos Team of the Biorobotics Laboratory ...sistemaolimpo.org/midias/uploads/e894ce4228b58b56e57d5c5ebd6edda6.pdfC++, have a Galileo Intel Board, is an interesting

D. Strategy

For the competition, the state machine model has been im-plemented to select an optimal action. The program discardslikely situations and it starts a solution; each action stopwhen the objective has accomplished or other case appear(interruptions). This approach makes possible a easily changeof code, depending on the strategy.

The basic dynamic consist by allocate a robot on the goalline and other as the forward: the first is responsible of returnthe ball to the center and block the enemy shot; the secondwill seek the ball and it will take it to the opposite goal. Theexecution flow for both, after a calibration round, is this:

Fig. 7. Basic execution flow.

V. CONCLUSIONS

The investigations that we made are important to improvethe knoledge in the electric and mechanic areas even thecomputational area, we combined the programming and themechanic designs to achieve our goals, things that in thepast, when we were not in these team, we thought wereunreachables now they are becoming real and making a betterfuture.

A. What future are we talking about?

In the future we hope to reach we look up that our workdoesnt stay only in the classroom, quite contrary we look upthat our work have a meaning and a purpose in our dailylife, doing easier the activities that require more occupation.

The implementation of how we use the components forthe position can become favorable for the development of

future technologies now that we are starting an age in whichthe systems doesnt demand adjusts or manipulation on itreaching a mayor utility as the usual, to illustrate thereare new aircrafts in the earth and in aerospace missions,considering that is more useful send an aircraft than a personand this without the necessary implementations wont be ableto do work.

REFERENCES

[1] Corporation, A. (2015). Atmel. Retrieved from ATMEL 8-BIT MICROCONTROLLER WITH 4/8/16/32KBYTESIN-SYSTEM PROGRAMMABLE FLASH DATASHEET:http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P datasheet Complete.pdf

[2] Corporation, F. S. (2000). Fairchild. Retrieved 02 2017,from TIP42/TIP42C PNP Epitaxial Silicon Transistor:http://www.mouser.com/ds/2/149/TIP42C-890174.pdf

[3] Electronics, P. (2002). Integrated circuits. Retrievedfrom PCF8574 Remote 8-bit I/O expander for I2C-bus:http://terzo.acmesystems.it/download/datasheets/PCF8574.pdf

[4] Eng, T. (2012). IRBeacons.com. Retrieved 01 2017, from FTC Thec-nical Document Seeker .

[5] Free Software Foundation. (08 de 05 de 2017). GNU Operating Sys-tem. Retrieved 09-06-2017, from About the GNU Operating System:https://www.gnu.org/gnu/about-gnu.html

[6] Instruments, T. (2015). DatasheetCatalog.com. Retrieved01 2017, from SN754410 Quadruple Half-H Driver:http://search.datasheetcatalog.net/key/SN754410

[7] NXP. (04 de 04 de 2014). UM10204. Retrieved 042017, from I2C-bus specification and user manual:http://www.nxp.com/docs/en/user-guide/UM10204.pdf

[8] Ramon, M. C. (2014). Intel Galileo and Intel Galileo Gen 2 API Fea-tures and Arduino Projects. New York: Apress Media. Retrieved fromhttp://wearcam.org/ece516/ArduinoLinux by Mano 9781430268390.pdf

[9] SEMICONDUCTOR, F. (2002). DatasheetCatalog.com.Retrieved 01 2017, from BC546/547/548/549/550:http://search.datasheetcatalog.net/key/BC546

[10] Stallman, R. (17 de 02 de 2017). GNU Operating System.Retrieved 9-6-2017, from Linux and the GNU System:https://www.gnu.org/gnu/linux-and-gnu.en.html

[11] Tisila. (2016). Instructurables. Retrieved 01 2017,from How to Setup a Pololu Carrier WithSharp GP2Y0A60SZLF Analog Distance Sensor:http://www.instructables.com/id/How-to-setup-a-Pololu-Carrier-with-Sharp-GP2Y0A60S/

[12] Battery University. (21 de 03 de 2017). Re-trived 03- 2017, from Whats the Best Battery?:http://batteryuniversity.com/learn/archive/whats the best battery