luisllamasbinaburo / Arduino-BTS7960

Arduino library to control the BTS7960 Dual H-Bridge, that can drive DC-Motor up to 43A
https://github.com/luisllamasbinaburo/Arduino-BTS7960
Apache License 2.0
29 stars 20 forks source link

Right channel pwm spike #1

Closed iw3row closed 3 years ago

iw3row commented 4 years ago

At least on Arduino DUE I've tried, loading the library and creating the motor object, creates a continuos 1KHz (standard pwm freq. on DUE) spike in idle on the right pwm channel. When the motor has to be driven it behave correctly.

I've found this part of the library causing what I guess is a problem: void BTS7960::Stop(){ analogWrite(_L_PWM, LOW); analogWrite(_R_PWM, HIGH); }

Modifying to: void BTS7960::Stop(){ analogWrite(_L_PWM, 0); analogWrite(_R_PWM, 0); } solves the problem.

Is this intentional or it's a real issue? If it's intentional what is the pourpose?

           Thanks, Mauro
luisllamasbinaburo commented 3 years ago

Solved. I have this update in my local Git, but have not commit. Thank you for point that