DEVELOPMENT AND APPLICATION OF A COMPUTER PROGRAM FOR FOUR-BAR LINKAGE AND SLIDER-CRANK MECHANISMS

Complex mathematical problems have been solved with the aid of software application to obtain reliable results. The positional kinematic analysis of a slider crank mechanism involves computation of the motion parameters: linear displacement, velocity and acceleration of the slider; and angular velocity and angular acceleration of the connecting rod for every 30 variation of the crank angle. This study aimed to develop a customized software which can be used to efficiently analyse a given design of a four-bar and a slider-crank mechanisms. A program was written using VB (Visual Basic) programming language for the equations of angular velocities and angular acceleration of the coupler and follower for the four-bar linkage and the linear velocity and acceleration of the piston for the slider crank mechanism. The program was tested with different parameters for the mechanisms and the solutions compared with the results from manual calculations. The findings revealed that there were no differences (p ≤ 0.05) between the results using the program and manual calculations, which imply the accuracy of the program. It can be concluded that the program could be used to solve problems of fourbar linkage and slider-crank mechanisms.


INTRODUCTION
A machine is a combination of rigid bodies, with various components connected moving with definite relative motion, applying force from the source of power in order to overcome higher resistance relatively to the applied force. A mechanism, according to [1][2][3][4] can be defined as a combination structural body, interconnected moving with definite relative motions in conjunction with one another [5,6].
Presence of mechanism in machine enhances successful operations for their successful operations. Mechanisms can be divided into two: planar and spatial mechanisms. In planar mechanisms, the relative motions of the rigid bodies are located in one plane; or if otherwise the mechanism can be referred to as the spatial mechanism [7].
All mechanisms are composed of links and generally have at least one of the links fixed. Absence of fixed link with the presence of combination of links and pairs cannot be referred to as a mechanism but a kinematic chain, [8]. A link is a stable body that has two or more paired elements connected to other bodies which help in transmitting motion or force. The frame of the machine which occupies a fixed position carries a whole machine during motion. The links in a mechanism are connected together in order to transmit motion from an input link, called the driver, to an output link called the follower.
The connection or joints between the links are called Kinematic pairs or simply pairs. Machining errors, link deflections, joint clearances are responsible for the link length inaccuracies and variations which always cause design variations and mechanism performances [9,10].
Kinematic pairs are generally divided into lower pairs and higher pairs. Lower pairs were attributed to the surface contact pairs. In planar mechanisms, there are two subcategories of lower pairsrevolute pairs and prismatic pairs, though; bar linkage is perhaps the most useful. Four bar linkage consist of a three moving links, one fixed link and four pin joints which are referred to as its members [11]. It must also be noted that planar mechanisms have only two kinds of lower pairs: revolute pairs and prismatic pairs [12,13].
The revolute pair keeps the axes of the two rigid bodies together and the two bodies have an independent rotary motion around their common axis. In the case of the prismatic pair, it keeps two axes of two rigid bodies aligned and allows no relative rotation. The two rigid bodies constrained in this manner will only have independent translational motion along the axis [14].
Four bar and slider-mechanism are used for the transmission of rotary motion at a distance that gears cannot function well. Power transmission needs a very good motion relationship of input and corresponding output element. Four bar linkage can have a value of 1 of possible constant transmission ratio, when the mechanism has a parallelogram configuration [15,16], developed 'C' language for position and force analysis of four bar mechanism, compared the obtained result with ANSYS workbench rigid dynamic analysis for same linkage. Both methods led to the same linkage. Both methods led to the same value of angular acceleration angular velocity of the coupler link and output link.
Giovanni [17], discussed the dynamic behavior of a fourbar linkages driven by a velocity controlled DC motor. The result obtained was in form of developed software that implements the mathematical models of all system components. The software helps to check the dynamic behavior of the mechanism. The objective of this paper is to develop a customized program which can be used to efficiently analyze a given design of a four-bar mechanism and a slider-crank mechanism. For the four-bar mechanism, it will compute the motion parameters like the angular velocities and accelerations of the coupler and follower.
It will also determine the transmission angle and the position coordinates of a given point on the coupler which will be used in tracing the coupler curve for every variation of the crank angle. The program will plot the graph of the motion parameters, for example the angular velocities of the coupler and follower links and the transmission angle against the crank angle, given the lengths of the links and angular velocity of the crank. It will also predict the limits of motion or rotation of the different links and show an animated display of the motion of the mechanism.

Design analysis
Program development writing and the application package installation that is compatible with the developed program that can be able to run concurrently with the program were already installed in the system. Visual Basic version 6 was considered suitable for the program. Visual Basic programs were created, run and designed conveniently in a lesser time that normally required to code programs, in form of RAD (Rapid Application Development) language, a process of rapidly creating an application.
A link mechanism was constructed and set to produce a rotating, oscillating or reciprocating motion from the rotation of a crank or vice versa to perform the following: • Continuous rotation into continuous rotation with a constant or variable angular velocity ratio; • Continuous rotation into oscillation or reciprocation, with a constant or variable velocity ratio; • Oscillation into oscillation, or reciprocation into reciprocation, with a constant or variable velocity ratio.
A classification of the different functions of linkages was constructed according to the primary goal of the mechanism as follows: • Generating the relative motion between the links connected to the frame; • Generating the path of a tracer point; • Generating the couple link motion.
The number of degree of freedom of a mechanism (mobility) was evaluated for a planar mechanism, using: of m of a planar n-link mechanism, where j1 and j2 are the number of single-degree of freedom and number of two-degree of freedom joints in the mechanism respectively and n is the number of links.
If m > 0, the mechanism has m degrees of freedom which implies that m = 1, the mechanism requires just a single input motion which is the case in the four bar link mechanism.
However, if the criterion yields m = 0, motion is impossible so the mechanism formed is a structure. A criterion result of m = -1 or less means that there are redundant constraints in the chain and it forms a statically indeterminate structure. The two functions of machine: transmitting definite relative motion and transmitting force were formulated in Figure 1: Flowchart of the model, Figure 2: Flowchart for slider crank mechanism, and Figure 3: Flowchart for four bar mechanism; the values were computed according to the flow charts developed.

4.CONCLUSIONS
The developed software will improve design approach and allow the designer to understudy the dynamic characteristics of the mechanism which may arise from various system parameters involved. The software has reduced the rigor and complexity of manual calculations and gives accurate result, saves cost and time. It also enables the designer to see the motion and type of mechanism and make necessary changes and adjustments without having first to construct the mechanism. It enables the engineer to design four-bar mechanisms to generate specific coupler curves, reduces the task in plotting the mechanism parameters by readily generating all these graphs. Visual Basic provide a powerful feature such as graphical user interface, objectoriented features, error handling and simplifies window application development tremendously and much more. FP -Inertia force required to accelerate the piston, N m1mass of the crank, kg m2mass of the connecting rod, kg rAB -Length of link AB of the four bar mechanism, m rBC -Length of link BC of the four bar mechanism, m rCD Â -Length of link CD of the four bar mechanism, m rAD -Length of link AD of the four bar mechanism, m θ1 -Angle between links AB and AD, rad θ2 -Angle between links BC to the horizontal, rad  -Transmission angle, rad 3  -Angle between link CD and the horizontal, rad ̇1 -Crank Angular velocity, rad/s ̇2 -Coupler Angular velocity, rad/s ̇3 -Follower Angular velocity, rad/s