You are currently browsing articles tagged 3D.

OpenSCAD apparently doesn’t have an easy way to make an arc or wedge, or any way to do a partial rotate_extrude. This presented a problem when I started to design my Parametric Encoder Wheel, because in order for it to look nice, it would need to have lots of extruded arcs or partial rotate extrudes in order to make the holes.

Encoder Wheel, OpenSCAD Arc

Creating an Arc with OpenSCAD

Here’s how I solved the problem. Currently this will render slots up to 180 degrees around, but extending it should be pretty easy. If you’re doing a lot of these in your model, be sure to use render(), or badness will occur.

 * Excerpt from... 
 * Parametric Encoder Wheel 
 * by Alex Franke (codecreations), March 2012
 * http://www.theFrankes.com
 * Licenced under Creative Commons Attribution - Non-Commercial - Share Alike 3.0 

module arc( height, depth, radius, degrees ) {
	// This dies a horible death if it's not rendered here 
	// -- sucks up all memory and spins out of control 
	render() {
		difference() {
			// Outer ring
			rotate_extrude($fn = 100)
				translate([radius - height, 0, 0])
			// Cut half off
				cube ([radius+1,(radius+1)*2,depth+1]);
			// Cover the other half as necessary
				cube ([radius+1,(radius+1)*2,depth+1]);

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

This is a parametric encoder wheel that allows you to set circumference, internal width, shoulder height/width, mounting hole diameter, number of timing holes, as well as several parameters for captive nuts, alignment/snap-together pins, bolt holes, and inset of those timing holes. Most of the renderings here are for a 608 bearing (for free rotation) and sized to fit another pinch bearing.

The wheel circumference (less shoulders) of the metric and SAE versions is slightly different, and the hole sizes/spacing is different depending upon what distance you want to measure between holes. The distances will be accurate at the surface of the wheel for these renderings.


NEW UPDATES — please read below for important information abut which renderings are part of which version!

A note about resolution: The resolution of the renderings is defined by the circumference of the wheel (but not the shoulders) divided by the number of holes. So, if you’re using an optoisolator, you can either count rising edges or falling edges for this resolution. But, you can effectively double the resolution by counting both rising and falling edges. For example, use the 5mm resolution wheel and count both edges (e.g. using Bounce or a pin change interrupt) for 2.5mm resolution.

If you want to just print the stl models…

For most of the models shown, print one copy of the encoder wheel cap, and one of the encoder wheels. Onto an 8mm (or 5/16in) bolt, add a washer, the cap (flat side first), another washer or two, the 608 bearing, another washer, and then the nut. Slide the encoder wheel onto the 608 bearing, but not so far that it contacts the cap. If it’s loose (default 0.5mm play), then put a bit of tape around it.

The 2.5mm version was rendered using the latest v0.9 of this openSCAD file, and includes several of the new features, including captive nuts, bearing constraints, and pins you can use to join the parts together. I’ll update the others as I get these files tested.

If you want to tweak it for your own purposes…

Open the file and tweak the values of these variables in the “User-defined values” section.

General Encoder wheel parameters:

  • bearingSize – The dimensions of the bearing, if you’re using that to define the hole
  • encoderCircumference – The circumference at the *surface* of the wheel (subtract tire thickness, e.g.)
  • internalWidth – The internal width (e.g. tire width) of the wheel. This is the width of a pinch 608 by default
  • collarPlay – The amount of play to build into the internal width.
  • collarHeight – How high the shoulders/encoder extend out from the wheel
  • collarWidth – How thick the shoulders are
  • holeDiameter – The diameter of the mounting hole. This is the diameter of a 608 bearing by default.
  • holePlay – The amount of play built into the mounting hole.
  • timingHoles – The number of timing holes to render. (e.g. 100mm circumference / 5mm per hole = 20 holes)
  • timingHoleInset – How far the timing holes are inset from the edge of the shoulder

Captive Nut traps allow you to tighten the wheel onto a shaft or bearing.

  • nutCount – The number of captive nuts
  • nutDiameter – The distance across the nut, from flat to flat, default M3
  • nutThickness – The thickness of the nut, default M3
  • setScrewDiameter – The diameter of the set screw clearance hole, default M3

The constraint values can be used to add material to the bottom of the mounting hole that partially blocks the hole. This can be useful, for example, if you want to constrain a bearing in the hole.

  • constraintInset – How far the constraint estends toward the center of the mounting hole
  • constraintThickness – The thickness of the contstraining wall
  • capConstraintInset – How far the constraint estends toward the center of the mounting hole on the cap
  • capConstraintThickness – The thickness of the contstraining wall on the cap

Pins or holes allow the cap to be snapped, glued, or bolted to the encoder wheel.

  • pinCount – The total number of pins / pin holes to render evenly-spaced
  • pinLength – The length of the pins/holes
  • pinDiameter – The diameter of the pins/holes
  • useHolesInstead – If true, render bolt through-holes rather than pins and pin holes
  • mateHoleDiameter – Bolt holes are sized to match hardware, not physical properties.

These values define the cap

  • capDiameter – The diameter of the shoulder cap, defaulting to the outer diameter of the encoder
  • capWidth – The thickness of the shoulder cap, defaulting to the thickness of the slotted encoder shoulder
  • capStandoff – A surface rendered on the inside of the cap around the mounting hole
  • capStandoffWidth – The width of the stand-off surface
  • capHoleRotation – Rotation of cap holes (in order to avoid the nut traps)

Other miscellaneous Parameters

  • distanceApart – How far apart the object will be rendered.

Important Notes

I’ve printed it successfully (as pictured) using a 0.5mm nozzle Prusa Mendel down to about 1.6mm. The pins in v0.9 come out quite small, and two of the three default pins were usable once I drilled out the holes. I’m still a bit new at this, though, and I’m still tuning my print quality, so I’d be interested in hearing about anyone else’s experiences with printing these.



This design is licensed under the Attribution - Non-Commercial - Share Alike license. Find it on Thingiverse at: http://www.thingiverse.com/thing:20491

I received several filament samples from New Image Plastics in Ohio, ranging in length from about 1-4 feet. Here are the measurements I took from various points on each strand. I measured all the way around the filament and recorded the minimum and maximum values:

Orange 1.75mm ABS (Sample 1): 1.70-1.73, 1.70-1.73, 1.67-1.70, 1.71-1.74
Orange 1.75mm ABS (Sample 2): 1.71-1.74, 1.71-1.74, 1.71-1.73, 1.70-1.73
Orange 1.75mm ABS (Sample 3): 1.67-1.70, 1.69-1.73, 1.67-1.69
Orange 1.75mm ABS (Sample 4): 1.68-1.70, 1.66-1.68, 1.67-1.70

White 1.75mm PLA: 1.69-1.71, 1.68-1.73, 1.68-1.73, 1.68-1.73, 1.68-1.72

Clear 3mm ABS*: 2.87-2.91, 2.90-2.95, 2.90-2.94, 2.88-2.93, 2.86-2.95

* They noted that the clear plastic “is to sample only we do not have clear resin to sell” [sic].

This is a project enclosure for the Velleman Metal Detector Kit, commonly available at Radio Shack.


Clip the PCB into the bottom of the case. (You may need to bend the corners out a bit, but it should snap right in.) The 9V battery fits below the circuit board. There are four little hooks around the perimeter that might print well if you send it off, but I haven’t had success with them on a reprap, so I just hold it together with tape.

Here’s a link the the Velleman kit this was made for: vellemanusa.com/products/view/?country=us&lang=enu&id=350591


case_bottom.stl 287.3 KB
case_top.stl 280.1 KB


This design is licensed under the Attribution - Non-Commercial - Share Alike license. Find it on Thingiverse at: http://www.thingiverse.com/thing:18825

This is a custom modular Beyblade launcher-compatible spinning top, designed by Jacob (7). He says, “It’s awesome!”


Use a 3M metric machine screw with washer through this, and then through one of the custom middle sections. Add a washer and a nut and tighten the two parts together. (If they’re loose, it won’t spin well — if at all.) Finally put a dab of hot glue into a tip, stick it onto the bottom of the screw, and let it rip!

For the square pattern, add some weight to the top by attaching screws and washers using the holes. The other design is supposed to be hearts, but it turned out looking more like a four-leaf clover.

These probably won’t be the highest performing tops you have, but you’ll be the only one who can say you made it yourself. And yes, I know the print quality is awful here — it was one of our first prints.



This design is licensed under the Attribution - Non-Commercial - Share Alike license. Find it on Thingiverse at: http://www.thingiverse.com/thing:18694

When I wired up my Reprap and started printing, I noticed that all my prints were mirrored along the Y axis — I’d set it up with the end stop at the front and configured it so that the print bed moved forward when I clicked Y- in pronterface (printrun), and not back. (When the table moves back, the print head essentially moves forward along it.)

The end stops were already in place and I didn’t want to move them, but no combination of INVERT_Y_DIR and Y_HOME_DIR in Configuration.h would work. I even tried changing Y_ENDSTOP_INVERT, knowing full well that it wouldn’t help either.

So how do you flip an axis without moving the end stop or the home position? The answer is to change both INVERT_Y_DIR and Y_HOME_DIR in Configuration.h, and also swap the values for Y_MAX_PIN and  Y_MIN_PIN in pins.h for the specific motherboard you’re using.

A couple of people have noticed this, so I thought I’d write it up. There’s nothing wrong — it’s just something to be aware of if you’re soldering up a Sanguinololu 1.3a PCB.

If you look closely at the circuit board where the FTDI chip goes, you’ll notice a tiny solder bridge between pins 25 and 26 (below the “L” in “FT232RL”). I noticed it when I first inspected the board, and I looked at the original gerber files to make sure it was part of the design. It is, in fact, part of the original design (see photo below), so there’s no need to try to remove it. (To confuse the issue, the instructions even say to look for things like this.)

If you did remove it, that’s okay, too — those pins (which both go to ground) are still connected inside of the outline of the chip.

One other thing to note is that the pin headers along the top of the board sit a little further in than those along the other sides. This is also exactly as it is in the original gerber files, but it means that the PCB might prevent some right-angle headers (like those in the Mouser project kit) from plugging all the way in unless the male headers are soldered a little high. (See the second photo.) This is probably more of an aesthetic issue than a functional one, but if you want to make sure they plug in completely, you can use one of the female connectors to space it properly when you solder it on.

Yeah, free. If you’re starting a 3D printer project (such as RepRap) at your public K-12 school in the United States for the benefit of the students, then we’ll give you a free Sanguinololu v1.3a PCB to help you out (while supplies last). They typically sell for about $12-14. We won’t even charge you for shipping.

What is a 3D printer? Check out the video at the bottom of the page for an introduction.

Not a school but want one anyway? I’m selling some of them to raise funds for a printer for a local school. Just select “None – Buy one” for affiliation below, and I’ll send you the details. They’re $11, shipping included within the USA.

Sanguinololu 1.3a PCB

Sanguinololu 1.3a PCB

We don’t see any reason why kids shouldn’t have access 3D printing technology in their problem solving toolkit, and soldering up the electronics is all part of the fun. A club with only six kids raising $50 each could be well on its way to building and operating a 3D printer for its school, and while the electrionics can typically amount to 1/3 or more of the final build price, hopefully a free PCB will help ease the pain a bit.

Are you interested? Submit the form below for instructions on how to get your free Sanguinololu 1.3a PCB.

Name (required)
Email (required)
School (required)
Affiliation (required)
Description of Your Project (required)

What is a 3D Printer?

Here’s an introduction to the technology:

I’ve set out to build a Prusa Mendel for $300. So far I think I’m doing pretty well. The top part is what I’ve already picked up, and the bottom part is what I have yet to purchase — that’s where I still have some flexibility in cost. The first column is the percentage of total cost for that part. Shipping charges for a group of items from the same supplier are listed with the first item in that group. [Note: This chart has been updated many times as I build, and as because I’m already up and running with my reprap 3D printer, there’s no longer anything left to purchase.]

Where I discovered mistakes, I’ve corrected them. For example, I actually ordered nylock #6 nuts instead of regular ones. In cases like these, I’ve just corrected the prices and pretended like I never incurred the cost of the wrong product.

There’s one important point I’d like to make out here: I was patient, I waited for good deals (and occasionally got exceptional ones), and I arranged some group buys for bulk discounts. Often if you agree to purchase larger quantities of a product, you can secure a discounted rate, and so that’s what I did where I could. You might not find all of the same deals I did, but you may get pretty close if you are patient and work with your suppliers.

I’ve added a table below that breaks out the electronics order, including what I had on hand, what I bought from ebay, and what I didn’t actually need. (Welcome Hack A Day readers!)

Finally, be sure to scroll to the right in the spreadsheet views for important notes or shortcuts on most line items.


It’s not easy to find concrete examples of shipping costs for McMaster-Carr online, and they don’t tell you what an order is going to cost to ship until after it’s already shipped — and that can be a little scary especially if you’re ordering odd sized parts, even if they only charge their shipping cost. So here’s a real example of shipping costs for a small order with some long parts to NC, USA. The order was placed online and shipped the same day from their Atlanta, GA, USA location. It was ordered on December 29, and received in North Carolina on January 3.

For a reprap build, I ordered these items, which include three 3-foot steel rods, 200 nuts, 292 washers, and 200 machine screws. Shipping was only $6.52 for everything. That’s not bad at all…

Description Ordered Unit Price Total
95462A030 Zinc-Plated Grade 5 Steel Hex Nut, 5/16″-18 Thread Size, 1/2″ Width, 17/64″ Height, Packs of 100 1


Per Pack
90126A509 Zinc-Plated Steel Type A SAE Flat Washer, No. 6 Screw Size, 3/8″ OD, .03″-.07″ Thick, Packs of 100 1


Per Pack
90272A153 Zinc-Plated Steel Pan Head Phillips Machine Screw, 6-32 Thread, 1″ Length, Packs of 100 1


Per Pack
90631A007 Zinc-Plated Grade 2 Steel Nylon-Insert Hex Locknut, 6-32 Thread Size, 5/16″ Width, 11/64″ Height, Packs of 100 1


Per Pack
92005A120 Metric Pan Head Phillips Machine Screw, Zinc-Plated Steel, M3 Size, 10MM Length, .5MM Pitch, Packs of 100 1


Per Pack
8890K41 W1 Tool Steel Rod, .3125″ Diameter, Trade Size 5/16″, 3′ Length 3


90126A030 Zinc-Plated Steel Type A SAE Flat Washer, 5/16″ Screw Size, 11/16″ OD, .05″-.08″ Thick, Packs of 192 1


Per Pack
Merchandise 30.99
Shipping 6.52
Total $37.51

« Older entries § Newer entries »