Fun with Lego® Mindstorms – the Color Sorter
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:
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:
- 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.
- 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.
For now, though, these efforts will have to wait – I’ve got another project coming with Mindstorms that I can’t wait to begin.







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?
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.
thank you so much