Sunday, September 22, 2013

Gears: Another Reason to Appreciate the Power of 3D Printing

The first step on my "machined" version of  sgraber's i3ext ( +Shane Graber  ) ... Gearing:


Another perfect example of learning by doing it the hard way (on purpose). While machining gears has been on my list for a long time, building a RepStrap has finally forced me to do it. Machining gears also made me realize how powerful 3D printing is. An understanding of the true involute gear curve, (or even the approximate true radius curve used below) leads to the realization that being able to just print curves based on mathematical formulas is way easier that machining them. Granted, your not going to use plastic gears on a lathe, but for an extruder... it's perfect.

OpenScad Parametric Involute Bevel and Spur Gears (GregFrost on Thingiverse)


Ivan Law's Gears and Gear Cutting is well worth the price (6 or 7 bucks new). The information is timeless, and won't become useless, unlike the Java 1.2 Certification, and Turbo C++ books I still have on my shelf ;)  After reading the book I realized you don't' choose your gears to match your "machine", you build your machine to match your gears. Because of this, gearing is one of the first steps in my extruder build. Your choice of gears determines the location of the stepper motor and hobbed bolt or, in my case, the filament drive gear and corresponding axle. I'll try to detail what I did below (mainly for my own reference). I'm no expert in machining or gear making, but I'll try to illustrate what I've read in Ivan's book and the interwebs. I'll just paraphrase everything, and put the actual references at the bottom of the post.

A quick summary of where the involute gear comes from:

Spur gears are pretty much what most people think of when you say "gear" (disks with teeth). The involute curve is the result making sure the teeth transmit power evenly, don't collide, or get stuck. Basically square teeth will scrape on the way in, get stuck when they mesh, and scrape on the way out. So "round them off", in a mathematical sense. The involute curve is a curve formed from another curve! The common example used is to tie a pencil to a spool of thread and "unwrap" the spool with the pencil. The result is a curve with an continuously increasing radius (from wikipedia):


The main components of the involute gear

Designing the gears we need. 

I'll admit I based most my decisions on how many teeth, what pitch, etc by just looking at what was in the pictures on the RepRap Wiki and Thingiverse.

While most books, and articles, go into great detail about every formula to calculate every gear component, Ivan Law was nice enough to mention that it is for completeness only, and you will only use a few of them in practice ( at least for machining a hobby level gears).

Basically all we need is the Outside Diameter(OD), which is size of the disc that we will cut the teeth into, the Pitch Circle Diameter(PCD), which is the theoretical disc that is used to design the actual gear spacing and drive ratios, and D+f, which is how deep we cut.(Depth of tooth + clearance)

Gear Formulas Used:
$$ OD = \frac{N+2}{DP} $$
$$ PCD = \frac{N}{DP} $$
$$ C2C= \frac{PCD_1 + PCD_2}{2} $$
$$ D+_f= \frac{2.157*}{DP} $$
*dunno where this constant comes from?

Where:

N = Number of Teeth: The total number of teeth on the gear
DP = Diametral Pitch. This is the number of teeth per inch.(along the Pitch Circle )
         *Module (M) Is the length per tooth in mm, and is the reciprocal of DP and converted to metric.
          So, instead of teeth per length, module is length per tooth (converted to metric):
\(\frac {1}{DP}*25.4 \)

OD = Outside Diameter: This is the disc size that the cutter is machined from.
PCD = Pitch Circle Diameter: The theoretical gear size used during design.
C2C = Center-to-Center: The distance from center of one gear to the center of another. This distance will determine the stepper motor and drive gear location.
D+f = The full depth of the tooth plus the tooth clearance. The amount we feed the cutter into the blank.

So looking at the Open Scad files, we see a 26 toothed large gear and a 9 toothed small gear, which is about 3:1 gear reduction from the stepper to the filament drive gear axle.

In practice you choose the small gears tooth count first, then you design the big gear to meet the desired drive ratio. Ivan suggests not going any smaller than 16 teeth, which doesn't work for these tiny printer parts.  This is addressed below in the "making gear cutters" section.


