Let's Design and Build a (mostly) Digital Theremin!

Posted: 7/30/2020 3:29:13 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Btw., for a while now you can explicitly state types in Python, where you think it counts."  - tinkeringdude

Thanks for that!  I saw some code using types a bit ago.  I'm trying to redo my calculator with Tkinter and I've almost got a complete non-functioning (widgets with no associated calculator code) mock-up.  Many of the widgets don't resize automatically with the "sticky" parameter, which is annoying.  There's a ton of bad examples on the web too, where they make the overall winow size some fixed number of pixels, and then the buttons and such don't fit.  The way to do it is to let the window fit to the layout grid.

============

I'm using someone else's thread library function to generate plastic threads in OpenSCAD - specifically, an M25-2 for the axis antenna & coil mounts.  I made a little round nut and a hex head bolt to do thread printing tests, but I'm having to add quite a bit of clearance to the female thread (1mm!) which is making me think of writing my own thread library function, as I've probably got enough SCAD chops at this point to do it. 

Posted: 8/2/2020 3:10:52 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Threads

It seems many of the higher level geometric convenience functions in OpenSCAD can cause a lot of churn and other issues when applied.  One thread library uses skin() to cover a big pile of polyhedron gaps; the thread library I was using employs slight overlap to cover the gaps.  You can directly describe polyhedrons with a large number of faces (rather than make individual polyhedrons), so that is what I set out to do.  Turns out making the whole thread spiral one polyhedron causes issues too, so I limited it to a quarter turn and copied that (sigh). 

Above is 20mm of an M20 x 2 external thread with top and bottom lead-in chamfers, created with my own thread library.

And that thread library I was using doesn't really address fit tolerance, other than making internal threads a bit larger (+h/20, a linear offset based only on thread pitch, which isn't a terrible approximation, but it should be applied to shrinking external threads as well).  Looking into metric tolerance in general and doing some graphing of metric tolerance charts, log/log gives a more or less straight line, which means it's a scaled power type thing.  Square root works quite well, and applying this to the thread tables I can get a function based slightly on the square root of the diameter and more strongly on the square root of the pitch that fits the thread tables fine (within ~0.01mm).  I have yet to implement this tolerance function in my SCAD thread code, and plastic threads will require quite a bit more clearance than metal threads.

Looking around our home pantry, plastic lids tend to use a "shark fin" type thread, where the mating face is 90 degrees and the back support is something like 45 degrees, often with the tip rounded and multiple lead.  I wanted to do this for the D-Lev printed threads, but printing the 90 degree face would be problematic for the male thread.  Standard 60 degree threads seem to print OK, though they do cause compression / expansion forces when tightened.

This all takes me back to my QC / machine shop days (another lifetime), and it's quite interesting to have a better understanding of tolerance and threads.  The eternal irony is that in order to validate what someone else has done, one must acquire a deep understanding of it, but real understanding only comes from doing it yourself.

[EDIT] It seems most of the real thread sizing goes on with external (male) threads?  There are more thread grades there anyway.

Posted: 8/3/2020 10:44:27 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

More Threads

Today while cleaning up my OpenSCAD thread file I decided to veer from the ISO Metric standard a bit.  It's one thing to cut threads in steel, it's another to print them in plastic.  There's a basic thread factor in the standard 'H' that sets all the dimensions.  Since the thread is 60 degrees, and H is the theoretical distance from the thread triangle minimum to the thread triangle maximum, this means H = P * sqrt(3) / 2, where P is the thread pitch.  The nominal diameter (e.g. 10mm for M10) + H/8 is the location of the thread triangle maximum.  The H clearance allowances for the thread ID and OD peaks in the standard are asymmetrical, and I decided to make them symmetrical.  Sizing is still based off nominal, so it isn't a huge deviation from the standard.  But the flats as seen in both male and female threads at their IDs and ODs are now all equivalent, and the OD of the male thread is a bit smaller than the standard dictates.  All flat clearances are H/8.

Above is a test bolt and some test nuts I printed out today with M25-2 threads.  The bolt is undersized by 0.5mm, the nuts are oversized by 0, 0.25mm, and 0.5mm.  0 is too tight, 0.25 is about right, 0.5 is pretty loose.  So combining these sizeings, it seems 0.75mm overall is a good ballpark clearance for 3D printed M25-2 plastic threads, and I would probably evenly split that between them for any real parts (~0.4mm for each at 2mm pitch).

For these clearances I'm just scaling the nominal diameter, and everything else follows from the H geometry, which seems sufficient.

You must be logged in to post a reply. Please log in or register for a new account.