Loading... Please wait...

Stepper Motor and L298N Stepper Motor Controller

Stepper Motor and L298N Stepper Motor Controller

L298N Motor Controller Module and Arduino

The L298N Motor Controller can be used to control two DC motors or one bipolar stepper motor such as the NEMA17 stepper motor supplied in our Deluxe Kits.

Module pinouts

Here's the module and its pinouts.

L298N Motor Controller for Arduino from Tronixlabs Australia

  1. DC motor 1 "+" or stepper motor A+
  2. DC motor 1 "-" or stepper motor A-
  3. 12V jumper - remove this if using a supply voltage greater than 12V DC. This enables power to the onboard 5V regulator
  4. Connect your motor supply voltage here, maximum of 35V DC. Remove 12V jumper if >12V DC
  5. GND
  6. 5V output if 12V jumper in place, ideal for powering your Arduino (etc)
  7. DC motor 1 enable jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control.
  8. IN1
  9. IN2
  10. IN3
  11. IN4
  12. DC motor 2 enable jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control.
  13. DC motor 2 "+" or stepper motor B+
  14. DC motor 2 "-" or stepper motor B-

Connecting the Stepper Motor to the Controller and to the Arduino

The key to successful stepper motor control is identifying the wires - that is which one is which. You will need to determine the A+, A-, B+ and B- wires. With our example motor these are red(A+) + gray(A-) and yellow(B+) + green(B-). Now let's get the wiring done. 

Connect the A+, A-, B+ and B- wires from the stepper motor to the module connections 1, 2, 13 and 14 respectively. Place the jumpers included with the L298N module over the pairs at module points 7 and 12. Then connect the power supply as required to points 4 (positive) and 5 (negative/GND).

Once again if your stepper motor's power supply is less than 12V, fit the jumper to the module at point 3 which gives you a neat 5V power supply for your Arduino. 

Next, connect L298N module pins IN1, IN2, IN3 and IN4 to Arduino digital pins D8, D9, D10 and D11 respectively. Finally, connect Arduino GND to point 5 on the module, and Arduino 5V to point 6 if sourcing 5V from the module.

Once you've made these connections you can follow the regular stepper motor tutorial here.

 

 

 

What's News

newsletter

Copyright 2018 oddWires. All Rights Reserved.
 Sitemap | oddWires