Arduino Lego Sorter with vision

I'm thinking of making a Lego Sorter with a vision camera to help ID the piece. I want to sort by part number, not by color. I'd imagine the logic to go something like this:

1.) Trigger camera
2.) Scan object
3.) Look up object comparing it against a DB of known lego parts
4.) Sends results back to Arduino
5.) Sort

I think the hard part is step 3. Is this something doable with the arduino? Or is it best left for the raspberry pi? Thoughts on this?

Here's someone doing it with a raspberry pi
Video

he doesn't explain anything, just a demo of the sorter working.

Step 3 is the only difficult step. What is the approach?

I think step #5 will be the hardest to achieve. Please expand on what and how you think sorting will be achieved!

Specifically? No idea! That's why I'm here :slight_smile:
I'd imagine the arduino would scan the object in #2, then compare against a DB of known parts(?) the decide where to place the part. However, where is the DB? I'd think it's on the cloud. How do we access this cloud data? Where does the logic to compare the scanned parts vs DB of parts take place?

These are the initial questions I have. Thoughts?

So I was envisioning something like this:
Video

This is with a raspberry pi. But I find the arduino to be easier to work with.

How do you envision getting past step 3?

Good question, but it is not an Arduino question.

Most Arduinos have too little memory to do any serious image manipulation (if an image is a result of the "scan"), let alone comparison of images.

You might start by investigating the existence, locations, contents and structures of Lego part databases.

If you have to sort the Legos in order to take an individual picture, what is the point of sorting them a much later time?

The Legos are in mixed together. So I'll have a separator that separates them, take individual photos, processes, then sorts them to the appropriate bin.

There's a reason for that. Take a look at the specs of a RPi (CPU cores, clock speed, RAM memory...) and compare them to the specs of a variety of Arduino boards. What do you see in common?

Based on what criteria?

Same but different project.  Possibly useful.

How large variety of bricks does it need to handle? Maybe you don't need an Arduino at all? :slightly_smiling_face:

Yes I would agree that the HuskyLense is the way to go. I have one myself and it is fast and is simple to train.

I friend of mine who saw it working and had a Pixy2 said it knocked the socks of the Pixy2, which he considered useless.

The fact that the HuskyLens handles all the heavy grunt and is so easy to connect to the Arduino in several ways, does make it, in my opinion, an Arduino question.

PS. the Lego corporation make it very clear that these bricks should be called Lego and not Legos.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.