20131102

Where's Waldo-the-Datasheet?

Howdy gang,

Once in a while, an interesting, random project shows up at 23b's doorstep.  This week's project-du-jour is a rotary encoder / stepper motor drive.  Without getting too bogged down in the details, what we need to do here is read the position from an encoder, and then drive a stepper motor at 110% the speed of the encoder.  This is meant for pulling extruded vinyl out of a larger machine, while keeping an appropriate tension on the extrusion. 

The focus of this post isn't the extrusion puller itself, this is more about the quest I took to find out where the Mil Spec callouts were for this particular connector, so we can hook up test leads while we develop the rest of the project.

The first step was checking the product data sheet.  A "Sick Stegman DGS25 rotary encoder" yielded ample Google results, with the proper data sheet.  Cool, that was easy. 

Another bit of googling for the connector type lead me to the Digikey and Mouser website where it has the proper connector listed (I think), and it's nearly $20.  Screw that, I'll make something here at the shop (why else do we have all these tools?)  After the 3D printer was down for most of the summer due to my dumb ass putting ancient support material through the extruder, I find myself champing at the bit for every opportunity to make a customized, one off piece for any project in the general vicinity.  The printer is an incredibly useful tool, when it works. 
After examining the case a little better, there is confirmation on the physical connector that it is nearly the same part number, calling out CR3102E18-1P-1.  The numbering convention is essentially the same, but why the CR spec instead of MS? 

After a bit more smashing my face on the keyboard, I learn that the CR and MS specifications are essentially the same scheme.  CR spec came from Cannon Electronics in the 50's, and it looks like the Mil Spec connectors were developed a decade prior.  Perhaps there's some overlap?  Perhaps it's similar to the 7400 / 5400 families of ICs.

Checking Digikey for the part number, I find myself puzzled, as the part number only seems to be for the male receptacle of the plug.  What the hell is the mating part called?   After some more face-smashing and context-grokking, I find "Oh, it's a MS/CR3106-18-1, of course that was easy to figure out".  NOT!



Different Mil Spec, different connector callout.  I guess that makes sense. Now where the hell is the blueprint? 

Just looking for the -3102 or -3106 part number didn't yield anything incredibly fruitful at first.  I did find a few diagrams showing pin location, but nothing with dimensional values.  Should be no big deal, perhaps I can figure this out.  Time to break out the calipers and Solidworks. 

