Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

How to Mate Ball Detent Mechanism?

matthew_stacymatthew_stacy Member Posts: 487 PRO
Any suggestions as to how I could mate the components in a ball detent mechanism?

The slug and ball are mated to the origin with CYLINDRICAL's, such that their axial degrees of freedom orthogonal to one another.  My intent is to animate the slug left/right (along global X-axis) and have the ball translate fore/aft (along the global Y-axis) to track the surface of the slug.

I am stumped on two fronts:
  1. Applying TANGENT mate fixed the axial degree of freedom on both parts (locked them up)
  2. I can't figure out how to make a compound selection along the slug faces to provide continuous tangency throughout the motion 
I tried mating the ball to a sketch (and a surface) representing the slug contour, but to no avail.  Any ideas or suggestions would be greatly appreciated.

Comments

  • EvanReeseEvanReese Member, Mentor Posts: 2,112 ✭✭✭✭✭
    I wasn't able to access your document for some reason. Will you double-check that it's public?
    Evan Reese
  • matthew_stacymatthew_stacy Member Posts: 487 PRO
    @Evan_Reese I turned on link-share just a moment ago.  Try it now.  I thought public was sufficient, but perhaps not.
  • EvanReeseEvanReese Member, Mentor Posts: 2,112 ✭✭✭✭✭
    Hmm, still not working. Public ought to be enough. Is it the right link?
    Evan Reese
  • alnisalnis Member, Developers Posts: 452 EDU
    The problem with ball detents is that there is a mechanical singularity when the ball is in the groove: it is tangent at multiple places. Assembly motion solvers don't like dealing with this sort of stuff, so you need to smooth it out to prevent the singularity from being a bother. This means making the radius larger and the transition smoother for the detent. Admittedly, this is not 100% physically accurate (there are interferences as the ball transitions in/out of the groove), but it is close enough for animations and visualizing what's going on, and even drawings since the ball is situated correctly in the groove as long as it is all the way in or all the way out (it's only the transitions where it's off). I recommend configuring suppression of the tangent mate & limits of the ball's cylindrical mate if you'll use it in a big assembly to prevent seizing.

    Final model link: https://cad.onshape.com/documents/1d32c693466a04ab93886854/v/4661912d1fb034cb0dd97e50/e/aa7e02d6663c411bddef20c4

    Step 1:
    Make a sketch, something like this. The middle arc should be tangent to the groove, the outer lines should be coincident with the edges of the cylindrical thing ("Intersection" makes this easy in the sketch environment), and there should be an arc connecting the two. Note the tangent constraints between all of the arcs and the construction lines (and their "normal to curve" constraints) from the start of the transition of the actual groove to the "skeleton" arc setup we have. I used a distance of 0.3 mm, but you can use a smaller one if you are brave or a bigger one if you are cautious.


    Step 2:
    Use the "unified spline" custom feature to create a 3D spline curve containing the lines and arcs. This will make our skeleton surface have a single face and no tangency lines, increasing reliability in some cases. This is really great whenever you have this sort of continuous tangent motion. For example, you can use it to model a pipe resting in a v profile rollers.


    Step 3:
    Create another sketch on the same plane as the first one and project the curve back onto it. This seems like a redundant step (why don't we just use the original sketch?), but it is useful since it turns the 3 arcs and 2 lines into a single, continuous spline sketch entity (but still with the correct shape!). This will let us extrude the profile without separate faces/tangency lines, and it needs to be a sketch since even a "flat" 3D curve can't be extruded since it doesn't have a "normal" direction.


    Step 4:
    Oh yeah, it's all starting to come together now! Extrude the surface an arbitrary amount, and make it symmetrical so that the tangent mate doesn't have to solve contact right at the edge. Don't make it too big to be distracting when you're adding the mates, and don't make it so small that it's hard to select. Note how it is perfectly tangent to the cylindrical portion and just barely comes in at the deepest point of the groove, but interferes in the intermediate area. This is the smooth transition we need for the solver to stop complaining about singularities and the AI takeover of the planet or something.


    Step 5:
    Add a group between the slug and the skeleton surface. Then, add slider mates between the slug and origin as well as the ball and the origin. If you leave them as cylindrical mates, the solver can get confused from the spare degrees of freedom and it will lock up as soon as you show the model to someone important (of course, it will resume functioning once the important person has left the room). Optionally add a limit to the slug's motion to keep the model from flying apart and turning angry.


    Step 6:
    Sit back and relax, and spend 5 minutes playing with the assembly, completely trapped by its mesmerizing motion, until you remember you have three problem sets due on Tuesday and you really wanted to get them done by tonight so that you could have free time to work on doing the lab, tutorial, lecture, and writing sections of your classes over the weekend (since you spent too much time using onshape during the week and now there's a pile of work to do...)


    Hope this helps, and have a great weekend!
    Get in touch: contact@alnis.dev | My personal site: https://alnis.dev
    @alnis is my personal account. @alnis_ptc is my official PTC account.
  • matthew_stacymatthew_stacy Member Posts: 487 PRO
    @alnis_smidchens bravo!  That is a brilliant work-around for something that OS really doesn't want to do yet.  I suspect that you have a formidable  chess game.

    To summarize the key elements of your strategy for this detent mechanism:
    1. Trace the shaft detent profile, with appropriate modifications to circumvent computational singularities (i.e. R > radius of ball and radius the edges.  R7 was the smallest I could go for consistent assembly behavior on an R6mm ball.  Interesting that R6.1 won't suffice.)
    2. Unify that profile with the Unified-Spline FS (further experimentation reveals that the 3d-Spline-Fit tool will also work but the Edge-to-Spline FS will not work)
    3. Project the spline in a 2d sketch
    4. Extrude that 2d sketch (projected spline) to create a 'skeleton' surface for use as a construction feature in assembly
    5. Insert the shaft part AND skeleton surface into assembly at their coincident default origin locations
    6. GROUP the shaft part and skeleton surface (while still coincident at their default locations)
    7. Mate the ball TANGENT to skeleton surface
    8. Hide the skeleton surface.
    Thanks again!

    PS:  Don't read this until you complete your homework assignments.

Sign In or Register to comment.