Go Down

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

34DOL

No idea what I'm doing...

I have a 5 wire unipolar stepper motor and a L298N H Bridge (probably not what I need, but it is what I have).

The packaging for the motor labels the wires as:
blue - A
purple - /A
yellow - B
orange - /B
white - com

I wired the motor leads to the H Bridge as follows:
blue - motor A
purple - motor A
yellow - motor B
orange - motor B
white - VMS

I wired the H Bridge to the arduino as follows:
LN1 - 9
LN2 - 10
LN3 - 11
LN4 - 12
VMS - 12V supply
GND - ground
I didn't wire up ENA or ENB

So far so good???

No idea how to write code for this.  Basically, I just want the stepper to turn a certain number of steps clockwise at a certain time of day and then to turn the same number of steps counterclockwise at another time.  It'll repeat this day after day.

I have an RTC connected to my arduino already.  I'm adding the stepper.  The RTC and everything else already connected works.

sonnyyu

Quote
It is a unipolar stepper motor with 5 wires:
red: power connector, I have it at 5V and works fine
orange and black: coil 1
brown and yellow: coil 2


http://arduino.cc/en/Tutorial/StepperUnipolar

Msquare

5 Wire steppers are unipolar by defenition/design
A L298 is an H-bridge and such will drive the coils in a bipolar fashion
You can drive a 6 wire stepper in either mode, but not a 5 wire one (because of the common between the two coils)

Blue smoke will be seen.

MarkT

There's another recent thread on this - in brief with care you can cope with 5 wire and bipolar
drive, but you have to be careful.  The insight is that the centre of each winding is common,
but if each winding is energized then the centre will be at V/2 so commoning them isn't a problem.

In fact each winding can either be energized or completely open-circuit, no where inbetween.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Msquare

Well last time I did it, I was not "carefull" enough. It depends on the Hbridge driver I presume (it wasn't a L298).
@MarkT:Do you have a link to that thread handy?

sonnyyu

google with this keyword "5 wire bipolar stepper MarkT site:forum.arduino.cc"
remove ";wap2" from url, I think SMF make version for search engine.

Msquare

and for the lazy -> http://forum.arduino.cc/index.php?topic=170246.msg1266204#msg1266204

OK, so back to the OP - Full Step Only and a dumb L298N may work. Make any small mistake ....

Southpark

There's another recent thread on this - in brief with care you can cope with 5 wire and bipolar
drive, but you have to be careful.  The insight is that the centre of each winding is common,
but if each winding is energized then the centre will be at V/2 so commoning them isn't a problem.

In fact each winding can either be energized or completely open-circuit, no where inbetween.
Couple of years late here. But I don't understand what is meant by the details above. My understanding is that the centre of the windings is usually connected to a supply voltage, such as 'V' volts. For a 5 wire motor, if the centres of the windings are both at 'V' volts, then how can the centre voltage become V/2 Volts? Thanks!

MarkT

If you treat a 5-wire motor as bipolar but always energize both coils, the centre of each coil must be at
V/2 whichever way round you energize it.  This is not the normal way of driving bipolar motors though.

Of course to treat a 5-wire as bipolar you have to identify the phases correctly.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Southpark

If you treat a 5-wire motor as bipolar but always energize both coils, the centre of each coil must be at
V/2 whichever way round you energize it.  This is not the normal way of driving bipolar motors though.

Of course to treat a 5-wire as bipolar you have to identify the phases correctly.
Hi MarkT! Thanks for your help and explanation. Just to make sure I got the correct understanding - do you mean that supply voltage of 'V/2' volts needs to be applied to the centre of each coil?

I was thinking that supply voltage applied to the centre was typically 'V' volts (rather than V/2), so was confused about the reason for V/2. Is using V/2 related to maximum power handling requirements of the coils?

Thanks MarkT.

 

jremington

#10
Feb 08, 2016, 01:33 am Last Edit: Feb 08, 2016, 01:40 am by jremington
Quote
do you mean that supply voltage of 'V/2' volts needs to be applied to the centre of each coil?
No. If you apply "V" to one end of the coil and ground the other end, the center tap is at potential V/2. It also doesn't matter which end is at "V".

5-wire steppers work fine with bipolar motor drivers, but use full step mode only.

Southpark

#11
Feb 08, 2016, 08:10 am Last Edit: Feb 08, 2016, 08:20 am by Southpark
No. If you apply "V" to one end of the coil and ground the other end, the center tap is at potential V/2. It also doesn't matter which end is at "V".

5-wire steppers work fine with bipolar motor drivers, but use full step mode only.
Thanks for your help JRem. I see what you mean there. My error was due to thinking that the 5-wire motor was meant to be wired with both centres connected to a supply voltage V. But now I realise that (if we want to use a bipolar drivers like a L298N), then we connect the supply voltage to a coil end (and not to a coil centre).

So it appears that the 5-wire stepper is really going to be used as a 4-wire (with the common centre-tap wire unused), right?

Thanks again. Much appreciated!

MarkT

Yes, but it requires non-standard drive mode - so no-one does it.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Southpark

Yes, but it requires non-standard drive mode - so no-one does it.
Hi MarkT, I was assuming that you meant that a 5-wire stepper motor (meant for uni-polar operation) can become a 4-wire stepper motor to give bipolar operation. And since it becomes a bipolar motor, then it can be driven using an H-bridge, right? I was thinking that using an H-bridge for driving a bipolar stepper motor is 'standard' or typical.


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy