0
\$\begingroup\$

I'm using a DC gear motor (from this kit, plastic gears) driven by a L298N module controlled by a STM32 BluePill. The motor voltage supplied to the L298N is 9V from a variable voltage AC adapter with a max current of 1A. The STM32 is powered from USB. The STM32 and L298N share a ground circuit.

I'm using a PWM signal from the STM32 to the Motor A Enable pin of the L298N to control the voltage applied to the motor. The Input 1/2 pins are driven correctly to rotate the motor in one direction.

When I start with a low duty cycle to produce a low voltage, the motor does not start turning and simply makes a high pitched whining noise. As I increase the duty cycle and thus voltage, the whining noise increases in pitch and eventually at a specific duty cycle the motor will suddenly start turning at quite a high speed. Once it's turning, if I reduce the duty cycle below that threshold, the motor will continue turning albeit at a slower speed. If I reduce it further, the speed of the motor becomes uneven and eventually stops and the whining noise resumes.

I don't understand what's happening here. Am I not controlling it correctly? Is the torque produced by the motor at low voltage not high enough to overcome the friction of the gears and inertia of the motor?

Motor specs:

  • Operating Voltage: 3-6V DC
  • Reduction ratio: 1:48
  • When the voltage is 6V:
    • No-load current: 200mA
    • No-load speed: 200±10%rpm
  • When the voltage is 3V:
    • No-load current: 150mA
    • No-load speed: 90±10%rpm
\$\endgroup\$
3
  • 2
    \$\begingroup\$ What you're seeing is "normal". When we make DC motor products, we turn the motor on full speed for the first 1/2 second or so, then dial the PWM back. \$\endgroup\$
    – Kyle B
    Commented Jan 27, 2021 at 15:20
  • 1
    \$\begingroup\$ What frequency are you running your PWM at? \$\endgroup\$ Commented Jan 27, 2021 at 15:25
  • \$\begingroup\$ I'm using the STM32 Arduino framework, and it appears that it uses 1kHz for PWM. \$\endgroup\$
    – dOxxx
    Commented Jan 27, 2021 at 15:30

3 Answers 3

1
\$\begingroup\$

Your comment about the friction is a dominant one.

Static friction is invariably greater than dynamic friction, this applies to almost any two surfaces in contact, not just motors.

Initially when not rotating the various bearing surfaces will be in intimate contact with oil-film - that will require more force to initiate motion than to maintain motion.

There is also a characteristic of permanent magnet motors with iron rotors called cogging which makes it more difficult to start a motor than for it to continue operating once rotating.

When stationery the poles of the armature will be attracted to the magnets, it will require more force to rotate in this position than other positions of the motor - you can feel this if you rotate the motor by hand. Once running inertia will carry the motor through this position. Coreless motors have no iron in the rotor and do not suffer from this.

Cogging Torque In Permanent Magnet Motors

The inertia does not however affect the ability to start the motor, it only starts to have an effect once moving. It will affect how fast the motor comes up to speed but not whether it rotates. Inertia in small motors is usually insignificant in small motors and dwarfed by friction and cogging forces.

\$\endgroup\$
5
  • \$\begingroup\$ So I basically I have to apply a high voltage to achieve the torque necessary to overcome the cogging and then once it's turning reduce voltage to get the speed I want? \$\endgroup\$
    – dOxxx
    Commented Jan 27, 2021 at 15:38
  • 1
    \$\begingroup\$ @CharlesCowie - I respectfully disagree. With no armature current, the motor will naturally come to rest in the lowest energy position with the poles attracted to the magnets. It will require more current to move the armature from that position than elsewhere. The "cogging force and the static friction are acting the same direction. This also makes it very difficult to get good slow-speed operation of small motors with iroon armatures. \$\endgroup\$ Commented Jan 27, 2021 at 16:45
  • 1
    \$\begingroup\$ I don't think that I stated my comment very well, so I will delete it. Cogging is motor torque variation or pulsation proportional to shaft angular position. Since the motor in question is a commutator motor it is not likely a major factor in this case. \$\endgroup\$
    – user80875
    Commented Jan 27, 2021 at 16:57
  • 1
    \$\begingroup\$ @CharlesCowie - That type of motor expriences worse cogging than any others - specially as it is almost certainly just a 3-pole type. 5 pole ones have less cogging while coreless ones (which still use a commutator) experience zero cogging. \$\endgroup\$ Commented Jan 27, 2021 at 17:04
  • \$\begingroup\$ I agree that 3-pole DC motors experience more cogging than others, but most of them have the rotor poles engaged with stator poles in a way that prevents the cogging torque from being being particularly problematic. In terms of this question, I don't think it is really relevant. \$\endgroup\$
    – user80875
    Commented Jan 27, 2021 at 18:14
1
\$\begingroup\$

Am I not controlling it correctly?

The control method is likely fine.

Is the torque produced by the motor at low voltage not high enough to overcome the friction of the gears and inertia of the motor?

Likely not enough to overcome the static friction of the gears.

The inertia should not be an issue.

\$\endgroup\$
1
\$\begingroup\$

The answer lies in basic physics.

  1. Static friction- Statis friction is always more than dynamic friction. So you need more energy to start the motion of a body.
  2. Initially the body is the position of rest (Intertia of rest), so it tried to be in that state and same when it is moving it tried to be in motion.

Your control seems to be fine.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.