L298 schematics


I want to connect Arduino Uno and stpper motor (4 wires) through L298N

Would somebody could give me a schematics?

Thanks in advance

I’ve just got mine wired up. I really struggled to find any documentation that was useful.

Have you just got the chip or a board like this? That’s the one I have used.


Basically I put mine together with a bit of guess work

First get the wiring colours from the stepper motor manufacturer website. Mine were black and green for one pair, blue and red for the other. No idea if this is standard. I then hooked one pair up to out1/2 the other up to out3/4.

If you use a 12v supply on VCC you can use the on-board 5v so don’t connect to the 5v terminal, just use the ena5v jumper to enable the on-board 5v

Then connect in1, in2, in3 and in4 to four pins on the arduino (I used 4,5,6, and 7)

Finally you need to make sure you have a common 0v. If you are using the same power supply for the arduino and the motor board then all will be fine, if not connect the 0v on the board to one of the gnd pins of the arduino

That worked for me but it does get very hot. Apparently the L298 might not be the best option and it’s 2A rating is a little optimistic.

You need to route one motor output to one of the windings, the other to the other (if its bipolar). You may need to get multimeter out to discover which motor pins are which. If the motor runs the wrong way simply reverse one of the output wire pairs (or change the sign of steps in the sketch).