Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad implementation of PWM overheating motor #38

Open
pppalain opened this issue Dec 4, 2017 · 2 comments
Open

Bad implementation of PWM overheating motor #38

pppalain opened this issue Dec 4, 2017 · 2 comments

Comments

@pppalain
Copy link
Contributor

pppalain commented Dec 4, 2017

I revisited the implementation of PWM after burning a motor (melting the 3d printed carriage) and getting a really bad electronic burning smell. It shouldn't have gotten that hot.
I am using the l298 and I noticed this from the datasheet:

if the motor is enabled and the outputs are both high or both low, the motor is in braking mode.
if the motor is disabled the motor coast.
I had in the past experimented with this but forgot about it.
The PWM pin should be the motor enable.
dynamic breaking should only be activated when error is 0.
otherwise the motor should be coasting.

so 3 pins are needed for correct operation. One PWM pin and two direction pins

The current implementations make the motor turn a bit and immediately break.
dynamic breaking makes the motor heat significantly. This is done at every pwm cycle (31khz)

This is something I had done a while ago but completely forgot.

@misan
Copy link
Owner

misan commented Dec 4, 2017 via email

@pppalain
Copy link
Contributor Author

pppalain commented Dec 4, 2017

Oh you don't have to be sorry... I have thousands of motors and lots of smoke left. I think different drivers implement things differently. The TB6612 calls it a short brake. it happens whenever the PWM pin is low for this chip.

The reason I am so concerned is that some systems may have run the motors hot and abandoned. I am modifying my implementation for my 1 nano 2 servo which worked well.... before the destruction of the motor. 1 m/s for a small motor.... I would like to see a stepper motor do that.
The heating happens not when the pwm is at 255 but it happens when the motors are tracking a pulse.... so always a percentage on and the rest of the time braking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants