Have you ever taken an interest in something, and then found it’s got a little out of hand as your acquisitions spiral into a tidal wave of bags and boxes? [Jacques Mattheij] found himself in just that position with Lego. His online purchases had run away with him, and he had a garage packed with “two metric tonnes” of the little coloured bricks.
Disposing of Lego is fairly straightforward, there is a lively second-hand market. But to maximise the return it is important to be in control of what you have, to avoid packaging up fake, discoloured, damaged, or dirty parts. This can become a huge job if you do it by hand, so he built a Lego sorting machine to do the job for him.
The machine starts with a hopper for the loose Lego, with a slow belt that tips individual parts down a chute to a faster belt derived from a running trainer. On that they run past a camera whose images are analysed through a neural net, and based on its identification the parts are directed into appropriate bins with carefully timed jets of compressed air.
The result is a surprisingly fast way to sort large amounts of bricks without human intervention. He’s posted some videos, one of which we’ve placed below the break, so you can see for yourselves.
Lego has appeared so many times on these pages that it’s difficult to pick links, but automated sorters it’s a bit easier. How about sorting M&Ms and Skittles, or maybe automatic resistor sorting.
Thanks [Robert] for the tip.
28 thoughts on “Sorting Two Tonnes Of Lego”
Nicely done!! This is how many things in the food industry from blueberries to potatoes are sorted as well as small machine parts.
Seems like the easiest way to sort your blueberries from your potatoes is to not mix them together in the first place.
Don’t hate on it until you’ve tried it >:-) Maine joke in 3…2…1…
I think it’s potatoes and blueberry jam…
When making potato chips they use a cam and multiple solenoid to pulse jets of air, blow away the burned ones. This has been around a while, and from what I see here is becoming quite improved!
Of course, he should have made the machine itself out of Technic, that programmable brick thing they have, and some old Lego pneumatic parts. But it’s probably more practical this way. Amazing that he’s got it working, well done. I might keep hold of it after he’s done, Lego has a way of getting mixed back up again.
Or something that looks like those programmable bricks, maybe a Gameboy with a custom cartridge containing a ROM and some GPIO chips (e.g. 6522 or 8255). BTW, interfacing to Lego Technic stuff is easy if you can get the proprietary (Lego-based) connector or don’t mind cutting cables.
What, no Arduino?
Use the Arduino to run a 3d printer that creates an enclosure box for the Raspberry Pi that you use as a desktop environment to write the code that procedurally generates the plans for the Lego Lego sorter which are then sent out to an on-demand Lego building service.
This is really neat, but I couldn’t figure out what he was putting in the different bins. It’s not sorted by color, so what is it sorted by?
Looks like it currently is separating large lego from small logo, and then parts that are either not lego, blocks stuck together, or special blocks, make it to the last bin.
There is always a golf ball and some kinder surprise toys in the mix.
and so much K’nex because I was an irresponsible child
The article made it seem like he was sorting by value
He might be sorting into a kit, too.
Neat idea. If the machine is versatile enough and if there’s an easy way to input the kit BOM then he could store all pieces in one big unsorted container and only do “sort on demand” for just the pieces needed for this or that kit.
I’d love to have a GENERAL PURPOSE ON DEMAND SORTING MACHINE. Instead of keeping nuts, bolts, screws, nails and so on in separate compartments just toss them in a big bin and let the machine sort things out on request. Same for resistors and other electronics components.
Working on it. Will eventually be on .io.
I’ve got a lot of learning to do. Will start with Arduino or Propeller or something that holds my hand (because I’m a noob with too many ideas) and then eventually port to a “real” language.
My goal is to be able to bring a bolt or nut to an optical scanner, scan item, and be able to select the same exact thread and length or larger, smaller, washers that would fit, similar thread, nuts/bolts that match, ect…
It is a life-goal to at least try, even though it would be reinventing a wheel IMO.
The start sentence reminds me of the one time i was talking with a coworker of how one calls severed body parts and ended up giving a presentation about conservation of dead tissue for display purposes with a conserved human toe as example
Very good post, I really enjoyed reading it.
The software side is also interesting: https://jacquesmattheij.com/sorting-lego-the-software-side
And for those lacking the hardware to accelerate training: https://cloud.google.com/ml-engine/ allows you to download any models you trained, so you can use them locally.
I would think that sorting by piece function would be more useful than sorting by color,never ceases to amaze me,
the things people think up,although an obsessive person like me would have sorted them a long time ago.
Completely agree. It’s easy for you to find red ones in a group of different colored legos even at a glance, not as easy identifying a 1×4 in a mix of different shapes of all the same color. @_@
too freakin short
That much effort to sort lego? None of my business, but I would still go for the old but gold “sit down and hand-pick it”.
Two tonnes is something around the hundreds of thousands pieces mark. It’d probably be quicker to melt the lot down and re-cast it than sort by hand.
I think it’s easy to sort using both hands. At the first pass you only pick (with both hands) only a certain category of bricks (all 2×3, 2×4, 2x….), what is not in this category, goes into a temporary bin, from where you start the second sorting pass. Of course, you should start with the most abundant type, then continue with the second most abundant and so on.
After sorting all bricks in several big buckets/heaps, you can start sorting each one further by size, color, degradation, etc.
Good man! Spotted that there’s less labor in doing it by hand that building the machine!
But. But! Where’s the fun in that? And the view count?
Please be kind and respectful to help make the comments section excellent. (Comment Policy)