
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>BrickSortingMachine</title>
        <description>Building a LEGO brick sorting machine</description>
        <link>https://bricksortingmachine.github.io/</link>
        <atom:link href="https://bricksortingmachine.github.io/feed.xml" rel="self" type="application/rss+xml"/>
        <pubDate>Tue, 14 Oct 2025 17:09:52 +0000</pubDate>
        <lastBuildDate>Tue, 14 Oct 2025 17:09:52 +0000</lastBuildDate>
        <generator>Jekyll v3.10.0</generator>
        
            <item>
                <title></title>
                <description>&lt;p&gt;To make the build of the Brick Sorting Machine (see &lt;a href=&quot;/lego-sorting-machine-diy-build-instructions&quot;&gt;build instructions&lt;/a&gt;) easy to reproduce, I decided to deliver the image based LEGO® brick identification for the machine as a remote web-service.&lt;/p&gt;

&lt;p&gt;As a hobby project with super limited development time, creating a remote service was the most time efficient path forward. It bypasses the need for me to dive into optimizing and quantizing neural networks for AI accelerator hardware. To continuously enhance its accuracy, the classifier training learns from the images this service processes. Every image submitted will be used to improve the model’s performance.&lt;/p&gt;

&lt;h2 id=&quot;public-dataset-releases&quot;&gt;Public Dataset Releases&lt;/h2&gt;

&lt;p&gt;After manual labeling of the data my plan is to publicly release the training data sets in regular intervals for training of everybody’s own classifier projects&lt;/p&gt;

&lt;h2 id=&quot;sw-interface&quot;&gt;SW Interface&lt;/h2&gt;

&lt;p&gt;The brick sorting machine software stack will be ready to connect to this classification backend within the next days. The service currently is in private beta test phase. If you are interested and building a compatible machine please reach out to me via &lt;a href=&quot;https://discord.com/users/1193229221863108698&quot;&gt;Discord&lt;/a&gt; to get an API-KEY.&lt;/p&gt;

&lt;h2 id=&quot;backgrounds&quot;&gt;Backgrounds&lt;/h2&gt;

&lt;p&gt;The image classification backend is reachable via &lt;a href=&quot;http://api.bricksortingmachine.com/docs&quot;&gt;api.bricksortingmachine.com&lt;/a&gt;. Its neural network is fully tuned to work best as a classifier for the Brick Sorting Machine with its ability to capture two viewing perspectives simultaneously. It classifies parts into one of 21 part classes, which perfectly fits the machine’s 22 bins (with one bin for unclassified parts).&lt;/p&gt;

&lt;p&gt;The classification extracts the two known regions of interest from the provided image and feeds them through the visual feature encoders. At this point this mid-level feature information is fused from both perspectives and provided jointly to the classification head. The network thus always works on image pairs both at training and inference time. This way the the classifier can make maximum use of the mutual multi-view information which often is key to uniquely identify part classes.&lt;/p&gt;

&lt;p&gt;Currently available part classes:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    bar
    brick1x
    brick2x
    brick_modified
    car
    hinge
    human
    multiple_parts
    plane
    plate
    plate1x
    plate2x
    plate_modified
    plate_shaped
    round
    round_slope
    slope
    slope1x
    small
    tile
    window
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;!--
- Raspberry Pi 5 RAM to be clarified 
    - https://www.berrybase.de/raspberry-pi-5-8gb-ram
    - 83€
- Active Cooler
    - https://www.berrybase.de/raspberry-pi-active-cooler-luefter-fuer-raspberry-pi-5
    - 5.80€
- Lens
    - https://www.berrybase.de/6mm-weitwinkelobjektiv-cs-mount
    - 28.90€
- Camera
    - https://www.berrybase.de/raspberry-pi-high-quality-kamera
    - 59.90€
--&gt;
</description>
                <pubDate>Sat, 23 Aug 2025 05:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/classification-webservice</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/classification-webservice</guid>
                
                <category>diy</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;← &lt;a href=&quot;lego-sorting-machine-diy-build-instructions&quot;&gt;Back to Build Instructions Overview Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/intro-own/04_scanner.webp&quot; alt=&quot;View through the scanner towards the v-channel with mirror and camera&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;View through the scanner towards the v-channel with mirror and camera&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The design of the scanner adopts a key idea from Johann Rocholl’s &lt;a href=&quot;https://www.youtube.com/watch?v=o-FL02ePFEU&quot;&gt;Conveyor belt for LEGO sorting&lt;/a&gt;. 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Object detection is realized via &lt;a href=&quot;https://docs.opencv.org/3.4/d8/d38/tutorial_bgsegm_bg_subtraction.html&quot;&gt;OpenCV’s MOG background subtraction&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h2 id=&quot;frame&quot;&gt;Frame&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/instructions/scanner/scanner_roller.png&quot; alt=&quot;Photo of the end-roller of a conveyor belt&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Conveyor Belt Roller&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;conveyor-belt&quot;&gt;Conveyor Belt&lt;/h2&gt;

&lt;p&gt;For the conveyor belt material I made very good experience with 100mm wide &lt;a href=&quot;https://www.ebay.de/itm/334604695338&quot;&gt;Woven Elastic Band&lt;/a&gt;. It is made from a blend of Polyester and Elastane and commonly used in sewing and clothing making e.g. as a waistband.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;To close the belt into a loop, I experimented with two methods: stapling and sewing.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/instructions/scanner/belt_stapled.jpg&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/instructions/scanner/belt_sewed.jpg&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;Closing the belt to a loop by stapling (left) and sewing (right)&lt;/em&gt;
&lt;/div&gt;
</description>
                <pubDate>Sat, 23 Aug 2025 05:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/sorting-machine-diy-build-instructions-scanner</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/sorting-machine-diy-build-instructions-scanner</guid>
                
                <category>diy</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;← &lt;a href=&quot;lego-sorting-machine-diy-build-instructions&quot;&gt;Back to Build Instructions Overview Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The electronics of the Brick Sorting Machine are currently under heavy re-work. My goal is to make the build easier to reproduce and a key element of this is to reduce the electronics to a 1-box setup (having moth the machine control and the image processing on the Raspberry). The following electronics is the future setup after the re-work is completed. Thus currently &lt;strong&gt;this list is untested&lt;/strong&gt;:&lt;/p&gt;

&lt;h3 id=&quot;compute-and-camera&quot;&gt;Compute and Camera&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.berrybase.de/raspberry-pi-5-8gb-ram&quot;&gt;Raspberry Pi 5 8GB&lt;/a&gt; ~83€&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.berrybase.de/raspberry-pi-active-cooler-luefter-fuer-raspberry-pi-5&quot;&gt;Active Cooler&lt;/a&gt; ~6€&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.berrybase.de/raspberry-pi-camera-module-3-wide-12mp&quot;&gt;Raspberry Pi Camera Module 3 Wide 12MP&lt;/a&gt; ~40€&lt;br /&gt;(&lt;strong&gt;not&lt;/strong&gt; the NoIR version)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.berrybase.de/raspberry-pi-27w-usb-c-power-supply-netzteil-schwarz&quot;&gt;27W USB-C Power Supply&lt;/a&gt; ~13€&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.berrybase.de/detail/019234a5de5771ef9009ec28c179161b&quot;&gt;Housing&lt;/a&gt; ~5€
    &lt;ul&gt;
      &lt;li&gt;Needs space for active cooler and venting channels&lt;/li&gt;
      &lt;li&gt;Needs outlet for Camera Serial Interface (CSI) port&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sum: approx. 150€&lt;/p&gt;

&lt;h3 id=&quot;motor-controllers--servos&quot;&gt;Motor Controllers &amp;amp; Servos&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;2x &lt;a href=&quot;https://eckstein-shop.de/Keyestudio-2KG-Gray-Servo-270-33V-to-6V&quot;&gt;Servo Keyestudio 270° compatible to LEGO® bricks&lt;/a&gt; ~9€&lt;/li&gt;
  &lt;li&gt;1x &lt;a href=&quot;https://docs.arduino.cc/hardware/nano/&quot;&gt;Arduino Nano&lt;/a&gt; for the rotating Slide 1-5€&lt;/li&gt;
  &lt;li&gt;DC Motor Controller for 9V LEGO® compatible motors
    &lt;ul&gt;
      &lt;li&gt;As of now I did not find a zero-soldering, off-the-shelf solution for this. That’s why I am using several &lt;a href=&quot;https://www.ti.com/product/L293D&quot;&gt;L293D&lt;/a&gt; dual H-bridges connected via GPIO to the Raspberry. As I am not an electronics professional I can neither recommend nor advise against using this solution. For this approach you need to do a small amount of soldering, use a pegboard or custom PCB.&lt;/li&gt;
      &lt;li&gt;There is many small scale DC motor drivers on the market even with USB support. If you found a good solution I’d love to get a suggestion and open to integrate it with the software.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;!--