After getting to know my Stratasys 3D printer over the last few months, I know that it's for the most part dimensionally accurate (maybe a hair on the small side)  Sure, I could run calibrations until I'm blue in the face, but that won't help too much.  The printer operates in open loop mode, meaning that it doesn't get any positional feedback to make on-the-fly adjustments to the print head location.  Translation - even if I program something at 1.000" exactly, it may come out a tiny bit bigger (1.003") or smaller (.997"), depending on a few factors, mostly the positional tolerance of the machine itself.  I'm satisfied I can program this part to a tolerance that will be acceptable to fit.  Usually, I give loose-fitting portions a +/- .005" tolerance (depending on direction of interference).  Tight fits usually have a single sided tolerance of .002", and we have even successfully produced accurate interference fit parts. 

There's a neat feature in Solidworks where you can superimpose an image on top of your model, so you can draft features based on an imported image.  "Sketch Picture" is the command you'd use, and here's what I did.  I opened up a sketch on the back face of the nearly-finished connector plug, resized the image, and simply drafted new lines on top of the image until they matched.  Mostly.




One thing I've learned while using Solidworks over the last few years, combined on top of my experience fabricating and machining parts, is that if something doesn't look right, it probably isn't right.  With ample training, your brain can become a finely-tuned difference engine, instantly recognizing small changes in familiar objects, without needing to intellectualize what the change is.  The warning alarm becomes a subconscious manifestation screaming into your Neocortex.

These Mil Specifications are quite good about part fitment and mating.  Something immediately struck me as odd while drafting this using my image file.  According to the superimposed image, the holes aren't precisely centered on the face, nor are they parallel, or even exactly aligned with one another.  I didn't think of this as a huge problem, hoping that the generous amount of space around the pins would more than make up for any dimensional inaccuracies of my part.  Take a close look at the centerlines of the part, versus the centerlines of the circles.  It's all wonky and offset, which is what I should have expected using a JPG as a reference. 



I printed the part, eagerly burning a little bit of time for the print to complete.  After realizing I am surrounded by assholes, I returned to Mr. Printer, lovingly nestled in between Mr. Coffee and Mr. Compressor.  An excited, anticipatory removal from the machine only led to my disappointment.  In this case, close enough wasn't going to cut it.  The pins were offset too far, something was wrong with my design. 

Shit, it doesn't fit all the way

Dammit.  

you can see a few of the pins barely peeking out

Back to the good ol' drawing board.

So what went wrong?  A quick glance down the holes, and you can see that the pin spacing wasn't quite accurate enough to get us a decent fitment: the plug is jamming on the pin diameter.  Since I gave up on finding the exact dimensions early on, looks like I'll have to dig around on the internet to find the exact specifications for this particular connector.  More Googling. 

As it turns out, there isn't any one specific drawing on the 3106 connector.  Rather, it lives as a subset of the byzantine MIL-STD-1651,where there's a breakdown of all variety of round connectors.  266 pages of connectors, not ordered in any specific way.  Even when searching for the term "18-1", I got close, but not close enough.  Turns out, the X in 18-X gives a variation on the part, usually a rotational value for the pins, and there's umpteen different varieties of rotation, and not even with the same pin population!  



DAMMIT, this last one is close, but rotated 90* off. 

FINALLY, after manually scanning each page of the document (really only about 20 minutes of work), I found the correct specification. 


Strange, even though the pin population is the same as the last spec (18-24), the spacing is just off enough where it wouldn't match, even with a rotation.  Time to update the model with the correct information. 



how about a googly eyed connector?

Close wasn't close enough.  The change in hole location seems to reflect the skew in my first part.  My brain processed the resulting linear offset accurately without needing a measurement.  Now if only my brain could be calibrated for more useful things, like where I leave my keys every day...

A quick revision to the hole locations, and off to the printer.  But wait, things can't be that easy, can they?  Of course not. 

One of the complications I've run across with the 3D printer is incomplete layer slicing. 

Just like reading toolpaths for CNC machines, when slicing a 3D model in Catalyst, it gives a preview of the toolpath before the print, which provides a quick and robust method to diagnose the print quality before finding out the hard way.  Look for erratic motions in the toolpath, or strange insertions of support material.  In this case, we saw both. 

STL file imported into Catalyst

The red lines indicate model material, and the white lines indicate soluble support, typically inserted if there are any overhangs to the model, building up a support network from the bottom up.  Since there weren't any programmed overhangs, why is there support here?

After slicing.  Notice the support material in the middle of the part.  This is bad, something is wrong.
Top view of the same part.  What's with the hole contours? 

Checking out the top view of the toolpath, you can see how some of the holes are artifacted and incongruous with the contours we programmed in Solidworks.  What happened? 

My first clue is the hole size, and the spacing that requires.  These features are getting pretty small, and the spacing between the holes is getting thinner and thinner.  Even though the finest level of print is .010" layers, that doesn't mean that the plastic extrusion is exactly that size.  The extrusion head prints layers that are substantially thicker than they are tall, nearly .020" wide.  This can cause problems for interpreting smaller dimensions, as well as the fill pattern between thin walls.  In this case, Catalyst changed the programmed contours of the circles to now have a bit of cutaway, probably to accommodate for the XY size of the extruded plastic.  While these changes would be minute, since we're dealing with small parts and tight tolerances in the first place, allowing these changes to be made by Catalyst would at best produce a part that doesn't fit correctly.  At worst, it may have messed up the entire print by inserting support material where none is intended - I've even seen whole layers of support inserted in the middle of a print, effectively ruining the model half-way through.

After a few revisions to the part (making the hole size slightly smaller, so the wall thickness can be larger), I was able to find some dimensional values that would happily process in Catalyst.


Much better, Aziz

Notice the holes look right, now?



 So how did the part turn out, after all this trouble?  Perfectly. 




This is a much more satisfying result.  The printed parts fit precisely, as long as they were designed precisely.  Not everything works on the first shot, but success the second time around isn't a bad consolation prize.