Robot Soccer

Robot Soccer © GPL3+

Robot soccer with arduino and controlled with bluetooth.

  • 398 views
  • 15 comments
  • 40 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)
98h3029 30
Tip Tinner/Cleaner, Lead-Free
4966285
Solder Wire, Lead Free
08wx9696 40
Tape, Electrical

Apps and online services

About this project

Manufacture of chassis

Project link on tinkercad:

https://www.tinkercad.com/things/hzhtHj35Tfz

Assembly of the project

1º stage :

  • Fix the engines with gearbox and the freewheel on the main chassis.

2º stage:

  • Attach the secondary chassis over the motors.
  • Weld wire 10 cm. (different color on each engine pole, orange and black used).

3º stage:

  • Add the H bridge module (model L298n).
  • Make connections to each engine.

4º stage :

  • Set Arduino one.
  • Attaching the battery slot.

5º stage :

  • Make the connections of the H bridge module with the Arduino board.
  • Add Bluetooth module HC-05.

Code

Code of Robots SoccerArduino
/*************** PINOS DO BLUETOOTH ***************/
#define tx  3
#define rx  4
#define gnd 5
#define vcc 6
#include<SoftwareSerial.h>
SoftwareSerial bt(rx,tx);
int comando;

/*************** PINOS DA PONTE H ****************/
#define in1 13
#define in2 12
#define in3 11
#define in4 10

void setup() {
bt.begin(9600);
Serial.begin(9600);
pinMode(vcc,OUTPUT);
pinMode(gnd,OUTPUT);
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(in3,OUTPUT);
pinMode(in4,OUTPUT);

digitalWrite(vcc,HIGH);
digitalWrite(gnd,LOW);
}

void loop() {
  if(Serial.available()>0){
   comando = Serial.read(); 
  }
  if(bt.available()>0){
    comando = bt.read(); 
  }
/*************** controlando motor ***************/
      if(comando=='F'){  //FRENTE
        Serial.println("FRENTE");
        digitalWrite(in1,LOW);
        digitalWrite(in2,HIGH);
        digitalWrite(in3,HIGH);
        digitalWrite(in4,LOW);
        }
        
      if(comando=='B'){  //TRAS
        Serial.println("TRAS");
        digitalWrite(in1,HIGH);
        digitalWrite(in2,LOW);
        digitalWrite(in3,LOW);
        digitalWrite(in4,HIGH);  
        }
           
       if(comando=='R'){  //DIREITA
        Serial.println("DIREITA");          
        digitalWrite(in1,HIGH);
        digitalWrite(in2,LOW);
        digitalWrite(in3,HIGH);
        digitalWrite(in4,LOW);
        }
           
       if(comando=='L'){  //ESQUERDA
        Serial.println("ESQUERDA");
        digitalWrite(in1,LOW);
        digitalWrite(in2,HIGH);
        digitalWrite(in3,LOW);
        digitalWrite(in4,HIGH);
        
        }
           
       if(comando=='S'){  //STOP
        digitalWrite(in1,LOW);
        digitalWrite(in2,LOW);
        digitalWrite(in3,LOW);
        digitalWrite(in4,LOW);
        }
}

Schematics

circuit diagram
assembly of all components
Esquematico futebol robo qlmoor1l2q

Comments

Add projectSign up / Login