- Lens
    - https://www.berrybase.de/6mm-weitwinkelobjektiv-cs-mount
    - 28.90€
- Camera
    - https://www.berrybase.de/raspberry-pi-high-quality-kamera
    - 59.90€
--&gt;
</description>
                <pubDate>Sat, 23 Aug 2025 05:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/sorting-machine-diy-build-instructions-list-of-materials-and-electronics</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/sorting-machine-diy-build-instructions-list-of-materials-and-electronics</guid>
                
                <category>diy</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;In this article series I publish the plans and DIY instructions for building your own LEGO® brick sorting machine. Feedback on the build or any questions are highly encouraged. As I am not an electronics professional, please feel free to reach out via &lt;a href=&quot;https://discord.com/users/1193229221863108698&quot;&gt;Discord&lt;/a&gt; or &lt;a href=&quot;https://www.instagram.com/bricksortingmachine&quot;&gt;Instagram&lt;/a&gt; if you identify problems.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/instructions/overview.png&quot; alt=&quot;Image of a LEGO sorting machine with the four main elements highlighted&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;The 4 modules of a typical LEGO sorting machine: (1) Bulk Storage (2) Part Separation (3) Scanner (4) Sorted Storage&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;article-overview&quot;&gt;Article Overview&lt;/h2&gt;
&lt;p&gt;The instructions follow the &lt;a href=&quot;/exploring-lego-sorting-machines-a-survey-of-designs&quot;&gt;4-stage design&lt;/a&gt; common to many sorters:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Material/Electronics&lt;/strong&gt; - &lt;a href=&quot;/sorting-machine-diy-build-instructions-list-of-materials-and-electronics&quot;&gt;List of Materials&lt;/a&gt; needed for the build&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Software&lt;/strong&gt; - The &lt;a href=&quot;https://github.com/BrickSortingMachine/BrickSortingMachine-sorter&quot;&gt;open source software stack for LEGO sorting machines&lt;/a&gt; on GitHub&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Main Modules&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Bulk Storage&lt;/strong&gt; - Build instructions of the bulk part storage&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Part Separation&lt;/strong&gt; - &lt;a href=&quot;/diy-build-instructions-vchannel&quot;&gt;Vibration Feeder Build Instructions&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Scanner&lt;/strong&gt; - &lt;a href=&quot;/sorting-machine-diy-build-instructions-scanner&quot;&gt;Plans to build the scanner module&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Sorted Storage&lt;/strong&gt; - &lt;a href=&quot;/robotic-sorting-slide&quot;&gt;Blog article on the build of the sorting slide&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;bl-studio-files&quot;&gt;BL-Studio Files&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/instructions/combined.png&quot; alt=&quot;Rendering of the LEGO brick sorting machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Rendering of the LEGO sorting machine in BrickLink Studio&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here are the BrickLink studio files to assist with the LEGO brick part of the build:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/BrickSortingMachine/BrickSortingMachine/tree/main/doc/Hardware&quot;&gt;BL studio files on Github&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.bricklink.com/v3/studio/design.page?idModel=730441&quot;&gt;Part List on BrickLink&lt;/a&gt; &lt;em&gt;approx. cost 150EUR&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <pubDate>Sat, 09 Aug 2025 06:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/lego-sorting-machine-diy-build-instructions</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/lego-sorting-machine-diy-build-instructions</guid>
                
                <category>diy</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;← &lt;a href=&quot;lego-sorting-machine-diy-build-instructions&quot;&gt;Back to Build Instructions Overview Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The task of part separation is to take the entangled stream of bricks and separate it into individual parts which can be passed on to the scanner strictly one by one at a time. Separation is especially challenging with LEGOs, since the parts have a huge variety in size (e.g. 1x1 plates stuck inside a window) and also friction (e.g. bricks vs. rubber wheels). When building a LEGO Sorting Machine this is one of the key components to get right since large parts of the efficiency of the overall machine depend on it.&lt;/p&gt;

&lt;p&gt;There is a big variety of potential designs and &lt;a href=&quot;/exploring-lego-sorting-machines-a-survey-of-designs&quot;&gt;many earlier machines&lt;/a&gt; implemented this component. The approach I chose is a pair of v-channel vibration feeders and this article provides building instructions as well as &lt;a href=&quot;https://www.bricklink.com/v3/studio/download.page&quot;&gt;bricklink studio&lt;/a&gt; CAD files.&lt;/p&gt;

&lt;!--The key principle to
Held by rubber bands which allow limited vertical and longitudinal motion but restruct any lateral motion.
--&gt;

&lt;h2 id=&quot;the-build&quot;&gt;The Build&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/BrickSortingMachine/BrickSortingMachine/blob/main/doc/Hardware/vchannel.pdf&quot;&gt;Build Instructions (PDF)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/BrickSortingMachine/BrickSortingMachine/blob/main/doc/Hardware/vchannel.io&quot;&gt;Bricklink Studio CAD model&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.bricklink.com/v3/studio/design.page?idModel=724327&quot;&gt;Part List on BrickLink&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;additional-information&quot;&gt;Additional Information&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why 2 channels in series&lt;/strong&gt; - Having multiple vibration channels behind each other has 2 key advantages. The first is that channel 2 is pulsed twice as often as channel 1. The parts thus move at higher speeds. Having two different speeds “pulls” the parts apart from each other longitudinally. The second advantage is the vertical step between both channels. The small fall gives another chance to separate strongly entangled parts e.g. two window elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rubber Bands&lt;/strong&gt; - The v-channel is suspended from 2 rubber bands at each corner. 1 band to carry the vertical load of the v-channel and 1 band to center the longitudinal position. The offset weight of the vibration motor moves the v-channel in the freedom the rubber bands provide. Only the lateral position is fully constrained. I will post a photo as soon as possible.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/instructions/vchannel/rubber_bands.jpg&quot; alt=&quot;Rubber bands holding the v-channel&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Elastic mount of the v-channel using rubber bands. The mounting is flexible in vertical and longitudinal direction but constrained laterally (sry for the dust - the machine is located in a former wood shop 😊)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tuning&lt;/strong&gt; - This v-channel has several adjustable parameters. 1) the inclination of the channel 2) the motor speed 3) the mass of the offset-weight. Alls these parameters need to be tuned to your specific machine. Over very long periods of time I also noticed the optimal parameters to slightly change. I chose the old 9V motors for their high RPMs but high speed is not always best. I tuned their speed via the motor driver to hit the resonance frequency of my v-channel. This way the motion is strong enough to disentangle the lego parts. Also the inclination needs to be calibrated to a sweet spot. It needs to be steep enough to still transport the parts forward. It needs to be shallow enough so that entangled pieces do not pass through the v-channel too quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Surface&lt;/strong&gt; - To reduce surface friction of the plates I added paper sticky tape and it works very well. Adding tiles on top of the plates would increase the mass of the v-channel and thus require a bigger vibration motor. Using large tiles instead of the plates could be another solution, they then require a different technique to be joined at the bottom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Est. Cost&lt;/strong&gt; - The pure material cost of a v-channel is approx €20 according to the &lt;a href=&quot;https://www.bricklink.com/v3/studio/design.page?idModel=724327&quot;&gt;part list on BrickLink&lt;/a&gt;.&lt;/p&gt;

&lt;!-- INSERT HERE: Embed Build Video (locally) --&gt;
</description>
                <pubDate>Sat, 09 Aug 2025 05:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/diy-build-instructions-vchannel</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/diy-build-instructions-vchannel</guid>
                
                <category>diy</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;To keep up with the community of LEGO® sorting machine makers, I want to continue showcasing recently published work. Today’s highlight is &lt;a href=&quot;https://www.instagram.com/lego.sorting.machine/&quot;&gt;lego.sorting.machine&lt;/a&gt;. It was built in public on Instagram since August 2023 and very recently completed its end-to-end sorting milestone.&lt;/p&gt;

&lt;h2 id=&quot;first-impressions&quot;&gt;First Impressions&lt;/h2&gt;

&lt;p&gt;What first comes to mind when looking at this machine is its super clean design, utilizing almost purely white parts. It is built from a mixture of standard LEGO® parts and many custom 3D printed LEGO® compatible components. Its overall size fits nicely on a table-top. The usage is primarily targeted towards efficiently sorting smaller LEGO® parts.&lt;/p&gt;

