Category Archives: Robotics

Moved to GitHub

Due to various reasons, not the least of which was a desire to make my code easier to access for those who want to see it, I’ve decided to move my ROS repository from my own server to GitHub.

It can be viewed here: https://github.com/rbtying/Companion-Cube

Read More Leave a Comment

December 1, 2011

Categories:

Robotics

Simple Arduino Robot Control

One of the simplest bits of functionality that is useful for small-scale robotics is the ability to control robots over the serial port, which can easily be made wireless using Pololu Wixels, XBee, bluetooth, or any other wireless serial connection. Since the Arduino Serial Monitor only sends out messages rather slowly, and it’s usually nice to have a fast response from computer to robot, I wrote a short Java application that handles the communication for you.

Download here:

Robot Controller
Source code is released into the public domain, but if you use it, I’d appreciate it if you cite me somewhere (Robert Ying).

You’ll also need to have the appropriate rxtx native library in the same folder as the jar file when running it—you can download that here

Corresponding Arduino Code:

void setup() {
  Serial.begin(115200);
}

// method that sets motor speeds from -255 to 255
// corresponding to full reverse and full forward
void setLeftMotor(int speed);
void setRightMotor(int speed);

byte nextByte() {
  unsigned long start = millis();
  while (millis() - start < 100) {
    if (Serial.available()) {
      return Serial.read();
    }
  }
  return 0x00;
]

void loop() {
  while (Serial.available()) {
    switch(Serial.read()) {
      case 0xC1: setLeftMotor(2 * nextByte()); break;
      case 0xC2: setLeftMotor(-2 * nextByte()); break;
      case 0xC5: setRightMotor(2 * nextByte()); break;
      case 0xC6: setRightMotor(-2 * nextByte()); break;
      default: setLeftMotor(0); setRightMotor(0); break;
    }
  }
}
Read More Leave a Comment

November 30, 2011

Categories:

Robotics, software

A sneak peek…

A sneak peek at upcoming developments:

Read More Leave a Comment

November 19, 2011

Categories:

Robotics

Update: Wheels!

The Companion Cube—with new wheels!

I finished up the wheel replacement today with a pair of Vex Omniwheels, which have little rollers on them to allow movement perpendicular to the way they’re mounted, thus resolving the previous shearing force problems.

An Omniwheel

Unfortunately, since my motor shafts are 6mm single-flat and the Vex wheels are designed for 0.125″ square, I had to drill the wheels out a bit to make it work. Lacking a drill press, I made do with a slightly smaller drill bit, a hand drill, and a rotary tool, adding in a few screws to adjust the fit and to lock the wheel against the single flat. Although there were some mistakes, I think it turned out rather well:

Closeup of the left side of the robot

Closeup of the right side of the robot

The larger wheels get over bumps more easily, and they make it faster, both to turn and to drive—the omniwheels are especially helpful while turning, as they allow me to treat the system as a two-wheel system at the back instead of a four-wheel system like it actually is.

Read More Leave a Comment

September 30, 2011

Categories:

Robotics

Status Update: Rolling Along

I’m still not quite done with all of the updates for my robot—most notably the wheels. I’ve actually run into a little trouble: the wheels I was intending to use are actually too good at sticking to the ground to turn easily—the rubber tires fall off every once in a while. To solve this, I’m planning to use some omniwheels for the front, which should convert the drive system from four drive wheels to only two, and thus reduce the shearing force on the wheels.

Got some new rear drive wheels, but I'm still waiting on the omniwheels for the front.

I’ve also got a (really short) video from before I started the wheel switch:

Get the Flash Player to see this content.

Read More Leave a Comment

September 27, 2011

Categories:

Robotics

 
Content-Type: text/html