Solidworks: 3D Printing threaded holes

When designing 3D models in Solidworks with the intent of fastening with machine screws, you might not think of directly modeling machined threads into your design. If your threads are coarse enough though, it may work better than modeling a hole with no threads since you won’t have to use a nut or threaded insert hardware.

Solidworks-Cross-Section-ThreadsCross section of threaded hole as modeled in Solidworks

As an example, I recently modeled a part that would be attached to a tripod. A tripod bolt is typically 1/4 inch diameter x 20 threads per inch. It’s not too hard in Solidworks to model a threaded hole. Basically it’s a matter of creating a helix, creating a sketch that defines the thread cut shape, then perform a swept cut.

Solidworks-Cross-Section-HelixHelix/Spiral that goes through thickness of material.

Solidworks-Cross-Section-Cut-Shape

Triangular shape used to cut threads.

Depending upon the resolution of your 3D printer, your results will vary. I used an FDM printer that has a .2mm per layer thickness at the finest setting, and it worked well enough. The fit was a little tight, but not too bad. You may have to experiment with the thread modeling to get it just right. I have also found that if you get the untapped hole size correct you can cut threads with a fine pitch machine screw though it’s a bit tough. I have used that technique with 4-40 screws and it worked well enough to fasten 2 parts together. Calling it “cutting threads” with a 4-40 screw may be a little generous, but it did the job :)

Solidworks-Rendered-Threaded-HoleRendering of threaded hole. 1/4 x 20

I’d certainly consider using this technique for coarse machine threads into printed plastic. You could even use it for a better fit for self tapping screws, as it may help relieve stress as well as prove better for straight insertion of the screw rather than being at an angle which sometimes happens with self tapping screws. Your 3D print will not be as pretty as the above rendered threaded hole, but should be good enough to enable use of a threaded screw and integrating the nut right into the 3D print.


Solidworks tip – scanning and importing

One very useful technique in Solidworks for designing parts to fit other parts that already exist is to use a flatbed scanner or other calibrated input device to make your model match critical dimensions with a reduced amount of getting out the calipers and making detailed measurements. Flatbed scanners are particularly useful for scanning printed circuit boards or parts of a chassis that can be laid flat on the scanner.

One of the difficult things though is getting the scale just right. When you have to start scaling the photograph to match certain measurements you introduce opportunity for errors. Even small errors can be frustrating because you’ll be tweaking the model a lot to match reality.

A flatbed scanner isn’t the “perfect” device though, and many of them have issues with distortion since most of the time you’re not scanning something that’s completely flat. The optics and scanning/digitizing methods vary greatly. I’ve found that some of the cheaper scanners found in the “all in one” types of devices like scanner/printer/fax machines don’t have great depth of field and do weird things when the object being scanned is not a flat document.

Back to the scaling issue. Wouldn’t it be nice to just not have to scale anything manually, to have it come in just perfect? It should be easier, but it is certainly possible with a tiny bit of work. A little experimentation may be needed. Once you’ve got it down, you can re-use the technique over and over.

I’ll give you an example. As a test, I created a 1 inch square bitmap using Adobe Photoshop and loaded it into Solidworks.

sketch-pictureSketch picture command in lower right of image

 sketch-picture-size

What Solidworks thinks it should be.

Look at that! My 1 inch square image gets interpreted as 39.37 inches. This will not do.

Now if you’ve been doing a few metric conversions, you may notice that 39.37 seems familiar. That’s the number of inches in 1 meter. So it would almost seem that Solidworks thinks my square is 1 meter instead of 1 inch. I did some experimentation and it seems that the DPI setting in photoshop has no effect. Whether it’s 72 DPI or 1000 DPI, my 1 inch square shows up as 39.37 inches when it’s 1000 pixels across. Put another way, 1 pixel = 1mm.

So if it’s based on pixels, I should be able to just scale down my image so for instance my 1000 pixel square divided by 39.73 would become 25.4 pixels square. Well that’s pretty chunky, and any scanned images aren’t going to look too great at 25.4 DPI. Besides, I want to take advantage of the native resolution of my scanner as much as practical so I get a nice looking image.

One way around this is pretty simple. I’ll just scan at some multiple of 25.4 pixels per inch, then scale it down in Solidworks by a constant factor. So, I chose a multiple of 20. Using a 508 DPI setting (25.4 x 20) on my scanner will let me divide by 20 in Solidworks, get the scale right, and maintain a decent image.

