Go Down

Topic: 5-wire Unipolar Stepper, L298N H Bridge (Read 12130 times) previous topic - next topic

Southpark

#15
Feb 12, 2016, 05:34 am Last Edit: Feb 13, 2016, 01:34 am by Southpark
You don't understand - H-bridges are commonly used in fast or slow decay mode, where one
connection is left to float to whereever the backEMF takes it - this cannot be used for 5-wire
as it won't float if the winding centres are commoned.
I see. Thanks Mark. You might not have understood my question. I was just asking if a 5-wire motor can be treated as a 4-wire motor where it is operated as a 4-wire bipolar motor (with 5th wire disconnected).

Before, I didn't understand what was meant by non-standard drive mode. Thanks for explaining. I think that you mentioned somewhere that it is possible to use the 5-wire as a 4-wire device. I assumed we could then drive the 4-wire using a dual H-bridge in the typical fashion, even though we would be limited to full stepping (ie. no support for half-stepping).

I was interested to see whether or not the O.P. was able to operate his/her 5-wire stepper (uni polar mode) by using it as a 4-wire stepper (bipolar mode), and driving it with an L298N.

I had a L298N dual H-bridge circuit board and a YM2754 on hand, but didn't know how to configure them at that time. So I searched on the net to see what info there was.

At first, I didn't know that the uni-polar 5 wire motor could be used as a typical bipolar motor by leaving the centre tap wire(s) disconnected. I only found out that this could be done after you mentioned it.

Today I set up an L298N h-bridge circuit board according to the diagram figure 5 at this site:

http://www.bristolwatch.com/L298N/

The only difference is that motor 1 in figure 5 becomes coil #1 of the bipolar stepper motor, and motor 2 becomes coil #2. I chose to use 1N5822 diodes for the 8 protection diodes.


I used 12V DC to drive each of the two 'full' coils of the YM2754 stepper motor (with 5th wire not used). The motor is rated for 12V DC for uni-polar operation. I decided to choose 12V DC for bi-polar operation - even though a full coil is meant to take 24V DC, and half coil is meant to take 12V DC.

I needed to find out what polarity to apply to the pair of coils in order to go clock-wise and anti-clockwise (with the motor working as 4-wire and with 5th wire disconnected).

For the YM2754, I have a blue-purple pair of wires for one coil, and a yellow-orange pair of wires for the other coil. For each of these two coils, I chose the blue and the yellow wires to be 'positive' reference wires.

While looking directly at the shaft itself from birds eye view -

To make the shaft go clockwise in steps, I drove (simultaneously) blue to 12V, purple to 0V, yellow to 12V, orange to 0V, then I added a delay (eg 1 second delay), then simultaneously drove blue, purple, yellow, orange to 0V, 12V, 12V, 0V respectively, then added a delay again, then simultaneously drove blue, purple, yellow, orange to 0V, 12V, 0V, 12V respectively, then added a delay, then simultaneously drove blue, purple, yellow, orange to 12V, 0V, 0V, 12V respectively, then added one more delay. Then repeated the whole cycle.

The above sequence for clockwise stepping in terms of high (12V) and low (0V) voltages are:

clockwise: blue purp orange yellow simultaneously made to be high low high low, then 1 second DELAY, followed by low high high low, then 1 second DELAY, followed by low high low high, then 1 second DELAY, followed by high low low high, then another DELAY, then repeat the whole cycle.

anti-clockwise: high low low high, then another DELAY, low high low high, then another DELAY,  low high high low, then DELAY, then high low high low, then DELAY, then repeat the whole cycle.


I used an Arduino MEGA 2560 to control the input pins of the L298N h-bridge circuit board.

The L298N 5V pin caused confusion. I now understand that this '5V' pin can be an input or an output pin, depending on whether a jumper-wire is connected or not. I initially guessed that I needed to hook up that pin to a 5V DC supply in order to supply the logic circuity in the L298N. Then I learned that the '5V' pin is actually an output pin by default, unless I pull out a jumper. When the jumper is connected, the L298N bridge board has its own 5V regulator supply, and the '5V' pin will not only output 5V DC, but will also supply the logic circuitry of the L298N chip. But when the jumper is pulled-out, then the L298N logic circuitry needs to get 5V from somewhere, so the '5V' pin will be an input pin, which can then receive 5V DC from say the Arduino 5V output pin. So, for my setup, I removed the '5V enable jumper' from the L298N board, and I connected the 5V output of the arduino to the '5V' pin of the L298N board. This provides 5V DC for running the L298N logic circuit.

Anyway, the L298N is driving the YM2754 stepper in the 4-wire configuration. Getting the full 48 steps.

Although, I think I need to either drive the coils with a lower voltage (maybe 6V or 8V instead of 12V), or need to put some current limiting resistors in there..... as the motor temperature builds up after a while. Otherwise..... it steps nicely in forward direction as well as reverse direction.

I decided to write a little about what I did for those that want to drive their YM2754 stepper motor with a L298N H-bridge circuit board.

Kenny



Go Up