Dumb Little Tank
When followed correctly this protocol will show you a way how to make a sturdy, fast and long lasting little remote controlled car. This is probably a way too overcomplicated way to create such a thing yet it is still a way I would have liked to show people.
Basically it is remote controlled with an IR remote combined with an IR remote transceiver. It uses a motor driver to control the motors and servo motors to control the direction. I have used an aluminium plate as the outside of the box, because of how light and sturdiness aluminium is in general.
Furthermore I have used an Arduino Mega 2560 instead of the normal Arduino Uno, because of the extra pins the Arduino Mega provides.
Because I have not made any pictures of my project I proceeded to (try) and recreate it in Microsoft Paint.
Note. This "tank" is not finished since i do not have the needed code for it.
Little Unbreakable Tank
For this dumb little box on wheels you would need a surprisingly lot of items:
- An aluminium plate being at least 1000 mm * 300 mm
- 4 servomotors
- 4 normal motors
- 4 wheels that can be connected to the normal motors
- Arduino Mega (2560)
- 2 motor drivers
- Breadboard
- ton of cables
- IR remote transceiver and transmitter
- Source of electricity (most likely 2x 5 - 9 V batteries with lots of Amps)
- Minimum of 12 corner braces
- lots of screws
- Hinge (door of the box)
- Equipment
- Hammer
- Screwdriver
- Drill
- Saw (preferably a grinder)
- Tape measurer
- Marker
- Soldering iron & soldering wire (with oil)
- Glue gun & glue sticks (optional)
- Small piece of non-conductive material, thin and as big as the Arduino
And that's about it. I know that there is a specific section for supplies, but I realised that too late so, sue me.
The Box - Start
First you start by taking your aluminium plate. You will have to take your marker, and draw a line after 210mm, 260mm, 470mm and 520mm. when done correctly you will have something that looks like figure 1 in the upper image. After that you must proceed to draw another line, at 570mm that goes exactly 210mm upwards. In other words cut out another 5cm plate of 210 cm high.
The Box - Putting Together
Now that you have 6 rectangles, you must put them together to create a box, what you could've probably guessed. Remember the corner braces I mentioned earlier? Now its the time to use them.
Everywhere where a red line has been drawn, must a corner brace be located. In total you would need at least 12 corner braces to have the same box as seen in the image.
When put together you must drill holes in the corner braces, so that you could screw in the screws. After which you would be presented with a sturdy, aluminium box.
The Box - Doorway
Now that you have an beauty of a box, you must find a way to make a door. I thought of simply cutting out a rectangle off the top of the box and connecting that rectangle to a hinge which I screwed to the box.
After which i made a little lock/unlock system by adding a little bit of aluminium to the top side of the box (as seen in the picture). One part of this piece was screwed to the main-box and the other part was not. This made it so that you could close the box by simply rotating that little piece.
And there you go, your own little door for your box.
The Box - Bottom
Wow, you have made a box. What now?
Now you will make a start about the actual car part. In the upper picture you will see the bottom part of the box. In the corners of the box you will have to either glue or screw servomotors. After making them sturdy and stuck to the box you must make some holes at the bottom, in which the cables of the (servo)motors will go through.
After connecting the servomotors, you must bind the normal motors to the servomotors, which can be done by either glueing or screwing. After they are stuck together you could connect the wheels to the normal motors and once again get the cables of the motors through the hole inside your box.
The Box - Inside
The outer side of the box is done, no more adaptions to that.
Now we are gonna work on the inside. This actually depends per person. You just have to either once again glue or screw your Arduino mega 2560 (which is not allowed to touch the aluminium box, since it is conductive. that's why you needed a non-conductive material beneath the Arduino.), breadboard, batteries and motor drivers to your box in the way you would like it and that's that.
The Arduino - Code
Almost every physical thing is done, now we will proceed with the coding and putting together the cables.
In the picture above you can see how it almost would've looked liked (The website didn't had any motor drivers which are part of the circuit, in other words it is incomplete).
Now that you have an idea of how the circuit looks, i will show you how the code would look like.
actually, i will not. i will just show you what i tried in the course of making this project.
This only made me be able to turn some of the servomotors with the remote controller. The rest was simply too confusing for me since i have almost no knowledge of the arduinos coding language.:
/*Code belongs to this video
writen by Moz for YouTube changel logmaker360. 13-04-2016
code works on a car mp3 remote controller */
#include <Servo.h>
Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
#include int RECV_PIN = 6; int motor11 = 22; int motor12 = 24;
IRrecv irrecv(RECV_PIN); decode_results results;
void setup() { // initialize the digital pin as an output. pinMode(RECV_PIN, INPUT); pinMode(BLUE_LED, OUTPUT); pinMode(RED_LED, OUTPUT); irrecv.enableIRIn(); // Start the receiver Serial.begin(9600); myservo.attach(11); } void loop() { int i = 0; myservo.write(pos); Serial.println(pos); if (irrecv.decode(&results)) { translateIR(); // unknownRemoter(); irrecv.resume(); // Receive the next value } } // attaches the servo on pin 9 to the servo object
void translateIR() // takes action based on IR code received describing Car MP3 IR codes {
switch (results.value) { case 0xFFA25D: Serial.println(" CH- "); break; case 0xFF629D: Serial.println(" CH "); break; case 0xFFE21D: Serial.println(" CH+ "); break; case 0xFF22DD: Serial.println(" blue LED off "); while (pos < 180) { pos += 1; } break; case 0xFF02FD: Serial.println(" blue LED on "); while (pos > 0) { pos -= 1; } break; case 0xFFC23D: Serial.println(" PLAY/PAUSE "); break; case 0xFFE01F: Serial.println(" VOL- "); break; case 0xFFA857: Serial.println(" VOL+ "); break; case 0xFF906F: Serial.println(" EQ "); break; case 0xFF6897: Serial.println(" 0 "); break; case 0xFF9867: Serial.println(" 100+ "); break; case 0xFFB04F: Serial.println(" 200+ "); break; case 0xFF30CF: Serial.println(" 1 "); break;
case 0xFF18E7: Serial.println(" 2 "); break;
case 0xFF7A85: Serial.println(" 3 "); break;
case 0xFF10EF: Serial.println(" 4 "); break;
case 0xFF38C7: Serial.println(" 5 "); break;
case 0xFF5AA5: Serial.println(" 6 "); break;
case 0xFF42BD: Serial.println(" 7 "); break;
case 0xFF4AB5: Serial.println(" 8 "); break;
case 0xFF52AD: Serial.println(" 9 "); break;
default: Serial.print(" unknown button "); Serial.println(results.value, HEX);
}
delay(500);
}
Tank - the End
Even though you probably dont have the code for this tank to work, you do in fact have a little sturdy car. if you are able to fix the coding, would you mind to let me know? if you do, you would at least have a pretty cool looking car.
Thanks for reading (and hopefully creating) this,
have a good day.
regards,
Sdk