The machine has eight basic functions:
- a hopper and chute to accept bulk Lego pieces of approximately the correct maximum size
- a drum feeder to extract a few pieces at a time for onward processing
- a vibratory feeder to help separate pieces from each other
- a 'slippery slope' feeder to encourage the pieces to stop tumbling and instead slide at a constant rate and constant orientation past the sensors
- a 'light gate' sensor to detect the presence of an approaching piece
- a colour sensor (and light source) to measure the colour of a piece
- a microprocessor to perform a colour classification function, plus control the motors etc.
- a rotary diverter to guide the piece into the correct output bin
A key function of the machine, and something which is critically important to reliable sorting, is to tease apart pieces from each other, and separate them sufficiently that they can be diverted into different bins if necessary. Otherwise two or more might end up (incorrectly) in the same bin. This separation function is performed in three ways:
- The drum feeder only scoops a few pieces in each bucket, and the bucket is curved so that pieces are released slowly, not all at once. The drum feeder sets the overall processing rate too.
- As the pieces drop onto the vibratory feeder, partly helped by a sloping ramp, they are scattered along its length somewhat.
- The vibratory feeder is designed to vibrate with an amplitude sufficient to make the pieces 'dance' about, not just move them along. Also it vibrates only a little at the uphill end, and much more at the lower end, so that pieces further along therefore tend to 'dance' more and accelerate towards the sensor, spreading them apart as they go.
The RGB value from the colour sensor is matched to one of 30 or so distinct Lego brick colours (determined by measuring a reference set of bricks). Each matched colour has an output bin number associated with it, so that e.g. all the different greens go in the 'GREEN' bin.
Finally, the diverter is designed to be short and have very low mass (low inertia). It limits the overall machine throughput because it determines a) how long a piece takes to transit between sensor and output bin, and b) how quickly it can move around to the next bin if required.