Category Archives: 3D Printing

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.



AutoScope : Part 1 : Overview

Dr. Dan Kott, a member of our local maker community, came to us with a problem. He had come across a microscope automation project created by a pathologist in Australia. Because of other commitments, the Australian doctor was unable to complete the project, and Dan wanted to complete it.

The idea is this: automate an inexpensive, but good quality, microscope. In other words, motorize the stage. Instead of manually moving knobs, motors and a microcontroller would take the place of your hands.

Why do this?

  1. You can make the microscope joystick controlled. This means you can remotely move around a slide. Very handy in a teaching situation where a video camera is connected to the microscope and the teacher is pointing at an overhead projection.
  2. Samples can be “marked up” for reference. An automated scope knows exactly where X/Y are on the sample slide. Therefore, a physician can find an element of interest, say a cancer, note it’s location, then give the slide and location to a student for review. (“See position 1456, 2345 — that’s an abnormal cell wall.”)
  3. Slides can be automatically scanned. The automated microscope setup means that an entire slide can be photographed in very high resolution. Those photos can be “stitched” together to make a single high resolution image.

While Dan had some videos of the rig, and copies of the 3D models for holding the motors, there were a number of challenges. These included:

  • Creating gears which would fit onto the existing knobs of a common series of microscope.
  • Determining which stepper motor controllers and software to use.
  • Choosing a microcontroller and writing code for it.
  • Getting the basic setup to work, so that additional functionality can be added.

First stop: the gears.

Makerbot Replicator 2

Our newest prototyping machine, the Replicator 2. The open source folks were all up in arms about the software going closed source. To which I say: I couldn’t care less. It’s a fantastic machine. I’ll take a well engineered closed source machine over something made of 5mm plywood any day. Sorry, but that’s how I roll.

DSCN2526 (Medium) DSCN2537 (Medium) DSCN2536 (Medium) DSCN2534 (Medium) DSCN2533 (Medium) DSCN2529 (Medium) DSCN2527 (Medium)