Ratazana drifting

I´ve been quite busy with the motor of this robot and I already started to have some of the results I wanted, but I still couldn´t find a stable setup, after a couple of drifts it starts to lose power as you can see by the end of the movie.

Besides this, I like the way it moves, and I can have some control when it´s drifting, it is now my anti-stress toy!!! :)

I have also made some major updates to the arduino circuit board. As you can see in the photo below, I finally have figured out how to upload code to a custom arduino board, (this post describes everything related to this), added capacitors to the L293D, added pins for the ladyada xbee adapter and also added pins for the sonar sensor.
To upload code, I have to add a switch button, to change the rx / tx wires from the xbee to the ftdi cable :)

The power button connects to the white bit at the left of the power connector

I added this male connectors so that I don´t have to remove the circuit when uploading

This is how it looks now :)

Ratazana update

This post is a full description of all the building process, the main idea started with the ratbot, and then I found out that I could follow the same concept with a different approach :)

Click the button to read more:

I used this little and cheap car toy, two caster wheels and a plastic tube to build this bot.

I used polymorph to create an inner support to the servo, this way the servo will have an horizontal position which is necessary for this robot.

More side supports were added with polymorph and wood. I guess the servo won´t go anywhere now :)

This is the Arduino based circuit, I´ve assembled all the components on a perfboard. From left to right you see the XBee with 3.3v voltage regulator, L293D motor driver, 5v regulator, Arduino chip, and power connector.

This is the back side of the circuit, a friend told me I was better with wire wrapping technique than his college teacher  :)

The circuit fits neatly inside the case

A rat without a tail it is not a rat at all :)  ..it was made with polymorph, I consider this material to be the best that I have.

I mounted a micro-servo to hold a little sonar (SFR10). Later I will make this bot autonomous

And this is the final look, for now it will be remote controlled by the G-Remote (Arduino Based Remote Control)

I´ve had several issues with this bot, first the direction was unbalanced, it was always turning to one side and was impossible to control, then the motor gears started to have some missaligment and the motor seemed to spin and to go out of grip with the gears, I tried to solve it but the issue still remains, everytime this happens I have to tweak the chassis, press the motor, and it goes ok for a couple of minutes and then it happens again. I feel that the robot could be a lot faster and more powerful, I will do my best to solve this, If I have success I will create another post with a full description of the workaround  :-)

G’Remote – Arduino based remote controller

27-August-2009 UPDATE:
My friend Gerhard from Germany asked me to build a walkthrough regarding the G-Remote, with part list, schematics and code. And here it is.  Enjoy  :D

___________________________________________________________________________

This is my first attempt to make a custom remote controller, and also my first customized Arduino.
After seeing this post made by OddBot I wanted to try to make one myself.

I figured out that if I purchased one remote controller it would be cheaper than buying two of these and paying shipment to Portugal.

So, ripping the guts from a game remote controller I get two joysticks, a couple of buttons, two nice motors and one small lcd.

Each joystick have one button inside, that is cool  :-)

Now I have more control over my bots, specially the ones with two motors.. will post videos later.

no comments on this one :-)

Tankah – remote controlled tank

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…

bigbro

After completing the new motor driver board, now I feel ready to continue with the development of this bot..

For now it´s just remote controlled, but it will have some intelligence soon.
I will try to add microphones and use them as sound sensors. If I add for example 4 microphones, one on each side of the bot I could detect where does the sound come from and make it move in that direction, then add a couple of distance sensors to avoid obstacles..

My living room seems to be too small to drive this bot..

see it on MAKE :]

Farrusco RC

I wanted to keep working with the XBee modules, and I thought it would be cool to control Farrusco.

So, first I used 2 potenciometers and assigned one to each motor.. and then I used a nunchuck controller.
Both require a learning curve and it’s only after a while that you start to feel the touch  :]

This is the code I´m using to control the robot with the Nunchuck


Serial Comunication between Arduinos – With Wire & Wireless

— please check an updated code sample on the following post —
http://lab.guilhermemartins.net/2013/08/01/new-basic-arduino-serial-communication/

 

I´ve created this example to make two Arduinos talk in a simple and clear fashion.
You will see below an example with wires, and another one without wires.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Setup with TX and RX pins connected by wire:

On the sender Arduino there is a potenciometer, the values are read and sent through the serial port.
On the receiver Arduino one Led intensity will change accordingly the pot value.

Tx on Arduino#1 -> connect to ->  Rx  on Arduino#2
Rx on Arduino#1 -> connect to ->  Tx on Arduino#2

NOTE:
Don´t forget to disconnect Tx / Rx wires before upload

// SENDER

int analogValue5, val5;

void setup() {
// Serial port enable
Serial.begin(19200);
}

void loop() {
// read analog pin 5
analogValue5 = analogRead(5);

// remap values from the analogValue5 variable to 0 / 255
val5 = map(analogValue5, 0, 1023, 0, 255);

// send the value to the serial port
Serial.println(val5, BYTE);

}

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

// RECIEVER

byte incomingByte;

void setup() {
// Serial port enable
Serial.begin(19200);

// declare pin 11 as output, this is the LED
pinMode (11, OUTPUT);
}

void loop() {

// if there is bytes available coming from the serial port
if (Serial.available()) {

// set the values to the ‘incomingByte’ variable
incomingByte = Serial.read();

// write the value to the pin 11
analogWrite(11, int(incomingByte));

}
}


– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Wireless setup with XBee modules:

Recently I got two XBee modules, and here is the setup to make them talk to each other:
As a start I used 2 potenciometers to control the intensity of two LEDs and It works pretty well.  :]

I´m using this adapters to connect the XBee to the circuit. They are very simple to assemble and to use.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

// SENDER

int analogValue2, analogValue5, val2, val5;

void setup()
{
// start serial port at 19200 bps
Serial.begin(19200);
}

void loop()
{
// read analog input
analogValue2 = analogRead(2);
analogValue5 = analogRead(5);

// remap values

val2 = map(analogValue2, 0, 1023, 253, 0);  // 254 and 255 for SYNC
val5 = map(analogValue5, 0, 1023, 253, 0);

Serial.print(254, BYTE); //SYNC char
Serial.print(val2, BYTE);

Serial.print(255, BYTE); //SYNC char
Serial.print(val5, BYTE);

delay(150);
}

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

// RECIEVER

byte incomingByte, sensor1, sensor2;

void setup() {

// start serial port at 19200 bps
Serial.begin(19200);
Serial.println(“Ready!”);

// led pins

pinMode (5, OUTPUT);
pinMode (6, OUTPUT);

delay(1000);

}

void loop() {
if (Serial.available()) {   // are there any bytes available on the serial port ???

// assign bytes to the var ‘incomingByte’
incomingByte = Serial.read();

Serial.print(int(incomingByte));

// from now on is pretty clear I guess   :)

if ((int(incomingByte) == 254)) {
sensor1 = Serial.read();
Serial.print(“Sensor 1 = “);
Serial.print(int(sensor1));
}

if ((int(incomingByte) == 255)) {
sensor2 = Serial.read();
Serial.print(“  Sensor 2 = “);
Serial.print(int(sensor2));
}
}

analogWrite (5, sensor1);
analogWrite (6, sensor2);
}