AutoScope : Part 2 : Gears

The original design for the microscope’s gears were nicely done. They had set screws and mounted securely to the knobs (from what we can tell from the video). Unfortunately, our microscope used different control knobs, so we couldn’t use the original 3D models.

So, Dan and I started from scratch. The most important item that Dan discovered, with the help of the Australian pathologist, was that the gears were designed in part in OpenSCAD using Parametric software.

OpenSCAD is an open source program which allows you to program 3D models. You write code instead of drawing objects. This is very handy when it comes to creating repeating objects — like gears. Let the math and the computer figure out the shapes needed for a given pitch/size.

I spent some time using the Parametric Pully program written by droftarts. It allows for a lot of nice things, like different gear profiles, retainers, set screws, and whatnot. In the end, I decided to go with a simple “idler” style.


Why an idler? Because it’s simple — just a ring of gears. At this stage I’m testing fit and the general idea — so I wanted something simple that would print quickly.

Since these gears will slide onto existing knobs — not motor shafts — the inside diameter is much larger than normal. For example, a NEMA17 Stepper Motor has a 5 mm shaft. I needed 26 and 30 mm!

OpenSCAD needed the ID — which I knew. But is also needed the number of teeth, which I didn’t want to guess at.

To help me figure out the problem, I put together a simple Excel sheet which calculates the Diameter and Number of Teeth given a tooth pitch (we’re using 2mm 2GT / GT2 belts) and tooth height (found on belt spec sheet — 0.75 mm).

It’s a simple calculation, where I had the number of teeth as a variable in the calculation. The idea was to get a ballpark idea of the gear size. Since I know that the OD needed to be at least 35mm, I could scan down the list and see how many teeth this would be.


Scanning down the list, I saw that anywhere from 50 to 70 teeth would work fine. I went with 60 because it’s a nice even number (60 minutes in an hour) and it was about the right size.

After plugging the numbers into OpenSCAD I was able to get two nice 3D models of my gears. There was a LOT of trial and error — my measurements of the knobs were exact, but 3D printers aren’t. And the knobs are slightly tapered, and I’m going for a friction fit. We’re talking 1/4 mm changes here — very small.

You’ll notice that I didn’t put a flange or retainer on the gears. (The retainer keeps the belt from slipping off.) Why? Because I printed one with a flange and the 3D printer created a bunch of supports. These support just get broken away when you clean up the part — BUT, they resulted in poorer quality gears. Instead, I’m printing the gears as one part and the retainers as the other parts. I can then glue them together. A little more work to assemble, but MUCH cleaner teeth on the gears.

Another important design decision I made was to make the gears a little oversized. Remember how my knobs are different sizes? Well, I didn’t want my gears to be. Why? Because then they’d have different ratios, making coding a bit trickier. And I already have enough to deal with. So, I sized everything to the larger knob. This resulted in two gears with exactly the same number of teeth (60), the same OD (about 38mm), but different IDs (about 26mm and 29mm).

The result is a pretty clean look.


Next up, controlling the steppers.