&lt;p&gt;The overall setup follows the &lt;a href=&quot;/exploring-lego-sorting-machines-a-survey-of-designs&quot;&gt;classic 4-stage design&lt;/a&gt; common to many sorters:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Bulk Storage&lt;/strong&gt; - Holding the unsorted bulk&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Part Separation / Unification&lt;/strong&gt; - Isolating individual bricks&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Scanner&lt;/strong&gt; - Camera-based part identification&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Sorted Storage&lt;/strong&gt; - Directing parts to the respective bins&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, that’s where the standard design ends, as the rest of the machine is
packed with innovative features.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/lego.sorting.machine/bulk-storage.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/lego.sorting.machine/scanner.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/lego.sorting.machine/rotating-slide.png&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;&lt;strong&gt;Left:&lt;/strong&gt; Bulk part storage. &lt;strong&gt;Middle:&lt;/strong&gt; Two sequential v-channel vibration feeders. &lt;strong&gt;Right:&lt;/strong&gt; Rotating and pitching slide to guide identified parts into custom, stacked storage boxes.&lt;/em&gt;
&lt;/div&gt;

&lt;h2 id=&quot;unique-v-channel-monitoring&quot;&gt;Unique V-Channel Monitoring&lt;/h2&gt;

&lt;p&gt;One particularly unique aspect is the use of a second camera for fill state monitoring of the vibration feeders. Both the bulk storage belt and the v-channels themselves can be adaptively controlled based on the fill state of the downstream stage. Since bricks often behave chaotically in the feeder, this is a clever automation step to ensure a steady, well-separated stream of parts. This is key for an efficient machine running at high parts per minute.&lt;/p&gt;

&lt;h2 id=&quot;innovative-scanner-design&quot;&gt;Innovative Scanner Design&lt;/h2&gt;

&lt;p&gt;The scanner stage also incorporates unique elements:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Transparent Belt&lt;/strong&gt; - The machine uses a transparent conveyor belt. This is a very unique choice, which enables the scanning of the underside of LEGO® parts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Mirror&lt;/strong&gt; - Complementing the transparent belt, a mirror is positioned within the scanner. This can allow the overall system to capture top, front and bottom perspectives to disambiguate part classification.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;rotating-slide&quot;&gt;Rotating Slide&lt;/h2&gt;

&lt;p&gt;The final sorting stage features a modern rotating slide mechanism:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Yaw and Pitch Control&lt;/strong&gt; - The slide shows both yaw (rotation) and pitch (angling) capabilities. This allows it to access two levels of sorting bins, pushing the sortable class count to 16 while keeping a compact footprint.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User-Friendly Storage&lt;/strong&gt; - The sorting chute leads to stacked boxes. This design offers great usability, as the boxes can be easily removed, emptied and replaced without disrupting the machine’s operation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/lego.sorting.machine/tray.png&quot; alt=&quot;A tray with sorted LEGO parts&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;A custom, stackable sorting tray for efficient part unloading&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Overall, the &lt;a href=&quot;https://www.instagram.com/lego.sorting.machine/&quot;&gt;lego.sorting.machine&lt;/a&gt; presents a highly refined and innovative take on LEGO® sorting, introducing several novel ideas. Congratulations for reaching this big milestone, and I hope you will continue building!&lt;/p&gt;
</description>
                <pubDate>Tue, 22 Apr 2025 11:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/instagram-lego-sorting-machine</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/instagram-lego-sorting-machine</guid>
                
                <category>community</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;The motivation is straightforward: LEGO so far has produced approximately 20,000 different parts (including variations such as color). To advance sorting machines beyond handling part classes and enable sorting by individual part IDs, the number of discrete storage locations must strongly increase.&lt;/p&gt;

&lt;p&gt;Storage approaches typically scale hardware needs linearly in the number of bins. For example, a &lt;a href=&quot;/exploring-lego-sorting-machines-a-survey-of-designs#stage-4--sorted-storage&quot;&gt;belt-and-gate system&lt;/a&gt; requires one dedicated gate and servo for each storage location. This quickly becomes infeasible as the number of bins increases, leading to complex and expensive machines.&lt;/p&gt;

&lt;h2 id=&quot;a-scalable-approach-automated-storage-and-retrieval-systems-asrs&quot;&gt;A Scalable Approach: Automated Storage and Retrieval Systems (AS/RS)&lt;/h2&gt;

