We are Apogeeweb Semiconductor Electronic

WELCOME TO OUR BLOG

Home  Product Technical Articles   L297&L298 Stepper Motor Driver Circuit

L297&L298 Stepper Motor Driver Circuit

Author: Billily
Date: 21 Oct 2020
 13435
l298

I Description

This blog introduces a simple method to drive stepper motors using L297 and L298 chips. The stepping motor drive system designed by this method has the following characteristics: simple hardware structure, easy software programming and low price.

I Description

II Introduction

III L297 and L298 Hardware circuit

3.1 L297 Overview

3.2 L298 Overview

3.3 L297 and L298 Circuit

IV Software design

FAQ

Ordering & Quantity

II Introduction

Stepper motor is one of the commonly used embedded motion control equipment in industrial control. This is because stepper motors can move at discrete steps, provide accurate angular position information, and are easier to control. With the use of L297 and L298 chips together, a relatively low price can be used to form a stepper motor drive circuit with good performance.

Standard stepper motor driver using L297 and L298 IC

III L297 and L298 Hardware circuit

3.1 L297 Overview

L297 is a stepper motor controller. It is suitable for the control of bipolar two-phase stepper motors or unipolar four-phase stepper motors. There are three drive modes: half-step, full-step, and wave. The on-chip PWM chopper circuit allows switching control of the winding current. A notable feature of l297 is that only clock, direction, and mode input signals are required. The phase required by the stepping motor is generated inside the circuit, which greatly reduces the burden on the CPU.

L297 has the following characteristics:

  • Normal/ wave drive
  • Half/ full step modes
  • Clockwise/ anticlockwise direction
  • Switchmode load current regulation
  • Programmable load current
  • Few external components
  • Reset input&home output
  • Enable input

3.2 L298 Overview

L298 is a high-voltage and high-current dual full-bridge driver with two H-bridges. It accepts standard TTL logic level signals and can drive stepper motors with a voltage of 46V and 2.5A per phase or below.

Each bridge has an enable input, which allows or prohibits the device to work without being affected by the input signal. The emitters of the two low-end transistors of each bridge are connected together and led out for external detection resistance. It sets an additional power input terminal to make the logic part work at low voltage.

L298 internal logic diagram (half of the diagram)

Figure 1. L298 internal logic diagram (half of the diagram)

L298 has the following characteristics:

  • Operating supply voltage up to 46v
  • Total DC current up to 4A
  • 25w rated power
  • 2 enable control terminals to enable or device without inputting signals.
  • Able to drive a two-phase stepper motor, four-phase stepper motor or two DC motors
  • Built-in stabilivolt tube 78M05 can be used to obtain 5v from power supply. (Must be used with an external 5v logic supply when drive voltage is greater than 12v to protect the chip)
  • Low saturation voltage
  • Overtemperature protection
  • Logical “0”input voltage up to 1.5V( high noise immunity)
  • Operating temperature: -23°C to 130°C
  • Storage Temperature: -40°C to 150°C

3.3 L297 and L298 Circuit

L297 and L298 can be used to make a two-phase bipolar stepper motor drive circuit. It is driven by a constant current mode, and the peak current of each phase can reach 2A. L297 is a stepper motor controller that is used to generate two-phase bipolar. Drive signal (A, B, C, D) and motor current settings. L298 is used to drive the power output of the stepper motor. It is driven by a double full bridge mode. Due to the bipolar drive, the motor coil is fully utilized to enable into the motor can achieve the best drive.

When two pieces of L297 are used to drive the two windings of a stepping motor through L298, and the Vref corresponding to each winding is changed through two D/A converters, a stepping motor subdivision driving circuit is formed.

The principle of L297+L298 drive wiring is shown in Figure 2. Ports P0~P4 are respectively connected to the corresponding control terminals of L297. Then, through the reasonable arrangement of the software, the purpose of controlling the motor to rotate in the expected direction is achieved.

l297 l298 Electrical schematic diagram

Figure 2. Electrical schematic diagram

In addition, the terminal 1 of L297 is the synchronous terminal, which can be connected to the terminal 1 of another group of L297 and L298 drive circuits. In this way, the two sets of drivers can be synchronized to achieve the effect of driving multiple motors at the same time.

IV Software design

Use C language to write program code:

  P0_0 = 1; // CW

  P0_1 ~ 1; // HALF

  P0_3 = 1; // ENABLE

  P0_2 = 1; // RESET

  P0_7 = 1; // CLOCK

  TMOD one 0 X01; // Tl

  TH0 = (a 4000/2 56);

  TL0 = one (4000% 2 5 6 );

  TR0 = 1;

  for(; ;)

  {

  TH0 = one (4000/256 );

  TL0 = one (4000%256);

  do{} while (!TF0);

  P0_7 =! P0_7; // CLOCK

  TF0=0;

  }

