LEGO Mindstorms NXT Bin Emptying Robot – Mark I

PDF24 Tools    Send article as PDF   
This is Mark I of my LEGO Mindstorms NXT Ball Sorting Factory, which I have been working for a number of weeks. The whole project consists of three main parts. Firstly there is the ‘Ball Sorting Factory’, made up of Gantry System with 3-Axis: Front-Back, Left-Right, and Up-Down for the Ball Gripping Claw. The Second Part is the Forklift Truck which carries the ‘Ball Bins’ from loading to emptying positions. The final part is the ‘Ball Bin Emptying” mechanism & Conveyor system.

The NXT Ball Sorting Factory uses the following parts:

If you are finding difficult locating Light Gray Technic, Gear Racks 1 x 4. I brought as many (200+) as I could locate on [bricklink] a couple of months ago. This project uses 208 Gear Racks 1 x 4 on the Gantry system. The whole project also uses a huge number of Light Bluish Gray Technic, Liftarm 5×7 and 5×11 Open Center Liftarms.

The Gantry and Claw mechanism are controlled by a single NXT Programable Brick with 3x NXT Motors, and a Power Functions M-Motor which is controlled and powered by a Multiplexer for NXT Motors (NXTMMX-v2). The Power Functions M-Motor Opens and Closes the Claw mechanism which handles he Balls.


The Gantry also relies on 3x NXT Touch Switches connected via a Mindsensors Touch Sensor Multiplexer for NXT. The 3x NXT Touch Switches are used to tell the Robot when the 3x Axis of the Gantry System are at the Home Position.


Also connected to the Gantry’s NXT, is a Hitechnics Colour Sensor which is used for Ball Colour Detection. The Ball Colour Detection is built into the pedestal to the left of the Ball Collection Shoot.


The Bin Emptying Machine detects the presence of a new Bin to be emptied when the LASER Target Sensor Beam Reflection is broken. The LASER Target Sensor Beam is reflected by a piece of 3M™ Scotchlite™ Reflective Material – 8910 Silver Fabric. Scotchlite reflective fabrics is composed of wide angle, exposed retroreflective lenses bonded to a durable cloth backing, available in several construction types.

Forklift & Bin Emptying Machine - Components.jpg

The bin is clamped, lifted and then emptied. There are 4x motors controlled from a single NXT: 

  • 1x Bin Clamping Motor
  • 1x Bin Lift Motor
  • 1x Bin Rotating (Emptying) Motor
  • 1x Ball Shoot Motor
  • 1x Ball Conveyor Motor

The Ball Shoot and Conveyor Motors are controlled by the NXT in conjunction with a Mindsensors® NXT Motor Multiplexer (NXTMMX).


The Forklift is used to deliver full Bins of balls to be emptied by the Bin Emptying Machine, and then the empty bin is taken away, back to the processing facility. The Forklift receives BlueTooth Messages from the Gantry System’s NXT when a particular Bin is required to be emptied.


The forklift it’s self is fairly straight forward, using a standard NXT Light Sensor to follow the ‘Black’ lines and a standard NXT Colour Sensor used to detect the coloured lines which mark various positions along the Forklift’s trail. Two NXT type Motors directly drive the front wheels, with a third NXT Motor used to lift the Forklift’s Tines up-and-down.


The Forklift uses Rotacaster® Omni-wheels on the rear to allow precision turning. The Rotacasters also allow the Forklift to be nice and compact with a very tight turning circle.


The Forklift uses a NXT Light Sensor to follow the ‘Black Lines‘, and a NXT Colour Sensor to detect the Red, Green and Yellow Bars between the two Black Lines used for ‘Line Following‘. More details on the Forklift, including Build Instructions are in this article: LEGO Mindstorms NXT Forklift – Mark II.


The whole project is programmed with [robotc]. Listed below are the Three separate programs for each of the projects modules are listed below.

Download Complete Source Codes & Sound Files:

Gantry’s RobotC Source Code:


Forklift’s RobotC Source Code:


Bin Emptying Mechanism’s RobotC Source Code:


Previous Post

NXT Tower Defense Programmed with Urbi

I came across the NXT Tower Defense project while cruising the web and felt compelled to share it. NXT Tower Defense is a system that lets you build, develop and ... Read more

Next Post

LEGO Mindstorms NXT Bin Emptying Robot - Mark II

This is a LEGO Mindstorms NXT "Bin Emptying Robot Mark II". It is part of a larger project I have been working on, my "Ball Sorting Factory". A forklift delivers ... Read more

Short URL:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do NOT follow this link or you will be banned from the site!