thunderomnibot

 #MAKE 

 03/14/14 

An omnidirectional robot made with LEGO Mindstrorms which use three of our wheels

This robot was made to show how our omnidirectional wheels are excellent for robot made with Lego Mindstorms too. The structure is very simple: there are three motors, everyone rotated of 120° to other ones and all connected to the NXT 2.0 controller. There aren't sensors, because, as we already said, any other goal. (We are very thankful to the guys of "The Urban Reef" for lending us the essential material to develop this robot)

How does it work?

Referring to our tutorial about how to use our omnidirectional wheels, let's try to imagine which are the combinations that we used to do the basic movements. Whereas that motors are all connected with the same polarity, we number the motors starting with the one at the top right and going clockwise for convenience. You can notice that there are two types of movements: those along a trajectory which is coincident to an axis of a motor and those along a trajectory which is perpendicular to an axis of a motor.
An example of movement which is coincident to an axis of a motor is moving straight forward; for this type of movement the motor that has the axis coincident to the trajectory is turned off, while the other two rotate in opposite directions each other and at the same speed (the direction of rotation depends on the direction that you want to go referred to this trajectory, the important thing is that the two motors rotate in the opposite direction). In particular, to go straight ahead, we see that the motor 2 is turned off while the motor 1 is rotating forward and the motor 3 is rotating backwards.
Instead, an example of a movement perpendicular to an axis of an motor is the shift to the right; for this kind of movement the motor that has the axis perpendicular to the trajectory runs in the direction that coincides with the direction of the desired movement, while the other two rotate in the opposite direction and at half speed. In particular, to go straight to the right we see that the motor 2 rotates forward, while the motors 1 and 3 rotates backward at half of the speed of the motor 2.
The other straight movements are very similar to those described above, and we won't explain them as well, let's see the rotation movements, instead. They are very simple: if you want the robot to rotate clockwise all the motors must rotate backwards; while, to rotate counterclockwise all motors must rotate forward.
So, we have seen how easy it's to manage a robot that mounts our omnidirectional wheels and that a bit of reasoning is enough to be able to move it in any direction.
In this discussion it's clear that each motor has to be managed individually, then the next question to be answered is: how to manage these the three motors?

Software

Below we describe the part of the code used to manage the 14 basic movements, more precisely the function that is used to manage these movements.

/*
 La variabile speed può assumere valori da 0 a 127 e va a regolare
 la velocità di rotazione di tutti i motori.

 La variabile direction può assumere i seguenti valori:
 - 0 per far star fermo il robot;
 - 1 per far muovere il robot in avanti rispetto all'asse 0;
 - 2 per far muovere il robot in avanti rispetto all'asse a 30°;
 - 3 per far muovere il robot in avanti rispetto all'asse a 60°;
 - 4 per far muovere il robot in avanti rispetto all'asse a 90°;
 - 5 per far muovere il robot in avanti rispetto all'asse a 120°;
 - 6 per far muovere il robot in avanti rispetto all'asse a 150°;
 - 7 per far muovere il robot indietro rispetto all'asse 0;
 - 8 per far muovere il robot indietro rispetto all'asse a 30°;
 - 9 per far muovere il robot indietro rispetto all'asse a 60°;
 - 10 per far muovere il robot indietro rispetto all'asse a 90°;
 - 11 per far muovere il robot indietro rispetto all'asse a 120°;
 - 12 per far muovere il robot indietro rispetto all'asse a 150°;
 - 13 per fare ruotare il robot su se stesso in senso orario;
 - 14 per fare ruotare il robot su se stesso in senso antiorario.
*/

