LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome

 

 

     
    A FAST NXT2.0 ball sorter

    While doing the color sensor comparison, I discovered the high speed of NXT2.0 color sensor. This prompted me to build this fast color ball sorter, able to sort 2 balls per second!

    A ramp holds the balls to be sorted. Just below is a mechanism with two bars with an alternating movement that let balls go one at a time. The color sensor detects the color of the balls as they go down. According to detected color, two levels of switch points direct the ball to one of 4 buckets.

     

    Right side view.

    Left side view.

    The ball stream splitter mechanism. When one bar is up, the other is down, so only one ball go through during one cycle. Next to the splitter is the color sensor. The ball channel is shielded to prevent too much ambient light to reach the color sensor. Despite this, sorting reliability decrease with bright lighting. This can be seen in the video at the beginning of slow motion sequence: one yellow ball is incorrectly directed into blue bucket (good video needs good lighting!)

    Close-up of the switch point section. Note that the motors drive the switching levers through a friction pin that may slip at the end of the move. This clutch provides several benefits:

      • Use of unregulated motor control, much faster than slaved modes
      • Simplified (thus faster) program, since it is possible to rotate motors to do the switch, even if it is already positioned.

    The sorter uses many angled beams, resulting in weird angles all over the model (modelling it was a challenge, fortunately the relative rotation feature of LeoCAD was a great help!). These angles lead me to use the Technic Axle Joiner Double Flexible to fix the buckets. An added benefit is that you can lift the buckets to retrieve the balls more easily!

    Update: Alban suggested me to use an axle3 with stud and half bushes to secure better the rubber parts.

     

    An animation showing the ball path depending on orientation of switch points.

     

    Video

     
    Link to YouTube video

    Building instructions

    Printable building instructions (PDF, 13 Mb).

    LDraw/MLCad MPD file.

       

    Programs

    I used NXC to build the first version of program for the sorter. The main difficulty I encountered was that red balls are first detected as yellow when they are entering field of view of the color sensor. So the color needs to be confirmed after some time (15 ms) when the ball is more centered.

    Fast Ball Sorter NXC program

    After a few tries, I finally managed to get a working version of the sorter using NXT-G. The program is almost a direct translation of the NXC program. One difference is that when the motors are stopped, I had to use coast mode. Otherwise in brake mode NXT-G tries to maintain motor position and oscillate around stop position. This makes the switch points move during some time and they may eject the ball!

    Fast Ball Sorter NXT-G program

 

LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome