ES.293 | Spring 2007 | Undergraduate

Lego Robotics

SP.285

This page is an archive of another ESG course that spun off from SP.293 in Spring and Fall ‘99, SP.285 Robotics and Mechatronics Projects. Similar in format, with fairly open-ended teaching sessions and several projects, it emphasized electronics and mechanical construction skills, in addition to the Lego robotics topics.

Lecture Topics

  • Sensors + Actuators and Printer Disassembly
  • Abstraction, Writing control psuedocode for the printers
  • Discussing examples of Good Design and Bad Design
  • Feedback and Control Systems
  • Mechanical Transmissions
  • Control and Programming Case Study: The wall-following car
  • Project 2 conclusion, demonstrations
  • Lego gear and geartrain physics
  • Mechanisms
  • Methods of Manufacturing and Mass Production
  • Estimation and Getting a Feel for Measurements
  • The one-day Electronics class

Projects

Project 1: The Claw, Photos

Project 2: Industrial Salvage, Photos

Project 3: Independent Robotics Projects

The following pages were created by students in the Spring ‘99 class, detailing their final robot projects. All material is used courtesy of the students named, with their permission.

Chad Keever, Projectile Launcher

Kendall McConnel, Control of a Plotter

Jonah Elgart, Guidance by IR Beacon

Miki Havlickova, IR Remote Control

Jessica Bowles-Martinez, Guidance by Light

Matt Seegmiller, Master/Slave IR Control

Jitin Asnaani, Invertible Robot

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


Hello! My name is Kendall McConnel and this webpage is devoted to my final project for SP.285, a seminar on Robotics and Mechatronics.

First, a little bit about the class…

The Robotics and Mechatronics seminar is taught in ESG by two spiffy fellows by the names of Eric Smith and Max “Ben” Davis. The course involves tinkering with Legos, motors, sensors and programming to create robots that can pick up, run away from light, or even follow a line. For the first part, I learned about how to make a robot and what goes into making it work. Max and Eric ran lectures on topics related to the robots (sensors, electronics, etc) and also helped us work through and learn about what works best. For the latter part, I worked on a project (this one) which reflects my interest in programming specifically.

And now, a bit about my project!

I chose to work with a plotter (which came with two sensors and two motors) my plan was to get the plotter to go to a point as accurately as possible, and, if time allowed, to draw simple objects.

The main problem of this particular plotter was that because it was so smooth (barely any friction) it would overshoot and wouldn’t be very accurate. So, part of my project was to learn a bit about control theory and apply and test different methods to see what worked best.

To sum up my experience with my plotter, I tinkered with different functions of distance to see what would get the plotter to the designated point as quickly and as accurately as possible. First, I wrote up readpt function that would give out the x coordinate on the plane. Then, I tried different gotox functions. Initially, I tried a simple distance function (but when the motor runs too slow, it doesn’t move and sounds horrible so.) then I experimented with different sections where the motor would run at different speeds (i.e. at the distance for speed, and then, when it got close enough, (within a certain distance) it would run at a minimum speed.) I still had a decent degree of overshoot and some bugs, but after awhile I created a distance function that worked. To make the geometrical figures that my plotter eventually drew, I created a line function (that makes a diagonal line out of smaller lines) for a complete record of what I did on a day to day basis, check out my journals (TXT). And, if you’re really curious, you can check out my program (C).

And now, some pictures of my monster (I mean, my… uh.. creation)

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


Hi, I’m Jonah Elgart and for my final project in SP.285, a robotics and mechatronics class taught in ESG (Experimental Study Group), I created a Lego robot that chases or flees an infrared beacon.

My robot car is very simple. It has two wheels, each connected to its own motor. The two motors are driven at different speeds to steer the car. The back wheel is mounted on a really cool caster that I built with Eric (one of the instructor dudes).

My robot.

The car.

The car’s rear side.

Infrared transmitter.

An infrared signal is broadcasted from a transmitter hooked up to a handyboard (one of those circuity things which is a minicomputer).

Infrared receiver.

The signal is detected by the tower, which consists of three directional infrared receiver doohickeys, oriented in three quadrants.

Click “code” (C) to see the IC code I wrote to make the robot flee or chase the signal. To change from flee to chase you simply reverse the polarity of the motors.

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