void Move(byte direction, byte speed)
{
  // Controlla che il valore di speed richiesto non sia sopra il limite
  speed=speed>127?127:speed;

  char m1,m2,m3;

  // Sceglie quale movimento fare in base al valore di direction inserito
  switch(direction){

  // Direzione 1
  case 1:{
      m1=speed;     // Motore 1 gira in avanti
      m2=0;         // Motore 2 fermo
      m3=-speed;    // Motore 3 gira all'indietro
    }
    break;

  // Direzione 2
  case 2:{
      m1=speed/2;   // Motore 1 gira in avanti a velocità dimezzata
      m2=speed/2;   // Motore 2 gira in avanti a velocità dimezzata
      m3=-speed;    // Motore 3 gira all'indietro
    }
    break;

  // Direzione 3
  case 3:{
      m1=0;         // Motore 1 fermo
      m2=speed;     // Motore 2 gira in avanti
      m3=-speed;    // Motore 3 gira all'indietro
    }
    break;

  // Direzione 4
  case 4:{
      m1=-speed/2;  // Motore 1 gira all'indietro a velocità dimezzata
      m2=speed;     // Motore 2 gira in avanti
      m3=-speed/2;  // Motore 3 gira all'indietro a velocità dimezzata
    }
    break;

  // Direzione 5
  case 5:{
      m1=-speed;    // Motore 1 gira all'indietro
      m2=speed;     // Motore 2 gira in avanti
      m3=0;         // Motore 3 fermo
    }
    break;

  // Direzione 6
  case 6:{
      m1=speed;     // Motore 1 gira in avanti
      m2=0;         // Motore 2 fermo
      m3=-speed;    // Motore 3 gira all'indietro
    }
    break;

  // Direzione 7
  case 7:{
      m1=-speed;    // Motore 1 gira all'indietro
      m2=0;         // Motore 2 fermo
      m3=speed;     // Motore 3 gira in avanti
    }
    break;

  // Direzione 8
  case 8:{
      m1=-speed/2;  // Motore 1 gira all'indietro a velocità dimezzata
      m2=-speed/2;  // Motore 2 gira all'indietro a velocità dimezzata
      m3=speed;     // Motore 3 gira in avanti
    }
    break;

  // Direzione 9
  case 9:{
      m1=0;         // Motore 1 fermo
      m2=-speed;    // Motore 2 gira all'indietro
      m3=speed;     // Motore 3 gira in avanti
    }
    break;

  // Direzione 10
  case 10:{
      m1=speed/2;   // Motore 1 gira in avanti a velocità dimezzata
      m2=-speed;    // Motore 2 gira all'indietro
      m3=speed/2;   // Motore 3 gira in avanti a velocità dimezzata
    }
    break;

  // Direzione 11
  case 11:{
      m1=speed;     // Motore 1 gira in avanti
      m2=-speed;    // Motore 2 gira all'indietro
      m3=0;         // Motore 3 fermo
    }
    break;

  // Direzione 12
  case 12:{
      m1=-speed;    // Motore 1 gira all'indietro
      m2=0;         // Motore 2 fermo
      m3=speed;     // Motore 3 gira in avanti
    }
    break;
    
  // Direzione 13
  case 13:{
      m1=-speed;    // Motore 1 gira all'indietro
      m2=-speed;    // Motore 2 gira all'indietro
      m3=-speed;    // Motore 3 gira all'indietro
    }
    break;

  // Direzione 14
  case 14:{
      m1=speed;     // Motore 1 gira in avanti
      m2=speed;     // Motore 2 gira in avanti
      m3=speed;     // Motore 3 gira in avanti
    }
    break;
    
  // Tutti i motori fermi
  case 0:
  default:{
      m1=0;
      m2=0;
      m3=0;
    }
    break;
  }

  // Aggiorno le velocità dei motori
  OnFwd(OUT_A, m1);
  OnFwd(OUT_B, m2);
  OnFwd(OUT_C, m3);
}

Result

In this video we show the movements that the robot can do using our omnidirectional wheels. In this case we were remote controlling the robot via bluetooth using an Android app.


CONTACTS

At the moment we don't have an office,
we are often between Padua and Vicenza.
If you need to meet us, contact us
and we will organize it.

We usually reply quickly, if you don't
get any answer just resend the email
or try another method.
Info@VicenzaThunders.com

Attention: if you need to call us,
we suggest you to send us an email or an
SMS first because we aren't always available.
You can also use Whatsapp if you want.
+393484808073
+393494548359

You can find us on many social networks,
when we have free time we like to share
our works and experiences!