Improve Brushed DC Motor Performance - Adafruit Learning System

Skip to main content Improve Brushed DC Motor Performance Choosing Decay Mode and PWM Frequency
  • Overview
  • Introduction
  • PWM and Brushed DC Motors
    • Duty Cycle
    • Decay Mode
    • PWM Frequency
  • Choosing Decay Mode and PWM Frequency
  • CircuitPython Code Examples
  • Measuring Motor Performance
    • Motor Performance Charts
    • A Motor Testing Appliance
  • References
  • Single page
  • Feedback? Corrections?
  • Text View
Featured Products view all
  • Angled shot of a Adafruit CRICKIT FeatherWing for any Feather Adafruit CRICKIT FeatherWing for any Feather $29.95 Add to Cart
  • Top down view of a Adafruit CRICKIT for Circuit Playground Express with a circular board connected. Adafruit CRICKIT for Circuit Playground Express Out of Stock
  • Angled Shot of the Assembled DC Motor + Stepper FeatherWing Add-on Assembled DC Motor + Stepper FeatherWing Add-on $21.50 Add to Cart
  • Angled shot of a Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit connected to several different steppers and servos. Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit Out of Stock
  • Angled shot of a blue, square-shaped DC motor driver breakout with green pre-soldered terminal blocks. Adafruit DRV8871 DC Motor Driver Breakout Board - 3.6A Max $7.50 Add to Cart
  • Your browser does not support the video tag. Video of a Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board connected to a half sized white board powering a stepper motor with a adabot head spinning on it. Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board Out of Stock
  • Your browser does not support the video tag. Video of a spinning motor driver connected to a Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board. Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board $6.95 Add to Cart
  •  L293D Dual H-Bridge Motor Driver for DC or Steppers Dual H-Bridge Motor Driver for DC or Steppers - 600mA - L293D $8.95 Add to Cart
28 Intermediate Project guide

Choosing Decay Mode and PWM Frequency

robotics___cnc_DSC06302.jpg

Slow decay mode is usually selected for controlling brushed DC motors because of its ability to dynamically apply braking. It also helps to linearize the relationship between duty cycle and motor speed. Let’s compare the two modes.

robotics___cnc_current_mode_comparison.001.jpeg

If low-speed operation is required, slow decay mode increases available torque and significantly improves the overall speed range of the motor. Choosing slow decay also provides a linear mapping of the software throttle setting to motor speed which is helpful when measuring velocity and distance traveled.

Slow decay mode appears to be superior in most categories, but isn't the best choice if power consumption is your primary concern. For some battery-powered robots, the power saved using fast decay mode outweighs the more precise control offered by slow current decay.

Fast decay mode is the default mode in CircuitPython motor control libraries. Changing the operational mode parameter to slow decay can be accomplished with a simple, one-line statement. See the Code Examples section for the details.

After changing the mode, test the operation to confirm that the lowest required motor speed is working as needed. If a lower spin threshold is required, try reducing the PWM frequency to the lowest possible value (usually about 25Hz) and work up towards the maximum of the motor controller. Choose the frequency that provides the best balance of torque throughout the desired speed range while balancing the motor chatter that can happen at lower frequencies.

As a rule of thumb, most small brushed DC motors will operate nicely with a PWM frequency of 50Hz to 100Hz and slow decay mode. Projects like the StringCar Racer that don't use gearbox motors seem to work best at 25Hz.

robotics___cnc_Controller_Comparison.001.jpeg

In combination with its CircuitPython library, a motor controller board will offer a range of selectable PWM frequencies as well as decay mode. The table above shows the available frequency range and mode support for a variety of Adafruit motor controllers. Refer to the Code Examples section for how to select a specific decay mode and PWM frequency for your motor controller board.

Page last edited March 08, 2024

Text editor powered by tinymce.

PWM Frequency CircuitPython Code Examples Related Guides Bluetooth Controlled Motorized Camera Slider By Ruiz Brothers beginner CRICKIT Snake Bot By Dave Astels intermediate Your browser does not support the video tag. This links to the guide Automatic Mechanical Watch Winder. Automatic Mechanical Watch Winder By John Park beginner Your browser does not support the video tag. This links to the guide Bluefruit Ouija Board. Bluefruit Ouija Board By John Park intermediate Make it Move with Crickit By Anne Barela beginner Your browser does not support the video tag. This links to the guide Crickit Lab Shaker. Crickit Lab Shaker By Ruiz Brothers beginner Your browser does not support the video tag. This links to the guide Automatic Cat Treat Dispenser. Automatic Cat Treat Dispenser By Dano Wall beginner Adafruit Motor Selection Guide By Bill Earl beginner Improve the Low Speed of Brushed DC Motors By Jan Goolsbey intermediate Your browser does not support the video tag. This links to the guide MIDI Solenoid Drummer. MIDI Solenoid Drummer By Collin Cunningham intermediate Your browser does not support the video tag. This links to the guide Thanksgiving Robotic Turkey Hand with Circuit Playground Express and Crickit. Thanksgiving Robotic Turkey Hand with Circuit... By Dano Wall beginner Make It Sound By Anne Barela beginner Your browser does not support the video tag. This links to the guide Animatronic Glowing Medusa Headdress. Animatronic Glowing Medusa Headdress By Erin St Blaine intermediate Your browser does not support the video tag. This links to the guide Mini Smart Home with Huzzah, HASSio and Crickit. Mini Smart Home with Huzzah, HASSio and Crickit By Richard Albritton intermediate Your browser does not support the video tag. This links to the guide CircuitPython Turtle Graphics. CircuitPython Turtle Graphics By Dave Astels beginner
Create Wishlist
× Title Description Close Search Search
Categories

Tag » Arduino Pwm Motor Control Frequency