Author Topic: Bi-polar stepper motor 2-wire vs 4-wire control with H-Bridge? Arduino UNO R3  (Read 4619 times)

0 Members and 1 Guest are viewing this topic.

Offline gerathegTopic starter

  • Regular Contributor
  • *
  • Posts: 102
I want to control a Bi-Polar stepper motor using an H-Bridge and an Arduino UNO Rev3 as the controller. I have two questions:

1. I would like to know if there is any advantage to using 4-wire control over 2-wire control with the Arduino Uno Rev3?

Here is the tutorial I'm following:
https://itp.nyu.edu/physcomp/lessons/dc-motors/stepper-motors/

They mention using an L293D H-Bridge, but I will be using an SN754410 H-Bridge since I read that it is a pin-to-pin replacement for the L293D and I need to drive about 660mA of current.

I'm assuming it will work as a pin-to-pin replacement with the 4-wire control setup.
2. Is the SN754410 also a pin-to-pin replacement with the 2-wire control setup?
« Last Edit: April 21, 2015, 07:47:28 am by geratheg »
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Quote
1. I would like to know if there is any advantage to using 4-wire control over 2-wire control with the Arduino Uno Rev3?
Less circuit to build since the inverting of the other channels is done in software.

Quote
2. Is the SN754410 also a pin-to-pin replacement with the 2-wire control setup?
Seems so. But you should better go for a L298.
The L293 and SN754410 are only DIL package which makes it difficult to attach to a heatsink.

You can buy L298 on the otherhand already on a little breakout board including heatsink, skrew terminals, bypass capacitors, clamping diodes and what not.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline gerathegTopic starter

  • Regular Contributor
  • *
  • Posts: 102
Thanks for the response.

Besides reduced hardware, is there any performance difference?
Will it affect how much current the motor will use if I use the 2-wire control version? For example, where the pins of the H-Bridge are connected to the controller, is it simply On or Off state? Or does it matter how much voltage and/or current is applied to those pins?

The only problem I have is the stepper motors are rated at 0.33A per phase, and it's a 2-phase motor, so I'm expecting up to 0.66A = 660mA of continuous current. The L293D is rated for 600mA of continuous current and 1.2A max current.
The SN754410 can take up to 1A of continuous current.

I already have both of the H-Bridges and would prefer to use them instead of obtaining one assembled on a breakout board.
« Last Edit: April 21, 2015, 07:48:38 am by geratheg »
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Quote
Will it affect how much current the motor will use if I use the 2-wire control version?
No.

Quote
Or does it matter how much voltage and/or current is applied to those pins?
Of course. The higher the voltage, the higher the motor current.
These motors are often driven with current control at relatively high voltages. The high supply voltage ensures a dynamic response of the motor and the current control limits the motor current to its nominal value.
But the simple driver you got (as well as the L298) have no current limiting.
Therefor:
Quote
the stepper motors are rated at 0.33A per phase
What's the coil resistance?
You have to choose the supply voltage appropriate to meet this current.
« Last Edit: April 21, 2015, 08:20:38 am by PSR B1257 »
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline gerathegTopic starter

  • Regular Contributor
  • *
  • Posts: 102
The coil resistance is 32.6 ohms. Looks like the current at 12V will be 0.37A.

I'll be using this motor: https://www.sparkfun.com/products/9238
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Quote
Looks like the current at 12V will be 0.37A.
Not quite. There is a voltagedrop of about 1V towards Vcc and GND within the driver, therefore you get about 10V at the motorcoil.
That's should be fine. Especially if the motor is not or just slightly loaded.
« Last Edit: April 21, 2015, 04:26:59 pm by PSR B1257 »
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline gerathegTopic starter

  • Regular Contributor
  • *
  • Posts: 102
Not quite. There is a voltagedrop of about 1V towards Vcc and GND within the driver, therefore you get about 10V at the motorcoil.
That's should be fine. Especially if the motor is not or just slightly loaded.
So there is a total voltage drop of 2V?

On page 6 of this document http://www.farnell.com/datasheets/120417.pdf, I found an application schematic for the SN754410 and it looks like external diodes are used. I also attached the picture of it.
In addition, I see a 10k resistor from 5V (which I don't think is necessary according to the wiring from the link in the original post).

Since I'm new to electronics, I understand how a flyback diode works for simple inductive devices like relays.
However, this seems more involved because if I'm seeing this correctly, I'm seeing the Anodes connected to ground and the Cathodes connected to 24V, which doesn't make sense to me. I don't see the reason those Anodes are connected to ground since current is completely blocked in that direction, thus those diodes might as well be eliminated?
My understanding is that a flyback diode would short any back EMF.
« Last Edit: April 21, 2015, 09:04:18 pm by geratheg »
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Quote
In addition, I see a 10k resistor from 5V (which I don't think is necessary according to the wiring from the link in the original post).
That's a so called pull up resistor, which keeps the ENABLE-input from foating. But you have the option to short the ENABLE-input to GND (and therefore disable the output driver), without shorting the supply.

Quote
I don't see the reason those Anodes are connected to ground since current is completely blocked in that direction
Of course they block the current in this direction, otherwise they would short out the supply voltage.

Quote
thus those diodes might as well be eliminated?
NO!

Quote
My understanding is that a flyback diode would short any back EMF.
Yes, that's what they do.
« Last Edit: April 22, 2015, 07:05:44 am by PSR B1257 »
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline gerathegTopic starter

  • Regular Contributor
  • *
  • Posts: 102
Thanks for the reply.

Can the resistor be removed and the wires directly going to +5V without the resistor? (Since in the link in the original post, 3 pins went directly to 5V on the L293D driver without a resistor). Otherwise I'm just going to include the resistor as in the schematic.

While I am going to add diodes as shown in the schematic because that is the correct way, I'm also trying to understand what goes on and why that design of diodes works.
I attached an image of my basic understanding of diodes, which can be seen on the top of the image. When there is back EMF the coil is shorted from one end to the opposite end.

On the bottom, the diodes for one of the stepper motor coils are shown. I hope someone can explain how the coil is shorted when there is back EMF.
I don't see any open path from one coil to the other coil through the diodes. I also see that the diodes completely block current to ground, and I'm assuming ground will always have the lowest voltage, thus the diodes and the wiring to ground can be eliminated as shown on the image to the right, since no current will ever flow there. If I'm wrong, please help me out.

Thanks! :D
« Last Edit: April 23, 2015, 01:22:59 am by geratheg »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf