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 $29.95 Add to Cart
  • 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 $19.95 Add to Cart
  • 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 $5.95 Add to Cart
  • 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 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 Stroboscopic Zoetrope. Stroboscopic Zoetrope By John Park beginner Automation with Crickit and Capsela By Anne Barela beginner Your browser does not support the video tag. This links to the guide Make It Hot or Cold. Make It Hot or Cold By Anne Barela beginner Your browser does not support the video tag. This links to the guide Robotic Creatures . Robotic Creatures By Ruiz Brothers beginner AdaBox 008 By John Park beginner Your browser does not support the video tag. This links to the guide Astrolite NeoPixel Upgrade. Astrolite NeoPixel Upgrade By Ruiz Brothers intermediate Motorized Camera Slider MK3 By Ruiz Brothers intermediate Crickit Carnival Bumper Bot By John Park beginner Your browser does not support the video tag. This links to the guide Crawling Baby Sea Turtle Robot. Crawling Baby Sea Turtle Robot By Dano Wall beginner Your browser does not support the video tag. This links to the guide Crickit Controlled Animatronic Eyeball. Crickit Controlled Animatronic Eyeball By John Park beginner Cardboard Fundamentals By John Park beginner Adding an Accelerometer to your FeatherWing Crickit By Dave Astels intermediate Your browser does not support the video tag. This links to the guide NeoPixel Sprite Weather Display. NeoPixel Sprite Weather Display By Liz Clark beginner Line Following Zumo Robot Using Simulink By Anuja Apte beginner
Create Wishlist
× Title Description Close Search Search
Categories

Tag » Arduino Pwm Motor Control Frequency