SLIDER CRANK MECHANISM
SLIDER CRANK MECHANISM :
Slider-crank mechanism, arrangement of mechanical parts designed to convert straight-line motion to rotary motion, as in a reciprocating piston engine, or to convert rotary motion to straight-line motion, as in a reciprocating piston pump.
A slider-crank linkage is a four-link mechanism with three revolute joints and one prismatic, or sliding, joint.[1] The rotation of the crankdrives the linear movement the slider, or the expansion of gases against a sliding piston in a cylinder can drive the rotation of the crank.
DESIGN :
An in-line crank slider is oriented in a way in which the pivot point of the crank is coincident with the axis of the linear movement. The follower arm, which is the link that connects the crank arm to the slider, connects to a pin in the center of sliding object. This pin is considered to be on the linear movement axis. Therefore, to be considered an in-line crank slider, the pivot point of the crank arm must be in-line with this pin pointith an in-line crank slider, the motion of the crank and follower links is symmetric about the sliding axis. This means that the crank angle required to execute a forward stroke is equivalent to the angle required to perform a reverse stroke. For this reason, the in-line slider-crank mechanism produces balanced motion. This balanced motion implies other ideas as well. Assuming the crank arm is driven at a constant velocity, the time it takes to perform a forward stroke is equal to the time it takes to perform a reverse stroke.
clear all
close all
clc
% the length of the crank and the slider
a = 2;
b = 5;
p1 = [0 0];
% parameters of the plot
axis(gca,'equal'); %aspect ratio
axis([-3 10 -3 3]); % limits
% angular speed of tbe crank
k = 1;
ct = 1;
for t = 1:500
theta = k*(t/10);
% plot p2
p2 = a*[cos(theta) sin(theta)];
alpha = asin(a*sin(theta)/b);
p3 = [(a*cos(theta)+b*cos(alpha)) 0]
% the crank line
crank = line([p1(1) p2(1)],[p1(2) p2(2)]);
slider = line([p2(1) p3(1)],[p2(2) p3(2)]);
p2_traj = viscircles([0 0],a,'linestyle','--');
p1_circ = viscircles(p1,0.1);
p2_circ = viscircles(p2,0.1);
p3_circ = viscircles(p3,0.1);
pause(0.01);
M(ct)=getframe(gcf);
ct=ct+1;
delete(crank);
delete(slider);
delete(p1_circ);
delete(p2_circ);
delete(p3_circ);
end
movie(M);
videofile = VideoWriter('slider_crank_mechanism.avi','uncompressed AVI');
open(videofile);
writeVideo(videofile,M)
close(videofile)