So I am having trouble with a circuit I am building for a stepper motor controller, I am currently following this schematic enter image description here

My problem is that I don't really know what the Vref, control, sync and home pins do in this cirucit and what they connect to, and because of this I haven't connected anything to them when testing my circuit.

However my L297 heats up very quickly whenever I test the circuit so I suspect it is because of those pins.

My question is what are those pins in charge of, their job and what should I connect them to?

BTW I also haven't connected anything to pin 17 and 18 because I know they are inputs

  • \$\begingroup\$ If you find any of the answers here (or in any of the other questions you have asked) useful, you might consider up-voting them. Also consider accepting an answer to any of your questions that solves your problem. It is not required, but is encouraged as a way to reward the people who take the time to provide answers. \$\endgroup\$ – Tut Jul 1 '14 at 14:41

You really need to use the datasheet: L297 datasheet

My problem is that I don't really know what the Vref, control, sync and home pins do in this cirucit and what they connect to ...

Not connecting the Vref pin can cause your driver to burn out. (see final paragraph)


Reference voltage for chopper circuit. A voltage applied to this pin determines the peak load current.

There are internal comparators that compare Vref to the voltages coming from the current-sense resistors (R_S1 and R_S2). Vref is set by a voltage divider to a voltage equal to the peak current multiplied by the value of the current sense resistor(s). I generally use the combination of a fixed resistor in series with a potentiometer. The fixed resistor limits the maximum current that can be set to avoid burning out the driver transistors:


simulate this circuit – Schematic created using CircuitLab

(resistors chosen based on 0.5 Ohm current-sense resistors and 2.0A maximum phase current)


Control input that defines action of chopper. When low chopper acts on INH1 and INH2; when high chopper acts on phase lines ABCD.

Also from the L297 datasheet:

When the phase lines are chopped the non-active phase line of each pair (AB or CD) is activated (rather than interrupting the line then active). In L297 + L298 configurations this technique reduces dissipation in the load current sense resistors.

The circuit should perform acceptably with this line either tied to logic high (5V) or logic low (GND). It can be useful to make this signal jumper-selectable as sometimes switching transients on the Vsense voltages can cause the chopper to function at a frequency that is a division of the desired chopper frequency and resulting in an audible hissing sound from the motor. Changing the control mode will often eliminate this. (this can also be eliminated by a small RC filter on the Vsense lines, but that is beyond the scope of this answer)


Output of the on-chip chopper oscillator. The SYNC connections The SYNC connections of all L297s to be synchronized are connected together and the oscillator components are omitted on all but one. If an external clock source is used it is injected at this terminal.

Page 8 of the datasheet shows how this is used. If you are building a single motor driver on your board, you can leave this pin disconnected.


Open collector output that indicates when the L297 is in its initial state (ABCD = 0101). The transistor is open when this signal is active.

You can leave this pin disconnected.

Not connecting the Vref pin is probably your most serious problem. As you can see on the diagram on page 2 of the L297 datasheet, this is the reference voltage which goes to internal comparators and is compared to the voltages coming from the current-sense resistors. The level of Vref sets the peak current for the drive. With this pin un-connected, the controller cannot function correctly and it is very possible that it has caused the L298 to stay on and burn out. A failure of the L298 often results in a failure of the L297 and could be why it is getting hot.

| improve this answer | |
  • \$\begingroup\$ So basically I leave the home pin disconnected, I leave the sync pin disconnected(since I don't have multiple motor controllers on the same board), with the control pins I should find out which is best between GND and 5+ to eliminate the audible hissing and finally with the Vref I connect in series with a resistor and connect to the logic power (5 volts) yes or no? \$\endgroup\$ – Redrachet2 Jul 1 '14 at 19:10
  • 1
    \$\begingroup\$ BTW I did read the data sheet, however I still a bit confused so thank you for your summary because it made me understand a lot!!!!! \$\endgroup\$ – Redrachet2 Jul 1 '14 at 19:15
  • \$\begingroup\$ @user3145648 Vref is the most critical. You can use the schematic I provided for an adjustable output. Note I just made a correction to the fixed resistor value. The fixed resistor I chose will limit the max adjustable phase current to 2A. Anything smaller allows more current and risks burning out the L298. If you can't find 40k Ohm, use the next larger value or a combination of 2 resistors. The answer is "yes" to your question regarding the other pins. \$\endgroup\$ – Tut Jul 1 '14 at 19:29
  • \$\begingroup\$ again thank you soooooo much!!!!!!! and after connecting the resistor to the Vref pin do I connect the pin to 5 volt line or the 36 v line (in my case 12 v)? \$\endgroup\$ – Redrachet2 Jul 1 '14 at 20:17
  • \$\begingroup\$ As my schematic shows: The wiper of the potentiometer goes to the Vref pin. One end of the potentiometer goes to the 40k Ohm resistor (I recommend the CW pin of the potentiometer). The other end of the potentiometer goes to GND. The other end of the 40k Ohm resistor goes to +5V (as shown in my schematic). \$\endgroup\$ – Tut Jul 1 '14 at 20:30

The 297 draws typically 50mA (could be as much as 80mA) from the supply. If you're using a 5V supply it will get warm. It could get pretty hot with a 10V (the maximum) supply, and will probably be fried if you connect it to a much higher voltage supply.

If it's getting hot quickly with a 5V supply, it's probably wired wrong.

Please read the fine datasheet (RTFD) and learn what the outputs are used for.

| improve this answer | |
  • \$\begingroup\$ no actually is it no getting hot with the 5 volt, however when I connect the 36 volt line to the power supply (in my case it is 12 volts) then the L297 starts heating up but the l298 is perfectly fine \$\endgroup\$ – Redrachet2 Jun 30 '14 at 13:30
  • \$\begingroup\$ Maybe there is a short from pin 4 on the L298 to somewhere else. \$\endgroup\$ – Spehro Pefhany Jun 30 '14 at 13:31
  • \$\begingroup\$ I just checked with the multimeter and pin 4 on the l298 is not short circuiting with anything else on the other pins of both the l298 and the l297. This is why I suspected the those pins that I didn't connect \$\endgroup\$ – Redrachet2 Jun 30 '14 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.