My robot was born (rather painfully with all the sharp edges, according to its mother) with a natural tendency to avoid light. This is a side effect of much traumatic abuse it sustained as an infant and while in the womb. Its father used to shine intense light that was so intense it penetrated even into the uterus and was used as an instrument of terror. When it was born, it had more than just a healthy tan, it had a sunburn. After it was born to make it worse its older brother used to lock it in the closet and the only times it ever saw light was when his brother would hold a flashlight under his face deforming his features and yelling “I’m the leprechaun,” and when he would be burned by this flickering monster referred to as fire which seemed to ravenously devour all that it came in contact with.

Now, of course it doesn’t like light… so it runs away from it.. sometimes when it senses light all around it goes into twitchy seizure-like spasms while it has flashbacks to previous trauma.

It senses light using light sensor (JPG) device things; there are four of them and they make the motors run in a way that takes it away from the pain (no not suicide.. I wasn’t able to get a motor that just tears the whole thing apart, also I wouldn’t be able to test it out more than once).

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


Jitin’s Robotics Web Page!!!

Background

Hi! My name is Jitin Asnaani. I’m a Roboticist wanna-be, and as such I decided this term to take this cool class called the ESG Robotics and Mechatronics Seminar. This Web page is dedicated to the story of the first robot I made by myself (well, mostly by myself). I made this robot to satisfy the last required project of the class, which was “to design and construct a working device with at least vaguely-interesting capabilities” and then, to build a Web page to show it off. All the specifics, including the type of project we wanted to work on, was left entirely up to our imagination.

So What Was My Bright Idea?

Being a person of little experience with Lego and electronics, I decided to work on a modest project which would be both interesting as well as instructive. Thus came about the idea of an invertible robot: Invertibot. Essentially, the plan was to design and program Invertibot so that it could demonstrate its ability to perform a series of specific movements, performing the same movements whether placed rightside-up or upside-down.

Getting Around

The first decision I made as to the structure of the robot was to use wheels as the method of locomotion. On the front of the robot I put two large wheels, one on the left and one on the right, driven by individual motors. Due to the constraint that I did not want to use an excessive number of Legos, I made the width of my robot fairly small. This, however, caused two potential problems: firstly, the motors for the wheels could not be placed adjacent to each other since they were relatively large; and secondly, the gear train had to be sufficiently powerful yet fairly compact, so as to fit in to the limited space. To accomplish the problem with the motors, I simply placed one motor on the top of the robot, and the other on the bottom. Each one, as I said, operated on a different gear-train. As for the gear-train itself, making it compact created problems related directly with the limitations of Lego, in terms of the limited options for putting Lego pieces together so that they mesh perfectly with each other and with the technical parts (gears, shafts, etc.) required to create motion. As for the back of the robot, there I installed two (much smaller) caster wheels, one on the topside of the robot and the other on the bottom. The result was that whether or not the robot was inverted, locomotion is always provided by two driving wheels at the front of the robot and one caster wheel trailing at the back.

The gear train (left); a caster wheel (right).

What’s Up?

With the locomotive components of the robot constructed, the obvious question that to ask was this: “how will the robot differentiate between being rightway-up and upside-down?”. To accomplish this “detection of vertical orientation”, as I like to call it, I installed a very interesting type of sensor on the robot. Basically, this sensor consists of four pieces of wire, horizontally aligned above each other, running from outside the plastic sensor case and ending in the interior of the sensor case. Within the sensor case is a metallic ball, whose diameter is large enough to touch any two adjacent wires, but no others. The movement of the ball is basically restricted to vertical movement only due to the constrained width of the sensor. The result is that if the sensor is rightside-up, current could only flow through the circuit consisting of the bottom-most wire, the ball, and the second-bottom-most wire, while if it was upside-down, current could only flow through the topmost-wire, the ball, and the second-top-most wire. With this in mind, a pair of connection wires was attached to the two lower wires, and detection of the flow of electricity through this wire was used in the program (outlined below) that controlled the robot.

The “metallic ball” sensor.

Controlling Invertibot

