You are on page 1of 6

MECHATRONIC CONTROL SYSTEM

Part 2: System Integration and Calibration

Student Handout
1.0 Introduction

In general, mechatronic control system consists of three elements; controller, actuator


and sensor as shown in Figure 2.1. Key technology in mechatronics is system
integration of these three elements. The system must be integrated in the forward loop
as well as in the feedback loop.

▪ In the forward loop, the actuator must be integrated with the controller.
▪ In the feedback loop, the sensor must be integrated with the controller.
▪ In the closed loop, actuator and sensor, must be fully integrated with the
controller.
Establish the correct working principle and calibration of the hardware components of
the system is essential before embarking further on software development of the
computer control algorithm.

Figure 2.1: Block diagram of closed-loop mechatronic control system

2.0 Objectives

1/3
In this laboratory session, students will become familiar with the integration of
mechatronic control system. At the end of the session, student should know the
following;
▪ How to interface the encoder with the controller
▪ How to interface the DC Motor with the controller
▪ How to calibrate the encoder and DC motor
▪ How to establish the correct working principle of the system interfacing.

3.0 Prerequisites

To successfully carry out this laboratory, the prerequisites are;

▪ To be familiar with Arduino microcontroller working principle

▪ To be familiar with encoder working principle

▪ To be familiar with DC motor working principle

▪ To be familiar with PWM amplifier working principle

4.0 Pre-Lab Assignment

Student is required to do the following pre-lab assignments;

▪ How many inputs and outputs of the Arduino microcontroller. What are their
respective addresses?

▪ With aid of diagram explain the working principle encoder. What type of
encoder is used in this experiment?

▪ With aid of diagram explain the working principle of DC motor. Plot the graph,
voltage vs no load speed of the DC Motor.

▪ Explain the concept of digital to analog converter (DAC), its implementation in


this experiment

▪ With aid of diagram explain the working principle of PWM amplifier. Plot the
graph digital value to voltage of the PWM (i.e duty cycle vs voltage of the
PWM).

5.0 Experimental Setup

5.1 Main components

To setup this experiment, the following hardware and software are required;

● Power Module [1]

● Arduino Microcontroller and software [2]

2/3
● DC motor [3]

● Encoder [4]

● PWM Amplifier [4]

Identify all the main components in the test rig of the system

5.2 Wiring, System interfacing and integration

To wire up the system, please follow the default wiring procedure as shown in Figure 2.2.
Verify the connection and when you are confident with your connection, you can power up
the control system.

Figure 2.2: Wiring, System interfacing and integration

6.0 Experimental Calibration of the system

In order to ensure the control system algorithm is functioning properly, you need first to do
the following;

● To establish the working principle of the hardware components

● To calibrate the hardware components

6.1 Method of Approach: Calibration of encoder


3/3
▪ Download the computer algorithm for calibration of the encoder. The algorithm
is provided in Appendices A.1.

▪ Using the Arduino menu command, show the serial data and plot data.
Manually, rotate the motor shaft clockwise and counterclockwise, and read the
data from the command window.

▪ Determine the number of counts/pulses for 360 degrees of rotation in


clockwise direction. Determine the number of counts/pulses for -360 degrees
of rotation for the counter clockwise direction.

▪ Calibrate the accuracy or resolution of the encoder.

▪ Determine the sample times between two successive data.

▪ Determine the position and the speed of the motor shaft. Plot graph angular
position vs time and speed vs time

6.2 Method of approach: Calibration of DC motor and PWM amplifier

▪ Download the computer algorithm for calibration of the DC motor. The


algorithm is provided in Appendices A.2.

▪ Using the computer algorithm, rotate the motor clockwise and counter
clockwise direction. How to change the direction of rotation?

▪ Using the computer algorithm, change the rotational speed of the motor
clockwise and counter clockwise direction. How to change the speed of
rotation?

▪ Calibrate the relationship between the digital values of computer algorithm and
PWM voltage output.

6.3 Method of Approach: Calibration of DC motor and Encoder

▪ Download the computer algorithm for calibration of DC motor and encoder.


The algorithm is provided in Appendices A.3.

4/3
▪ Using the computer algorithm, rotate the motor shaft clockwise and
counterclockwise, and read the data from the command window.

▪ Plot graph angular position vs time and speed vs time

▪ Determine the position and the speed of the DC motor.

▪ Calibrate the relationship between the speed of DC motor and the PWM
voltage outputs.

▪ Determine the frequency of the rotating shaft of DC motor oscillation. Increase


the frequency of oscillation

▪ Determine the amplitude of the rotating shaft of DC motor oscillation.


Decrease the amplitude of oscillation

▪ Evaluate the sampling time of the system

6.4 Method of Approach: Calibration of input voltage and no-load speed of the DC Motor.

▪ Design and develop a computer algorithm to determine input voltage vs no-load


speed of the DC motor.

▪ Experimentally, plot graph input voltage vs no-load speed of the DC motor.

▪ Compare the results of the theory graph with experimentally graph. Give
justification for any discrepancy. Discuss the significant of the gradient of the
graph.

7.0 Post Lab questions

▪ Why the sampling time is not consistent.

▪ How to minimize the sampling time

▪ In the next laboratory, you will design, develop and implement a computer
algorithm for a motion control system. What are the effects of sampling time to the
control system

8.0 Lab report

5/3
The report is a group report which has the following headings;

i. Introduction

ii. Objectives

iii. Methodology

iv. Results, Analysis and Discussion

v. Conclusions

The report shall also include but not limited to the following items; flow chart of the computer
algorithm, and source code of computer algorithm.

Report Submission

Submission date:

Total marks:

LATE Submission: 5 marks per day will be deducted for late submission

Appendices

i. Appendices A.1 : Computer algorithm

ii. Appendices A.2 : Computer algorithm

iii. Appendices A.3: Computer algorithm

iv. Appendices A.4: Computer algorithm

References

i. Encoder manual

ii. DC motor Manual

iii. PWM manual

iv. Arduino manual

v. Ricrh Dorf

vi. Nise

6/3

You might also like