Main

Balls R Us

Each year Stellenbosch University holds a competition between its Mechatronics students to build some sort of particle-board and glue-gun contraption to be powered by a Siemens S7-1200 PLC and some supplied Pololu electronics. The contrast between the beautiful hardware and the apocalyptic mechanisms are comical, and ours was the ugliest of the lot. But it won.

Our first idea was well thought out, we were going to lazercut all our parts, have a nice little hopper, gravity feed it into a picking wheel so we can count out the marbles by rotations of the wheel and the only difficult part would be setting up the PLC and tuning the feedback and PID controller.

When we started assembling and testing parts of it, we soon discovered some major issues. What followed was us continually face-planting into the mud every time we thought we made a bit of progress. Here are some of the unforeseen problems we faced:

Marbles get stuck. Their friction coefficient is so high that they form interlocking meshes and block the exit to any container you try and come up with.

Marbles jam. They jam everywhere, against anything. They are temperamental and vindictive and will never go down a chute or tube or anything where they are the least bit forced.

Marbles encourage other components to join their jamming revolution and will make everything rebel against you.

Ultimately this leaves you with two options. Agitate and beat the hell out of them so they budge, or you need to herd them unsuspectingly like the cattle in Temple Grandin.

The user interface can be seen on the left. It allows the user to specify the distribution of the marbles into the three containers as well as a pass count. Since not all distributions can be evenly divided up into the number of passes specified, the program works out a RES value to add to the last pass to make up the total.

For example, if a container needs 32 balls in a pass count of 3, each pass will get 10 marbles but the last one will be 12 to make the total 32.

The right-hand side is a real-time feed of the sorting status, the top container is shown emptying into the bottom three with the currently active path being highlighted.

The bottom panel shows settings for the sorting chute such as the gain values for the PID loop and the set angles for each container.