Project

Simulating Crank and Slotted Arm Quick Return Mechanism using MATLAB

AIM:

To simulate Crank and Slotted Arm Quick Return Mechanism using MATLAB.

OBJECTIVE:

  1. Write a program in MATLAB to simulate Slotted Arm Quick Return Mechanism.
  2. Creating an animation from the plots obtained in the program.
  3. Understand the mechanism used for the quick return.
  4. Learn the engineering significance of quick return mechanism in industry.
  5. Calculate the velocity and acceleration of the tool at any instance.

THEORY:

The crank and slotted quick return mechanism converts rotatory motion into linear motion. It is extensively used in shaping and cutting machines and is particularly useful in cutting flat surfaces out of metal stock. The return stroke of the ram is faster than the advancing stroke. The mechanism consists of an arm attached to a rotating disc that moves at a controlled uniform speed. Unlike the crank, the arm of the mechanism runs at a different rate than the disc. By having the disc run at a different rate than the attached arm, productivity increases because the amount of time needed for a cut is reduced.

The crank and slotted quick return mechanism was invented by Whitworth in the 1800s. It played an active role in increasing productivity by reducing cutting times in shaping machines.

EXPLANATION OF THE MECHANISM:

Crank and slotted lever quick return motion mechanism:

This mechanism is mostly used in shaping machines, slotting machines and in rotary internal combustion engines. In this mechanism, the link AC (i.e. link 3) forming the turning pair is fixed, as shown in figure. The link 3 corresponds to the connecting rod of a reciprocating steam engine. The driving crank CB revolves with uniform angular speed about the fixed centre C. A sliding block attached to the crank pin at B slides along the slotted bar AP and thus causes AP to oscillate about the pivoted point A. A short link PR transmits the motion from AP to the ram which carries the tool and reciprocates along the line of stroke R1R2. The line of stroke of the ram (i.e. R1R2) is perpendicular to AC produced.

In the extreme positions, AP1 and AP2 are tangential to the circle and the cutting tool is at the end of the stroke. The forward or cutting stroke occurs when the crank rotates from the position CB1 to CB2 (or through an angle β) in the clockwise direction. The return stroke occurs when the crank rotates from the position CB2 to CB1 (or through angle α) in the clockwise direction. Since the crank has uniform angular speed, therefore,

`("Time of cutting stroke")/("Time of return stroke" )=β/α=β/(360 °-β) = (360 °-α)/α`

From Figure, we see that the angle β made by the forward or cutting stroke is greater than the angle α described by the return stroke. Since the crank rotates with uniform angular speed, therefore the return stroke is completed within shorter time. Thus, it is called quick return motion mechanism.

Applications (Engineering Significance):

Quick return mechanisms are found throughout the engineering industry in different machines:

  • Shaper
  • Screw Press
  • Power-Driven Saw
  • Mechanical Actuator
  • Revolver Mechanisms

How it is used in Shaper:

As a quick return mechanism, it finds applications in various fields. Its quick return action is used in shaping machines to reduce the total process time while its controlled forward action is used to give clean and defined cuts necessary for shaping.

The quick return mechanism is a time saver. Shapers only cut on the forward stroke and the speed of the cut is limited by the type of metal being cut and cutter choices. On the return stroke, no cutting is done, so returning as slow as the forward stroke is time wasted and slows down the job. A quick return mechanism speeds up the return stroke, making the job go quicker, increasing profits and freeing up the machine sooner for the next job.

CALCULATIONS:

L1 = Length of link 1 (AB)

L2 = Length of the crank (BC)

L3 = Variable Length between centre A and C (piston sliding the slotted lever)

L4 = Length of the Slotted lever (AP)

L5 = Length of the ram (PQ)

L6 = Variable Length between the reciprocating piston and the centre line.

a = Distance between the line of stroke and point A.

PROGRAM:

Programming language used is MATLAB.

Program for simulating the Crank and Slotted Arm Quick Return Mechanism:

% Quick Return Mechanism
clear all
close all
clc

