Lego Machine Uses Machine Learning To Sort Itself Out

In our opinion, the primary evidence of a properly lived childhood is an enormous box of every conceivable Lego piece, from simple bricks to girders and gears, all with a small town’s worth of minifigs swimming through it. It takes years of birthdays and Christmases to accumulate a Lego collection best measured by the pound, but like anything worth doing, it’s worth overdoing.

But what to do with such a collection? Digging through it to find Just the Right Piece™ can be frustrating, and bringing order to the chaos with manual sorting is just so impractical. How about putting some of those bricks to work with a machine-vision Lego sorter built from Lego?

[Daniel West]’s approach is hardly new – we’ve even featured brick-built Lego sorters before – but we’re impressed by its architecture. First, the mechanical system is amazing. It uses a series of conveyors to transport bricks from a hopper, winnowing the stream down as it goes. The final step is a vibratory feeder that places one piece on a conveyor at a time. Those pass under a camera attached to a Raspberry Pi, where OpenCV does background subtraction from the video stream, applies bounding boxes to the parts, and runs the images through a convolutional neural network (CNN) that’s been trained on a database of every Lego part. Servo-controlled gates then direct the parts into one of 18 bins. See it in action in the video below.

We must admit that we’re not sure what the sorting criteria are, as some bins seem nearly as chaotic as the input mix. Still, we appreciate the fine engineering, and award extra style points for all the Lego goodness.

Continue reading “Lego Machine Uses Machine Learning To Sort Itself Out”

LEGO bricks sorter

Sorting LEGO Is Like Making A Box Of Chocolates

Did you know that chocolate candy production and sorting LEGO bricks have something in common? They both use the same techniques for turning clumps of chocolates or bricks into individual ones moving down a conveyor belt. At least that’s what [Paco Garcia] found out when making his LEGO Sorter.

Sorting LEGO bricks using guidesHowever, he didn’t find that out right away. He first experimented with his own techniques, learning that if he fed bricks to his conveyor belt by dropping a batch of them in a line perpendicular to the direction of belt travel then no subsequent separation attempt of his worked. He then turned to [akiyuky’s] LEGO sorter for inspiration and dropped them onto the belt at an angle, ensuring that some bricks would be in front of others. A further trick he found is very well demonstrated in the chocolate sorting video below and shown in the image here. That is to use guides on the belt which serve to create speed differentials. Bricks move slower than the conveyor belt while pressed against a guide but when a brick leaves the guide, it accelerates to the speed of the conveyor belt, pulling away from the bricks still at the guide and thus separating them.

A further discovery had nothing to do with chocolate production, unless maybe for quality control. Once an individual brick had been separated out, it had to be classified. To do that he used Google’s Inception v3 neural network. But first, he had to retrain it for recognizing different types of LEGO bricks, something we’ve seen done before for use with recognizing playing cards. And to do the retraining, he needed many images of different bricks all separated into their different types. That’s where he came up with a clever trick. He used his own sorter for that. For example, to get a bunch of images of 1×1 bricks of different colors and orientations, he simply ran them through the sorter, saving the images to files and assigning them to the 1×1 brick class. He then used his desktop machine with a GeForce GT 730 GPU for the retraining, taking around 2.7 seconds per brick. For sorting though, he runs the trained neural network on a Raspberry Pi, taking 3.8 seconds for each brick. The resulting sorter works quite well, sorting with 89% accuracy. Watch it in action in the video below.
Continue reading “Sorting LEGO Is Like Making A Box Of Chocolates”

LEGO: The Kristiansen Legocy

Whether you are young, old, or a time traveling Vulcan, something unites all of us globally: the innocent LEGO blocks that encourage creativity over spoon-fed entertainment. Have you noticed the excess of zombified children and adults alike drooling over their collective screens lately? Back in the ancient times, all a child needed to create hours of joy were plastic interlocking bricks and a place for their parents to trip over them. The LEGO Group harbored the inspiration of our childhood inventiveness, and none of it would have been possible without the founder, Ole Kirk Kristiansen (or Christiansen). The humble carpenter from Denmark forever made his mark on the little Scandinavian country, one brick at a time.

