Author Topic: 2-pin vs 4-pin circuit to drive stepper motor  (Read 7972 times)

0 Members and 1 Guest are viewing this topic.

Offline roborgTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
2-pin vs 4-pin circuit to drive stepper motor
« on: April 22, 2010, 08:49:04 PM »
Hi,

I am looking at http://arduino.cc/en/Reference/StepperBipolarCircuit where it shows two circuits to drive a bi-polar stepper motor. One has 2-pins that go to the controller and the other has 4 pins that go to the controller. I am wondering what is the advantage of one versus the other. The 4-pin circuit seems simpler to build but I end up using 2 extra pins whereas the 2-pin one is (comparatively) harder to build but saves 2-pins, which will be useful if I want to drive multiple steppers.

Thanks,
RO.

Offline Cristi_Neagu

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #1 on: April 23, 2010, 04:00:11 AM »
Hi

I think it's easier to program the steps for the circuit with 2 pins. But i can't tell how the stepping is actually made.
Have you thought about using an L297? That would take A LOT of programming off your shoulders. It just needs a clock source (could be a simple PWM signal), and a direction input (high or low).

Good luck.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #2 on: April 23, 2010, 08:06:53 AM »
Look up the data sheets for the two ICs in those Stepper schematics.  The definitions of the input pins will tell you what they control in the H-bridge and if the functions are what you need.

Offline roborgTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #3 on: April 23, 2010, 10:51:22 AM »
Hi

I think it's easier to program the steps for the circuit with 2 pins. But i can't tell how the stepping is actually made.
Have you thought about using an L297? That would take A LOT of programming off your shoulders. It just needs a clock source (could be a simple PWM signal), and a direction input (high or low).

Good luck.

Hi,

How flexible is this to program ? Can I control how fast, how long and/or how many steps to turn, which waveform etc. ? Can you please point me to a circuit ? I have Arduino board, any idea how to input clock source to L297 ?

Thanks,
RO.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #4 on: April 23, 2010, 11:03:34 AM »
Look up the data sheet for the L297. Its all there.

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.

Offline Cristi_Neagu

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #6 on: April 23, 2010, 12:12:32 PM »
Hi,

How flexible is this to program ? Can I control how fast, how long and/or how many steps to turn, which waveform etc. ? Can you please point me to a circuit ? I have Arduino board, any idea how to input clock source to L297 ?

Thanks,
RO.

Hello.
Well, since you don't actually program the L297, everything is a s flexible as the controller you are using.
You control how fast the motor is turning with the frequency of the clock source. The motor steps when the clock is on it's rising edge (could be the other way around, can't really remember).
It has an "enable" input. If it's high, the motor turns, if it's low, the coils are unenergized (the motor spindle is not held into place; to do that, you set the enable high, and stop the clock source).
It also has a direction input.

Programming wise, you just need a pwm timer, and one or two pins, depending wether you want the motor to reverse direction.

Also, what do you mean waveform? If you're talking about the clock waveform, it's square wave.
If you're still interested, i could post a circuit design. I built 6 motor drivers with it and none have failed me ;D

Good luck.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #7 on: April 23, 2010, 09:21:33 PM »
Hi,

I am looking at http://arduino.cc/en/Reference/StepperBipolarCircuit where it shows two circuits to drive a bi-polar stepper motor. One has 2-pins that go to the controller and the other has 4 pins that go to the controller. I am wondering what is the advantage of one versus the other. The 4-pin circuit seems simpler to build but I end up using 2 extra pins whereas the 2-pin one is (comparatively) harder to build but saves 2-pins, which will be useful if I want to drive multiple steppers.
The "two pin circuit" will only do full steps and will at all times have the coils energized - bad circuit.
Use the other one (the "four pin circuit").

If you wanna use the L297, be prepared for a larger circuit, like adding a L298 or similar as the L297 in itself isn't able to drive your motor.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Cristi_Neagu

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: 2-pin vs 4-pin circuit to drive stepper motor
« Reply #8 on: April 24, 2010, 07:47:28 AM »

If you wanna use the L297, be prepared for a larger circuit, like adding a L298 or similar as the L297 in itself isn't able to drive your motor.


Indeed. But it's not that complex. Just a few resistors, a couple of capacitors, and 2 trim pots, besides the L297 and L298. Also, 8 flyback (i think that is what they're called) diodes are used, but if you plan on powering any kind of motor, flyback diodes are a must.

It's a question of programing and time vs. circuit construction and a bit more money.