Bobot

Robots I have known (or made)
  • ~MANUALS~
  • STORE BOUGHT
    • Femisapien
    • i-Cybie
    • i-SOBOT
    • Joebot
    • Mr Personality
    • Ottobot
    • R2D2
    • Robopet
    • Roboquad
    • Roboraptor
    • Roboreptile
    • Roborover
    • Robosapien
    • Spykee
    • Tekno Cat
    • Hexbug
    • Roomba
    • Anarduino
    • AnaFTDI
  • KIT ROBOTS
    • 3pi
    • EDGE Arm
    • Rhino Beetle
    • Yellow Thing
    • Sumovore
    • JeeNode
  • SENSORS AND DRIVERS
    • Arduino, et al
    • PIR Motion Sensor
    • Adafruit Mshield
    • Solarbotics Driver
    • SRF05 Ultrasound
    • LDR Sensor
    • Infrared Sensor
  • SELF MADE
    • MyBot
    • Barbie
    • Tank
    • Dune Buggy
    • Armed Patrol
    • MeterBot
    • MyMote
    • Robosapien Hack
    • BlackBox
    • Robautonomous
    • Eew Shield
    • Buttercup
    • Little Blue Tank
    • 4 Motor Controller
    • New 4 Motor Controller
  • EXPERIENCES
    • 0 Defects Desired
    • A New Robot
    • Sparkfun
    • Adafruit
    • NKC Electronics
    • Hobbytron
    • Modern Device
  • HOME PAGE

Dune Buggy

I built the Dune Buggy while in a motel in Seattle. I was there as a guest of the VA; I’d been sent there for anti-cancer radiation treatments. The treatments only took 15 minutes a day, leaving me with a lot of time to fill. Dune Buggy is the result of me with too much time on my hands.

It’s a simple and straightforward robot and shares similarities with “MyBot,” my first robot. The chassis is built up from a Tamiya dual DC motor and gearbox pair. They are bolted to a chunk of thin steel plate I robbed from an Erector Set. Actually, I got a few parts from the Erector Set. The front axle is a buildup of those pieces. I’m using Tamiya off-road tires and wheels since they push fit right onto the axles. No muss, no fuss. The unit has no actual steering. It takes advantage of the separate motors and gear boxes to run the wheels together to move, or opposed to make the robot pivot. Ergo it isn’t exactly a sports car in its handling, but it gets around. Over the top of the car is a roll bar upon which I mounted a Sharp IR long range distance sensor.

When the IR sensor spots an obstacle within a certain distance, it backs up, pivots, and takes off again. It uses an Arduino as its micro controller and I drive the twin Tamiya motors with a two motor dual H-bridge shield from NKC Electronics. I got the Tamiya stuff from the RobotShop. I power it with a six-cell AA battery tray putting out 9v and I drive the Arduino with a regular 9v battery. I could have powered them both from the same source, but I wanted to have the Arduino functional when the motors weren’t, and having separate supplies was the easy way to do that.

As I do with many shields for Arduino, I replaced the male header pins with female headers with long legs. That allows me to get to all of the Arduino pins from the shield, and connect to them without soldering. The more you can put into a socket rather than solder, the easier it is to repair and replace things as you maintain or customize the robot in the future.

The sketch that run it is easy stuff too. Nothing very complicated.

// Dune Buggy robot

// April 2010

// IR code from luckylarry.co.uk

#define forward 0
#define backward 1

#define lMotor 12          //left motor direction pin (digital)
#define rMotor 13         //right motor direction pin (digital)
#define lspeedpin 9      //left motor speed pin (digital PWM)
#define rspeedpin 10   //right motor speed pin (digital PWM)
#define IRpin 0              //infrared sensor pin (analog)

float distance = 0;  // create ir distance var
float volts = 0;         // create ir voltage var
int x = 0;

void setup() {
Serial.begin(9600);  // start up serial at 9600 baud
pinMode(IRpin, INPUT);   // Set up the IR sensor on Analog 5
pinMode(lMotor, OUTPUT); // set up the left motor output pin
pinMode(rMotor, OUTPUT);  // set up the right motor output pin
goForward();
}

int goForward() {
digitalWrite(lMotor, forward); // left motor forward
digitalWrite(lspeedpin, 200);   // full speed
digitalWrite(rMotor, forward);  // right motor forward
digitalWrite(rspeedpin, 200);   // full speed
}

int goBackward() {
digitalWrite(lMotor, backward); // left motor forward
digitalWrite(lspeedpin, 200);   // full speed
digitalWrite(rMotor, backward);  // right motor forward
digitalWrite(rspeedpin, 200);   // full speed
}

int Pivot() {
digitalWrite(lMotor, backward); // left motor forward
digitalWrite(lspeedpin, 200);   // full speed
digitalWrite(rMotor, forward);  // right motor forward
digitalWrite(rspeedpin, 255);   // full speed
}

int Scan() {
volts = analogRead(IRpin)*0.0048828125; // read the voltage
distance = 65*pow(volts, -1.10);                  // from the IR sensor
x = distance;
return(x);
}

void loop() {
goForward();
delay(2000);  //two seconds
Scan();       //take a look
Serial.println(x);   //what did it say?
if (x < 40) {
Serial.println(“backup”);
goBackward();       //back up
delay(2000);
Serial.println(“pivot”);
Pivot();            //pivot in place
delay(3500);
Serial.println(“resume”);
}
}

Comment ¬
Cancel reply

  • Pages

    • EXPERIENCES
      • 0 Defects Desired
      • A New Robot
      • Adafruit
      • Hobbytron
      • Modern Device
      • NKC Electronics
      • Sparkfun
    • HOME PAGE
    • KIT ROBOTS
      • 3pi
      • EDGE Arm
      • JeeNode
      • Rhino Beetle
      • Sumovore
      • Yellow Thing
    • SELF MADE
      • 4 Motor Controller
      • Armed Patrol
      • Barbie
      • BlackBox
      • Buttercup
      • Dune Buggy
      • Eew Shield
      • Little Blue Tank
      • MeterBot
      • MyBot
      • MyMote
      • New 4 Motor Controller
      • Robautonomous
      • Robosapien Hack
      • Tank
    • SENSORS AND DRIVERS
      • Adafruit Mshield
      • Arduino, et al
      • Infrared Sensor
      • LDR Sensor
      • PIR Motion Sensor
      • Solarbotics Driver
      • SRF05 Ultrasound
    • STORE BOUGHT
      • AnaFTDI
      • Anarduino
      • Femisapien
      • Hexbug
      • i-Cybie
      • i-SOBOT
      • Joebot
      • Mr Personality
      • Ottobot
      • R2D2
      • Robopet
      • Roboquad
      • Roboraptor
      • Roboreptile
      • Roborover
      • Robosapien
      • Roomba
      • Spykee
      • Tekno Cat
    • ~MANUALS~
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Powered by WordPress with CommPress - Subscribe: RSS - Back to Top ↑