# Using a six wire stepper motor with L298n

I am using a L298n IC and (not a driver shield) and an Arduino.

I would like to know how to use the IC with the Arduino to run a six wire stepper motor.

Could I have a detailed explanation for wiring the IC connections on the breadboard and the Arduino?

Pin number on L298N
pin on Arduino
function
1   -   SenseA; connect through 0.5 Ohm sense resistor to power GND
2   -   one end of coilA on stepper motor
3   -   other end of coilA on stepper motor
4   -   VS: connect to "42V" motor power, and to the middle wire of both coils.
5   5   IN1
6   "5V"    ENA
7   4       IN2
8   GND     GND (hook to both power supply GND and Arduino GND)
9   "5V"    VSS
10  3       IN2
11  "5V"    ENB
12  2       IN4
13  -   one end of coilB on stepper motor
14  -   other end of coilB on stepper motor
15  -   SenseB; connect through 0.5 Ohm sense resistor to power GND


Also:

• connect a capacitor (typically 0.1 uF or 1 uF) between L298 "VS" (4) and GND (8)
• connect a capacitor (typically 0.1 uF or 1 uF) between L298 "Vss" (9) and GND (8)
• connect the motor power supply (42VDC to 5VDC) between L298 "VS" (4) and GND (8)
• external flyback protection diodes
• The L298P -- the same chip in a PowerSO20 package -- has completely different pin numbers. For more details, see the datasheet for the L298.

This is a good tutorial to get you started.

https://alselectro.wordpress.com/2014/04/25/stepper-motor-control-with-l298-arduino/

• As it stands, this is a link only answer. Could you provide a summary, and the relevant information from the article? – Greenonline Jun 4 '17 at 11:32
• Thanks for your answer but we prefer answers to be self contained where possible. Links tend to rot so answers which rely on a link can be rendered useless if the linked to content disappears. If you add more context from the link, it is more likely that people will find your answer useful. – Mark Booth Jun 5 '17 at 10:44