The speed of the motor speed can be controlled by the timer.

Waveform diagram generated by L297

Figure 3. Waveform diagram generated by L297

According to the waveform generated by L297, in fact, when the CPU port resources are not tight, the CPU can be used to simulate output.

The above hardware circuits and software programs have been tested and are completely practical.


FAQ

  • What is l298n?

This L298N Motor Driver Module is a high power motor driver module for driving DC and Stepper Motors. This module consists of an L298 motor driver IC and a 78M05 5V regulator. L298N Module can control up to 4 DC motors, or 2 DC motors with directional and speed control.

  • What is L297?

The L297 integrates all the control circuitry required to control bipolar and unipolar stepper motors. Used with a dual bridge driver such as the L298N forms a complete microprocessor-to-bipolar stepper motor interface.

  • How does l298n control DC motor speed?

1.If you send a HIGH signal to the enable 1 pin, motor A is ready to be controlled and at the maximum speed;

2.If you send a LOW signal to the enable 1 pin, motor A turns off;

3.If you send a PWM signal, you can control the speed of the motor. The motor speed is proportional to the duty cycle.

  • What is l298n motor driver module?

This L298N Motor Driver Module is a high power motor driver module for driving DC and Stepper Motors. This module consists of an L298 motor driver IC and a 78M05 5V regulator. L298N Module can control up to 4 DC motors, or 2 DC motors with directional and speed control.

  • How does l298n motor driver work?

The L298N is a dual H-Bridge motor driver which allows speed and direction control of two DC motors at the same time. The module can drive DC motors that have voltages between 5 and 35V, with a peak current up to 2A.

  • How do i use a l298 motor driver with Arduino?

Start by connecting power supply to the motors. In our experiment we are using DC Gearbox Motors(also known as 'TT' motors) that are usually found in two-wheel-drive robots. They are rated for 3 to 12V. So, we will connect external 12V power supply to the VCC terminal.

  • What is the function of H bridge?

An H-bridge is an electronic circuit that switches the polarity of a voltage applied to a load. These circuits are often used in robotics and other applications to allow DC motors to run forwards or backwards.

  • What is the use of l298n?

The L298N is a dual H-Bridge motor driver which allows speed and direction control of two DC motors at the same time. The module can drive DC motors that have voltages between 5 and 35V, with a peak current up to 2A.

 

Ordering & Quality

Photo Mfr. Part # Company Description Package PDF Qty Pricing
(USD)
L297D L297D Company:STMicroelectronics Remark:IC MOTOR DRV BIPOLAR/UNIPLR 20SO Package:20-SOIC (0.295", 7.50mm Width)
DataSheet
In Stock:On Order
Inquiry
Price:
1+: $7.43000
10+: $6.70800
25+: $6.39600
100+: $5.30400
250+: $4.83600
500+: $4.52400
1000+: $4.05600
Inquiry

Related Articles

CCS811 Digital Gas Sensor: Datasheet, Arduino and Schematic [Video&FAQ]

Irene 29 Sep 2021  228

Video about CCS811   Catalog DescriptionPin ConfigurationBlock DiagramSchematics / LayoutBenefitsFeaturesApplicationsDatasheetProduct AttributesManufacturerUsing WarningFAQ (Frequently Asked...

Continue reading »

FQP27P06 Mosfet: Datasheet, Equivalents, Circuit [FAQ]

Irene 27 Sep 2021  129

Product OverviewThe FQP27P06 is a through hole, -60V P channel QFET MOSFET in TO-220 package. This device feature planar stripe and DMOS technology which has been tailored to minimize the onstate resi...

Continue reading »

BC337 Transistor: Pinout, SMD, Equivalent

Iggy 21 Jan 2021  3694

BC337 is NPN Amplifier Transistor. Primarily, the BC337 used for lower power audio applications. It belongs to the NPN family of transistors and has a maximum gain of 630. The continuous collector cu...

Continue reading »

Difference Between CR2025 Battery and CR2032 Battery

Iggy 11 Jun 2021  4847

Button cells are used to power small portable electronics devices. It has a round diameter, and two metal electrodes. An electrolyte that is placed between them controls the flow of ions that make the...

Continue reading »

Difference Between CR2016 Battery and CR2032 Battery [Video&FAQ]

Iggy 18 Nov 2021  24565

Sometimes, CR2032 batteries and CR2016 batteries that are round, flat, and look like small silver buttons seem to look the same. Since they all look the same, can they be used universally? Stop! Wait...

Continue reading »

0 comment

Leave a Reply

Your email address will not be published.

 
 
   
 
Rating:

# 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z