Though ideally I would have liked to place touch sensors on the periphery of the robot’s frame so that it could tell when it had run into walls and other external objects, time restrictions dictated otherwise. Thus the program (C) I wrote to control the robot was simple, and designed to do two things: firstly, to use the sensor readings to tell what orientation (rightway-up or upside-down) the robot was in; and secondly, to command the robot to perform a small series of movements which would not occupy too much straight but would demonstrate the robots ability to move in a specific series of movements no matter what the orientation. The program was downloaded from a network computer to the robot’s handiboard, which is really a small motherboard. The handiboard controls all the attached electronic components on the robot, allowing a user to logically control his robot with the specific programs he writes to manage the sensors and motors.

Rightside-up and upside-down views of invertibot.

Future Robots?

And that’s the story of Invertibot: controlled by a handiboard and equipped with an orientation sensor and two motors on the front, the Invertibot is the product of three weeks of trial-and-error, not to mention some ingenuity and a bit of laboratory tom-foolery. I guess that’s it: Invertibot is the first breakthrough in robotics and AI for me, being the first robot I ever built and programmed myself. I hope to work on more robots in the near future, and on that account, I’ll hopefully need to update this page soon. Till then, thanks for dropping by. I hoped you liked the story of the Invertibot. Bye!

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


Welcome to my web page!

My name is Smarty (in honor of a certain autonomous detective) and I am an MIT robot created by Miki Havlickova. Part of my hardware was (thank goodness!) made by Kit Lennox.

I started out as a little claw with lots of gears so that I could open and close. That was pretty boring, though, since the only thing that was around to catch was air. And clashing your claws against each other gets slightly less exciting after a while.

Then, the big change came. I got two big wheels in the back part that could drive me forward, and six little ones in the front to be able to turn. And, most importantly, I got a light sensor so I was able to see!

Having all this inventory, I was supposed to go to a burnt chemical factory and bring out a barrel of unknown chemical content. There were more of us who tried, but what a shame, none of us succeeded. That was a little disappointing (Miki, what did you do to my program (C)?), and my self-esteem went down quite a bit. But there were more days to come and I knew my time was yet to come.

The next exciting thing that made its appearance into my life was a remote-control. It was very funny - it could talk to me by sending secret messages that I could read and knew exactly what to do. It required quite a trust to the person holding mentioned remote, a trust that turned out not to always be justified (Miki, Miki, you better stay as a theoretical mathematician, since if you decided to be an engineer, we’d all die miserably). My wheels kept falling off, I was breaking apart every two minutes, my chain was down every day or so, my claw kept getting stuck and broken, and over all, it was a pretty miserable time.

After a while, even Miki recognized that the world is not just theory and decided to fix some of my mechanical parts. After that, my life got pretty decent - I fell apart only every week or so, and although my chain eventually broke apart permanently so that I couldn’t pick up my head, I spent at least most of the time in less than three pieces.

I could communicate with the remote pretty well, and that was a lot of fun. I could drive around everywhere; I even got into the chemical factory and finally brought out the barrel. I felt really good about that.

And then the last day came, and with it the final presentation. Suddenly there were lots of people around me; I could happily drive around and catch onto their legs, and they were all watching and I think they liked me. Some of them even tried to drive me around, but certain people created my driving program so nicely, that it took everybody else five minutes to understand it, and then they broke me anyway. Miki got to dive very nicely quite a few times when she heard my wheels squeaking, to save me from totally falling apart. She had a lot of training from my earlier days, though, so most of the time she made it just fine.

Alright, I got to the present, and since I am not a prophet, I cannot really tell you the rest of the story. I took some pictures so that you can see what I look like, and with that I give you my goodbye.

See you sometime when driving around, and remember: Life is great! (unless your gears are falling apart…)

Smarty

That’s my board, and my friend remote control.

This is my front gear system. Now you understand why I keep falling apart, hm?

Here is a view from the top.

And just for completeness, some of my programming: cd_buttons (C), infra (C).

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


Matt’s IR Controlled Tank

This is a side view of the tank.

For my final project in SP.285, I built an infrared controlled tank out of Legos. The basic idea is that one board acts as a slave and takes commands from another board, which acts as master, through IR signals. These signals are sent in 32 bit bursts along some carrier frequency from the master board to the slave board.

