Bluetooth Controlled Soccer Robot using Arduino

Introduction

In this blog post, Get ready to join us on an exciting journey into the captivating world of robotics, as we explore the creation of a Bluetooth “HC05” Controlled Soccer Robot using Arduino Uno /Any. Adding to the excitement is the utilization of a 3D printed body, enabling us to unleash our creativity and individuality. By merging Arduino, Bluetooth technology, and 3D printing, we can fashion a versatile and interactive robot for thrilling soccer matches. Without wasting any time, let’s jump right into the thrilling adventure of constructing our very own Bluetooth Controlled Soccer Robot with a remarkable 3D printed body!

Components Required

1Arduino Board (e.g., Arduino Uno)
2HC-05 Bluetooth Module
3Motor Driver (e.g., L298N)
4Robot Chassis (3D Printed)
5Wheels and Motors
6Power Supply (e.g., 9V battery or DC power adapter)
7Jumper Wires (Male-to-Male, Male-to-Female, Female-to-Female)
8Breadboard (optional, for prototyping and testing)

Ensure that you have the necessary quantities of each component based on the specific requirements of your robot design.

Additionally, for the 3D printed body, you will require:

1Filament for 3D Printing (type and color of your choice)
23D Printer
3Slicing Software (such as Cura or PrusaSlicer)

Making Video

Circuit Diagram

This kit is designed to enjoy soccer without ever stepping foot on the field. The kit uses Bluetooth wireless communication. The soccer robot kit has a motor driver that can be controlled from a distance of 10 m in an open space. The kit is easy to use which makes it ideal for kids above the age of 10 years.

Bluetooth Controlled Soccer Robot using Arduino
Bluetooth Controlled Soccer Robot circuit

Bluetooth Module pins

1VCC: This pin is used to supply power to the HC-05 module. It typically operates at 3.3V, but some modules may support a wider voltage range. Make sure to provide the appropriate voltage based on the specifications of your module.
2GND: The GND pin is the ground connection for the HC-05 module. It should be connected to the ground (GND) of your power supply and the microcontroller to establish a common ground reference.
3TXD: The TXD (transmit data) pin is used to send data from the HC-05 module. It transmits data to the receiving device or microcontroller. Connect this pin to the RX (receive) pin of the device you are communicating with.
4RXD: The RXD (receive data) pin is used to receive data into the HC-05 module. It receives data from the transmitting device or microcontroller. Connect this pin to the TX (transmit) pin of the device you are communicating with.
5STATE: The STATE pin is an optional pin available on some HC-05 modules. It provides information about the current mode of the module, such as whether it is in the AT command mode or data mode. You can use this pin to monitor the module’s status, but it is not necessary for basic communication.
6KEY/EN: The KEY or EN (Enable) pin is another optional pin found on some HC-05 modules. It is used to enter the AT command mode when pulled HIGH (typically connected to VCC) or to enter the data mode when pulled LOW (typically connected to GND).

Arduino Code

int IN1 = 10;
int IN2 = 9;
int IN3 = 6;
int IN4 = 5;

char val;

void setup()
{
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);

  Serial.begin(9600); // Check your Bluetooth Baud Rate ** Change it if it's not the same **
}

void loop()
{
  while (Serial.available() > 0)
  {
    val = Serial.read();
    Serial.println(val);
  }

  if ( val == 'F') // Set this LETTER (FFFF) in your smart phone to move forward 
  {
    digitalWrite(IN1, HIGH);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'B') // Backward
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, HIGH);
  }

  else if (val == 'L') //Left
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'R') //Right
  {
    digitalWrite(IN1, HIGH);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
  }

  else if (val == 'S') //Stop
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'I') //Forward Right
  {
    digitalWrite(IN1, HIGH);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'J') //Backward Right
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, HIGH);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'G') //Forward Left
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, HIGH);
    digitalWrite(IN4, LOW);
  }
  else if (val == 'H') //Backward Left
  {
    digitalWrite(IN1, LOW);
    digitalWrite(IN2, LOW);
    digitalWrite(IN3, LOW);
    digitalWrite(IN4, HIGH);
  }
}

STL File for 3D Printing

STL (STereoLithography) is a special file format used in 3D printing. It helps printers create 3D objects by using a mesh made up of connected triangles. These triangles describe the shape and size of the object. STL files are made using special software, and they hold all the instructions the printer needs to bring the model to life. They are super popular because they let people easily share and make copies of their cool 3D designs for all kinds of fun things!