본문 바로가기
카테고리 없음

Stepper Motor Driver Schematic

by pilmocomparata 2021. 5. 27.

One of the easiest and inexpensive way to control stepper motors is to interface L293D Motor Driver IC with Arduino. It can control both speed and spinning direction of any Unipolar stepper motor like 28BYJ-48 or Bipolar stepper motor like NEMA 17.

If you want to learn the basics of L293D IC, below tutorial is invaluable. Consider reading (at least skimming) through this tutorial first.

Circuit for Bipolar Stepper Motor Two Pins. Reference Home. Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain. Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain. May 15, 2015  Technically stepper motor driver circuit is a Decade Binary Counter circuit.The advantage of this circuit is, it can be used to drive stepper motors having 2-10 steps. Before going any further let’s discuss more about the basics of stepper motor.

Stepper motor driver The second important component is the motor driver. The function of stepper driver is to control the direction and magnitude of current flow into the motor windings. It takes pulses from the controller and calculates when and how motor windings should be energized to generate motion. The AlphaStep consists of stepper motor and driver products designed to draw out the maximum features of a stepper motor. These products normally operate synchronously with pulse commands, but when a sudden acceleration or load change occurs, a unique control mode maintains positioning operation.

Control DC Motors with L293D Motor Driver IC & Arduino
If you are planning on assembling your new robot friend, you will eventually want to learn about controlling DC motors. One of the easiest and...

Controlling a Stepper Motor With an H-Bridge

As L293D IC has two H-Bridges, each H-Bridge will drive one of the electromagnetic coils of a stepper motor.

By energizing these electromagnetic coils in a specific sequence, the shaft of a stepper can be moved forward or backward precisely in small steps.

Driver

However, the speed of a motor is determined by the how frequently these coils are energized.

Below image illustrates driving stepper with H-Bridge.

Driving Unipolar Stepper Motor (28BYJ-48)

In our first experiment, we are using 28BYJ-48 unipolar stepper rated at 5V. It offers 48 steps per revolution.

Before we start hooking the motor up with the chip, you will need to determine the A+, A-, B+ and B- wires on the motor you plan to use. The best way to do this is to check the datasheet of the motor. For our motor these are orange, pink, blue and yellow.

Note that we will not be using the common center connection(Red) in this experiment.

The center connection is merely used to energize either the left or right side of the coil, and get the effect of reversing the current flow without having to use a circuit that can reverse the current.

The connections are fairly simple. Start by connecting 5V output on Arduino to the Vcc2 & Vcc1 pins. Connect ground to ground.

You also need to connect both the ENA & ENB pins to 5V output so the the motor is always enabled.

Now, connect the input pins(IN1, IN2, IN3 and IN4) of the L293D IC to four digital output pins(12, 11, 10 and 9) on Arduino.

Finally, connect the stepper motor’s wires A+ (Orange), A- (Pink), B- (Yellow) and B+ (Blue) to the L293D’s output pins (Out4, Out3, Out2 & Out1) as shown in the illustration below.

Driving Bipolar Stepper Motor (NEMA 17)

In our next experiment, we are using NEMA 17 bipolar stepper rated at 12V. It offers 200 steps per revolution, and can operate at 60 RPM.

Before we start hooking the motor up with the chip, you will need to determine the A+, A-, B+ and B- wires on the motor you plan to use. The best way to do this is to check the datasheet of the motor. For our motor these are red, green, blue and yellow.

The connections are fairly simple. Start by connecting external 12V power supply to the Vcc2 pin and 5V output on Arduino to the Vcc1 pin. Make sure you common all the grounds in the circuit.

You also need to connect both the ENA & ENB pins to 5V output so the the motor is always enabled.

Now, connect the input pins(IN1, IN2, IN3 and IN4) of the L293D IC to four digital output pins(12, 11, 10 and 9) on Arduino.

Finally, connect the A+ (Red), A- (Green), B+ (Blue) and B- (Yellow) wires from the stepper motor to the L293D’s output pins (Out4, Out3, Out2 & Out1) as shown in the illustration below.

Arduino Code – Controlling Stepper Motor

The following sketch will give you complete understanding on how to control a unipolar or bipolar stepper motor with L293D chip and is same for both the motors except stepsPerRevolution parameter.

Change this parameter as per your motor’s specification before trying the sketch out. For example, for NEMA 17 set it to 200 and for 28BYJ-48 set it to 48.

The sketch starts with including Arduino Stepper Library. The stepper library comes packaged with the Arduino IDE and takes care of sequencing the pulses we will be sending to our stepper motor.

After including the library we define a variable named stepsPerRevolution. As the name suggests it’s the number of steps per revolution that our motor is rated at. Change this parameter as per your motor’s specification. For example, for NEMA 17 set it to 200 and for 28BYJ-48 set it to 48.

Next, we create an instance of the stepper library. It takes the steps per revolution of motor & Arduino pin connections as parameter.

In setup section of code, we set the speed of stepper motor by calling setSpeed() function and initialize the serial communication.

In loop section of code, we simply call step() function which turns the motor a specific number of steps at a speed determined by setSpeed() function. Passing a negative number to this function reverses the spinning direction of motor.

This bipolar stepper motor driver circuit will drive a bipolar stepper motor using externally supplied 5V levels for stepping and direction. These usually come from software running in a computer or from a microcontroller unit. The circuit uses IRFZ44 and MTP2955 MOSFET’s.

All the power inputs were connected together. The CLOCK was connected to STEP, and the RESET was connected to DIRection. Pushing the CLOCK button then advanced the motor one notch. Pressing CLOCK with the RESET button also depressed and pressed down advanced the motor one notch the other way.

Bipolar Stepper Motor Driver Part Lists

Resistors 1/2W
R1, R2 : 1K
R3, R4 : 10K
R5, R6, R11, R12 : 12K
R7, R8, R13, R14 : 2K2
R9, R10, R15, R16 : 150R
C1 : 100uF/63V ecap
C2 : 10uF mini ecap
C3 : 100nF
D1-D8: 1N4148 diode
IC1 : 4013
IC2 : 4030
IC3, IC4 : 4N25
IC5 : 7805

Bipolar stepper motors have two coils and are controlled by changing the direction of the current flow through the coils in the proper sequence. These motors have only four wires.

Stepper Motor Driver Circuit Using Tip122

The unipolar stepper motor is connected as a bipolar motor (the 2 center wires of the 6 wire motor are unused.) 9V was used. The STEP and DIRection negative inputpins were tied together and connected to system ground.

Stepper Motor Driver Chip

Kit for this bipolar stepper motor driver circuit is available.

Tb6560 Cnc Stepper Motor Driver Schematic

Download kit manual in PDF:

Stepper Motor Controller Circuit

Bipolar Stepper Motor Driver Manual Kit

1 file(s) 132.50 KB

Related Posts:

댓글