&lt;p&gt;To overcome this limitation, I’m exploring an approach with more favorable scaling properties. It draws inspiration from large-scale warehouse storage, specifically Automated Storage and Retrieval Systems (AS/RS). These systems efficiently manage vast quantities of goods using automated cranes or shuttles to retrieve items from dense storage racks.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/asrs/arno-senoner-warehouse-wide.jpg&quot; alt=&quot;Photo of an automated highbay warehouse&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;An automated highbay warehouse (photo by &lt;a href=&quot;https://unsplash.com/@arnosenoner?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash&quot;&gt;Arno Senoner&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/photos/blue-and-brown-metal-bridge-yqu6tJkSQ_k?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash&quot;&gt;Unsplash&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a proof of concept, I plan to integrate a small-scale, DIY AS/RS with my existing LEGO brick sorting machine. The sorter will continue classifying parts as usual but will now instruct the storage system to retrieve the appropriate bin for depositing each part. The core idea is simple: If the DIY automated storage system can reliably manage 100 bins, scaling up to 1,000 bins—or even more—should be achievable by either increasing its physical size or deploying multiple AS/RS units side by side.&lt;/p&gt;

&lt;p&gt;More importantly, this approach shifts the complexity from handling individual parts to moving entire bins, which not only simplifies automation but also enables instant part retrieval. For BrickLink sellers and advanced LEGO builders, this means dramatically faster access to specific parts. Instead of manually searching through drawers or containers, the system can fetch and deliver the required bin in seconds, streamlining the entire building and order fulfillment process.&lt;/p&gt;

&lt;p&gt;Let me summarize the key requirements for this project:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Scale&lt;/strong&gt; - The system must support ≥100 storage bins, with the option for further internal subdivisions to accommodate smaller parts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Efficient Operation&lt;/strong&gt; - The system should enable ≥10 storage operations per minute without introducing additional latency.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;design&quot;&gt;Design&lt;/h2&gt;
&lt;p&gt;The design and construction of the AS/RS will revolve around three major components:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Storage Rack&lt;/strong&gt; - A structured shelving system to hold each storage bin in a 2D grid layout.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Moving Gantry&lt;/strong&gt; - A mechanism providing precise X/Y motion across the storage rack to access bins.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Telescopic Fork&lt;/strong&gt; - A retrieval mechanism that extends and retracts along the Z-axis, allowing bins to be pulled from / pushed to the rack.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;storage-rack&quot;&gt;Storage Rack&lt;/h3&gt;

&lt;p&gt;The storage rack serves as the structural backbone of the system, organizing bins in a grid layout for efficient retrieval. For storage bins, I have chosen off-the-shelf &lt;a href=&quot;https://www.1a-topstore.eu/Einsatzkasten-E-45-4-Farbe-gruen-162-x-108-x-45-mm-lxbxh-aus-PS-1-VE-25-Stueck&quot;&gt;polystyrene sorting bins&lt;/a&gt;. Priced at just €1.70 per bin, they are cheap and at the same time available quickly. The bins measure 162mm x 108mm x 45mm. They are thus large enough to accommodate even bigger LEGO parts while at the same time allowing them to be further subdivided to maximize storage density for smaller parts.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/asrs/storage-rack.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/asrs/storage-box.png&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;Storage rack featuring 10x8 bins and &lt;a href=&quot;https://www.1a-topstore.eu/Einsatzkasten-E-45-4-Farbe-gruen-162-x-108-x-45-mm-lxbxh-aus-PS-1-VE-25-Stueck&quot;&gt;polystyrene sorting tray&lt;/a&gt;&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;For the first prototype setup, I am targeting a 10-by-8 grid of bins. To ensure smooth retrieval, I’ve accounted for small gaps between bins, bringing the total estimated dimensions of the storage system to approximately 1.65m x 0.8m. This compact footprint is ideal, as it allows the unit to fit neatly behind the existing sorting machine while still providing high storage capacity.&lt;/p&gt;

&lt;h3 id=&quot;gantry&quot;&gt;Gantry&lt;/h3&gt;
&lt;p&gt;The moving gantry is responsible for precise 2D motion across the storage rack, enabling the system to position itself over any bin. To achieve smooth and reliable movement, I drew inspiration from DIY CNC machines and 3D printers, which commonly rely on linear rails for accurate motion. However, full-length linear rails at the scale required for this project are prohibitively expensive, prompting me to explore more cost-effective alternatives.&lt;/p&gt;

&lt;p&gt;For the vertical Y-axis, I opted for &lt;a href=&quot;https://de.aliexpress.com/item/1005004178133675.html&quot;&gt;round linear bearings&lt;/a&gt;, which provide a reasonable balance between precision and affordability. These bearings allow smooth movement while keeping costs lower than premium linear rail systems.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/asrs/y-axis-bearings.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/asrs/x-axis-wheels.png&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;X/Y motion mechanics using linear bearings and aluminium extrusions&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;For the horizontal X-axis, which spans a significant length, I needed an even more budget-friendly yet effective solution. Drawing inspiration from entry-level 3D printers like the Ender 3, I chose &lt;a href=&quot;https://www.aluxprofil.de/aluminium-nutprofil-2020-v-slot-schwarz/a3957&quot;&gt;20mm x 20mm V-slot aluminium extrusions&lt;/a&gt; paired with matching &lt;a href=&quot;https://www.amazon.de/dp/B097PBYHJS&quot;&gt;rubber wheels&lt;/a&gt; that fit precisely into the V-slot profile. These components are readily available as off-the-shelf replacement parts for 3D printers, making them both cost-effective and easy to source. The wheels come as complete assemblies with pre-mounted bearings, screws, and spacers, simplifying integration into the gantry design.&lt;/p&gt;

&lt;p&gt;The gantry’s wheel configuration is designed to ensure rigidity and maintain precise vertical alignment:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Two wheels on top of the extrusion rail&lt;/li&gt;
  &lt;li&gt;Two wheels below, running along the underside of the rail&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup effectively prevents unwanted movement or wobble, ensuring the gantry remains stable as it moves across the storage rack. The two upper wheels bear the majority of the load, supporting the weight of the moving gantry assembly. To ensure long-term durability, I will closely monitor these wheels, their bearings, and their mounting points for any signs of wear. If necessary, I will reinforce the structure or integrate additional wheels to better distribute the load and enhance long-term reliability.&lt;/p&gt;

&lt;p&gt;Beyond load-bearing considerations, the gantry must be exceptionally rigid, particularly against torsion and racking forces, which could cause misalignment. To address this, I designed it with a wide stance and rigid diagonal supports, improving structural integrity. The stainless steel rods of the vertical Y-axis are securely mounted at the gantry ends using press fittings, which are tensioned with small screws to ensure a stable connection. This setup enhances overall rigidity and minimizes flex during rapid movements.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/asrs/rigid-gantry2.png&quot; alt=&quot;Image of the end piece of the moving gantry&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Gantry-end element reinforced for shearing forces&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The telescopic fork, serving as the end-effector that interacts with the storage bins, requires an onboard stepper motor for its operation. Consequently, cables must be routed to the fork while allowing for unrestricted movement along both the X and Y axes.&lt;/p&gt;

&lt;p&gt;To achieve clean and reliable cable management, I plan to incorporate miniature drag chains along the linear rails. These chains will guide and protect the cables, ensuring they move smoothly without tangling or excessive strain. However, in the current CAD design, these drag chains have not yet been included. My approach is to first build a prototype without them, allowing me to gain practical experience with the system before finalizing the cable routing.&lt;/p&gt;

&lt;p&gt;The same iterative approach applies to end-stop switches, which are critical for automated homing and safe operation. These switches will enable the system to accurately reset its position upon startup, preventing misalignment or unintended movements. They will be added in later iterations as I refine the design based on real-world testing results.&lt;/p&gt;

&lt;h3 id=&quot;telescopic-fork&quot;&gt;Telescopic Fork&lt;/h3&gt;

&lt;p&gt;The telescopic fork serves as the end-effector responsible for handling storage bins. Its retrieval process follows a three-step sequence:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The fork extends beneath the designated bin, reaching into the storage rack.&lt;/li&gt;
  &lt;li&gt;The gantry lifts the fork, raising the bin from its slot.&lt;/li&gt;
  &lt;li&gt;The fork then retracts, carrying the bin along with it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is a wide range of DIY inspiration available showcasing various approaches to building a telescopic fork. The most common design mounts the motor on the stationary base, using a system of belts and pulleys to coordinate the movement of the telescoping segments. However, the &lt;a href=&quot;https://www.youtube.com/watch?v=qlHrXn_9SeY&quot;&gt;Awesomemakes YouTube channel&lt;/a&gt; presents a more elegant solution: By mounting the motor to the middle segment of the fork, the design achieves a much simpler motion coupling. This approach reduces mechanical complexity and minimizes the number of moving parts.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/asrs/maker-tutor-diy-mini-pallet-as-rs.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/asrs/nathan-koflanovich-mini-pallet-asrs-cycle-testing.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/asrs/awesomemakes-logistis-robot-prototype.png&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;Telescopic forks of existing DIY AS/RS projects: &lt;a href=&quot;https://www.youtube.com/watch?v=qlHrXn_9SeY&quot; target=&quot;_blank&quot;&gt;Youtube/awesomemakes&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=04ududkLlSw&quot; target=&quot;_blank&quot;&gt;Youtube/Maker Tutor&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=ksVe7vame3Q&quot; target=&quot;_blank&quot;&gt;Youtube/Nathan Koflanovich&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=fZx8tUw4hQA&quot; target=&quot;_blank&quot;&gt;Youtube/Mr Jos&lt;/a&gt;&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;For my own design, I decided to combine both approaches: I will mount the motor to the middle segment to benefit from the simplified mechanics, but instead of using gears, I plan to use one belt to achieve synchronized motion between the elements.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/asrs/fork-cad-large.gif&quot; alt=&quot;Animation of a telescopic fork&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;CAD drawing of the telescopic fork&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The fork is constructed from five 3D-printed components: the base, middle, and top sliding segments, a motor mounting plate (orange), and a pulley holder (pink). The motor is rigidly attached to the mounting plate, which is itself fastened to the middle segment of the fork using elongated screw holes. These slots allow for precise adjustment of the motor position to tension the belt. The pulley holder (pink) is printed separately and is only glued in place after the three sliding segments have been nested together.&lt;/p&gt;

&lt;p&gt;At this stage, the design does not incorporate any linear rails or bearings. Instead, it relies solely on PLA plastic surfaces sliding directly against each other. While this keeps the construction lightweight and simple, I’m uncertain about its long-term durability. This aspect will need to be closely monitored for wear over time.&lt;/p&gt;

&lt;p&gt;In addition, the fit and tolerances between the sliding elements are critical: The parts must move with minimal friction while also maintaining tight alignment to prevent play. This is especially important when the fork is fully extended backward, as the motor (being the heaviest component) is positioned far behind the mounting point. This could introduce imbalance or sagging.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/asrs/fork-extend.png&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/asrs/fork-retract.png&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;The telescopic fork allows extension in both directions. This is enabled by the motor being mounted to the underside and a matching cutout in the base segment.&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;It is crucial to the overall design that the fork can extend in both directions—forward into the storage rack and backward toward the sorting machine. This bidirectional capability offers two key advantages:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Future Expandability&lt;/strong&gt; – It opens the possibility of adding a second storage rack on the opposite side of the gantry. This would double the storage capacity without requiring any mechanical changes to the fork or gantry system. The same hardware could serve both sides, maximizing efficiency within the same footprint.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Precise Bin Positioning&lt;/strong&gt; – Extending the fork toward the sorting machine also allows the system to precisely adjust the position of the bin during part insertion. This fine-grained control over where the LEGO piece lands within the bin will make it possible to implement internal subdivisions. Especially for small parts, this would significantly increase storage density by allowing multiple sub-compartments within a single bin, each dedicated to a different part or color variant.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;wrapping-up&quot;&gt;Wrapping Up&lt;/h3&gt;

&lt;p&gt;This concludes the overview of the current AS/RS design work at the CAD level. Nearly all core components are designed, with some details still left open.&lt;/p&gt;

&lt;p&gt;In parallel, I’ve already begun 3D printing for the physical prototype, testing key subsystems like the gantry mechanics, motor controllers and the telescopic fork in real-world conditions. These tests will provide lots of important early learnings.&lt;/p&gt;

&lt;p&gt;I’ll be sharing an update on these tests very soon, here on the blog. Until then, feel free to reach out! I’m always happy to connect with fellow builders, makers, and curious minds — whether you have questions, suggestions, or just want to chat about LEGO sorter projects. The easiest way to reach me is via &lt;a href=&quot;https://discord.com/users/1193229221863108698&quot;&gt;Discord&lt;/a&gt; or &lt;a href=&quot;https://www.instagram.com/bricksortingmachine&quot;&gt;Instagram&lt;/a&gt;. Looking forward to hearing from you!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/asrs/complete.gif&quot; alt=&quot;CAD animation of a DIY warehouse system&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;CAD drawing of the automated storage and retrieval system (without z-axis)&lt;/em&gt;&lt;/p&gt;
</description>
                <pubDate>Sat, 05 Apr 2025 11:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/scalling-storage</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/scalling-storage</guid>
                
                <category>build</category>
                
                <category>update</category>
                
                <category>asrs</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;The goal of this rebuild is to maximize the machine’s operation time by allowing it to run unattended for longer periods without human support. This includes simplifying and accelerating human maintenance, such as refilling unsorted parts and emptying storage containers for sorted LEGO® bricks. There are &lt;a href=&quot;/exploring-lego-sorting-machines-a-survey-of-designs#stage-4--sorted-storage&quot;&gt;many possible options&lt;/a&gt; for designing the sorted storage: Conveyor belts, horizontal/vertical gates, pneumatic/mechanical approaches, etc. To reduce complexity, space and hardware requirements, I decided to follow the simple rotational slide design principle.&lt;/p&gt;

&lt;p&gt;Bricks are falling on a slide which sits on top of a rotating platform. Based on the brick classification results, the platform rotates in order to direct each brick into its target bin. This design is very hardware efficient since it merely uses two servos to serve a large number of densely packed storage bins. As a bonus, timing is not particularly critical with this system.&lt;/p&gt;

&lt;h2 id=&quot;first-designs&quot;&gt;First Designs&lt;/h2&gt;
&lt;p&gt;My very first design iteration of the slide was built mostly from Lego (unfortunately no pictures were taken at that time yet). The construction was quite large, thus resulting in a pretty high slide mass. The high mass far off the slide’s center of rotation created a large moment of inertia. The servo was under high load and during acceleration and deceleration there were oscillations.&lt;/p&gt;

&lt;p&gt;Thus I learned to keep the mass low which led to the second design iteration built from a mixture of LEGO bricks and cardboard. It immediately performed much better. The oscillations were greatly reduced. The servo was able to position the slide quickly and accurately above the bins. During this time I was using hardware storage containers as storage bins (after all this whole machine is being built in a woodshop).&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/slide_side_view.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/full_machine_first_version.webp&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;First variants of the cardboard slide&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;On the electronics side, the slide is actuated by &lt;a href=&quot;https://eckstein-shop.de/Keyestudio-2KG-Gray-Servo-270-33V-to-6V&quot;&gt;360° Geekservos&lt;/a&gt;. Out of the box they are LEGO compatible so no adapters had to be made. The servos are controlled by an Arduino Nano. The code of the slide controller (and the full machine) is available on &lt;a href=&quot;https://github.com/BrickSortingMachine/BrickSortingMachine-sorter&quot;&gt;GitHub&lt;/a&gt;. It uses the excellent &lt;a href=&quot;https://www.arduino.cc/reference/en/libraries/servoeasing&quot;&gt;ServoEasing library&lt;/a&gt; which enables smooth acceleration curves. The Arduino receives its motion commands via USB/serial by the serial service of the sorting machine stack (&lt;a href=&quot;/system-architecture-of-the-lego-sorting-machine&quot;&gt;sorting machine architecture&lt;/a&gt;).&lt;/p&gt;

&lt;h2 id=&quot;going-2d&quot;&gt;Going 2D&lt;/h2&gt;
&lt;p&gt;Right from the beginning I wanted the slide to operate in 2 dimensions. Thus not just rotate but also pitch. This would at least double the amount of reachable storage bins. To realize this, both the slide and the storage containers had to be modified.&lt;/p&gt;

&lt;p&gt;On the slide, the change was simple. I mounted a second servo onboard the rotating platform. Via a gear reduction the servo drives two arms which pitch the slide up and down. The motion is quick and precise and the mechanics integrate nicely into the existing design.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/rotating-slide/slide_pitch_mechanics_960x540.gif&quot; alt=&quot;Animated photo of the slide pitching mechanics&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Slide pitch mechanics&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The work on the storage bins was more extensive. The primary goal was to pack as many bins as possible around the slide in an almost full circle. To achieve this, the bins needed to be as narrow as possible while still allowing parts to fall in reliably. The initial prototypes of these 2-level chutes were designed in FreeCAD and built from cardboard. This approach enabled rapid iterations on the dimensions, yielding first promising results.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/rotating-slide/cardboard_prototype.webp&quot; alt=&quot;Photo of Cardboard prototype of the 2-level chutes&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Cardboard prototype of the 2-level chutes (&lt;a href=&quot;https://www.youtube.com/watch?v=7KCp_zvolrM&quot;&gt;see video&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After the design was validated in cardboard, the work took a little bit of a detour since I started getting into 3D printing. This allowed the design of the chutes to be much more refined. It still features two channels which now separate at the bottom and change shape into round tubes. They are round because it is intended to hang round cloth tubes (they look almost like socks) beneath them in order to store sorted parts. The chute design also features mounting holders to mount them inside a cutout of the tabletop board. The CAD design files are available &lt;a href=&quot;https://cad.onshape.com/documents/f2c26ce89caaf473dfff022a/w/77e670c4a7d98f879599aa89/e/0598b82d782f27f539adf67f&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/cad.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/print.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/circle.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/group.webp&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;Onshape drawing, printing and arrangement of the redesigned chutes&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;For the mounting of the chutes the tabletop board had to be modified heavily. The board is made from OSB wood. It features a C-shape cutout into which the chutes get mounted from below. The center wood circle is supported from one side only, thus utilizing approximately 300° of the full circle.&lt;/p&gt;

&lt;div class=&quot;gallery-box&quot;&gt;
  &lt;div class=&quot;gallery&quot;&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/garden.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/construct.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/chutes_side.webp&quot; loading=&quot;lazy&quot; /&gt;
    &lt;img src=&quot;/assets/images/rotating-slide/socks.webp&quot; loading=&quot;lazy&quot; /&gt;
  &lt;/div&gt;
  &lt;em&gt;Mounting of the 2-level chutes inside the tabletop board — cloth storage “socks” added on the bottom right&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;After the chutes were mounted, the cloth “socks” could be added as well. They just fit over the round end of the chutes. A rubber band holds them in place while locking on to the rim.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/rotating-slide/full_view.jpg&quot; alt=&quot;Photo of the complete machine as of today&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;View of the complete machine as of today&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is the final view of the completed new design. I am super happy with it because it reduces manual handling efforts significantly and thus causes the machine to be running more often. The 22 bins fit our 20 bin sorting concept perfectly (+1 bin for parts with low confidence classification). I’ll make sure to create a video soon, until then you can reach me via DM as &lt;a href=&quot;https://www.instagram.com/bricksortingmachine/&quot;&gt;BrickSortingMachine on Instagram&lt;/a&gt;. If you are interested in LEGO® sorting machines in general you might also want to join the fabulous Discord server of the Great Brick Lab where frequent exchange is happening.&lt;/p&gt;
</description>
                <pubDate>Thu, 08 Aug 2024 11:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/robotic-sorting-slide</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/robotic-sorting-slide</guid>
                
                <category>build</category>
                
                <category>update</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;h2 id=&quot;physical-setup&quot;&gt;Physical Setup&lt;/h2&gt;
&lt;p&gt;The LEGO sorting machine is driven by two main compute units. A Raspberry Pi 3 as interface to the &lt;a href=&quot;https://www.ti.com/product/L293D&quot;&gt;L293D&lt;/a&gt; motor drivers and a &lt;a href=&quot;https://ark.intel.com/content/www/us/en/ark/products/76978/intel-nuc-kit-d34010wyk.html&quot;&gt;Intel® NUC Kit D34010WYK&lt;/a&gt; handling all image processing, classification and HMI. Images are acquired by a &lt;a href=&quot;https://www.amazon.de/-/en/Cameras-Operating-Definition-2592X1944-USB500W02M-L21/dp/B07GBNYX8H&quot;&gt;ELP 5MP 120° Wide FOV USB camera module&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;logical-architecture&quot;&gt;Logical Architecture&lt;/h2&gt;
&lt;p&gt;All system units are implemented as independent services (python processes) communicating via TCP sockets using a very simple text based message passing protocol. The Raspberry Pi is acting as a relay server routing certain message types to the intended receivers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/system-arch/02_logical_arch.webp&quot; alt=&quot;Drawing of the Logical Architecture&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Logical Architecture&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;raspberry-pi--machine-controller&quot;&gt;Raspberry Pi / Machine Controller&lt;/h2&gt;
&lt;p&gt;The machine controller is driven by a state machine, which handles the operation of the two conveyor belts and the two v-channel vibration feeders. While the scanner belt is running continuously, both the storage belt and the vibration feeders switch activation states based on a fixed timing sequence. Whenever an object is detected on the scanner belt, the vibration feeders are stopped.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/system-arch/03_scanner.webp&quot; alt=&quot;Photo of Brick Scanner with Camera Module and Mirror&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Brick Scanner with Camera Module and Mirror&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;nuc--vision-service&quot;&gt;NUC / Vision Service&lt;/h2&gt;
&lt;p&gt;The vision service handles all image processing and part detection. Images are captured via USB and the &lt;a href=&quot;https://docs.opencv.org/4.x/d1/dc5/tutorial_background_subtraction.html&quot;&gt;OpenCV background subtraction&lt;/a&gt; is detecting bricks against the white background of the scanner belt. Whenever a part is detected on the scanner a belt busy message is sent to stop the vibration feeders. The moment the part reaches the trigger area, a image is stored and a request is sent to the classification service.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/system-arch/04_hmi.webp&quot; alt=&quot;Screenshot of Sorting Machine HMI with a car part detected and classified&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Sorting Machine HMI with a car part detected and classified&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;nuc--classification-service&quot;&gt;NUC / Classification Service&lt;/h2&gt;
&lt;p&gt;The classification service receives stored camera images and creates image cutouts for both direct perspective (side view) and mirror perspective (top view). Then CNN inference is triggered on both cutouts simultaneously for part class prediction. The prediction results are again distributed via a TCP message.&lt;/p&gt;

&lt;h2 id=&quot;nuc--serial-service&quot;&gt;NUC / Serial Service&lt;/h2&gt;
&lt;p&gt;The serial service is a gateway between the TCP socket connection and the USB/Serial interface for Arduinos. As of now, only a single Arduino is part of the machine. It is controlling the servos of the rotational slide. After a part class prediction message is received, the serial service forwards a slide positioning message to the Arduino. The Arduino then controls the servos to smoothly rotate the slide to the corresponding storage bin location.&lt;/p&gt;

&lt;h2 id=&quot;nuc--notification-service&quot;&gt;NUC / Notification Service&lt;/h2&gt;
&lt;p&gt;The notification service is handling non-visual human machine interaction. This includes both audio feedback on part class prediction results as well as notifications on soft e-stop states of the machine. Soft e-stops are currently only triggered if no part was detected within the last 60s. This can be caused by the storage conveyor running empty or a part blocking the stream. In future, optical encoders are planned to be added to monitor belt speeds / detect blocked conditions. Based on the suggestion of a dear friend, error conditions are now forwarded to smartphones via the Pushover service 😉.&lt;/p&gt;

&lt;p&gt;This concludes today’s view into the sorter architecture. I am always interested to get in contact with other sorting machine builders. Feel free to contact me via DM on Instagram.&lt;/p&gt;
</description>
                <pubDate>Sat, 16 Dec 2023 11:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/system-architecture-of-the-lego-sorting-machine</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/system-architecture-of-the-lego-sorting-machine</guid>
                
                <category>build</category>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;Probably the best-known LEGO sorter is Daniel West’s &lt;a href=&quot;https://www.youtube.com/watch?v=04JkdHEX3Yk&quot; target=&quot;_blank&quot;&gt;Universal LEGO Sorting Machine&lt;/a&gt;. His work was inspired by Akiyuki’s &lt;a href=&quot;https://www.youtube.com/watch?v=6lZ9rSZwDzE&quot; target=&quot;_blank&quot;&gt;NXT Vision Guided Brick Sorter&lt;/a&gt; and Jacques Mattheij’s &lt;a href=&quot;https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/&quot; target=&quot;_blank&quot;&gt;Sorting two metric tons of lego&lt;/a&gt;. Focusing on hardware, all three machines show a similar four stage design:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bulk Storage → Part Separation → Classification → Sorted Storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following overview will look at a larger field of machines and show the creative variety in designing each stage.&lt;/p&gt;

&lt;h2 id=&quot;stage-1--bulk-storage&quot;&gt;Stage 1 — Bulk Storage&lt;/h2&gt;
&lt;p&gt;In bulk storage you have a large amount of unsorted, entangled bricks and the goal is to feed it to the machine progressively. There are two typical designs used for bulk brick storage. Nr. 1 is what I call the “belt slowly moving under pile of bricks” type. Two nice examples can be seen with Daniel’s and Jacques Mattheij’s machines.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/02_daniel_west_bulk.png&quot; alt=&quot;The WORLD&apos;S FIRST Universal LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Daniel West’s &lt;a href=&quot;https://www.youtube.com/watch?v=04JkdHEX3Yk&quot;&gt;The WORLD’S FIRST Universal LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/03_jaques_mattheij_bulk.png&quot; alt=&quot;Sorting two metric tons of lego.&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Jacques Mattheij’s Sorting two metric tons of lego&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;While in Daniel’s Design, we have a narrow bulk storage where the full width of the ground is transporting bricks, Jacques’s machine features small 1x4 tiles being glued to the belt. As a result only the small middle part is feeding a small amount of bricks to the machine. If you want to learn more about these two machines, both Daniel (&lt;a href=&quot;https://towardsdatascience.com/a-high-speed-computer-vision-pipeline-for-the-universal-lego-sorting-machine-253f5a690ef4&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://towardsdatascience.com/how-i-created-over-100-000-labeled-lego-training-images-ec74191bb4ef&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;) and Jacques published additional background information (&lt;a href=&quot;https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/&quot; target=&quot;_blank&quot;&gt;Part 1&lt;/a&gt;, &lt;a href=&quot;https://jacquesmattheij.com/sorting-lego-the-software-side/&quot; target=&quot;_blank&quot;&gt;Part 2&lt;/a&gt; and &lt;a href=&quot;https://jacquesmattheij.com/sorting-lego-many-questions-and-this-is-what-the-result-looks-like/&quot; target=&quot;_blank&quot;&gt;Part 3&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The bulk storage design Nr. 2 is based on a “step feeder”, where a step is moving vertically through the storage pile and feeds a small portion of bricks into the machine. Akiyuki’s, Francisco Garcia’s and Johann Rocholl’s machines employ this design idea.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/04_akiyuki_bulk.png&quot; alt=&quot;LEGO Mindstorms NXT Vision Guided Brick Sorter ver1&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Akiyuki’s &lt;a href=&quot;https://www.youtube.com/watch?v=6lZ9rSZwDzE&quot;&gt;LEGO Mindstorms NXT Vision Guided Brick Sorter ver1&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/05_franzisco_garcia_bulk.png&quot; alt=&quot;Lego Sorter with TensorFlow on Raspberry Pi&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Francisco Garcia’s &lt;a href=&quot;https://www.youtube.com/watch?v=uCuQsNwX1QY&quot;&gt;Lego Sorter with TensorFlow on Raspberry Pi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/06_johann_rocholl_bulk.png&quot; alt=&quot;Brick feeder prototype&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Johann Rocholl’s &lt;a href=&quot;https://www.youtube.com/watch?v=TYAh1lxqg8o&quot;&gt;Brick feeder prototype&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;stage-2--part-separation&quot;&gt;Stage 2 — Part separation&lt;/h2&gt;
&lt;p&gt;The task of part separation is to take the entangled stream of bricks and separate it into individual parts which can be passed on to the scanner strictly one by one at a time. Separation is especially challenging with LEGOs, since the parts have a huge variety in size (e.g. 1x1 plates stuck inside a window) and also friction (e.g. bricks vs. rubber wheels). On the machines I saw so far, part separation is built up from one of the following tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chicaning Conveyors&lt;/strong&gt; are belts with diagonal barriers which force the parts on the conveyor to align sequentially. The delicious video below shows the chicanes being used in the food industry.&lt;/p&gt;

&lt;!--
&lt;p&gt;&lt;iframe src=&quot;https://www.youtube.com/embed/CrGrcaJoyws&quot; loading=&quot;lazy&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
--&gt;

&lt;p&gt;Here are nice examples of chicaning conveyors in Lego sorting machines.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/07_francisco_garcia_cc.png&quot; alt=&quot;Lego Sorter with TensorFlow on Raspberry Pi&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Francisco Garcia’s &lt;a href=&quot;https://www.youtube.com/watch?v=uCuQsNwX1QY&quot;&gt;Lego Sorter with TensorFlow on Raspberry Pi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/08_peter_back_cc.png&quot; alt=&quot;Deep Learning Lego Sorter&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Peter Backx’s &lt;a href=&quot;https://www.streamhead.com/3d%20printing/ai/2021/11/01/deep-learning-lego-sorting.html&quot;&gt;Deep Learning Lego Sorter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two-speed belt steps&lt;/strong&gt; are another possible component to achieve part separation. They consist of a slow moving conveyor belt, which drops parts onto a second, much faster moving belt. This feature takes parts which are already sequentially aligned and spreads them out longitudinally.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/08_akiyuk_step.png&quot; alt=&quot;LEGO Mindstorms NXT Vision Guided Brick Sorter&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Akiyuki’s &lt;a href=&quot;https://www.youtube.com/watch?v=6lZ9rSZwDzE&quot;&gt;LEGO Mindstorms NXT Vision Guided Brick Sorter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/09_francisco_garcia_step.png&quot; alt=&quot;Lego Sorter with TensorFlow on Raspberry Pi&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Francisco Garcia’s &lt;a href=&quot;https://www.youtube.com/watch?v=uCuQsNwX1QY&quot;&gt;Lego Sorter with TensorFlow on Raspberry Pi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;vibration feeder&lt;/strong&gt; is the most frequently used part separator. It strongly shakes parts inside a v-shaped channel. As a result it forces the parts to align sequentially. Vibration feeders have the advantage of being able to separate even entangled parts. The amplitude and frequency of the vibrations as well as the slope of the feeder needs to be tuned well to achieve good separation performance.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/10_daniel_west_vchannel.png&quot; alt=&quot;Universal LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Daniel West’s &lt;a href=&quot;https://www.youtube.com/watch?v=04JkdHEX3Yk&quot;&gt;Universal LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/11_jacques_matteij_vchannel.png&quot; alt=&quot;Sorting two metric tons of lego&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Jacques Mattheij’s &lt;a href=&quot;https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/&quot;&gt;Sorting two metric tons of lego&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/12_chris_james_vchannel.png&quot; alt=&quot;Big Robot LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Chris James’s &lt;a href=&quot;https://www.youtube.com/shorts/7FFnoSeIwnU&quot;&gt;Big Robot LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/13_johann_rocholl_vchannel.png&quot; alt=&quot;Brick feeder prototype&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Johann Rocholl’s &lt;a href=&quot;https://www.youtube.com/watch?v=TYAh1lxqg8o&quot;&gt;Brick feeder prototype&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/14_peter_v_vchannel.png&quot; alt=&quot;Lego Sorting machine close-up&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Peter V’s &lt;a href=&quot;https://www.youtube.com/watch?v=ZOox_HX_6eo&quot;&gt;Lego Sorting machine close-up&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Also combinations of these designs are possible. The LegoLAS system by Jörn Schlingensiepen runs two vibration feeders at different slopes and thus effectively different transport speeds. This combines the sequential alignment of the vibration feeder with the longitudinal spreading of the belt step.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/15_joern_schlingensiepen_vchannel.png&quot; alt=&quot;Lego Automatic Sorting LegoLAS2.0&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Jörn Schlingensiepen’s &lt;a href=&quot;https://www.youtube.com/watch?v=sCfN5LrUlKc&quot;&gt;Lego Automatic Sorting LegoLAS2.0&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;stage-3--classification&quot;&gt;Stage 3 — Classification&lt;/h2&gt;
&lt;p&gt;After part separation, the bricks are transported one by one into the classification stage. Its task is to recognize/classify parts or part categories. Most classification stages rely on visual recognition via camera images. There are different approaches in how camera based scanners are designed. Driving motivation is to capture parts from multiple perspectives because sometimes parts are hard to distinguish from certain angles. Also strong, non-flickering lighting, which is decoupled from the environment is important. It allows cameras to operate on very short exposure times to minimize motion blur.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Poses&lt;/strong&gt; — Daniel’s machine achieves capturing of multiple perspectives by letting the parts run towards the camera. The angle of observation and the scale of the part thus changes slightly while the parts are approaching. A specialty of this setup is that the classifier needs to become scale invariant. It thus can’t use absolute image dimensions as a classification cue.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/16_daniel_west_visualization.png&quot; alt=&quot;Universal LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Daniel West’s &lt;a href=&quot;https://www.youtube.com/watch?v=04JkdHEX3Yk&quot;&gt;Universal LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Cameras&lt;/strong&gt; — Gijs van Haeff’s sorting machine instead uses multiple cameras to capture multiple perspectives simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/17_gijs_van_haeff_vision.png&quot; alt=&quot;Universal LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Gijs van Haeff’s &lt;a href=&quot;https://www.youtube.com/watch?v=9OO0SsRy6FE&quot;&gt;Universal LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mirror&lt;/strong&gt; — Johann Rocholl’s sorter features a single camera and a mirror to capture two perspectives at once. This design reduces complexity, ensures synchronization between the captured images and greatly reduces bus/CPU load compared to grabbing multiple cameras.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/18_johann_rocholl_mirror.png&quot; alt=&quot;Conveyor belt for LEGO sorting&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Johann Rocholl’s &lt;a href=&quot;https://www.youtube.com/watch?v=o-FL02ePFEU&quot;&gt;Conveyor belt for LEGO sorting&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smartphone&lt;/strong&gt; — Spencer Hunber’s Nexus sorting machine is using a smartphone for high quality camera and potential CNN accelerator hardware.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/19_spencer_huber_mobile.png&quot; alt=&quot;Nexus&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Spencer Hubert’s &lt;a href=&quot;https://github.com/spencerhhubert/nexus&quot;&gt;Nexus&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale&lt;/strong&gt; — Part weights are a great complementary feature to standard visual input for classification. Akiyuki fitted a digital scale to his Lego sorting machine. This can be achieved using either a USB scale or via a camera looking at the display of the scale and doing basic character recognition. However, the classifier needs to be adapted to accept multimodal input. A mechanism is also needed for pushing parts onto and off the scale. The weight feature could also be useful for detecting multiple parts erroneously presented to the camera at the same time. By combining visual input with part weights, sorting machines potentially can achieve higher classification accuracy.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/20_akiyuki_scale.png&quot; alt=&quot;LEGO Mindstorms NXT Vision Guided Brick Sorter&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Akiyuki’s &lt;a href=&quot;https://www.youtube.com/watch?v=6lZ9rSZwDzE&quot;&gt;LEGO Mindstorms NXT Vision Guided Brick Sorter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;stage-4--sorted-storage&quot;&gt;Stage 4 — Sorted Storage&lt;/h2&gt;
&lt;p&gt;After the correct part type has been identified inside the classification stage. The part can be directed to its correct storage location. This can be achieved using one of the following approaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Horizontal Gates&lt;/strong&gt; — Usually a conveyor belt with mechanical arms which direct the part into the intended bucket. The two examples below don’t just guide the part but even actively push the parts into the bucket while closing. This allows parts to follow each other more closely on the belt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/21_neal_anthoons_gates.png&quot; alt=&quot;Lego Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From NealAnthoons’s &lt;a href=&quot;https://www.youtube.com/watch?v=6IAMW4N4ohY&quot;&gt;Lego Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/22_gijs_van_haeff_gates.png&quot; alt=&quot;Universal LEGO Sorting Machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Gijs van Haeff’s &lt;a href=&quot;https://www.youtube.com/watch?v=9OO0SsRy6FE&quot;&gt;Universal LEGO Sorting Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vertical Gates&lt;/strong&gt; turn the principle around and replace the conveyor with a vertical channel through which the parts are falling. A gate directly above the target bin then directs them to the right place. The speed of the falling part is high thus allowing parts to be sorted quickly.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/23_johann_rocholl_vertical_gates.png&quot; alt=&quot;Sorting Machine Flap Design&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Johann Rocholl’s &lt;a href=&quot;https://www.youtube.com/watch?v=ZGXZsMSBHzg&quot;&gt;Sorting Machine Flap Design&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/24_spencer_huber_vertical_gates.png&quot; alt=&quot;Nexus&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Spencer Hubert’s &lt;a href=&quot;https://github.com/spencerhhubert/nexus&quot;&gt;Nexus&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pneumatic Sorters&lt;/strong&gt; use a short, directed blast of air to push the parts off the belt and into the storage bin. They feature very little moving parts and typically use a solenoid valve which can be triggered from GPIO ports. Timing is crucial in order for the parts not to fly sideways into the wrong bin. A belt position encoder (e.g. optically via the wiggly line in Jacques’s design) helps measuring the exact belt and thus part position. A belt with lateral cleats (see Eppos Vision System below) helps to keep the parts on course when they fly with the air stream. Jacques Mattheij’s machine apparently even adjusts the dose of air based on the respective part size. Finally it is very helpful to use a silent air compressor, since normal ones are quite loud for long term usage. Apart from the compressor noise, personally I think pneumatic sorters at work are super relaxing to watch 😉&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/25_jacques_matteij_air.png&quot; alt=&quot;Sorting two metric tons of lego&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Jacques Mattheij’s &lt;a href=&quot;https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/&quot;&gt;Sorting two metric tons of lego&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/26_peter_v_air.png&quot; alt=&quot;The Shape Sifter — First working demonstration&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Peter V’s &lt;a href=&quot;https://www.youtube.com/watch?v=0VHN3AZKY0E&quot;&gt;The Shape Sifter — First working demonstration&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/27_eppos_vision_air.png&quot; alt=&quot;Automatic LEGO sorting machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Eppos Vision System’s &lt;a href=&quot;https://www.youtube.com/watch?v=FCiqmOP6NQc&quot;&gt;Automatic LEGO sorting machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rotary Slides&lt;/strong&gt; again use mechanical servos but instead of just binarily opening or closing a gate they choose one out of many storage locations by pointing a slide towards the target. This design is very efficient in the number of servos required. In theory multiple such slides could even be cascaded.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/28_francisco_garcia_slide.png&quot; alt=&quot;Lego Sorter with TensorFlow on Raspberry Pi&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Francisco Garcia’s &lt;a href=&quot;https://www.youtube.com/watch?v=uCuQsNwX1QY&quot;&gt;Lego Sorter with TensorFlow on Raspberry Pi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/29_claus_christiansen_slide.png&quot; alt=&quot;Automated AI LEGO Sorting machine&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Claus Christiansen’s &lt;a href=&quot;https://www.youtube.com/watch?v=vwPZwttLG2A&quot;&gt;Automated AI LEGO Sorting machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/30_joerg_schlingensiepen_slide.png&quot; alt=&quot;Lego Automatic Sorting LegoLAS2.0&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Jörn Schlingensiepen’s &lt;a href=&quot;https://www.youtube.com/watch?v=sCfN5LrUlKc&quot;&gt;Lego Automatic Sorting LegoLAS2.0&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/31_michael_talarczyk_slide.png&quot; alt=&quot;LEGO Sortierer (Color Sorter) mit raspberry pi&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Michael Talarczyk’s &lt;a href=&quot;https://www.youtube.com/watch?v=jego7nntfAM&quot;&gt;LEGO Sortierer (Color Sorter) mit raspberry pi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;!-- 
Future content:
- Comment in https://www.youtube.com/watch?v=bzSIB47b7vA&amp;lc=UgxMa33Zx7Wead5maMp4AaABAg by nickzwa - rotating stack of bins
- Stackable bins by lego.sorting.machine
--&gt;

&lt;p&gt;&lt;strong&gt;Picking Robots&lt;/strong&gt; are the final variant of sorting systems. A robotic arm is grabbing the parts, moving over a 2D set of storage locations and dropping it into the respective bin. While such part handling takes more time, the two-dimensional storage matrix allows for an extremely large amount of bins.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/32_tampere_univeristy_robot.png&quot; alt=&quot;Robotic LEGO sorting robotwith machine learning&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Tampere University’s &lt;a href=&quot;https://www.youtube.com/watch?v=qUhMBUhAEMc&quot;&gt;Robotic LEGO sorting robotwith machine learning&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/33_rbtx_arm.png&quot; alt=&quot;First automatic Lego™ bricks sorting system&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From RBTX’s &lt;a href=&quot;https://www.youtube.com/watch?v=Gwx8xHtitGA&quot;&gt;First automatic Lego™ bricks sorting system&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;recent-updates&quot;&gt;Recent Updates&lt;/h2&gt;

&lt;p&gt;In the time since I wrote this article new machines continue to be in the making. In this section I am trying to keep up with recently published machines.&lt;/p&gt;

&lt;h3 id=&quot;20231227&quot;&gt;2023–12–27&lt;/h3&gt;
&lt;p&gt;360er0/awesome-lego-machine-learning gives a great overview on LEGO machine learning projects including many sorting machines.&lt;/p&gt;

&lt;h3 id=&quot;20240313&quot;&gt;2024–03–13&lt;/h3&gt;
&lt;p&gt;Freakstuff published a video on his automatic sorting machine. What’s special about this project is, that it is purely mechanical. It sorts LEGO parts by size. This is both very useful for subsequent manual sorting and as a preceding step for automated shape sorting. In shape sorting, part separation is a very hard task which gets much easier if parts are pre-sorted to be similar in size.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/36_freakstuff.webp&quot; alt=&quot;Freakstuff&apos;s automatic sorting machine (German)&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;From Freakstuff’s &lt;a href=&quot;https://www.youtube.com/watch?v=AhR8x4PuMIM&quot;&gt;automatic sorting machine (German)&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Looking at the design in detail, the 4 typical stages are still apparent even though being grouped in an interesting way.&lt;/p&gt;

&lt;p&gt;Bulk storage is organized as a wooden crate with a step feeder which ensures a constant in-flow of parts. The step is oriented parallel to a conveyor belt. With each stroke the step releases a well defined portion of bricks in longitudinal sequence onto the conveyor. This realizes the required part separation.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/37_freakstuff.webp&quot; alt=&quot;Freakstuff&apos;s step feeder&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Freakstuff’s step feeder&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Part classification (in terms of part size) is implemented using a sequence of sieve tubes featuring progressively larger openings. Small parts fall through the openings in the early stages, larger parts get transported further on to fall into a later bin.&lt;/p&gt;

&lt;p&gt;The sieve openings are designed in a spiral shape. This is a very interesting choice which according to freakstuff is key for the parts to progress through the tubes in a continuous motion.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/38_freakstuff.webp&quot; alt=&quot;Freakstuff&apos;s spiral shaped sieve tubes&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;Freakstuff’s spiral shaped sieve tubes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;According to Freakstuff, his machine is already used in production in his BrickLink store, followed by manual sorting for individual parts. He is planning to extend the setup by a visual classification based auto sorting stage. Classification shall be realized via the the brickognize web service. In general it will remain interesting to follow the project on his channel.&lt;/p&gt;

&lt;h3 id=&quot;20240521&quot;&gt;2024–05–21&lt;/h3&gt;
&lt;p&gt;In a parallel development, Smyrnoff Specialist Lego Parts has also been working on a fully mechanical sorter since January of this year. The design is similar to Freakstuff’s approach, utilizing tube modules with progressively larger dimensions for part sorting. Each module incorporates a spiral shape for efficient part transport. This machine is constructed from a combination of LEGO elements as well as 3D printed components.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/survey/39_smyrnoff.webp&quot; alt=&quot;Sorter for LEGO® bricks by Smyrnoff Specialist Lego Parts&quot; loading=&quot;lazy&quot; /&gt;
&lt;em&gt;&lt;a href=&quot;https://www.instagram.com/p/C6RwE0trDwt&quot;&gt;Sorter for LEGO® bricks&lt;/a&gt; by Smyrnoff Specialist Lego Parts&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;feedback-and-contact&quot;&gt;Feedback and Contact&lt;/h2&gt;
&lt;p&gt;If you are also currently in the process of building a sorting machine I would love to hear from you. Also if you would like to add a missing machine/design to this list please contact me. In all cases I am easiest to reach via DM as &lt;a href=&quot;https://www.instagram.com/bricksortingmachine&quot;&gt;BrickSortingMachine&lt;/a&gt; on Instagram.&lt;/p&gt;
</description>
                <pubDate>Wed, 13 Dec 2023 11:00:00 +0000</pubDate>
                <link>https://bricksortingmachine.github.io/exploring-lego-sorting-machines-a-survey-of-designs</link>
                <guid isPermaLink="true">https://bricksortingmachine.github.io/exploring-lego-sorting-machines-a-survey-of-designs</guid>
                
                <category>community</category>
                
                
            </item>
        
    </channel>
</rss>