# Converting rotary motion to linear motion (door for sliding trash can)

I have one of these slide-out trash cans:

I want the trash can to slide out with the door being opened and slide in with the door being closed.

I'm thinking of a method to convert the door opening motion (rotational?) into the linear motion of the trash can. Now I have tried searching multiple ways for solutions on converting rotational to linear motion, but came up empty for this seemingly simple problem. The door motion of course isn't purely rotational as we're not talking about converting the hinge-motion, but the motion of the door.

A method that works is just attaching a string to the side of the door and onto the trash can. That works for pulling out the trash can, but pushing in obviously doesn't work with a flexible string.

I'm lacking to tools to properly model this problem, right now I am stuck to fiddling around - I'm assuming there are better ways to solve this.

This is actually two different questions.

1. Mechanisms to convert linear motion to rotational: There are different mechanisms around, the most common of all crankshafts.
2. what is the best mechanism for your problem, coupling the opening of the door to the sliding of the can. I don't think you can use a rack-pinion mechanism unless you have pinion with big radius. IMHO the best mechanism for your need should be a 1DOF mechanism mechanism with one prismatic and one revolute joint. The revolute joint will be on the door and the sliding part in front of the can. Something like this:

You have already arrived at half of the simplest solution. You need a dual tension system. When you open the door, the string pulls the slide out. When you close the door, you simply need something to pull it back. That something can be a spring mounted to the back of the slide and the back of the cabinet.

It needs to be sized in length and spring stiffness to not overcome (and break) the string, but to have enough force to overcome the friction of the slide.

• Sometimes the easy solutions are the hardest. Good idea! I don't particularly like having a spring in the back because that would mean constant tension on the door once opened - let go of it and 'snap' it'll just close. But right now this is the best idea. Commented Dec 15, 2016 at 8:32
• You could fix that problem with a hinge that has a detent to hold it in the open position. Commented Dec 15, 2016 at 9:42

A small plastic rack and pinion will work well and eliminate the need for strings. The rack will be on the drawer slider while the pinion at the hinge of the door.

• That was one of the solutions on converting rotary to linear. Problem is that the door isn't located like your blue gear, that would mean I would also need a bevel gear between the blue gear and the door. Then again I would suppose that the door motion isn't "enough" to make the trash can slide out all the way - more gears converting the small motion into bigger motion... I think I would have to over-engineer this ;-) Commented Dec 15, 2016 at 8:34