This is an old revision of the document!
Mobile robot is one of the most popular robot for construction. Very common are sumo robots, sports robots (football, volleyball etc.), robots simulating rescue operations (firefighting, person or object finding etc.) and many other. For these kinds of robots there are many different competitions in the world and in Estonia, even standard classes have been developed (eg sumo robots). The common feature for these types of robots is mobile platform, which may have different construction and capabilities, but its main functionality remains the same. It is controlling the motors and basic navigation, which includes avoiding objects and travelling to the desired destination. Usually, a specific functionality is added to the main functionality, which is planned according to the requirements and opportunities set for the project.
Here we look at documentation of a typical mobile robot platform project and its different phases.
Plan and construct a multifunctional mobile robot platform with basic navigation functionality using HomeLab components. Robot platform must have an easy-to-change operational functionality, when equipped with different gadgets:
Robot must be able to move on a flat surface in indoors.
The overall model of the system is presented as a block diagram. It describes the structure, behaviour and other important aspects of the system. As an example, an hierarchical model of the overall system is depicted below.
For this task the team used a brainstorming method and generated 3 conceptually different solutions. Evaluation matrix was compiled and the most optimum construction was found. The main differences of the solutions lay in the movement schemes.
Simplified evaluation matrix was as following:
| Function/Solution | I | II | III | Weight factor |
|---|---|---|---|---|
| Cost | 3 | 4 | 6 | 0,8 |
| Complexity of building | 2 | 4 | 7 | 0,7 |
| Maneuverability | 4 | 8 | 8 | 0,5 |
| Permeability/läbitavus? | 5 | 8 | 2 | 0,3 |
| Applicability of HomeLab | 5 | 4 | 5 | 0,9 |
| Weight | 5 | 6 | 7 | 0,8 |
| Total (with weight factor) | 19 | 27 | 28 |
Evaluation scale was 1-10 points and weight factor 0-1. Weight factors were chosen according to the requirements and restrictions set for this system. Eg, although solution 2 was significantly more capable moving on rough ground, it wasn't required in the preliminary task and therefore the weight factor was low.
Based on the assessment the optimum solution for given task was proved to be a platform moving on two wheels with two separate motors. Further work continued developing the chosen solution into a real system.
Mechanics was tried to make as simple as possible, while following the principle of modularity. The front and the rear bumper are identical modules. Electronics have three modules, which are placed on top of each other, allowing simple ribakaabelühendusi, while ensuring relatively simple changeability of modules. Motors have been selected from HomeLab kit: motors with integrated reducer and coder, which are connected directly to the actuator of the motors. Model aircraft wheels have been used, because they are very light and strong enough for the robot. To simplify the construction the bottom and the top plate are identical. Plates are equipped with holes, allowing different devices to be attached on the top plate. Besides the electronic modules a battery fits between the plates as well.
The bumper of the robot is projected separately and it is integrated with touch sensors and tracking sensors. The bumper is made from PCBs and therefore has electricity in addition to construction. Tracking sensors are soldered directly to the bumper of the bottom plate. Touch sensors (micro switches) are placed between the bumper plates and is covered by a single rubber piece at front. The rubber piece absorbs the hit and at the same time enables to identify where the hit came from.
The electronics of the system is described as a principle scheme and electronic scheme with PCB assembly scheme.
As an example, tracking sensors electric scheme and respective PCB assembly scheme of the robot's bumper is shown.
The control system of the robot derives from behavioral model and is set by the functionality, requirements and restrictions of the initial task. From the behavioral model of the system a specified control program is created, which in turn is the basis for software program code. All three levels(behavioral model- algorithm- source code) must be consistent with each other.
Algorithm describes Algoritm kirjeldab süsteemi juhtloogikat ja on esitatud plokkdiagrammina. Lihtsama algoritmi koostamiseks piisab paarist elemendist ja nendevaheliste seoste kirjeldamisest. Kui roboti algoritm on koostatud korrektselt, siis on sellest roboti juhtprogrammi juba suhteliselt lihtne koostada. Algoritmis on kasutatud põhiliselt kahte erinevat objekti: ümardatud nurkadega ristkülik, mis tähistab mingit tegevust ja väike romb mingi tingimuse kontrollimiseks, millele järgneb vastavalt kontrolli tulemusena edasiste tegevuste käivitamine.
Algoritmis kasutatud tähiste tähendused:
| Tähis | Tähendus | 0 | 1 | -1 |
|---|---|---|---|---|
| M1 | left motor | stop | pöörleb päripäeva | pöörleb vastupäeva |
| M2 | right motor | stop | pöörleb päripäeva | pöörleb vastupäeva |
| F | first middle touch sensor | no signal | signal | |
| FR | first right touch sensor | no signal | signal | |
| FL | first left touch sensor | no signal | signal | |
| d | viide |
Simple navigation
#include <homelab/module/motors.h> #include <homelab/pin.h> #include <homelab/delay.h> // Põrkeandurite viikude defineerimine pin front = PIN(C, 0); pin frontleft = PIN(C, 1); pin frontright = PIN(C, 2); // // Mainprogram // int main(void) { // Mootorite 0 ja 1 algseadistamine dcmotor_init(0); dcmotor_init(1); // Andurite viigud sisendiks pin_setup_input_with_pullup(front); pin_setup_input_with_pullup(frontleft); pin_setup_input_with_pullup(frontright); // Lõputu tsükkel while (true) { // Mootorite päripäeva käivitamine dcmotor_drive(0, 1); dcmotor_drive(1, 1); // Keskmise anduri signaali kontroll if (pin_get_value(front)) { // Mootorite reverseerimine dcmotor_drive(0, -1); dcmotor_drive(1, -1); // Paus 1 sekund sw_delay_ms(1000); // Vasaku mootori päripäeva käivitamine dcmotor_drive(0, 1); // Paus 2 seconds sw_delay_ms(2000); } // Vasaku anduri signaali kontroll else if (pin_get_value(frontleft)) { // Parema mootori reverseerimine dcmotor_drive(1, -1); // Paus 2 seconds sw_delay_ms(2000); } // Parema anduri signaali kontroll else if (pin_get_value(frontright)) { // Vasaku mootori reverseerimine dcmotor_drive(0, -1); // Paus 2 sekundit sw_delay_ms(2000); } } }
Projekti raames valminud robotplatvorm on valmistatud üldjoontes plastikust, välja arvatud mootori kinnitused, mis on valmistatud alumiiniumprofiilist. Elektroonikamoodulid on paigutatud üksteise peale, aku on lahtiselt kahe plaadi vahel. Põrkerauad on valmistatud trükkplaadist ja värvitud mustaks. Roboti pealmine plaat on täiesti sile, võimaldades sinna kinnitada erinevaid soovitud seadmeid. Projekti raames paigaldati robotplatvormile lihtne radar, mis koosnes väikesest RC servomootorist ja infrapunaandurist. Teise lahendusena paigaldati platvormile intelligentne kaameramoodul masinnägemise ülesannete lahendamiseks. Mõlemad variandid on näidatud allolevatel piltidel. Kolmandaks seadmeks katsetati standardmanipulaatorit, mille lülisid juhitakse samuti standardsete RC servomootoritega, kasutades nende ajuri juhtimiseks jadaliidest.
Majanduslik kalkulatsioon hõlmab endas komponentide maksumust ja roboti detailide valmistamise ning koostamise kulusid.
Komponentide maksumuse tabel
| Komponent | Mark | Kogus | Hind | Maksumus |
|---|---|---|---|---|
| Mootor | M LE149.6.43 | 2 | 500.- | 1000.- |
| Mikrokontroller | uC ATmega128 | 1 | 900.- | 900.- |
| Mootorite juhtplaat | Actuator Board v1.2 | 1 | 700.- | 700.- |
| Toiteplaat | TP | 1 | 500.- | 500.- |
| Joonejälgimise andurid | LFS QRD1114 | 8 | 30.- | 240.- |
| Puuteandurid | TS Microswitch | 8 | 25.- | 200.- |
| Kere plaat | ABS | 4 | 50.- | 200.- |
| Trükiplaadi toorik | 2 | 50.- | 100.- | |
| Mootorikinnituse profiil | Al-L | 2 | 10.- | 20.- |
| Ratas | 60/10 mm | 2 | 30.- | 60.- |
| Aku | NI-MH 9,6 V | 1 | 350.- | 350.- |
| Erinevad kaablid | 10 | 20.- | 200.- | |
| Mutrid-poldid | 1 | 50.- | 50.- | |
| Muud tarvikud | 1 | 100.- | 100.- | |
| Total | 4620.- |
Hinnanguline tööjõu- ja tootmiskulu üksikeksemplari korral.
| Töö | Aeg (h) | Hind | Maksumus |
|---|---|---|---|
| Konstruktsioonidetailide freesimine | 1 | 300.- | 300.- |
| Trükiplaatide (põrkerauad) freesimine | 0,5 | 500.- | 250.- |
| Roboti konstruktsiooni koostamine | 0,5 | 250.- | 125.- |
| Põrkeraudade koostamine (komponentide jootmine) | 1 | 300.- | 300.- |
| Programmeerimine | 5 | 300.- | 1500.- |
| Dokumentatsiooni koostamine | 3 | 250.- | 750.- |
| Kokku | 11 | 3225.- |
Roboti hinnanguline maksumus kokku 7845.-
Arvutatud roboti maksumus on siiski hinnanguline, kuna tegemist on õppeotstarbelise projektiga, kus enamik tööd ja koostamist on tehtud oluliselt suuremas mahus, kuid otsese rahalise tasuta. Seetõttu on töö- ja ajakulu ligikaudne ja ei kajasta tegelikku olukorda.
Mehhatroonikasüsteem (Robot) on loodud meeskonnatööna ja kindla ajakava ning eelarvega, omades seega enamuse olulisi projekti tunnuseid. Projektijuhtimise seisukohalt olid olulised tegevused: aja planeerimine, meeskonnatöö planeerimine ja juhtimine, eelarve jälgimine ja vahendite hankimine, jooksev aruandlus juhendajale, lõpptulemuse presentatsioon ja dokumenteerimine. Projekti aruandele lisatakse töögruppide koosolekute protokollid, projekti plaan (soovitavalt Gantti diagrammina), ressursijaotus (k.a. inimressurss) ja planeeritud ning tegelik eelarve. Näiteks on toodud lihtne tegevuste plaan Gantti diagrammina.
Majanduslik kalkulatsioon näitas meile, et roboti tootmishind on üsna kõrge, eriti kui tegemist on ainueksemplariga, kuid jäi siiski lähteülesandes etteantud piiridesse. Tootmise hinda saaks kindlasti oluliselt alandada, optimeerides komponentide ja materjalikulu ning tootes korraga suurema koguse roboteid. Projekti käigus tutvusime mehhatroonikasüsteemi projekteerimise, valmistamise ja testimisega, mis andis meile esmakordse sellelaadse kogemuse.
Töö lõpus selgus tõsiasi, et roboti korralikuks töötamiseks on vaja oluliselt rohkem aega planeerida testimisele, seda eriti tarkvara osas. Erinevad moodulid ei pruugi alati koos korrektselt töötada, kuigi eraldi katsetades oli kõik korras. See näitab, et süsteemi moodulite integreerimine on tõsine väljakutse ja selleks tuleb planeerida oluliselt rohkem aega ja ressurssi.
Kokkuvõteks arvame, et projekt oli väga huvitav ja hariv ning andis aimu integreeritud süsteemide projekteerimisest ja valmistamisest.