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

MeterBot

This little guy exists as a courtesy. He makes his binary way to the nooks and crannies of the house in case someone there might need to measure a resistor or check battery voltage.

Like the Dune BuggyBot, he’s made up from a pair of Tamiya dual DC motor and gearbox sets mounted to some Erector Set parts. He uses a pair of SRF05 ultrasonic range finders, mounted back to back. The robot has no front or back; if it encounters an obstacle it merely reverses everything about itself. What were the front sensors shut off and the opposite one turns on, the motors reverse, and it continues to explore its surroundings. Setting the left motor to run slightly slower than the right side motor makes sure that the MeterBot doesn’t just go back and forth in the same place all the time. He swings a slow arc no matter which way it is moving.

The meter it carries is a real multimeter. It’s a Sparkfun kit I picked up from NKC Electronics. After assembling it and deciding it was functional but not necessarily handy, I decided to make it into a robot. So I guess you could say that I hacked this meter into a robot, or you could say I built a robot and hacked it to carry a meter. Personally, I think the hacked meter sounds cooler, but suit yourself.

He uses an Arduino Duemilanove with an Ardumoto  motor shield. It started out with an Adafruit Mshield, but since this bot ties the two motors on each side together, using a 4 motor shield seemed a waste. Plus that, it has no servos. So the 2 motor shield is all it needs and it works great. It does power the motors with the same 5v the Arduino uses, so I’m powering it with 9 volts from six AA batteries and I use a 5v regulator chip on a breakout board to make sure I don’t overamp the L293 chip on the shield or overdrive the 6v motors. I suppose I could have just come up with a 6v supply, but hey, this is what I had.

Here’s the Arduino sketch that makes him go.

// meterbot sketch
// uses a pair of SRF05 Ultra Sonic sensors
// and the Ardumoto motor shield
// it uses multiple LEDs to show status
// Bob Kirkpatrick May 2010 with thenks to LuckyLarry.co.uk
// for IR sensor math.

float pulseTime = 0;
float distance = 0;
float volts = 0;
int range0 = 0;
int range1 = 0;
int ir = 5;
int echoPin1 = 2;  // SRF05 echo pin (digital 2)
int initPin1 = 3;  // SRF05 init pin (digital 3)
int echoPin2 = 4;   // SRF05 echo pin (digital 4)
int initPin2 = 5;  // SRF05 init pin (digital 5)
int blueLed = 6;   // blue LED
int redLed = 7;    // red LED
int greenLed = 8;  // green LED
int yellowLed = 9; // yellow LED
int rightSpd = 10; // Speed pin for motor A is Digital 10 (PWM)
int leftSpd = 11; // Speed pin for motor B is Digital 11 (PWM)
int leftDir = 12; // Direction pin for motor B is Digital 12
int rightDir = 13; // Direction pin for motor A is Digital 13
int violetLed = 14;
int i = 0;
int r0 = 0;

void setup() {
Serial.begin(9600);
pinMode(echoPin1, INPUT);
pinMode(initPin1, OUTPUT);
pinMode(echoPin2, INPUT);
pinMode(initPin2, OUTPUT);
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(blueLed, OUTPUT);
pinMode(yellowLed, OUTPUT);
pinMode(violetLed, OUTPUT);
}

void loop() {
// send the sensor a 10microsecond pulse:
digitalWrite(initPin1, HIGH);
delayMicroseconds(10);
digitalWrite(initPin1, LOW);

// wait for the pulse to return. The pulse
// goes from low to HIGH to low, so we specify

pulseTime = pulseIn(echoPin1, HIGH);
delay(50);
range0 = ((pulseTime/72)/2);

// print out that number
Serial.print(“sonar 1 “);
Serial.println(range0, DEC);

// send the sensor a 10microsecond pulse:
digitalWrite(initPin2, HIGH);
delayMicroseconds(10);
digitalWrite(initPin2, LOW);

// wait for the pulse to return. The pulse
// goes from low to HIGH to low, so we specify
// that we want a HIGH-going pulse below:

pulseTime = pulseIn(echoPin2, HIGH);
delay(50);
range1 = ((pulseTime/72)/2);

// print out that number
Serial.print(“sonar 2 “);
Serial.println(range1, DEC);

if (range0 > range1) {
digitalWrite(blueLed, HIGH);
digitalWrite(redLed, LOW);
digitalWrite(leftDir, 0);
digitalWrite(rightDir, 0);
} else {
digitalWrite(blueLed, LOW);
digitalWrite(redLed, HIGH);
digitalWrite(leftDir, 1);
digitalWrite(rightDir, 1);
}

volts = analogRead(5)*0.0048828125;   // value from sensor

distance = 65*pow(volts, -1.10);
ir = distance/2.4;                  // general sync to sonar
if (ir < 30)   analogWrite(violetLed, HIGH);
Serial.println(ir);
}  // end loop

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 ↑