• DC Motor Polarity Control Exercise | ACE-Lab

    DC Motor Polarity Control

    This exercise shows how an Arduino Uno can control a DC motor through a Maker Drive motor driver. The Arduino provides the control signals, while the motor driver supplies the higher current required by the motor. By changing the H-bridge input signals, the polarity across the motor is reversed, allowing clockwise and counterclockwise rotation. PWM values are also used to investigate motor speed control.

    Introduction video for the DC Motor Polarity Control exercise, supporting the practical work with the Arduino Uno, Maker Drive motor driver, and Simulink model.

    1. Learning Outcomes

    After completing this exercise, learners should refer back to these outcomes and check that they can explain the hardware, wiring, H-bridge polarity control, and Simulink-based motor control workflow.

    Identify the main hardware components

    Recognise the Arduino Uno, Maker Drive motor driver, DC motor, 9V battery, breadboard, breadboard wires, and USB cable used to control the motor.

    Connect the motor circuit safely

    Build the circuit using an external power supply for the motor and a common ground between the Arduino, motor driver, and battery.

    Explain H-bridge polarity control

    Describe how changing the H-bridge input signals reverses the polarity across the DC motor and changes the direction of rotation.

    Control direction and speed in Simulink

    Use digital signals and PWM values in Simulink to manually control the direction and speed of a DC motor.

    2. Hardware Set-Up

    This hardware set-up uses an Arduino Uno to control a DC motor through a Maker Drive motor driver. The Arduino sends control signals to the motor driver, while the driver supplies the higher current needed by the motor. A separate 9V battery powers the motor side of the circuit. The Arduino, motor driver, and battery must share a common ground so that the control signals work correctly.

    Required hardware:

    • Arduino Uno
    • Maker Drive motor driver board
    • DC motor
    • 9V battery and clip
    • Breadboard
    • Breadboard wires, various
    • USB cable

    Important safety note

    The motor should be connected to the Maker Drive motor output terminals, not directly to the Arduino. The motor driver provides the current required by the motor, while the Arduino provides low-power control signals only.

    Hardware set-up for DC Motor Polarity Control showing the Arduino Uno, Maker Drive motor driver, DC motor, 9V battery, breadboard wiring, and common ground connection.
    Figure 1: Hardware set-up for DC Motor Polarity Control, showing the Arduino Uno, Maker Drive motor driver, DC motor, 9V battery, breadboard wiring, and common ground connection.
    1

    Connect the DC motor wires to one motor output channel on the Maker Drive, such as M1A and M1B.

    2

    Connect the 9V battery positive wire to the Maker Drive motor power input, usually labelled VIN, VM, or +.

    3

    Connect the 9V battery negative wire to the Maker Drive GND terminal.

    4

    Connect the Maker Drive GND to one of the Arduino GND pins. This creates the common ground required for reliable control signals.

    5

    Connect the Arduino control pins to the Maker Drive input pins. For example, connect Arduino digital/PWM pins to the motor input pins for speed and direction control.

    6

    Check all wiring carefully before powering the circuit. Make sure the motor is connected to the motor driver and not directly to the Arduino.

    7

    Connect the Arduino to the computer using the USB cable.

    4. Advanced Additional Exercises

    These extension tasks are intended for learners who have completed the basic direction and speed tests. They require changes to the Simulink logic and encourage safer, more structured motor control.

    1
    Build an enable and direction controller

    Replace the two manual H-bridge switches with an Enable input and a Direction input. Design the logic so that Enable = 0 always stops the motor, while Enable = 1 allows Direction to choose clockwise or counterclockwise rotation. Test all four input combinations and record the resulting IN1 and IN2 values.

    2
    Add protection against rapid reversal

    Extend the Simulink logic so that when the requested direction changes, the motor is first commanded to stop for a short delay before reversing. Explain why this protection is useful for the motor driver, power supply, and mechanical load.

    5. Concluding Remarks

    This exercise demonstrated how an Arduino Uno and Maker Drive motor driver can be used to control the direction and speed of a DC motor. By changing the H-bridge input signals, the polarity across the motor can be reversed to produce clockwise or counterclockwise rotation.

    The use of PWM also allows the motor speed to be adjusted. This provides a practical introduction to motor driver circuits, polarity control, and real-time control implementation using Simulink.