Robot Development - Part #1

I've started a robotics project. My plan is to build a small robot with QR codes for augmented reality. The robot will be a wheeled rover with fixed wheels. The augmented reality software will take footage of the robot, identify the QR codes on its chassis, and then orient and place a 3D model in the footage based on the QR code positions.

I've written a circuit diagram. Each section corresponds to a single motor or light. Diodes protect the transistors from motor back EMF; they sink back EMF through an open loop. I skimped on diodes for the LEDs. There are only two control pins for the four motors. I'm saving pins for wireless control; the wireless device I have in mind needs SPI. The left and right rovers will have to move at the same speed. I'm not sure if I can control multiple transistors with one ADC pin.

the_schematic_needs_work.png

The parts list:

Attentive readers will recognize this parts list as a scaled up version of existing Arduino tutorials. I didn't include the LEDs and their resistors. I'll just fish them out of my spare box.

Development of the basic rover has already started. I'm using an Arudino for the brain and DC motors to control the wheels. The motors are controlled with ADC pins and transistors. I hooked up the Arduino and wrote some basic software.

resize_bread1.jpg

const in RIGHT_MOTOR_PIN = 10;
const int LEFT_MOTOR_PIN = 11;

int clamp(int min_bound, int value, int max_bound) {
  return max(min(value, max_bound), min_bound);
}

void set_right_motor(float percent) {
  analogWrite(
    RIGHT_MOTOR_PIN,
    clamp(0, int(percent * 255), 255)
  );
}

void set_left_motor(float percent) {
  analogWrite(
    LEFT_MOTOR_PIN,
    clamp(0, int(percent * 255), 255)
  );
}

void setup() {
  pinMode(RIGHT_MOTOR_PIN, OUTPUT);
  pinMode(LEFT_MOTOR_PIN, OUTPUT);
  set_left_motor(0.5);
  set_right_motor(0.5);
}

void loop() {}

Once the initial test is done, I'd like to make several major improvements:

Finally, I need to learn about augmented reality. Right now, I know nothing. I might be able to copy a Sherman model I have lying around.

resize_tank1.jpg