We Built Robots. That Battle. Out of Legos

The Story

Lego MotorIt all started with this. A single motor.

My six year old boy, Beck, was rummaging through his cousins’ old Legos and came across this motor.

“What’s this, dad?”

“Looks like a motor… Hmm…” I grumbled. “I didn’t know Lego made motors. They didn’t in my day.” I wish I had taken a picture. I have rarely seen his eyes so wide, and his eyes are always wide.

“You mean, I can motorize my Legos?!!!”

“Uh, no son, you don’t have any motors.”

Well… not yet…”, he said.

Now seemed like as good a time as any to finally dash those bright eyes and squash that relentless enthusiasm, once and for all – toughen him up for the real world ahead.

“Never. We will never have motors. Ever. Don’t ask again.”

So here we are, three years later, with not just motors, but color, infrared, gyroscopic, touch and ultrasonic sensors, all computer controlled. I could have purchased an entire car with the money this stuff cost, and I have Lego to thank for it (I may be exaggerating, I could only have purchased part of a new car, maybe the doors. Or, an entire old, rusted Yugo).

Lego Sumo Robot

Honestly, though, I can’t think of a better use for hard-earned money (except feeding the poor, and maybe not even that). I hope the Lego people are filthy rich and drive Jaguars (or whatever it is they drive in Denmark. Trains, maybe?) They deserve it.

Some may argue who was the greatest, the Beatles or the Rolling Stones. About this, there is no argument: there is no better toy than Legos. Period.

To give you an idea of the capabilities of Lego’s robotics gear, a couple of years ago Beck built a machine using plans he downloaded from the web that solved a Rubik’s cube. Pretty impressive.

Even so, we felt we weren’t embracing the robotic’s full potential. It virtually cried out for combat and mayhem. So, we set about creating autonomous battlebots.

The Challenge

The format we decided upon was Sumo wrestling. Each robot must autonomously search within a ring drawn on the floor, find the opponent, and push it out of the ring. Easy enough.

Beck wanted to include flame throwers and buzz saws, but I convinced him that he wouldn’t enjoy being grounded, for life. He’s a smart kid. However, If one robot ‘accidentally’ smashed the other robot into its fundamental atomic elements, so be it. We could write that off as a chemistry lesson.

Lego Sumo Robot - Beck and TIm Bjella

Robot Design

To be fair, Beck and I used identical motors and sensors. Beyond that, any design features were allowable as long as they were built from Legos and didn’t remove skin, set hair on fire or result in profuse bleeding (all the good stuff, really).

The problem with both robots having identical motors was that they would have equal pushing power. Neither would have a mechanical advantage. I suggested that to be fair, the old guy should get an extra motor, which Beck agreed to, if I could find it. Sneaky kid. We may never find that motor.

To gain the upper hand, we both devised a lifting arm, an offensive weapon to reduce the traction of the opposing robot. Beck’s was more straightforward, while mine relied on gears and rubber bands. We are still not sure which had the greater power and leverage.

Lego Sumo Robot

Lego Sumo Robots
Here are the two designs. They are similar, but have some not-so-obvious distinctions.

Advantages of my design:

  • Wheels in back. If Beck’s robot lifts the front of my robot (most likely scenario), it will help my robot by putting more weight on its wheels, thus providing more traction (unless he flips over my robot, in which case he’s grounded for two lifetimes).
  • Pretty plume of feathers on top to appeal to the judges and possibly distract Beck’s robot (even robots have a softer side).

Advantages of Beck’s design:

  • Lower center of gravity and wider wheelbase
  • Direct lifter connection to motors. Possibly stronger lifting force. Mine relies on a rotating gear for leverage.
  • Looks meaner

Programming the Robots

Sumobot Programming - Beck Bjella 2016
Screenshot of Program

Both robots have the same basic programming. We programmed them together. My program includes an additional piece of code, however, that runs only at the beginning of the match. I call it the Sneak Attack.

Main Program:

  1. Search for opponent (repeat until ultrasonic sensor detects opponent, then proceed to Charge)
    1. Spin clockwise for 1 second
    2. Spin counterclockwise for 2 seconds
    3. Move forward for 1 second
  2. Charge opponent (continue until ultrasonic sensor loses sight of opponent, then return to Search)

Sensor Subroutines:

  1. Ultrasonic sensor: When the opponent is within range, raise lifting arm. Lower the arm if opponent moves out of range
  2. Color Sensor: Scan for out-of-bounds border. If detected, reverse robot then return to the start of the search program

Sneak Attack (the Feint):

If you watch the video closely, you may notice at the start of the match, my robot does not act exactly like Beck’s. While my robot spins and locates his, just like his does mine, instead of immediately charging, it stops and waits, facing Beck’s robot {insert wild west gunfight showdown music here}. It waits until it detects his robot moving toward it. Then it turns and races diagonally away from the other robot. Finally, it spins back toward it and charges. The idea is to catch the robot on its side, rather than the front, where (in theory) it is more vulnerable.

Published by

Tim Bjella

Principal architect and interior designer for Arteriors / Bjella Architecture.

Leave a Reply

Your email address will not be published. Required fields are marked *