Project tutorial
Pluto Bluetooth RC Car

Pluto Bluetooth RC Car © LGPL

Pluto is a 2WD Bluetooth car on which is placed a self-balancing plane.

  • 2,114 views
  • 2 comments
  • 9 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)
Hy gluegun
Hot glue gun (generic)
21j8631 40
Soldering Station, 110 V

Apps and online services

About this project


Pluto is a project about a particular Bluetooth machine.

This car can be controlled by a mobile phone, connecting the car on the Bluetooth we have used the app Arduino Bluetooth Controller which can be found on the Play Store.

On it are installed a self-balancing platform composed of two floors connected to two servo motors, which keep the horizontal plane, by means of an accelerometer, which calculates the angle and sends the same values to the servomotors, but opposite.

We decided to do this project for two reasons: 1. have a child play; 2. to be able to bring a glass to a person without emptying it if there are ramps.

The operation is simple: sending a Bluetooth signal from the phone the arduino card detects it and makes the machine move left, right, forward, backward or stand still based on what we want it to do to it.

For the self-balancing plane it stabilizes independently thanks to the two servo motors, the accelerometer and the gyroscope (MPU6050).


Code

Pluto car codeArduino
is usefull for the operation of the car
char t;
#include <Wire.h>          //include the required libraries
#include <MPU6050.h>       //include MPU6050 libraries
#include <Servo.h>
MPU6050 sensor ;          //create an instance of the MPU6050 named sensor
Servo sg90y;
Servo sg90x;
int servo_pinX = 2;
int servo_pinY = 3;
int motor1A = 4;
int motor1B = 5;
int motor2A = 6;
int motor2B = 7;

int16_t ax, ay, az ;      //declare 6 16 bit integer variables
int16_t gx, gy, gz ;      //declare 6 16 bit integer variables

void setup() {
  pinMode(servo_pinX, OUTPUT);
  pinMode(servo_pinY, OUTPUT);
  pinMode(motor1A, OUTPUT);
  pinMode(motor1B, OUTPUT);
  pinMode(motor2A, OUTPUT);
  pinMode(motor2B, OUTPUT);
  pinMode(A5, INPUT);
  pinMode(A4, INPUT);
  sg90x.attach ( servo_pinX );
  sg90y.attach ( servo_pinY );
  Wire.begin ( );                  //begins the trasmission with MPU6050
  sensor.initialize ( );           //initialise the sensor
  Serial.begin(9600);
  delay(400);
}
void forward() {
  digitalWrite(motor1A, LOW);
  digitalWrite(motor1B, HIGH);
  digitalWrite(motor2A, LOW);
  digitalWrite(motor2B, HIGH);
}

void reverse() {
  digitalWrite(motor1A, HIGH);
  digitalWrite(motor1B, LOW);
  digitalWrite(motor2B, LOW);
  digitalWrite(motor2A, HIGH);
}
void right() {
  digitalWrite(motor1B, HIGH);
  digitalWrite(motor1A, LOW);
  digitalWrite(motor2B, LOW);
  digitalWrite(motor2A, HIGH);
}
void left() {
  digitalWrite(motor1B, LOW);
  digitalWrite(motor1A, HIGH);
  digitalWrite(motor2B, HIGH);
  digitalWrite(motor2A, LOW);
}
void nomove() {
  digitalWrite(motor1B, LOW);
  digitalWrite(motor1A, LOW);
  digitalWrite(motor2B, LOW);
  digitalWrite(motor2A, LOW);
}
void loop() {
  sensor.getMotion6 (&ax, &ay, &az, &gx, &gy, &gz);   //read 6 values into 6 variables
  ay = map (ay, -17000, 17000, 0, 180) ;              // change the range of the ay value from -17000/17000 to 0/180
  sg90y.write (ay);
  ax = map (ax, -17000, 17000, 0, 180) ;              // change the range of the ax value from -17000/17000 to 0/180
  sg90x.write (ax);
  if (Serial.available()) {

    t = Serial.read();
    Serial.println(t);                               //Read the incoming data and store it into variable t
    if (t == 'F') {
      forward();
    }
    else if (t == 'B') {
      reverse();
    }
    else if (t == 'L') {
      left();
    }
    else if (t == 'R') {
      right();
    }

    else if (t == 'S') {
      nomove();
    }
  }
}

Custom parts and enclosures

Plan A
external plane
Plan B
Internal Plane

Schematics

Elettrical connections.
Mpu 6050 board gy 521 acelerometro giroscopio bb qphn62blho

Comments

Similar projects you might like

Turn your RC Car to Bluetooth RC car

Project tutorial by Prajjwal Nag

  • 21,243 views
  • 2 comments
  • 25 respects

Arduino Bluetooth Robot for Android Device

Project showcase by aip06

  • 4,608 views
  • 2 comments
  • 19 respects

Bluetooth Control RC Car

Project tutorial by Techatronic

  • 3,814 views
  • 2 comments
  • 16 respects

Arduino Bluetooth RC Car

Project tutorial by ardumotive

  • 4,334 views
  • 1 comment
  • 15 respects

Arduino RC Car with I2C Display!

Project showcase by DABOD

  • 1,695 views
  • 0 comments
  • 6 respects

Bluetooth RC Car with Remote Arduino

Project tutorial by Team Windows IoT

  • 45,422 views
  • 4 comments
  • 81 respects
Add projectSign up / Login