das klingt nach 2-Pin-Steuerlogik, 1 für Richtung und 1 für pwm.
Das führt sehr häufig zu diesen beschriebenen Problemen, auch bei mir.
Verwende lieber 3-Pin-Steuerlogik, die ist störungssicherer (L298 funktioniert logisch wie L293):
http://www.arduino-tutorial.de/motor...m-h-bridge-ic/
Die Pin-Namen gehen im Web oft sehr durcheinander.
IC-Spannungsquelle Vss(Vcc)=5V
Leistungsspannungsquelle Vs(Vc)=z.B. 9-12V
MotorA: Inputs 1+2=direction, enable1=pwm, outputs 1+2
MotorB: Inputs 3+4=direction, enable2=pwm, outputs 3+4
verfügbare PWM Pins Arduino:
Nano: 3; 5; 6; 9; 10; 11
Uno: 3; 5; 6; 9; 10; 11
Due: 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13
Mega 2560: 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13
Steuerlogik:
Code:
in1(3) in2(4) en1(2)==pwm Funktion
==========================================================
LOW LOW LOW coast
LOW HIGH pwm rechts pwm
HIGH LOW pwm links pwm
HIGH HIGH pwm brake pwm
Lesezeichen