Skip to main content

Check Your Understanding 11.1.4 Check Your Understanding

1.

A DC motor is spinning clockwise. What change to the electrical circuit would make it spin counter-clockwise?
  • Reverse the polarity of the voltage across the motor terminals so current flows through the armature in the opposite direction.
  • Correct. Reversing current direction reverses the magnetic force on the armature, reversing the torque and therefore the direction of rotation. This is what the H-bridge does when you swap which switch pair is closed.
  • Increase the supply voltage so the motor overspeeds and the commutator reverses automatically.
  • Increasing voltage increases speed but does not reverse direction. There is no automatic commutator reversal from overspeed.
  • Reduce the duty cycle to 0% so the motor decelerates and then spins backwards.
  • A 0% duty cycle removes power and the motor coasts to a stop, but does not cause it to spin backwards. Reversing direction requires reversing current, not just reducing it.
  • Connect both motor terminals to the same voltage rail.
  • Connecting both terminals to the same rail (brake mode) stops the motor by short-circuiting the back-EMF. It does not reverse the direction.

2.

A PWM signal switches between 0 V and 5 V at 10 kHz. The duty cycle is set to 30%. What average voltage does the motor see?
  • 1.5 V, 30% of 5 V.
  • Correct. Average voltage = duty cycle × supply voltage = 0.30 × 5 V = 1.5 V. The motor’s mechanical inertia averages the rapid switching and the shaft speed corresponds to this average voltage.
  • 5 V, because the motor always sees the full supply voltage when PWM is used.
  • PWM delivers the full supply voltage only during the HIGH phase, which is 30% of each cycle. The effective average is 1.5 V.
  • 3.5 V, because the motor sees the supply minus the duty cycle percentage.
  • Average voltage = duty cycle × supply, not supply minus duty cycle. 30% duty at 5 V gives 1.5 V, not 3.5 V.
  • 0 V, because at 30% duty cycle the motor receives less than 50% and cannot spin.
  • There is no 50% threshold. The motor receives an average of 1.5 V at 30% duty cycle and will spin at a reduced speed proportional to that average voltage.

3.

You set the PWM duty cycle once in your program to choose a motor speed. Does the CPU have to keep doing anything to hold that speed, or does the timer maintain the PWM signal on its own?
  • No: the timer hardware generates the PWM signal on its own. The CPU sets the duty cycle once, and the timer applies it and holds it until told otherwise.
  • Correct. This is the same autonomy that makes timers useful for delays and interrupts. The PWM waveform is generated entirely in hardware; the CPU is free to do other work.
  • Yes: the CPU must toggle a GPIO pin at the correct frequency to maintain the PWM signal.
  • Bit-banging PWM in software (manually toggling a GPIO pin) is possible but wastes CPU time. Hardware PWM via the timer generates the signal without any CPU involvement after setup.
  • Yes: the CPU must re-send the duty cycle to the timer on every period to keep it stable.
  • The timer holds the duty cycle continuously until it is changed. Setting it once fixes the speed indefinitely.
  • No, but only if the PWM frequency is below 1 kHz; at higher frequencies the CPU must assist the timer.
  • Hardware PWM operates at any frequency within the timer’s capability without CPU assistance. Frequency does not change this.