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.
Drok l298n motor driver controller 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.
Make sure that the wires are closer to the middle.Use the standoffs to hold the two motors together.If you have a 3D printer, clamp, helping hands or some spare parts you can design something a bit more stable. This is a quick way of putting together a rig that won't roll away while testing. You can buy the parts for this article by following my affiliate links to either Amazon or AliExpress: Part
Drok l298n motor driver controller 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.