% Taking inputs, Link lengths
L1 = 15;
L2 = 9;
L4 = 40;
L5 = 15;
a = 30;         % Height of Line of stroke from the base point
omega = input('Enter the angular velocity of the crank (in rad/sec):');      % radians per sec
 

% Setting an iterator to increment each time after the loop is executed
ct = 1;
i=1;
for t=0:0.03:2*ceil(2*pi/omega)
    
    % Setting up crank angle as per time (omega = 1 revolution per 3 seconds)
    theta2 = t*omega;
    
    % Calculating Length of link 3
    L3 = sqrt(L1^2 + L2^2 + 2*L1*L2*sin(theta2));
    
    % Calculating theta3
    theta3 = acos((L2*cos(theta2))/L3);
    
    % Calculating theta 5 
    theta5 = asin(-1*(L4*sin(theta3)-a)/L5);
    
    % Calculating Length of link 6
    L6 = (L4*cos(theta3)-L5*cos(theta5));
    
    % Calculating velocity of the tool
    velocity(i) = velocity_calculator(omega, theta2, theta3, theta5, L2, L3, L4, L5, a);
    
    % Calculating Acceleration of the tool
    acceleration(i) = acceleration_calculator(omega, theta2, theta3, theta5, L2, L3, L4, L5, a);
    
    % Plotting cranck
    plot([0, L2*cos(theta2)],[L1, L1+L2*sin(theta2)],'b o-','linewidth',2);
    hold on
    
    % Plotting link 1
    plot([0, 0], [0, L1], 'm', 'linewidth', 2);
    
    % Plotting link 4
    plot([0, L4*cos(theta3)],[0, L4*sin(theta3)],'k o-','linewidth',2);
    
    % Plotting link 5
    plot([L4*cos(theta3), L6],[L4*sin(theta3), a],'r o-','linewidth',2);
    
    % Plotting the tool
    plot([L6-4, L6+4, L6+4, L6-4, L6-4],[a-2, a-2, a+2, a+2, a-2],'k');
    plot([L6-4 L6-6, L6-6, L6-4], [a+1, a+1, a-4, a-2], 'k');
    
    % Slider reference line (Line of stroke)
    plot([-50 40],[30 30],'-');
    
    % Displaying velocity and acceleration on the screen
    text(-20,50,['Velocity = ', num2str(velocity(i))],'fontsize',10);
    text(-23,60,['Acceleration = ', num2str(acceleration(i))],'fontsize',10);
    
    % Defining the length of x and y axis
    axis(gca,'equal');
    axis([-50 40 -15 70]);
    
    title('Crank and Slotted Arm Quick Return Mechanism');
    hold off
    
    % Pausing the current plot for a while before movoing to the next plot
    pause(0.03);
        
    % Capturing the current plot to combine later
    M(ct) = getframe(gcf);
        
    % Incrementing ct so that each frame is captured in M
    ct=ct+1;
    i=i+1;
          
end

% Making a movie from collected frames
movie(M);

% Creating a video file of '.avi' format to save the animation
videofile=VideoWriter('Quick_Return_Mechanism.avi','Uncompressed AVI');
open(videofile);

% Writing the movie in the videofile created
writeVideo(videofile, M);
close(videofile);

% Calculating maximum velocity and accelearion
vmax = num2str(max(velocity));
amax = num2str(max(acceleration));
omega = num2str(omega);

% Displaying the results in the command window
fprintf('\n Maximum Velocity of the tool is: %s, when angular velocity of the crank is: %s. ',vmax, omega);
fprintf('\n Maximum Acceleration of the tool is: %s, when angular velocity of the crank is: %s \n',amax, omega);

Function for calculating velocity of the tool:

% Function for calculating velocity of the tool

function v = velocity_calculator(ang_vel, theta2, theta3, theta5, L2, L3, L4, L5, a)

% Caculating velocity
x = L2*cos(theta2)/L3;
term1 = (x)^2;
dtheta3_dt = (1/sqrt(1 - term1))*sin(theta2)*ang_vel*L2/L3;     % d(theta3)/dt 
term2 = dtheta3_dt;