The differentials of the tank as seen from below.

This tank is driven by two motors, one to control forward and reverse motion and the other to control turning. This is accomplished by connecting two differentials so that on one side, the outputs go in the same direction and on the other they go in opposite directions. This is a little hard to understand, unless you know something about differentials already. To help illustrate what is meant by this, there is a picture of the two differentials on my tank below.

This is the remote.

The other component of this project is the remote. It is basically an old remote from an RC car that has been taken apart and wired so that its sensors can be plugged into a board. The program that runs on this board checks the values of the sensors corresponding to the forward/backward and side-to-side motors. Based on these values, it sends signals to the board on the tank instructing it as to how fast to drive the motors at.

SP.285

Project 1: The Claw, Photos
Project 2: Industrial Salvage, Photos
Project 3: Independent Robotics Projects


Each of you will build a motorized Lego “claw” that can move up and down and grasp and release objects. The tutors have already built a sample claw that can be used as a design, which we recommend if you do not have experience designing and building things with Technic Legos. However, if you wish, you may design your own claw or modify (and improve!) our design.

Mechanical

  • Build a copy of the Lego claw provided in lab (modifying the design if you want to)

Electrical

  • Construct the claw analog position sensor (attach a position sensor to a Lego brick, attach wires and a plug to the sensor. Ask a tutor for details)
  • Construct the claw all-the-way-open limit switch (digital sensor) (ask a tutor for details)

Programming

  • Write a program (a subroutine) that moves the claw to a specified angle. For example, some subroutine ClawGoToAngle so that running ClawGoToAngle(0) moves the claw to 0 degrees (horizontal), and ClawGoToAngle(-20) moves the claw to 20 degrees below the horizontal. This subroutine should also not try to move the claw beyond its limits.
  • Write a subroutine that opens the claw. The routine should open the claw all the way and stop when it is fully open.


SP.285

Project 1: The Claw, Photos
Project 2: Industrial Salvage, Photos
Project 3: Independent Robotics Projects


Civil engineers surveying an old factory for demolition have discovered a partially-collapsed room that was perhaps once used as a storage annex for the various chemicals used in making whatever the factory made (paper, socks, whatever). Across the room they see several huge red plastic 55-gallon drums, apparently unlabeled. They start to cross the room when they notice the floor is covered with puddles of some chemical, and the air is caustic and starts to eat away their skin (a slight exaggeration, perhaps).

They quickly retreat and consider their options. If the red barrels contain something relatively non-toxic, they can just approve the building for demolition and collapse the building with them still inside. However, if they contain some controlled hazardous waste, they must be removed from the building before demolition can continue. So they must retrieve a sample of what is in the barrels.

However, what is inside the barrels could be very toxic and release fumes, so they should probably not puncture or open a barrel to take a sample; they should remove an entire barrel and take it to a lab for safe opening and analysis.

Normally, they could bring in a forklift or similar machine, drive over, and pick up the barrel, but whatever chemicals are on the floor and in the air are so nasty that they do not want to enter the room, even in protective gear. As they discuss this, in fact, they retreat to a couple of rooms away, as even standing nearby is irritating.

One of them pipes up and mentions that she went to MIT with someone who works for RoboJunk, a salvage robotics company. RoboJunk builds robots to go into dangerous areas and retrieve salvage of various kinds. Perhaps one of their robots could be programmed to cross the factory floor, pick up one of the barrels of chemicals, bring it back to the edge of the factory floor, and load it onto a waiting forklift. Then the civil engineers could transport it to a truck and then to the lab for analysis.

They all agree that this is a great idea, and crowd into a phone booth excitedly to call RoboJunk.


The phone rings on your desk. You’re across the hallway in your lab, working on one of the new RoboJunk industrial claws with some of your friends, but you rush back into your office and pick it up. It’s your boss. He relates the story of the civil engineers and their mystery barrels. He suggests that maybe with some modification, the industrial claw you and your friends have developed could be the main unit of a robot that could perform the task they asked for.

He also says that he has been the factory and checked it out and the situation isn’t as impossible as it might sound. First of all, the barrels stand on a raised platform near a wall that runs all the way to the edge of the factory floor, so a robot might be able to follow that. Secondly, there are still lines painted on the floor to guide humans operators from area to area in the factory; a robot might be able to make use of them. Thirdly oh yes, thirdly, RoboJunk is disassembling some old projects, so you have a nearly unlimited quantity of structural materials and robot parts to work from.

