Obviously you can not make a perfect square wave with any mechanism simply because they would need a infinite speed, acceleration, jerk (snap, crackle and pop). So no discontinuous functions and some finite raise time.
So from a design perspective there are many possible places to look at solutions. But the locations where I would concentrate my efforts are
- Cams
- Linkages
- Bistable mechnisms
First cams. Like said the canonical cam to start out with is the modified scotch yoke with a dwell because its simple to understand and easy to reason with. (not because its the best possible cam to do this, but gives you some insight into cam design in this case). The cam you got in @NMechns answer is okay but read a bit further when i talk a bit on the details of cam design. So the 2 dwell scotch yoke looks as follows:
Image 1: A modified scotch yoke. OUter black line is follower inner surface. the dashed circle the path the cam takes.
I have added an dwell in both the horizontal and vertical of the yoke. Just to show they are possible, other dwells could be built. each dwell consists of a offset base circle. The two dwell is not the one you are looking for but im just showing it for completeness, image 2 shows its movement function and its relationship to a non modified scotch yoke.
image 2: Graph if the x movement.
In reality you don't need the scotch vertical dwell you only need the horisontal one See image 3. In fact you never see the vertical dwell in practice because its problematic.
Image 3: Scotch yoke without the vertical dwell.
This should give the intuition needed to design the internal cam you need. If you need a faster raise time you can just slant the move lines a bit inward.
The role and shape of the blends
Remember when I said that you can not have discontinuities in your graph. Well if you do have discontinuities then your system is going to bounce. In general bad things happen if you bounce, either the cam follower loses contact or it causes a huge load in the rest of your system. The secondary result is that this causes the surfaces to erode reducing mechanism lifespan dramatically.
So for any high speed cam all of your shapes have to match:
- Position
- Velocity (first derivative of position)
- Acceleration (second derivative of position)
- Jerk (third derivative of position)
Now these functions are a bit tricky to work with. But literature has good candidates.
Other things to watch out are:
the friction between cam and follower if you rely on sliding. Choosing the material pairs is important. Here the Scotch yoke is a good candidate since the central pin can be changed to a bearing so it can have genuine rolling instead of sliding.
the load can cause the cam to bounce. Which is why many cam systems have a spring. The scotch yoke (especially one devoid of the vertical dwell) does not have a problem with forces that move against the cam, but can have problems with something pulling the cam along at the same direction the cam is moving. If you have this problem put a inner race inside the yoke too this way it cant move too much(This also applies to NMechs cam too which i would modify to be a grove cam), or use a spring load.
Could a four bar do the job?
Not alone. I tried to find a suitable four bar in my catalog of known paths. No suitable on hit my eye. Its still possible i don´t have easy access to a four bar curve fitter so who knows. But a six bar can do it.
However, you can take a bi-stable mechanism and drive with a crank rocker. Then you could do this. The plus side is that this could be really fast. I dont have time to sketch this out but imagine a rocker next to a electrical latching switch and the rocker has two pins that move it form state to another one when moving back and one when moving there.
Anyway i dont have much more time for this.