Jump to content






L297/298 Stepper Motor Controller

Posted by Nathan House, in Electronics, Completed Projects 22 July 2011 · 43,857 views

Completed Project
My first L297-298 stepper motor controller was made on prototyping board, which turned out to be a nightmare for two reasons:
  • It's really hard to keep track of all the wires and where they're supposed to go when you're trying to assemble the board.
  • I meticulously cut all the wires to the "right" lengths and bent them at right angles because I wanted the stepper motor controller to look pretty (never again!).
Even if you don't care about the board's looks and just cut and solder wires as fast as you can, it's still really time consuming and difficult.

Here are some pictures of my first board and, below those, a video of a stepper motor running off it:

Posted Image

Posted Image


http://www.youtube.com/watch?v=iRHaR10fej4


And here is the schematic (NOTE: this schematic is terrible, scroll down for a much better one):

Posted Image

A better way to make a stepper motor controller is to make a printed circuit board, and then simply drop the components in. After making the PCB, placing the components and soldering them hardly takes any time at all, in contrast to the proto board which took a ton of time to make. Here's a picture of the first stepper motor controller I made in PCB-form:

Posted Image

Here is the schematic for the PCB version of my stepper motor controller. Notice that some improvements were made, such as the Schmitt trigger to help filter out noise.

Posted Image

The Eagle Layout Editor schematic & PCB are available for download here: http://www.foxytroni...-schematic-rc2/

I want to thank Phil at PMinMO.com for his help when I was designing the PCB. He has a lot of experience with these stepper motor ICs and gave me a lot of advice. I also borrowed the idea of using a Schmitt trigger from him.

  • 1



hi
can you tell how to control clock signal????
    • 0
  • Report

The CLOCK pin is used to step the motor. Toggling the clock signal from low to high makes the motor step. Take a look at the bottom of page 3 in the L297 datasheet for the "official" pin description.

You can also take a look at my PIC18F4550 CNC machine firmware to see an example.

Hope that helps!

    • 0
  • Report
first i wanna thank you for sharing this informations , i have question?:
is the third ic on the right used to protect the stepper ? and what the name of this IC Thanks .
    • 0
  • Report
Are you referring to the diodes? If so, those are to protect the L298 from back emf. It's very important that they be included in the circuit.
    • 0
  • Report
Hi, my question is: Why you use twice the Schmitt trigger inverter?

pd. sorry for my English, I don't speak English.
    • 0
  • Report
Jhon - I think I did that because the Schmitt trigger inverts the signal, so by putting it through twice it exits the way it entered.
    • 0
  • Report

Nathan,

Could you please tell me what Capacitor, the big blue single one is. I don't seem to see a reference to it on the schematic.

Regards,

Dan.

    • 0
  • Report