I would like to know if it's advisable to control an H-bridge IC (L298N) using a single PWM pin?
Let me explain: By driving ENB pin High and by feeding complementary PWM (achieved by using a simple NPN transistor inverter circuit to invert PWM signal from Arduino) to IN1 and IN2, the dc motor connected to OUT1 and OUT2 is working (circuit schematic shown below).
In this setup, I am only using a single PWM: a duty cycle of 0% is maximum speed in one direction, a duty cycle of 100% is maximum speed in the other direction and a duty cycle of 50% stops the motor.
Apart from having a reduced resolution, everything seems to work. However all the tutorials online advise to use 3 pins to control L298N, with the PWM pin connected to ENB (for example this Tutorial). Why is this so? Is it not advisable to do what I did, using a single PWM pin?