Baker's Dozen GBC Module

Baker’s Dozen GBC Module
Baker’s Dozen GBC Module

Baker’s Dozen in my Great Ball Contraption (GBC) module for the Great Ball Pit’s 2020 Challenge. You can watch a video of it running below. Continue reading for an explanation of all its parts.

Baker's Dozen Video

I ran this module at the Virtual Brickworld Halloween, which can be seen in this video.

Challenge Rules

  • Only output balls in batches of 13
  • Batch must exit in under 3 seconds
  • Meet the GBC Standard


The module is made up of four mechanisms:

  • Conveyor
  • Binary split path
  • Stuck ball mechanism
  • Output Hopper


The conveyor is straight forward. It picks up balls from the input bin so gravity can do the rest of the work. A cam on the conveyor’s drive axle agitates the floor of the input bin to keep balls from jamming.

The conveyor runs quicker than one ball per second for two reasons: the conveyor frequently misses balls when the input bin is full and 3 of every 16 balls are recirculated. Running at full speed gives you just over 1 ball per second on average (13 balls every 12.9 seconds or so).

Conveyor and Input Bin
Conveyor and Input Bin

Binary split path

The balls then fall down a series of gates which send every other ball in a different direction. There are four levels, which leads to 16 different paths the balls could take, if each level was ‘full’ of gates (the last level would have eight gates). This design was created by Walt White.

This is how I can count out 13 balls. Of the 16 in each cycle, 13 go into the output hopper. 3 are recirculated, one of those triggers the gate to open.

I’ve combined several paths by removing potential gates. For example, all balls going into the right side of the first gate go directly into the output hopper; this is 8 balls per cycle (or half, since this is the first gate). A quarter of the balls go into the output hopper on the next level; 4 more brings it to 12. An 8th of the balls (2 per cycle) are recirculated directly on the third level. The last level splits the last two balls: one goes into the output hopper as the 13th ball of the cycle while the other goes into the stuck ball mechanism to open the gate before getting recirculated. The hole in which each ball falls is diagrammed below.

Counting Balls (click to enlarge)
Counting Balls (click to enlarge)

Three holes lead to the output hopper and they are outlined in yellow. The two outlined in red go straight back to the input bin while the last one, in orange, leads to the stuck ball mechanism. The holes are highlighted in white.

Stuck Ball Mechanism

This mechanism controls when the gate of the output hopper is opened. The motor drives a differential that connects a piston and the output gate. Since moving the piston requires less work than raising the output gate, the piston moves and the gate does not in normal operation.

Stuck Ball Mechanism

A ball can block the piston’s path. When this happens, the gate will open. Then the ball needs to be kicked out so the gate does not continuously open and close. The timing is such that the gate opens twice in a row while the ball is stuck; I did not have (or make) room to rotate the gate mechanism at half speed to just open it once.

A regulator gate assures the incoming ball drops at the right time - when the piston is out of the way. The same mechanism kicks the ball out allowing the piston to move again.

Since only one of the 16 balls enters the stuck ball mechanism, the gate is lifted once per cycle.

Output Hopper

The balls collect in the output hopper. It consists of a sloped floor and a gate. When the gate opens, the balls fall out quickly into the next module.

Output Gate
Output Gate


This module is fairly reliable. The conveyor mechanism is fairly standard, and while balls occasionally drop off, most get to the top.

Rarely a ball gets through the regulator gate and through the stuck ball mechanism without getting stuck. Then another cycle must complete to dump the 26 balls that build up.

The most unreliable part of the module is that it does not always get 13 balls. Because of the delay into the stuck ball mechanism, the next ball up the conveyor often sneaks through the gate. If there is constantly a next ball, there is no problem, but if a ball is slow up the conveyor, 12 or 14 balls will be dumped.

LEGO, LEGOLAND, DACTA, DUPLO, PRIMO, FABULAND, SCALA, TECHNIC, MINDSTORMS, and ZNAP, etc. are trademarks or registered trademarks of The LEGO Group, which does not sponsor, authorize, or endorse this site.