The motor speed is proportional to the duty cycle. If you send a PWM signal, you can control the speed of the motor.If you send a LOW signal to the enable 1 pin, motor A turns off.If you send a HIGH signal to the enable 1 pin, motor A is ready to be controlled and at the maximum speed.The enable pins are like an ON and OFF switch for your motors.
#How to use l298n motor driver how to#
Now that you’re familiar with the L298N Motor Driver, let’s see how to use it to control your DC motors. You need to remove those jumper caps to control the speed of your motors. There are jumper caps on the enable pins by default. The input pins are used to control the direction of your DC motors, and the enable pins are used to control the speed of each motor. If you supply more than 12V, you should remove the jumperĪt the bottom right you have four input pins and two enable terminals. Jumper removed: you need to provide 5V to the +5V terminal.
#How to use l298n motor driver driver#
Make sure GND of the Arduino's power supply is connected to the L298's GND.The motor driver has a two terminal block in each side for each motor. Make sure V_SS is connected to the logic supply voltage (see AnT's comment). ditch the L298 and use single bipolar transistors, depending on the output current.ditch the L298 and its high voltage drop Darlingtons and use a MOSFET H-bridge motor driver, such as the TB6612FNG, see also.temperature, so this might work now under certain conditions and fails horribly another day saturation voltage is related to output current and other parameters, e.g.this circuit is now operating at the fringes, one might call it shady at best, intolerable at worst.The actual restriction is that the motor supply be somewhat greater than the logic "1" input, but that need not match the logic supply. So driving the L298's logic inputs with a lower voltage for logic 1, i.e. And here's the trick that might make it work: as noted V_S (the supply voltage) needs to be at a level of V_IH + 2.546V while V_IH could be as low as 2.3V and 2.3V + 2.546V < 5V.
![how to use l298n motor driver how to use l298n motor driver](https://hackster.imgix.net/uploads/attachments/1161284/9v_a3_ksdDAxLdBz.png)
![how to use l298n motor driver how to use l298n motor driver](https://makeitmech.com/wp-content/uploads/2017/02/connection.png)
Which would explain that the circuit works at 7.2V under the assumption that the logic inputs (enable A and B as well as inputs 1 through 4) are at close to 5V high levels. V_IH, Input High Voltage, ranging from 2.3V to V_SS.V_SS, Logic Supply Voltage, pin 9, typical 5V (min.: 4.5V, max.: 7V).V_S, Supply Voltage, pin 4, Operative Condition V_IH + 2.546V (max.: 46V).There are only two supply pins on the L298 with the following electrical characteristics: I will assume that the " 12V-35V input pin" is the V_S pin, despite that label. Note: Since all vendors (checked Mouser, Octopart, and Sparkfun) link to the L298 datasheet when listing the L298N I will assume they are reasonably equivalent.