What do you think?


Project Details

Below is a model of the factory floor layout. The barrels are in red (note that they sit on a raised platform), and the bin to drop them in after they have been retrieved is clear plastic. Note also the wall and the layout of the line on the floor - both of them may be useful.


SP.285

Project 1: The Claw, Photos
Project 2: Industrial Salvage, Photos
Project 3: Independent Robotics Projects


In the time remaining in the semester, you will each pursue an independent robotics project of your choice. This will give you a chance to explore an area that you are especially interested in. This project can be an extension of something you have done before, or something completely new and different.

As this assignment is rather vague, we have come up with a list of about 20 suggested project topics. We hope that one of these will interest you or cause you to think of some other interesting project.

Projects must be completed by Week #10.

More Lego Vehicles

  • Build a robot to follow lines
  • Build a robot to navigate a maze (of walls or lines)
  • Build a robot controlled by a VCR remote
  • Build a robot that communicates via IR (infrared) signals
  • Build a robot that can drive right-side-up or upside-down
  • Build a robot that wanders the room
  • Work more on the Claw
  • Build a robot using the Lego pneumatics
  • Build a robot that figures out where it is
  • Build a light-seeking or dark-seeking robot

Non-vehicle Things to Build

  • Build a platform to pan and tilt a digital camera
  • Build a machine to throw/fire foam balls
  • Build a machine that turns the lights on and off remotely (controlled by IR, radio, or sound (“the clapper”))
  • Build a system that automatically waters a plant when it gets dry
  • Build a station that robots can drive into to recharge

Electronics

  • Build an electronic controller to run the Lego pneumatics from the boards
  • Build the electronics to monitor battery voltage/state of charge on the boards
  • Build a smart board recharger

Programming

  • Design/improve the board operating system (the “menu program” that comes up when you turn on the board)
  • Use the IR ports on the boards to allow one “master” board to control “slave” boards (to use more motors, for example)
  • Control a printer with the boards
  • Control a plotter with the boards
  • Communicate with a computer from the boards (to transfer data the robot collected to the computer, for example)
  • Experiment with multiple processes (several different programs running at the same time)

SP.285

Chad Keever, Projectile Launcher
Kendall McConnel, Control of a Plotter
Jonah Elgart, Guidance by IR Beacon
Miki Havlickova, IR Remote Control
Jessica Bowles-Martinez, Guidance by Light
Matt Seegmiller, Master/Slave IR Control
Jitin Asnaani, Invertible Robot


I’m Chad Keever, MIT class of 2001 and ESG alum/TA. This page is a description of my final project for SP.285, a seminar on Robotics and Mechatronics.

First, a little bit about the class (much of this is quoted from Kendall’s page of similar purpose)

The Robotics and Mechatronics seminar is taught in ESG by two spiffy fellows by the names of Eric Smith and Max “Ben” Davis. The course involves tinkering with Legos, motors, sensors and programming to create robots that can pick up, run away from light, or even follow a line. There were two major projects we worked on: the first was more structured and teamwork-related, and the second was the opposite (this project).

I love pretty much everything that is possible to do in this class, so my choice of what to work on for a final project was close to random. One of the suggested projects that looked like a lot of fun was building a robot capable of launching a projectile.

I could go on forever telling you how I came up with all the ideas behind this project, so I’ll just describe the hardest part. It was relatively easy to build the structure of the robot, the catapult mechanism, and the gears to pull it back. However, the hard part was how to release it suddenly enough to actually launch something. Simply untightening it just won’t work.

Being somewhat geometrically predisposed, the idea that eventually came into my head was to use a string, and have it make two legs of a triangle with the line between two places pulling on the string. When the axle holding it away from that line was removed, the string was suddenly released, launching the projectile. Perhaps the pictures below will illustrate this better. Observe my pretty little friend:

Winch mechanism for pulling back spring.

Trigger mechanism for releasing spring.

Aiming mechanism for adjusting vertical launch angle.

A picture of the spring prepared for a launch.