The image below is of a mouse pcb loaded into a sketch. I put it on the scanner, scanned at 508 DPI, loaded it into Solidworks, and voila, the scale came out right and it looks nice. In the photo below you can see how I simply entered an equation in the Solidworks field for X dimension. You can enter equations like this and Solidworks does the math.

Solidworks-image-scaling Entering an equation. Note the “/20” highlighted in red.

Solidworks-image-scaling-afterFinal result after scaling… just what we want.

There may be other tricks to accomplish this, but this is pretty straightforward. A quick measurement between 2 points on the drawing and the same 2 points on the physical pcb show an accurate match. Now I can proceed with building the model around this board!

I hope you’ve found this useful, and if you have other techniques to do this, I’d love to hear them.

ABS of goop – Making liquid ABS Plastic

One of the problems with 3D printing that has plagued mankind since… the beginning of 3D printing … is warping of the part while it’s being printed. Unfortunately, the ABS plastic material that is used in printers that use FDM technology is pretty susceptible to significant warping causing many a hunk of plastic to be tossed into the garbage. Now you can save those hunks of plastic as they may come in handy for making liquid ABS as we’ll see shortly.

Different 3D printers use different techniques to combat warping, with varying degrees of success. The professional commercial types usually use a closed heated environment with disposable build platforms that are made of ABS plastic. ABS sticks well to ABS. It can actually be difficult to remove a model from such a platform and if the model has delicate features you could even end up damaging the model when removing it. But this does a great job of preventing warping.

In the DIY realm lots and lots of techniques have been tried, which many people swear by, but don’t necessarily work well all of the time. Printing on perfboard is pretty popular as well. The tiny holes in the perfboard allow the plastic grip better, preventing warping.

I don’t know of any DIY types of printers that you can readily buy disposable trays for. Adding cost to each print is also not something most of us really want to do anyway. So I did a little research and experimentation with liquid ABS.

Where can you find liquid ABS? Well as it turns out, if you’ve got some 100% acetone and some ABS plastic you can make your own. Most nail polish remover is diluted but I’ve found you can buy 100% acetone in a nice sized bottle in the nail care section of drugstores like Walgreens, CVS, etc. You can also get it at hardware stores like Home Depot but it’s usually in a metal can that I find is a little harder to pour from. Use gloves and a well ventilated area as it’s pretty harsh stuff.

Acetone-and-ABSABS scraps, acetone, and liquid ABS plastic in glass bottle.

I usually use “painters tape” which is that blue tape that sticks to drywall, trim, etc and then peels off without taking the underlying paint with it. I put it right on my aluminum plate build platform then press it down with a putty knife. That gives pretty good adhesion between the tape and the metal. Often times when I experience warping, what happens is the raft under the model (I usually print with rafts vs raftless) lifts in one corner. The separation is between the ABS and the tape. I also usually put a coating of something on top of the tape. I’ve tried acrylic paint as well as other types of material to try to get good adhesion. For awhile now I’ve been using “Gesso” which is kind of like a thick paint.

 

pressing-painters-tapePressing tape onto platform

liquid-abs-dropDrop of liquid ABS on painters tape

But when I want it to stick really well I’ll put down a thin layer of liquid ABS which provides pretty good adhesion between the model being printed and the underlying tape. This does seem to help most of the time and when there is lifting in these cases it’s usually between the tape and the platform. The tape/ABS goop/model sandwich stays stuck together pretty well.

Using liquid ABS may well be something that could work for you sometimes and be in your bag of tricks for when you’re having a tough time printing that troublesome model. It’s easy to make. Just store it in something like a glass container or other material that Acetone won’t dissolve. You don’t want to find a big mess the next day from your liquid ABS container being compromised by the acetone.

abs-filmThin film of ABS plastic on top of tape.

Another way to avoid warping is to use PLA material, which unlike ABS, has very little if any issues with warping. It’s one reason why PLA printing has become more popular. However for durability and longevity especially in warm storage or use environments PLA is not quite as durable. PLA prints look great though and many people print them directly on glass or Kapton tape without concern for warping. Your printer may have a little difficulty with PLA though if it has not been designed for compatibility with PLA. PLA has a lower melting point and some material extruders can’t consistently feed the material properly.

Happy printing!