Sumo Robot with Accelerometer Remote Controller

Usually, there are two flavors of Sumo robot competition:

  1. Autonomous: no communication to the robot permitted after the start.
  2. Remote-controlled: there is a wireless remote controller driving the robot.

Just for fun, I have implemented a wireless remote controller application for my Zumo Robot using the Freescale SRB (MC13123) board. I’m using the Freescale MMA7260Q accelerometer on the SRB board to control the robot.

Accelerometer Remote Controller

Accelerometer Remote Controller

Messages are sent between the wireless network nodes using the RNet wireless communication stack. The SRB board measurees the X, Y and Z acceleration and sends it to the robot. The robot uses the values to change the desired speed values of the PID controller on the robot.

Sending the accelerometer values is using the RNet API:

uint8_t buf[6];
int16_t x, y, z;

/* send periodically accelerometer messages */
ACCEL_GetValues(&x, &y, &z);
buf[0] = (uint8_t)(x&0xFF);
buf[1] = (uint8_t)(x>>8);
buf[2] = (uint8_t)(y&0xFF);
buf[3] = (uint8_t)(y>>8);
buf[4] = (uint8_t)(z&0xFF);
buf[5] = (uint8_t)(z>>8);
(void)RAPP_SendPayloadDataBlock(buf, sizeof(buf), RAPP_MSG_TYPE_ACCEL, RNETA_GetDestAddr());

That’s it 🙂

Here is a video how this looks like:

Still a bit rough, and could use some fine tuning. One issue was that the A/D conversion of the SRB board is heavily affected by the battery/supply voltage which I need to compensate for.

As for the coming Sumo battle event scheduled for Friday, 13-Dec-2013, we will have a mixed rule: robots will be both autonomous and with remote controller help. Will be fun to see who plays best :mrgreen:.

Happy Controlling 🙂

3 thoughts on “Sumo Robot with Accelerometer Remote Controller

  1. Pingback: Sumo Robots, Sensors and everything else…. | MCU on Eclipse

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.