y = -1*(L4*sin(theta3)-a)/L5;
term3 = (y)^2;
dtheta5_dt = (-1/sqrt(1-term3))*L4*cos(theta3)*term2/L5;        % d(theta5)/dt
term4 = dtheta5_dt;

v = (L5*sin(theta5)*term4-L4*sin(theta3)*term2);        % Velocity of the tool
end

Function for calculating acceleration of the tool:

% Function for calculating acceleration of the tool

function accel = acceleration_calculator(ang_vel, theta2, theta3, theta5, L2, L3, L4, L5, a)

% Calculating Acceleration
c1 = L2*ang_vel/L3;
x = L2*cos(theta2)/L3;
term1 = sqrt(1-x^2);
dx_dt = -L2*sin(theta2)*ang_vel/L3;

dtheta3_dt = (1/sqrt(1 - x^2))*sin(theta2)*ang_vel*L2/L3;     % d(theta3)/dt 

term2 = (sin(theta2)*x*dx_dt/term1^3);
term3 = cos(theta2)*ang_vel/term1;

d2theta3_dt2 = c1*(term2 + term3);                            % d^2(theta3)/dt^2

c2 = -L4/L5;
y = -1*(L4*sin(theta3)-a)/L5;
term4 = sqrt(1-y^2);
dy_dt = (c2*cos(theta3)*dtheta3_dt);

dtheta5_dt = (-1/sqrt(1-y^2))*L4*cos(theta3)*term2/L5;        % d(theta5)/dt

term5 = (cos(theta3)*dtheta3_dt*y*dy_dt/term4); 
term6 = (cos(theta3)*d2theta3_dt2);
term7 = (sin(theta3)*dtheta3_dt^2);

d2theta5_dt2 = c2*(term5+(term6 - term7)/term4);              % d^2(theta5)/dt^2

term8 = (L4*cos(theta3)*dtheta3_dt^2);
term9 = (L4*sin(theta3)*d2theta3_dt2);
term10 = (L5*cos(theta5)*dtheta5_dt^2);
term11 = (L5*sin(theta5)*d2theta5_dt2);

accel = (-term8 - term9 + term10 + term11);         % acceleration of the tool
end

EXPLANATION OF THE PROGRAM:

  1. The program starts with taking inputs. Inputs given are:

L1 = Length of link 1 (AB) = 15

L2 = Length of the crank (BC) = 9

L4 = Length of the Slotted lever (AP) = 40

L5 = Length of the ram (PQ) = 15

a = Verical distance between the line of stroke and point A = 30

  1. Then we take the angular velocity of the crank as input which stored in the variable called “omega”.
  2. We then start a for loop using a variable t which represents time.
  3. Then within the for loop, we define “theta2” which represents crank angle and its rate of change with respect to time gives angular velocity of crank.
  4. Now with the help of theta2 and the formulas we calculate the remaining parameters and positions of the different points.
  5. Using the functions acceleration_calculator and velocity_calculator we calculate the acceleration and velocity of the tool at the instance.
  6. After calculating, we use plot() function to plot the frame and the tool at a particular instance.
  7. Then we display the velocity and acceleration at the instance on the screen.
  8. After this position of the frame is plotted at particular time in the time span it is captured frame by frame to make an animation.
  9. A video file of '.avi' format is made to save the animation.
  10. The movie is then written into the videofile and the final animation is thus created.
  11. We then calculate the maximum velocity and acceleration of the tool during its movement and display it in the command window.

RESULT:

1.The simulation of the Crank and Slotted Arm Quick Return Mechanism is obtained in form of an animation, which can viewed by visiting the link mentioned below:

Simulation of Crank and Slotted Arm Quick Return Mechanism using MATLAB

2.Command window:

CONCLUSION:

  • A simulation of the Crank and Slotted Arm Quick Return Mechanism was created using MATLAB program.
  • Instantaneous and maximum, velocity and acceleration of the tool is calculated, which can be further used for force analysis and designing the mechanism.
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.