I used this module L298N so many times and it was always so easy, and worked just fine.
However, this time it doesn't want to work with me
I wired the Vcc and GND to a power supply (12V, and kept the 12V jumper in place) and common ground with the Arduino. (Arduino UNO)
I then wired the two signal cables from the Arduino to the H-bridge (IN1, IN2)
And then the PWM cable from a pin on Arduino (digital pins, with the "-" mark) to the pin on the H-bridge. (Removed the jumper and connected)
But the problem is, the voltage to the motor is always too high - when I use 12V power supply, and PWM value of 10 (analogWrite(10) ) I get a reading of 8V (using a multimeter)
The H-bridge is new, unused - just opened it a few weeks ago (don't think I even used it), but just in case, I also tried another H-bridge, brand new straight from the box - same result. I also tried to use the second motor output, and same result - so the hardware is all good, I believe.
The code is nothing special, I set all 3 pins to OUTPUT in the setup(), and digitalWrite(HIGH) and LOW to the pins, and analogWrite(..) for the PWM value.
I thought maybe it has something to do with the PWM frequency (not that it should), and indeed it acts differently when the PWM is provided via pin5 (980Hz) or pin11 (490Hz) - but it shouldn't happen, it's just a simple PWM signal : but at least I tried and learnt something new.
Here are some more values I tried:
12V, PWM10 -> 6.43V
12V, PWM128 -> 10.14
8V, PWM10 -> 4.47V
8V, PWM128 -> 6.84V
12V, PWM10 -> 8.54:
12V, PWM128 -> 11.05
8V, PWM10 -> 6.04V
8V, PWM128 -> 7.44V
Is there something I'm missing? I know I barely sleep recently, but I always thought I'm still capable of wiring a simple L298N H-bridge
Thank you so much in advance!