module big_gear() {
 difference() {
  translate ([0,0,0])
   gear(number_of_teeth=26,
     circular_pitch=300,
     rim_thickness=5,
     bore_diameter=6.2
     );
  translate ([0,0,6]) cylinder(r=10.2/2, h=5, $fn=6);
 }
}


module small_gear() {
 translate([29,0,0]) {
  difference(){
   rotate([0,0,360*-1/10]) 
    gear(number_of_teeth=9,
      circular_pitch=300,
      rim_thickness=15,
      hub_thickness=17,
      hub_diameter=18.5,
      gear_thickness=8,
      bore_diameter=6.4
      );
   translate([-3.25,3.75,9]) cube([6.5,3.2,9]);
   translate([0,0,9+3.5]) rotate([-90,0,0]) 
    cylinder(r=1.75, h=20, $fn=10);
  }
 }
}
Code snippet from gears.scad

I have to admit I still don't know what he (Frost) is using for circular_pitch. Even after reading Gears and Gear Cutting, I can't tell what the units are, or where the value is derived from? In the actual gear_script.scad file it looks like he's using degrees instead radians along with circumference or something. Also, all the samples have nice round numbers too? 100, 300, 700, 1000, etc? Probably me, but anyway...

Plugging the number of teeth and pitch into the formulas above we get the following:

GLOBALGEARS Center-to-Center = 30.16 mm
Diametral Pitch16LargeSmall
Pressure Angle30Outside Diameter (OD)49.21 mm17.46 mm
Depth of Cut (D+f)3.42 mmPitch Circle Dia. (PCD)46.04 mm14.29 mm
Module1.588 mm

So: Now we know we need a gear blank with a 49.21 mm diameter and a gear blank with a 17.46 mm diameter. We also know that the stepper shaft and drive gear axle need to be 30.16 mm apart.

Update: I drew a 3D version of the i3ext( modified), based on measurements from the scad file, and my gear calculations didn't result in the same center-to-center distance of the axles. Could be a different pressure angle or who knows. I'll have to get on the #reprap irc channel and see :) So, as a result I chose a 29 tooth large gear. It's not that I need match the original exactly, but the bearing housing and stepper motor size limit how much you can change the original design. It was easier to enlarge the gear to match. Now onto actually cutting the gears.

Gear Cutters and Tool costs associated with the curve complexity:

Without going into detail, a different shaped cutter is required for gears of different diameters, pressure angles, and pitch. If you consider every possible permutation, it is a ton of cutters. This makes sense when you compare a tiny radius, 9 tooth, gear (as on the extruder stepper) to a straight rack and pinion style gear (of infinite radius). This is where the "close enough" factor comes into play. They make sets of cutters (no. 1-~10), where each cutter can cut a small range gears with different number of teeth:


This helps, but you still need a different set for every different pressure angle. The next obvious question from cheapskates, like myself, is "can I make my own gear cutters"? And the answer is yes. You need a tool to make a tool.  That is to say, we use a fixed radius cutting tool to cut a fixed radius cutter to approximate the continuously increasing radius profile of an involute gear cutter. :)

Single Point Cutting Tool:

My understanding is that even the multi-tooth cutter above is a "Single Point" tool because it only cuts one gear tooth at a time (B&S terminology). I initially thought it meant a single cutter edge, like on a fly cutter (which will also work). So, we take a disc (or square) of steel, shape the perimeter similar to an involute gear cutter's profile, cut away some material leaving teeth which can cut a single gear tooth. (technically it removes the material between 2 teeth).This picture is from a great pictorial of the processes::
Making Multi-Point Gear Cutters:
Homemade gear cutter

The Button Tool: How to create the correct tool profile to shape the gear cutter.

The button tool consists of a mild steel holder with a couple of hardened disc-shaped cutters(buttons)  mounted at a fixed center-to-center distance. This way we can cut the "approximate involutes" on both sides of the gear cutter at the same time while keeping the gear cutter symmetric.

