I wrote a little computer program to test all possible gear wheel combinations against all possible horizontal and vertical hole separations.
Gears seem to bind hopelessly when they are scrunched together too tightly and they can skip or lock up solidly if they are too loose. My experiments show that these bad things happen when there is one tenth of a stud difference from the "ideal" spacing (either too tight or too loose).
Knowing that, I produced these three tables. They shows all possible combinations of horizontal and vertical placements of gear wheels that produce less than that critical 0.1 stud error. The first table shows all the perfect combinations where the gears are meshed as LEGO geometry intended. The second table shows combinations where the gears are a little too far apart, the third shows when they are a little tight.
If you have a choice, you should (obviously) pick the 'perfect' combinations in the first table. The combinations in the second and third tables are better at the top of the table and worse at the bottom. You'd have to be pretty desperate to want to use combinations from the bottom of those tables.
The 'horizontal' distances are measured in 'studs' - the 'vertical' distances are in 1/3rd height 'plates'.
Exact Gear Meshings | Loose Gear Meshings | Tight Gear Meshings |
#include <stdio.h> struct GearWheel { float radius ; /* in 'studs' */ int num_teeth ; } ; struct GearWheel gear [] = { {0.5,8}, {1.0,16}, {1.5,24}, {2.5,40}, {0,0} } ; int main () { /* Try every combination of gears against every reasonable horizontal and vertical spacing. */ for ( int w1 = 0 ; gear [ w1 ] . num_teeth > 0 ; w1++ ) for ( int w2 = 0 ; gear [ w2 ] . num_teeth > 0 ; w2++ ) for ( int v = 0 ; v < 15 ; v++ ) /* Vertical distance in plates */ for ( int h = 0 ; h < 12 ; h++ ) /* Horizontal dist in half-studs */ { /* Convert everything into 'studs' */ float dv = (float) v * 6.0f / 15.0f ; float dh = (float) h / 2.0f ; float dd = sqrt ( dv * dv + dh * dh ) ; if ( fabs ( dd - ( gear[w1].radius + gear[w2].radius ) ) <= 0.1f ) { if ( w1 > w2 ) printf ( "<tr><td><center>%-1.4f</center></td><td><center>%g</center></td><td><center>%d</center></td><td><center>%dt x %dt</center></td></tr>\n", dd - ( gear[w1].radius + gear[w2].radius ), (float)h/2.0f, v, gear[w1].num_teeth, gear[w2].num_teeth ) ; else printf ( "<tr><td><center>%-1.4f</center></td><td><center>%g</center></td><td><center>%d</center></td><td><center>%dt x %dt</center></td></tr>\n", dd - ( gear[w1].radius + gear[w2].radius ), (float)h/2.0f, v, gear[w2].num_teeth, gear[w1].num_teeth ) ; } } return 0 ; }I ran it under Linux like this:
meash | sort | uniq > tables...and hand-edited the result into this file.