1
$\begingroup$

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?

$\endgroup$
7

2 Answers 2

1
$\begingroup$

G. Andrew Stone posted the following schematic of L298N and Arduino with Arduino sketch source code to drive a stepper motor using the L298 chip:

schematic drawing of L298 and 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.
$\endgroup$
2
-1
$\begingroup$

This is a good tutorial to get you started.

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

$\endgroup$
2
  • $\begingroup$ As it stands, this is a link only answer. Could you provide a summary, and the relevant information from the article? $\endgroup$ Commented Jun 4, 2017 at 11:32
  • $\begingroup$ 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. $\endgroup$
    – Mark Booth
    Commented Jun 5, 2017 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.