Introduction: Remote Controlled Battle Car!

The intention of this Project is to build a battle car, with

weapons capable to destroy the balloons of our enemies. All this work with a Smartphone, by Bluetooth, with an interface made by us.

Step 1: Gather Your Materials.

Materials

Arduino UNO

4 DC motors with a wheel

3 Servomotors

4 wheels

MDF wood

Batteries

Bluetooth

Adafruit Motor Shield v2.0

2 lithium batteries of 7.2V 3000mA (recommended)

Tools

Laser Cutter

Jumpers

Step 2: Chassis Design

The chassis of our car was made in NX, also known like

Siemens NX. It is a CAD/CAM/CAE software, it counts with a parametric modeling.

Step 3: Cut the Chassis

After of modeling, we should use laser cutter. Cutting MDF

we will get the structure that we design.

An MDF board is an agglomerate made with Wood Fibers Agglutinated with synthetic resins. It is very resistant and very cheap.

The car was design to not fill all the area so this allow us put weapons outside of the car. Car will be compact and faster.

Step 4: Assembly

We made the rest of the car with legos because is simple and

it is not heavy. The top of the chassis has the weapon. In the bottom, we made a cube just because with this our weapons can be higher. We put knives in two servos making it spin like helicopter blades.

Step 5: Electronics

If you don’t know transistors at all, they are 3 lead components that have 2 simple functions, to switch or amplify (in this example it is setup as a switch). You basically have an in called the Collector, an Out called the Emitter, and a Control called the Base. When you send a HIGH signal to the base (control pin), the transistor switches and allows current to flow from the collector (in) to the emitter (out).

So we connect it so that our motor, solenoid or light is connected to V+ but not ground (V-). Ground is connected to the transistor’s collector. When our arduino sends a HIGH signal to the transistor’s base, it switches the transistor (connecting the collector and emitter) and completes the circuit for the motor, solenoid, or light.

This circuit is simple. This type of transistor is switched
by current and not voltage, so we need to make sure to supply the correct current to the base to switch it, so a resistor is connected from the Arduino to the base to limit the current to the proper amount.

You can see, there is a diode parallel to the device we are powering. Any time you are powering a device with a motor, you need this. What happens is when you stop powering the coil, a reverse voltage, up to several hundred volts, spikes back. This only lasts a few microseconds, but it is enough to kill our transistor. So this diode (only allows current to pass one way) is normally facing the wrong direction and does nothing. But when that voltage spikes comes flowing the opposite direction, the diode allows it to flow back to the coil and not the transistor.

Step 6: Programming

We made a program to control the movements of the car, go

forward, go back, go right, go left and stop.

It is very simple to understand, but if you don’t have experience in arduino it can be confused. We will show you the code of the program in the next page.

#include Wire.h>

#include Servo.h>

#include Adafruit_MotorShield.h>

#include SoftwareSerial.h>

#include utility/Adafruit_PWMServoDriver.h"

Adafruit_MotorShield AFMS = Adafruit_MotorShield(); //Creamos un objeto tipo Adafruit_MotorShield

Adafruit_DCMotor *myMotor1 = AFMS.getMotor(1);

Adafruit_DCMotor *myMotor2 = AFMS.getMotor(2);

Adafruit_DCMotor *myMotor3 = AFMS.getMotor(3);

Adafruit_DCMotor *myMotor4 = AFMS.getMotor(4);

char bluet;

SoftwareSerial blue(11, 12); // RX, TX

Servo servo1;

int motores=8;

void setup() {

Serial.begin(9600);

AFMS.begin(9600);

blue.begin(9600);

myMotor1->setSpeed(255);

myMotor2->setSpeed(255);

myMotor3->setSpeed(255);

myMotor4->setSpeed(255);

servo1.attach(6);

servo1.write(90);

pinMode(motores, OUTPUT);

}

void loop() {

while(blue.available())

{ bluet = blue.read();}

switch (bluet) {

case 'f': // Forward

myMotor1->run(BACKWARD);

myMotor2->run(BACKWARD);

myMotor3->run(FORWARD);

myMotor4->run(FORWARD);

break;

case 'b' : // Backward

myMotor1->run(FORWARD);

myMotor2->run(FORWARD);

myMotor3->run(BACKWARD);

myMotor4->run(BACKWARD);

break;

case 'l': // Left

myMotor1->run(FORWARD);

myMotor2->run(FORWARD);

myMotor3->run(FORWARD);

myMotor4->run(FORWARD);

break;

case 'r': // Right

myMotor1->run(BACKWARD);

myMotor2->run(BACKWARD);

myMotor3->run(BACKWARD);

myMotor4->run(BACKWARD);

break;

case 's': // Stop

myMotor1->run(RELEASE);

myMotor2->run(RELEASE);

myMotor3->run(RELEASE);

myMotor4->run(RELEASE);

break;

case 'o': // on

digitalWrite(motores, HIGH);

break;

case 'p': // off

digitalWrite(motores, LOW);

break;

case 'q': // left

servo1.write(120);

break;

case 't': // center

servo1.write(90);

break;

case 'u': // center

servo1.write(40);

break;

}

}

Step 7: MIT App Inventor

To be able to control the car from our Smartphone, we use the Bluetooth module for the Arduino. We can create an app for smartphones using MIT App Inventor.

First we had to create some buttons that will appear in our smartphone. We must put every single action that we want the car do.

After, we must program every button. It is very simple; you
just must select the action when the button is pressed. In this case we will send letters by Bluetooth because with this letters the Arduino will execute some actions.

Step 8: Have Fun!

Finally, the kart end up as its shown on the upper photo, 2

motors spinning 2 blades each one, and a servo making turns so it could have a larger range.

Comments

author
Swansong (author)2016-11-22

Great instructable, thanks for sharing :)

About This Instructable

2,588views

31favorites

More by Jppp11:Remote Controlled Battle Car!
Add instructable to: