Crank-Rocker Mechanism

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
verilog
Citizen
Posts: 97
Joined: Thu Nov 03, 2011 3:15 am
Contact:

Crank-Rocker Mechanism

Post by verilog »

Hi guys,

This is a simple crank-rocker mechanism (AKA four-bar linkage) simulation I did for a little project I'm working on. The mechanism has four links: a driver or crank link that, as you guessed, drives the entire thing; a coupler that transmits motion between intermediate links. The last link is the output link and is usually called follower. The distance between the driver and the follower is also considered a link, and is called frame.

The simulation uses direct kinematics to estimate the planar motion (rotations and translations) of each link, the only input variables are the driver’s angular position and link length, all links must have a defined length. These can be changed at run time, however, under certain configurations the mechanism can fail. This is called the Grashof condition and states the maximum total link length allowed for possible physical motion.

The demo renders the driver in blue, coupler in red, follower in green, and frame in gray. Should you decide to download it, you can use the following controls:

Angular Velocity: ‘w’/’s’ keys to increase/decrease the driver’s angular velocity.
Link Length: You’ll see two circles that plot the driver’s and follower’s current radii, click inside (or outside) each circle to increase/decrease each links’ length.

If you want to know a little bit more, here's a brief overview of the kinematic analysis of this mechanism. I'm using a vector component position-based analysis.

Image
Attachments
crank-rocker.love
(2.25 KiB) Downloaded 189 times
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: Crank-Rocker Mechanism

Post by Ranguna259 »

This is actually really cool, I remeber doing something like this in the ninth grand where I had to make a circular rotation using horizontal back and forth motion and it really looks like this. Nice work on the simulation :megagrin:
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
verilog
Citizen
Posts: 97
Joined: Thu Nov 03, 2011 3:15 am
Contact:

Re: Crank-Rocker Mechanism

Post by verilog »

Thanks Ranguna, glad you liked it. I used to analyse a lot of these kinds of machines back in college. The math is quite extensive, I remember my mechanisms professor coming up with all sorts of obscure trigonometry identities and algebraic substitutions during his intense demonstrations. He'd practically get a hard-on every time he used such tricks. I have notebooks filled with this crap, it is nice to finally see those calculations in motion.
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Crank-Rocker Mechanism

Post by jjmafiae »

It's like the think on a steam locomotive :D
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Crank-Rocker Mechanism

Post by Ref »

Really, the only thing you need is a function for locating the overlap point of two circles.
Fun thing to play around with.
Attachments
WhenCirclesOverlap.love
Contains functions for circle overlap and line-circle overlap
(1.55 KiB) Downloaded 110 times
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests