Challenge

FINAL INDEPENDENT PROJECT

Aim : To calculate the dynamic properties and to creat animation of the slinding crank mechanism

Explanation:

A slider-crank linkage is a four-link mechanism with three revolute joints and one prismatic, or sliding, joint. The rotation of the crank drives the linear movement the slider, or the expansion of gases against a sliding piston in a cylinder can drive the rotation of the crank.

There are two types of slider-cranks: in-line and offset.

  1. In-line: An in-line slider-crank has its slider positioned so the line of travel of the hinged joint of the slider passes through the base joint of the crank. This creates a symmetric slider movement back and forth as the crank rotates.
  2. Offset: If the line of travel of the hinged joint of the slider does not pass through the base pivot of the crank, the slider movement is not symmetric. It moves faster in one direction than the other. This is called a quick-return mechanism.

velocity of piston
Where r = crank radius, ω = crank speed, n = Obliquity ratio
Velocity of slider will be maximum at θ = 90°, (∵ sin function is maximum at 90° i.e. sin 90° = 1)
∴ Vmax = rω(1 + 0) = rω
When θ = 90°, i.e. crank is perpendicular to the line of stroke, the velocity of the slider is maximum.
Acceleration of piston
Angular velocity of connecting rod : (w*cosd(theta)/n)
Acceleration of connecting rod : (w^2*(sind(theta)/n))
Main code :
%Dynamic analysis
clear all
close all
clc

%Input datas from user
r = input('Enter the crank radius(in M) : ');
l = input('Enter the length of the connecting rod(in M) : ');
N = input('Enter the crank rpm: ');
theta = input('Enter the angle of crank : ');

%Calculation for Velocity of Pison (m/s)
w = ((2*3.14*N)/60);                                           %Crank angler velocity(omega)
n = l/r;                                                                   %obliquity ratio
Vp = r*w*(sind(theta)+(sind(2*theta)/(2*n)));

%Calculation for acceleration of piston (m/s^2)
Ap= r*w^2*(cosd(theta)+((cosd(2*theta))/n));

%Calculation for Angular velocity of connecting rod
 Wp = (w*cosd(theta)/n);
 
 %Calculation for acceleration of connecting rod
 Ac = (w^2*(sind(theta)/n));
 
 fprintf('               RESULTS \n');
 fprintf('Velocity of Pison is : %8.3f m/s \n',Vp);
 fprintf('Acceleration of piston is : %8.3f m/s^2 \n',Ap);
 fprintf('Angular velocity of connecting rod is : %8.3f rad/sec \n',Wp);
 fprintf('Acceleration of connecting rod is : %8.3f red/sec^2 \n',Ac);
 
 %Animation for the Slider crank mechanism
 %parameters of the plot
 p1 = [0,0];
 axis([-0.2 0.7 -0.2 0.3]);
 count=1;
 
 for t = 1:500
     theta1 = Wp*(t/100);
     p2 = r*[cos(theta1) sin(theta1)];
     crank = line([p1(1) p2(1)],[p1(2) p2(2)]);
     text(p1(1)+0.02,p1(2),'crank');
     track = viscircles([0,0],r,'Linestyle','--');
     alfa = asin(r*sin(theta1)/l);
     p3 = [(r*cos(theta1)+l*cos(alfa)) 0];
     slider = line([p2(1) p3(1)],[p2(2) p3(2)]);
     text(p1(1)+0.15,p1(2),'connecting rod');
     tt =text(p3(1)+0.01,p3(2),'pistion');
     p2o = viscircles(p2,0.005)
     p1o = viscircles(p1,0.005)
     p3o = viscircles(p3,0.005)
     pause(0.003);
     
     M(count) = getframe(gcf);
     delete(crank);
     delete(slider);
     delete(p1o);
     delete(p2o);
     delete(p3o);
     delete(tt);
     count = count+1;
     
 end
 movie(M)
videofile = VideoWriter('Slider crank mechanism')
open(videofile)
writeVideo(videofile,M)
close(videofile)
Explanation:
  • First the input variables were defined by the user which is radius of crank, length of connecting rod, RPM and the angle values.
  • Then the Crank angler velocity(omega) and obliquity ratio were calculated by respective formulas.
  • After that the Velocity of Piston, Acceleration of piston, Angular velocity of connecting rod and acceleration of connecting rod were calculated by using the above formulas.
  • Then the results were printed by using fprintf command
  • By using the calculated and given values the animation was created
  • Then by using getframe command the each frame was write into the video file.
  • The movie was saved in a folder by using writevideo command.

Results:

Link for the animation is given below:
https://drive.google.com/file/d/1KxZaIRra-IYT6OP4zYLDK-8IAQXZJtBh/view?usp=sharing
Animation Video:
References:
  1. https://ocw.metu.edu.tr/pluginfile.php/6885/mod_resource/content/1/ch7/7-2.htm#:~:text=If%20the%20eccentricity%2C%20c%20(or,(s%20%3D%202a2).&text=Since%20the%20crank%20length%20is,length%20for%20better%20transmission%20angles.
  2. https://en.wikipedia.org/wiki/Slider-crank_linkage#:~:text=A%20slider%2Dcrank%20linkage%20is,the%20rotation%20of%20the%20crank.&text=This%20is%20called%20a%20quick%2Dreturn%20mechanism.
  3. https://www.britannica.com/technology/slider-crank-mechanism
  4. https://web.wpi.edu/Pubs/E-project/Available/E-project-042513-103948/unrestricted/Slider-Crank_MQP_Final_Draft.pdf
  5. https://www.hindawi.com/journals/mpe/2018/8540546/
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.