Since I’ve started messing with robotics that I wanted to build a tank, and finally that moment arrived when two Tamiya thread kits and a Twin Motor Gearbox arrived.
Everything started with a sketch:
And as soon as I decided what I wanted, the assemble process has begun.
I have some plastic sheets laying around and I thought they would be perfect to hold all the hardware.
The chassis:
Meanwhile the replacement motors from Pololu arrived and I soldered the caps to remove motor noise.
The ones that came with the twin gear box are very noisy (electrically speaking)
This is the design in an almost final phase:
Later I replaced the plastic things for wood, and I used polymorph for the first time, it´s the best material I have seen in the last decades.
The brains (Xbee, Arduino and my custom motor driver with L293D):
When all the things got in place it was time for a test drive through some obstacles..
I figured that it needs some kind of stabilizer.. otherwise it won´t climb more difficult obstacles, OR it may flip around… (I think i´m just having an idea for another bot)
and… this was the solution I came up with :D
I placed an “arm” on the back, it stops the tank from flipping over when its climbing stuff.
It works like a charm :-)
It´s a lot of fun to drive this thing!! :-) still editing the video…
nice friend!!!
now you can take a beer without leaving your sofa!;)
oh yeah! :-)
Hi,
I love this little tankbot!
Could you please help me out but letting me use your code??
I just want the basic’s for controlling the twin motors, etc…
I learn from looking and rewriting the code.
Thank you!
Hello friend!
To control two motors you will need an h-bridge circuit, and here´s a sample code:
// – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – VARIABLES
int motorSpeed = 150; // motor speed – from 0 to 255;
// the L293D H-bridge takes two outputs from the Arduino to control each motor.
int motor1_Pin0 = 11;
int motor1_Pin1 = 10;
int motor2_Pin0 = 6;
int motor2_Pin1 = 5;
// – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – SETUP
void setup() {
// set Arduino pins as outputs
pinMode(motor1_Pin0, OUTPUT);
pinMode(motor1_Pin1, OUTPUT);
pinMode(motor2_Pin0, OUTPUT);
pinMode(motor2_Pin1, OUTPUT);
delay(500);
}
// – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – LOOP
void loop() {
// HIGH / LOW
digitalWrite(motor1_Pin0, HIGH);
digitalWrite(motor1_Pin1, LOW);
digitalWrite(motor2_Pin0, HIGH);
digitalWrite(motor2_Pin1, LOW);
delay (1000);
digitalWrite(motor1_Pin0, LOW);
digitalWrite(motor1_Pin1, HIGH);
digitalWrite(motor2_Pin0, LOW);
digitalWrite(motor2_Pin1, HIGH);
delay (1000);
// PWM
analogWrite(motor1_Pin0, motorSpeed);
digitalWrite(motor1_Pin1, LOW);
analogWrite(motor2_Pin0, motorSpeed);
digitalWrite(motor2_Pin1, LOW);
delay (1000);
digitalWrite(motor1_Pin0, LOW);
analogWrite(motor1_Pin1, motorSpeed);
digitalWrite(motor2_Pin0, LOW);
analogWrite(motor2_Pin1, motorSpeed);
delay (1000);
}
Perfect project, so genius!!!
I have 2 questions
First: 1 want to know how the value of the caps
Second: Can you send me the source code
Thank you !
what do you mean by the “value of the caps”? what caps? :)
up you told “I soldered the caps to remove motor noise.”
it’s because, i soldered 3 caps in the motor, but didn’t sold the problem, the motors generates too much noise, and it makes stop the circuit
you understand my problem?
I using other motors, that generates less noise, but don’t have the same power that other motors
thanks
I see!! motor noise is such a pain.. if you are using the tamiya gear box you can replace the motor for a noise clean motor: http://www.pololu.com/catalog/product/1117 – I strongly advice it!!
For the caps value check the second schematic here: http://lab.guilhermemartins.net/2009/01/29/l293d-custom-motor-driver/
If your motors are stopping the circuit they might be draining to much power from your batteries and are doing a cold reset on the MCU.. Try to add a 4700uF cap on the power supply connections, check here: http://letsmakerobots.com/node/18068. I am doing the same here: http://lab.guilhermemartins.net/2010/03/16/motoruino-action/
Hope it helps