Well, maybe not at first. You see the plastic LEGO bricks we all know and love were initially made of wood. And they were also not actually bricks.

Continue reading “LEGO: The Kristiansen Legocy”

Lego Boosts Their Robotic Offering

Kids often have their first exposure to robots in school using Lego Mindstorm kits. Now Lego is rolling out Boost — a robotic kit targeting all Lego builders from 7 years old and up. The kit is scheduled to be on the market later this year (it appeared at the recent CES) and will sell for about $160.

[The Brothers Brick] had a chance to try the kit out at CES (see the video below) and you might find their review interesting. The kit provides parts and instructions to build five different models: a cat, a robot, a guitar, a 3D printer, and a tracked vehicle. You can check out the official page, too.

Continue reading “Lego Boosts Their Robotic Offering”

LEGO Looper Makes Modular Music

This LEGO synth made by [Rare Beasts] had us grinning from ear to ear.

It combines elements from LEGO Mindstorms with regular blocks in order to make music with color. A different music sample is assigned to each of five colors: red, blue, green, yellow, and white. The blocks are attached to spokes coming off of a wheel made with NXT an EV3. As the wheel turns, the blocks pass in front of a fixed color sensor that reads the color and plays the corresponding sample. The samples are different lengths, so changing the speed of the wheel makes for some interesting musical effects.

As you’ll see in the short video after the break, [Rare Beasts] starts the wheel moving slowly to demonstrate the system. Since the whole thing is made of LEGO, the blocks are totally modular. Removing a few of them here and there inserts rests into the music, which makes the result that much more complex.

LEGO is quite versatile, and that extends beyond playtime. It can be used to automate laboratory tasks, braid rope, or even simulate a nuclear reactor. What amazing creations have you made with it? Let us know in the comments.

Continue reading “LEGO Looper Makes Modular Music”

Lego Exoskeleton Mimics Pacific Rim

Lego Exoskeleton Controls Pacific Rim Robot

As hilariously outrageous as Pacific Rim was, it was still an awesome concept. Giant robot battle suits, duking it out with the aliens. Well, it looks as if it wasn’t quite as far-fetched as we first imagined. Maker [Danny Benedettelli] just released a video of his very own Lego exoskeleton suit that when worn can be used to control a desktop size Cyclops robot. You might remember [Danny] as the author of The Lego Mindstorms EV3 Library,

The Cyclops robot (also his design) was originally built four years ago using Lego Mindstorms NXT system with an Android phone running a custom app. Cyclops has been upgraded a bit for this demonstration. Now it communicates over Bluetooth with an Arduino to [Danny’s] telemetry suit.

Relatively speaking, the system is pretty simple. The Lego exoskeleton has potentiometers on each joint, which map to a degree of freedom for the robot. When one potentiometer spins, the associated robot joint mimics it. Simple, right?

Continue reading “Lego Exoskeleton Controls Pacific Rim Robot”

I Am NXT 3-Point Bend Tester. Please Insert Girder.

Learning with visuals can be very helpful.  Learning with models made from NXT Mindstorms is just plain awesome, as [Rdsprm] demonstrates with this LEGO NXT 3-point bend tester that he built to introduce freshmen to flexural deflection and material properties. Specifically, it calculates Young’s modulus using the applied force of a spring and the beam’s deflection. [Rdsprm] provides a thorough explanation in the About section of the YouTube video linked above, but the reddit comments are definitely a value-add.

[Rdsprm] built this from the Mindstorms education base set (9797) and the education resource set (9648). Each contestant endures a 5-test battery and should produce the same result each time. The motor in the foreground sets the testing length of the beam, and the second motor pulls the spring down using a gearbox and chain.

This method of deflection testing is unconventional, as [Rdsprm] explains. Usually, the beam is loaded incrementally, with deflection measured at each loading state. Here, the beam is loaded continuously. Vertical deflection is measured with a light sensor that reads a bar code scale on the beam as it passes by. The spring position is calculated and used to determine the applied force.

[Rdsprm] analysed the fluctuation in GNU Octave and has graphs of the light sensor readings and force-deflection. No beams to bend with your Mindstorms? You could make this Ruzzle player instead.

Continue reading “I Am NXT 3-Point Bend Tester. Please Insert Girder.”