As someone who disassembles and repairs hardware, [Aad] eventually ended up with a huge collection of mixed bolts and screws. This led to creating the automatic bolt and screw sorting system you see here, although in a way it is just a proof of concept. Bolts and screws happen to be a useful application for now, but the system is capable of sorting just about any small objects.

Mixed pieces go onto a large conveyor belt, shown on the right. This feeds a few screws at a time down a chute, where they roll onto an illuminated platform.
Above the lit platform is a camera, and machine vision is used to detect the size and shape and orientation of each screw. A robotic gripper on a gantry picks the screws up one by one — separating them first if they happened to clump together — and places each in a drop-off cart. The cart drops the object into a receptacle with its brethren, making sure similar ones are grouped together. Watch it in action in the video, embedded below the page break.
It’s a great build that shows fancy components aren’t necessary for good results. Servos and steppers are controlled with an ESP32-WROOM board, and a piezo sensor detects screws falling off the conveyor. Some of you may have noticed a repurposed Ultimaker 3D printer serving as the bulk of the system, its hot end having been replaced with a gripper that can raise and lower. The overhead camera is an ESP32-CAM adapted to accept M12 lenses so it can focus on the platform.
There’s one more feature worth mentioning — the system also has the ability to measure the weight of a picked object by placing it onto a moveable inspection platform, which can optionally put it under a USB microscope for a closer look. Everything is controlled by a nearby PC, so there’s a lot of flexibility built into the system.
We suppose that once all the screws and bolts in a shop are sorted, it only makes sense to sort all the nuts. Are there other objects besides screws and bolts that would be useful to sort with a system like this? If you have any ideas, don’t keep them to yourself! [Aad] would love to hear your comments and ideas, so share them below.

Lego parts sorting? Feed it a parts list, your stock of assorted pieces.. Or let it sort everything. Needs good color recognition.
https://basically.website/ is project for that
I’m. Interested in the method used for part outline, I’m building a patterning system with vision that needs a reliable outline
“Contour Detection” will get you there.
https://www.youtube.com/watch?v=FKIn_UIsXy4 Contour Detection using OpenCV: A Comprehensive Guide
I need one I can dump a whole building into.
This does remind me of my senior project where I earned my BSCE. The project required sorting objects by colour. This is easily performed by young children, but took me about a month to teach a microcontroller how to decipher the numbers sent from a sensor. Thankfully I had a prior class in computer vision which helped immensely.
I noted in my project summary that this could also be used in sorting prescription pills (by colour, shape and size) used for medicating our senior citizens and help with medical emergencies as a result of taking too many/little at the [in]correct times.
But with computer vision is attention to the minutiae in what is being scanned is very important.
Kudos to those with the LEGO sorters.
My wife dropped a 1000 count assortment of different colored seed beads a week ago and if this could sort those by color then I might have been right when I said “we can probably build a robot to do it faster.”
(To clarify, she isn’t finished yet.)
Faster will be to vacuum clean them from the floor and order new ones. I was the robot sorter in such cases.
Hmm, no mention of sorting metric or asme threads which it might be sensitive enough to do
Yeah, good luck distinguishing between M5 and 10-32 threads. possible but unlikely with this setup.
I couldn’t help but think there’s plenty of scope to speed this up by feeding more screws at a time, start feeding as soon as the last screw is picked up, use electromagnetic gripper instead of jaws….
There’s no good reason to sully one’s collection with imperial threads in the first place. Caveat emptor.
Attach the load cell to the gripper. Tare when not holding anything, measure when gripping.
I am the maker of this project. It is difficult to measure weight with a load cell attached to the gripper. The movement and cabling disturbs the results.
The tension of the cabling makes makes attaching the load cell to gripper less accurate.
Here in Europe we see very few non metric screws. Maybe it is possible to check the threads when I add a telelens. Magnetic grippers do not work on atainless steel
Hi Aad. To detect pitch you first need a high resolution image of the contour. Then in the threaded region of the contour do a FFT and then detect the peak of the FFT, excluding the DC offset. That’s a pitch measurement which combined with other attributes like the head diameter (e.g. metric and imperial socket head cap screws have different head diameters) can relatively accurately distinguish between e.g. a 10-32 and M5 which would otherwise be difficult to tell with pitch and diameter measurements alone. Treat each physical attribute measurement a orthogonal measurement ( an N-dimensional coordinate space) and best fit is traditionally the one where the cosine angle is the smallest between a known coordinate and the measured.
Difference? You are not using enough force to assemble.
Crimp terminals. Spade, lug, ring. There are a bunch of ring terminals the same “size.” Eg. 12AWG wire, ring for #6 screw; 12AWG wire, #8 screw; 12AWG wire, #10 screw. They’re visually very similar.
Same with washers: #6, #8, and #10 washers have very similar ID and OD, as do 1/4″ and 5/16″. Determining by feel whether a washer in a bin is #10 fender or 5/16″ normal is difficult, especially when there are several lots of washers and all the ODs are slightly different.
How will it get a look inside the nut to measure the thread pitch? Or use different method?
In the lab at university students used to leave used resistors on top of the cabinet. I wanted to design a robot to sort then all out and put them back into their correct drawers according to resistance value.