Introduction: DIY - Sorting by Weight

About: Artist, maker, teacher.

You have a workshop? Of course you have a few screws somewhere, well sorted. I have too. But after a few projects there are always screws left over, and you throw them in a box or bucket, right? And then? Can someone sort them?

No one there!


So I need a sorting machine. But screws can't be sorted by colour recognition (camera or sensor), here it's about size or weight. You could also work with cameras, image recognition and deep learning, but I don't have the time to train the system for that.

The machine consists of 6 units:

  1. Shaker (for separating the objects)
  2. Conveyor belt
  3. Photo-electric sensor
  4. Scale
  5. Wiper
  6. Sorter

The shaker and also the conveyor belt ensure that the screws or other objects are separated. Only then they can be weighed individually. The light barrier ensures that the belt stops when an object falls on the scales.

The scales, wiper and sorting ramp then do the real work.

Sorter

Supplies

  • Arduino Nano or another compatible microcontroller (ESP8266, ESP32)
  • wooden base plate
  • LCD display
  • rotary encoder for the menu
  • 9-12V power supply

Shaker:

  • Sheet metal / wood / cardboard
  • 9-12V motor, second-hand
  • TIP120 transistor
  • 4 steel springs

Conveyor belt:

  • Metal rails
  • 9-12V motor with gearbox
  • TIP120 transistor
  • 2 rollers
  • a strip of denim as belt

Photo-Electric Sensor:

  • LED
  • LDR
  • Resistors

Scale:

  • scale HX711 Load Cell Amplifier

Wiper and Sorter:

  • 2 servos MG996R (wiping and sorting)
  • metal sheet, wood, plastic, cardboard

Step 1: The Shaker

First of all, the screws (or other items to be sorted) must be separated. The easiest way to do this is with a shaker. If you want to get sweets out of a box, for example, you also shake them out carefully.

The shaker consists of a V-shaped chute made of aluminium (or steel, wood, cardboard) that rests on 4 springs. The shaking is done by a motor from an old printer, which I equipped with an unbalanced weight. Controlled by our microcontroller with a transistor, it does the separating.

Step 2: The Conveyor Belt

The conveyor belt brings our screws to the scales. On the way there, we make sure that the screws are really separated. A LED light barrier at the end also ensures that the belt is stopped in time when an object falls onto the scale, so that the weighting and sorting can be done.

The light barrier allows a screw to pass. Only when the screw falls from the belt onto the scales the motors are stopped.

Step 3: Photo-electric Sensor

The light barrier ensures that only a single object falls on the scale and the belt then stops. Normal light, infrared or laser light can be used here.

When an object passes the light barrier, a signal is triggered (sorterflag = 1). The motors only stop when the object leaves the light barrier again.

Step 4: The Scale

The scale is a weighing element that measures weights up to 1 kilogram. It is the heart of the system.

The scale must first be calibrated. To do this, load the calibration program "Calibration.ino" onto the Arduino and follow the instructions on the serial monitor. Also you need a calibrated weight or a coin for it

Later the sorting material is weighed on the scales, the Arduino decides in which box the screw is placed.

Step 5: Wiper and Sorter


One servo wipes the screw into a funnel, a second servo uses a slide to ensure that the screw goes into the correct box. And the sorting continues.

The Arduino is programmed to sort objects lighter than the minimum weight into container 1, objects too heavy end up in container 6.

Step 6: Wiring and Software

I built and tested the individual parts of the device separately and combined them into one Arduino program at the end.

I used a breadboard and cables as a quick prototype. However, professionals can create a circuit board (PCB).

Download "Sorting.ino" and upload it to the Arduino nano.

Step 7: The Menu

When switching on the unit, wait a few seconds until everything is initiated and the scale is set to 0. You can decide by the rotary encoder HOW the screws are to be sorted. Normally, a screw weighs 2 to 12 grams.

1 - use the old settings (saved in EEPROM)

2 - new settings

    weight from .... to ..... (0-1000g)

    in ... steps. (2-6)


Example:

If you enter a range from 0 to 11 grams and 5 containers, the Arduino will calculate:

  • Department 1: 0 - 2.2g
  • Department 2: 2.2 - 4.4g
  • Department 3: 4.4 - 6.6g
  • Department 4: 6.6 - 8.8g
  • Department 5: 8.8 - 11g


If you would use a ESP8266 or ESP32 instead if a simple Arduino, you could add a message function to your smartphone when the sorting is finished.

Step 8: Sorting