Skip to content

Fun with Lego® Mindstorms – the Color Sorter

January 4, 2012

LEGO® Mindstorms is a robotics platform that allows builders to construct and program a variety of different mechanisms using familiar bricks and an easy-to-use computer application that is built upon LabView. I’ve been exploring this platform for the past few months, including building the model seen in the video below:



Lego® Mindstorms Color Sorter

This is the Color Sorter, which is one of about four different machines whose instructions come with the basic set. It was pretty fun to build, and I learned a few new techniques. Most interesting to me was the linkage between the carousel (at left above) and its drive motor (at bottom). It uses two pairs of pieces that I initially didn’t recognize as gears, the knob wheel. This allows the motor to be tucked out of the way (and its housing used as a stop for the storage tray), so the carousel can be kept low to the ground. The downside is that this connection isn’t as rigid as other gears, so there is considerable play in that portion of the model. It isn’t too much of a factor for this kit, but for something that needs greater precision it might not be usable.

There are two options for future development here that intrigue me:

  1. Replace the rotating carousel with something on a linear track. This would easily allow for more colors to be included, even taking into account the limited capabilities of the color sensor (which I believe can only sense six colors: black, blue, green, yellow, red, and white). A linear system would probably also improve the positioning capability addressed above.
  2. Optimize the sorting program, to remove some of the excess rotation found currently. The system works so that each cycle produces a full rotation of the carousel, unless it senses a blue ball. This removes any need to store information about the state of the carousel, as the machine is reliably at the blue position for each new ball. By introducing awareness about the state of the carousel, the machine could operate more quickly with only necessary rotations – including in both directions.

Lego® Mindstorms Color Sorter program excerpt

For now, though, these efforts will have to wait – I’ve got another project coming with Mindstorms that I can’t wait to begin.

4 Comments leave one →
  1. Lloyd permalink
    June 25, 2012 2:25 pm

    am thinking of doing this color sorter project as a final year project which I intend linking it to a vegetable farm. is it possible to have the building instructions and possibly the sourcecode?

    • Matt Bernhardt permalink*
      June 25, 2012 2:55 pm

      Thanks for your comment; this was a topic that confused me when I first got my starter set. The build instructions for a handful of standard projects are not given in printed form, but available within the Mindstorms software. Open the Robo Center panel in the right sidebar (on my software it is an orance icon of a 3-unit beam), and you should see four options: Vehicles, Animals, Machines, and Humanoids. If you expand Machines, you’ll see the Color Sorter. In there you’ll find build instructions and programming instructions.

      • Lloyd permalink
        June 25, 2012 9:39 pm

        thank you so much

Trackbacks

  1. Lego Mindstorms and Processing « Fabricated Experience

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: