MSD Exp2
MSD Exp2
MSD Exp2
Objectives
This experiment is to be performed in order to:
1- Learn how to build an H-bridge from discrete components.
2- Familiarize the students with the function of H-bridge module.
3- Control both the direction and speed of DC motors.
4- Illustrate the principle of pulse width modulation (PWM).
Theory
To control a DC motor in direction and speed it is required to use special drive circuits such as
H-bridge, which is an electronic circuit that enables a voltage to be applied across a load in either
direction. Figure 1 shows a simplified structure for H-Bridge connections.
2
Mechatronics Systems Design Lab
6. 5V output if 12V jumper in place, ideal for powering your Arduino (etc.).
7. DC motor 1 enable jumper. Connect to PWM output for DC motor speed control.
8. IN1
9. IN2
10. IN3
11. IN4
12. DC motor 2 enable jumper. Connect to PWM output for DC motor speed control.
13. DC motor 2 "+", (connection B+).
14. DC motor 2 "-", (connection B-).
Pulse-width modulation (PWM) technique that controls the width (in time) of an electrical pulse,
formally the pulse's duration, based on modulator signal information. It is used when a digital
system needs to control a system that expects an analog signal of varying amplitude. A typical
example is a 24V motor, the speed of the rotor can be controlled by changing the voltage from
low (0V) to high (24V). The idea from PWM is to pass the rotor always 24V but in discrete
pulses as shown in figure 4.
3
Mechatronics Systems Design Lab
Equipment
1. DC Power Supplies.
2. L298N driver.
3. Wires.
4. Arduino.
5. DC motor.
6. TIP120 and TIP 125 transistors.
7. Diodes.
Procedures
Part 1: DC motor direction control
a- Using 4 transistors:
1) Build an H-bridge using 4 transistors.
2) the base resistance (R1, R2, R3, and R4) EQUAL TO 1 KΩ.
3) Connect the DC motor as shown in figure 5.
4
Mechatronics Systems Design Lab
7) Switch off the 5 V power supply and reverse the connection in step 6 and notice the
direction of the motor.
Part 2: DC motor speed control using H-bridge module
1) Connect the circuit as illustrated in part 1-b.
2) Build PWM signal using Function Generator, then connect the function generator output
to the motor enable pin on the H-bridge module.
3) Set different duty cycle for the square wave on the output of the function generator and
notice the speed of the motor.