2021-22 Sem 1 Project 3: Motor control

Expected project duration: 1 week (i.e. 2 lab sessions)

At the end of this project, you should be able to:

  • Solder wires onto the terminals of a motor.
  • Perform unidirectional speed control of a DC motor using an Arduino and a MOSFET transistor.
  • Perform bi-directional speed control of a DC motor using an Arduino and an SN754410 driver IC.
  • Use an oscilloscope to visualise oscillating electrical voltage signals.

There are three items to be submitted to Brightspace for assessment:

  1. A Word document containing the following evidence (additional details below):
    • Photo of the wires soldered onto your motor.
    • Photo of your breadboard circuit for Task 1.
    • Working code for Task 1.
    • Photo of your breadboard circuit for Task 2.
    • Working code for Task 2.
  2. A link to a YouTube video showing that Task 1 is complete (details below).
  3. A link to a YouTube video showing that Task 2 is complete (details below).

Project Description

In this project, we explore two ways of controlling a motor with a program running on a microcontroller. In the first task, we use a MOSFET transistor to interface the motor to the Arduino Nano in a way that facilitates unidirectional speed control. In the second task, we use a driver IC to perform bi-directional control of the motor. You will also learn to do some simple soldering and to visualise oscillating electrical signals on an oscilloscope.

Task 1: Unidirectional control of a DC motor

The video below provides some background information for this task.

Perform the following steps:

  1. Solder 20 cm long wires onto the terminals of your motor. You can choose whatever wire colour you like, apart from red or black.
  2. Find the datasheet for the IRFZ44N transistor online, so that you can identify which pin is which.
  3. Build the circuit shown in the diagram above on a breadboard. The circuit should be neat and the wires should be appropriately colour-coded. Please pay special attention to correct use of red and black wires.
  4. Program the Arduino to perform the following sequence of LED and motor actions:
    1. LED off and motor driving at 25% duty cycle for 2 seconds.
    2. LED off and motor driving at 50% duty cycle for 2 seconds.
    3. LED off and motor driving at 100% duty cycle for 2 seconds.
    4. LED on and motor stopped for 4 seconds.
  5. Use the oscilloscope to visualise the pulsed signal being emitted from Arduino pin D3. Your lecturer will demonstrate how to do this in the lab.
  6. Record a video showing your circuit performing the above sequence, followed by the oscilloscope displaying the pulsed signal from pin D3 for each state of the system.
  7. Upload the video to YouTube and submit the link to the Brightspace assignment.
  8. Open a new Word document. Insert a heading with your name, student number, the date, the name of this module and the title of this project.
  9. Take a clear photograph of the wires soldered to your motor and add it to the Word document.
  10. Take a clear photograph of your breadboard circuit and add it to your Word document.
  11. Add your working Arduino code for Task 1 to the Word document. Ensure it is neatly formatted and includes clear and accurate comments.

Task 2: Bi-directional control of a DC motor

The videos below provide background information for this task.

Perform the following steps:

  1. Find the datasheet for the SN754410 IC online and use it to identify the correct pin for each connection to the chip. Try googling “SN754410 datasheet” and look for a PDF result.
  2. Build the circuit shown in the diagram above on a breadboard. Note that the final connection between Arduino pin D6 and pin 9 on the SN754410 chip is not shown in the diagram above, but must be included in your circuit to facilitate speed control (as explained in the video). The circuit should be neat and wires should be appropriately colour-coded (please pay special attention to correct use of red and black wires).
  3. Program the Arduino to perform the following sequence of LED and motor actions:
    • LED off and motor driving forward at 50% duty cycle for 3 seconds.
    • LED on and motor driving forward at 100% duty cycle for 2 seconds.
    • LED off and motor stopped for 3 seconds.
    • LED off and motor driving in reverse at 50% duty cycle for 3 seconds.
    • LED on and motor driving in reverse at 100% duty cycle for 2 seconds.
    • LED off and motor stopped for 3 seconds.
  4. Use the oscilloscope to visualise the pulsed signal being emitted from Arduino pin D6.
  5. Record a video showing your circuit performing the above sequence, followed by the oscilloscope displaying the pulsed signal from pin D6 for each state of the system.
  6. Upload the video to YouTube and submit the link to the Brightspace assignment.
  7. Take a clear photograph of your breadboard circuit and add it to your Word document.
  8. Add your working Arduino code for Task 2 to the Word document. Ensure it is neatly formatted and includes clear and accurate comments.
  9. Submit your Word document to the Brightspace assignment.

Leave a comment