This is an over-simplified depiction. In reality we need to account for chip clearance, rake angle, relief angles, etc by offsetting the disc either while shaping the disc, or offsetting the tool during the machining process.

Issues with the button tool method

For every involute( or range) a different button tool is needed. Each button tool has a unique disc size, center-to-center distance, and required infeed. This isn't as bad as seems for the extruder since we only need two gears. Gears and Gear Cutting contains a couple tables containing the required button parameters. However, there are a few problems: First, there is no information for the small 9 tooth gear we need on the stepper. Second, he only shows values for 20 and 30 degrees pressure angles (even though I am using 30). Third, he doesn't show where the data in the tables came from, so we can't calculate our own.

I searched web and found the following article on Mike's Workshop : Designing Gear Cutters. He ran into the same problem and using trig/geometry figured out the formulas and relationships. So, using the following relationships, along with the desired pitch(or module), and number of teeth, we can create smaller button tools to make smaller gear cutters.





Again, glossing over much of the information / derivations, it boils down to these three formulas:

$$ bd = NM\cdot sin(p) $$ $$ bs = NM\cdot Cos(p)\cdot sin(p + \frac{90}{N}) $$ $$ inf = \frac{M\{ N\cdot Sin p - (N-2.314) + N \cdot Cos(p)\cdot Cos(p + \frac{90}{N})\}}{2} $$

Where:
  • bd. Button Diameter
  • bs. Button Separation (C,D in diagram)
  • inf.  Infeed (G,F in diagram) The distance from point G to the root circle.  So, I can "touch off" the button tool tangent to the buttons and feed to proper depth. *remember this just to create the gear cutter, not the gear.
  • Number of teeth (N). This is simply the number of teeth on the gear.
  • Pressure angle (p). This is the angle AOC in the diagram above. A line drawn from the intercept of the gear tooth with the pitch circle forms a tangent to the base circle at the pressure angle.
  • Module (M). This is the pitch circle diameter divided by the number of teeth. Thus pcd = NM.
  • *M = 25.4/DP (module is the reciprocal of DP, but in metric) 
Plugging in numbers to the formulas above, and combining them with the gear specs from above, we now have everything we need to make two tools, to make two gear cutters, to make two gears, to make an extruder, to make a printer, to make...

GLOBALGEARS Center-to-Center = 30.16 mm
Diametral Pitch16LargeSmall
Pressure Angle30Outside Diameter (OD)49.21 mm17.46 mm
Depth of Cut (D+f)3.42 mmPitch Circle Dia. (PCD)46.04 mm14.29 mm
Module1.588 mm
BUTTON TOOL
Number of Teeth 299
Button Diameter 23.027.14
Button Separation 21.777.95
Button Tool Infeed 7.033.00


I created the these gears in 3D using a virtual button tool to create a cutter shaped solid that I subtracted from the gear blank


Now I have to find the time to get out in the shop and put my new-found knowledge into action...



References:

Wikipedia - Involute Gear
Ivan Law's Gears and Gear Cutting
John Stevenson - Cutting Involute Gears With Form Tools
Mike's Workshop - Designing Gear Cutters
Dean Williams - Making Multi-Point Gear Cutters (pictorial)
Shane Graber's i3ext Extruder - sgraber on Github
Parametric Involute Bevel and Spur Gears by GregFrost - Github
Designing Involute Profile Gear Pairs in Art of Illusion - RepRap Wiki






Monday, September 9, 2013

Machining a J-Head Nozzle

Currently I have zero parts for my 3D Printer, and I plan on making everything, just for the hell of it. Eventually I plan on building something like the Prusa i3. I'm guessing I'll build some sort of intermediate RepStrap first, who knows. After a month of reading the RepRap Wiki and forums, I decided to start with a version of the sgrabers i3ext extruder with a J-Head hot end:



This i3ext from the flickr album that sgraber links to on his Github account, and the J-Head is from the RepRap Wiki:

