← Back to Build Instructions Overview Page
Following the part separation stage, individual LEGO bricks are conveyed to the scanner for recognition and classification. The scanning system is solely camera-based, featuring a conveyor belt that transports the LEGO bricks past the camera.
View through the scanner towards the v-channel with mirror and camera
The design of the scanner adopts a key idea from Johann Rocholl’s Conveyor belt for LEGO sorting. The solution consists of a single camera paired with a mirror, allowing the machine to capture two different perspectives simultaneously. The core motivation behind this is to capture the LEGO parts from multiple perspectives, as some parts are difficult to identify when viewed from certain angles. Choosing a mirror over multiple cameras not only simplifies the overall design but also ensures synchronization between the captured images. Additionally, it significantly reduces the computational and bus load.
Lighting is another crucial element in each scanning system. The machine utilizes strong, non-flickering illumination that is isolated from external environmental factors. This approach allows the camera to operate with very short exposure times, effectively minimizing motion blur and thereby enhancing the accuracy of the part identification process.
Object detection is realized via OpenCV’s MOG background subtraction. The moment the detected part reaches a pre-defined position in the image, two cut-outs are taken. One of the direct view and one via the indirect mirror view. Both cutouts are presented simultaneously to a multi input CNN, which consists of two weight sharing instances of the same pre-trained MobileNetV2 encoder plus a dense classification head. The network thus always works on image pairs. Both during training and inference.
Frame
At this time, BrickLink Studio natively does not support duplo bricks. Because of this, the build instructions use a large amount of 3001 2x4 bricks. In practice I prefer using duplo to speed-up the build.
Conveyor Belt Roller
Conveyor Belt
For the conveyor belt material I made very good experience with 100mm wide Woven Elastic Band. It is made from a blend of Polyester and Elastane and commonly used in sewing and clothing making e.g. as a waistband.
It is elastic and thus easy to put under tension but at the same time it has a certain stiffness so it stays in line with the conveyor and does not run off the rollers. Even without a crowned pulley this belt material stays on track very well.
To close the belt into a loop, I experimented with two methods: stapling and sewing.

