Phone

    00852-6915 1330
  • Contents

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.

 

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Join our mailing list!

Be the first to know about new products, special offers, and more.

Leave a Reply

We'd love to hear from you! Feel free to share your thoughts and comments below. Rest assured, your email address will remain private.

Name *
Email *
Captcha *
Rating:

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserved.