
If you are using a variable power supply, preset it to 6V.Connect a black wire from your power source to the GND connector on the L298N.Connect a red wire from your power source to the node or rail on the breadboard wired to the 12V L298N input.If you are using a battery pack that can deliver at least 6V, leave the batteries out for now.If you are using a power supply leave it off or unplugged for the now.Plug the other end into its own row (node) or rail on the breadboard.Connect a male-to-male jumper wire to the 12V input on the L298N.Connect the 12V power input to the breadboard Repeat for IN2 through IN4, spacing out the wires on the breadboard in their own rows.Plug the male-end of the jumper into the breadboard on its own row (node).Attach the female-end of a jumper wire to IN1 ( INPUT 1) on the L298N board.Wire the input pins to the breadboardįor this step you will need four (4) different colored female-to-male jumper wires. Depending on the board the wiring will determine if both motors operate in the same direction when expected. Connect the red wire from the second motor ( M2) to OUT4īecause the motors are direct current, it doesn't really matter if you wire the red and black wires in reverse.Connect the red wire from the first motor ( M1) to OUT1 on the L298N board.On the board that I have the motor connectors on each side are labeled OUT1 though OUT4. Verify the ENA and ENB jumpers are set, so the motors will run without the need for a PWM signal.

That is the equivalent of sending a signal to operate at no speed. If you leave the jumpers off, and do not provide a PWM signal, then the signal will be LOW.
L298N MOTOR DRIVER BOARD ARDUINO FULL
It's like sending a PWM signal that is always HIGH - full speed. To do that you have to put the jumpers on ENA and ENB to pull both PWM pins HIGH.
L298N MOTOR DRIVER BOARD ARDUINO HOW TO
I'll provide a quick demo program so you can see how to run the motors through a predefined sequence.

In the second part I will show you how to quickly wire up the driver to an Arduino. It should also give you ideas for very simple robot projects. This will give you a better understanding of how a motor driver works.

In the first part I will show you how to control the driver without the need for a computer. Most motorized toys and many robot chassis kits use simple DC motors. In this tutorial I cover how to drive two DC (direct current) motors using an L298N motor driver.