I'm starting with J-Head nozzle. Essentially it will be a MKVI-B, which is a MK V with a heater cartridge, instead of the heater resistor. I've ordered a few heater cartridges from china. For 5.99 for 3 of them including shipping, I figured it was worth a try.

The RepRap Wiki J-Head page contains the specs needed for machining a J-Head:

Material: Brass Bar Stock, 1/2" Square, 1.000" Long
Finished Weight: 11.3 grams
  1. Cut a piece of brass bar stock 1 inch long plus enough to adequately hold the stock in the lathe.
  2. On the brass bar stock, find the center of the axis of the nozzle. (The axis is centered at 0.250 +-0.001, from one edge, and 0.157 -0.000 +0.003 from an adjacent edge.) This can be done by various means ranging from using a milling machine to using marking fluid, a height gauge, and a surface plate.
  3. Mount the brass bar stock in a 4-jaw chuck on a lathe. Adjust the chuck so that the nozzle axis is on center.
  4. Turn the threaded end of the nozzle down to 0.3125 +0.000 -0.004. This section is 0.500 +-0.005 long.
  5. For the first 0.150 +-0.010, of the threaded section, down to an OD of 0.255 (6.5mm) +0.000 -0.002.
  6. Thread the nozzle to 5/16-24 up to the shoulder of the heater section.
  7. Drill out the center of the nozzle with a 3.5mm drill bit. This will create a heat chamber that is the entire length of the brass nozzle.
  8. Remove the work piece and mount it by the threaded end so that the threaded end is centered in the lathe.
  9. Cut-off any excess material.
  10. Machine the nozzle tip to the desired profile leaving the heater block section 0.325 thick.
  11. Drill the nozzle orifice.
  12. Using a size A drill bit, drill the heater resistor hole through the heater block section.
  13. Drill the thermistor hole.

Even though I've been looking at pictures of J-Heads for a month, I had know idea how small they really were until I made one! The first one came out pretty bad, but after giving the lathe a tune-up, and getting some better tools I got things figured out:

  • I Turned down the stock, drilled/reamed the heat chamber, and threaded the nozzle. The only thing to be careful of here is the offset of heat chamber and the depth you drill. I decided to drill to a depth that leaves the outside of the drill tip flush with the "bottom" of the heater block. This way the cone of the drill extends into the nozzle nipple.

Using a 4-Jaw to offset the heat chamber. 






The much improved 2nd attempt

  • Then I created a threaded center to hold the nozzle while I shaped and drilled the heater block and nipple. I have C5 collets, but this just made it easier to protect the threads. The center worked great, but the .35mm drill is SO small I had to place two .006" shims under the tail stock to get the drill centered on the work piece. From what I've heard it takes nothing to snap these drills. Before the shims were added I could see the drill bit "lifting", to find the center :O
  • NOTE: I also realized I need to leave the nipple long at this point, and face it down to reach the desired .020" thickness. See the shaping pics below.



Ready for peck drilling. With such a small drill, I turned the nozzle as fast as my lathe could go while drilling


Watch closely at the first part of the video below. You can see the drill starting to lift. I'm sure it would have snapped had I continued.


I think these .006" shims are the only thing stopped me from snapping any drills

A well centered TINY hole

I would guess I drilled through about .125" of brass without any problem.


  • Finally I shaped the nipple and  faced the end until it was .020 thick. In order to measure this I used the back end of the reamer. It just happened to have a conical end the same angle as the bottom of the heat chamber. Basically I plugged the nozzle hole from inside of the heat chamber. I then used the dial on the tail stock to measure how far the drill could insert into the hole before hitting something solid ( the reamer). I kept removing material from the nozzle until the the tail stock indicated ~.020"

Big nipple

Little nipple, ~.020" wall thickness



If you look closely you can actually see the wall thickness (thinness) were the hole enters the heat chamber.

Twenty hours later I have a $10 part that may, or may not, work ;)