Pages: [1]   Go Down
Author Topic: arduino step motor example, wiring: L293 vs. L298  (Read 2776 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a question about the wiring example "Circuit for Bipolar Stepper Motor" - http://arduino.cc/en/Reference/StepperBipolarCircuit

How can an L298 L293 drive a bipolar motor? I ask because to my understanding, it cannot reverse currents, so it can only do unipolar control - which is not useful for a 4-wired stepper. You need an L293 L298 (or similar) for bipolar output. Which sucks, because the 293 298 is clumsy, expensive, and needs external diodes.

What am I missing here?
« Last Edit: August 06, 2009, 05:18:46 pm by edinfoel » Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The L293 is quite capable of reversing currents and therefore driving a bipolar stepper motor. For example, if the 1IN input is high in the wiring example you reference, then 1OUT is high. Since 1IN is high it turns on the transistor on the left side of the circuit which makes 2IN low, so 2OUT will be low.

1IN high + 2OUT low ==> current flows in one direction

Similarly, if 1IN is low, 2IN will be high:

1IN low + 2OUT high ==> current flows in the other direction
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, it works like a charm. Even better, if you control EN1,2 and EN3,4 (Pins 1 and 9) you can do halfstepping with four control wires (three if you build extra logic which I didn't).
Logged

Darlington, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Shaamo
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Apologies for dragging this thread out of hte grave, however seemed the most pertinent thread out of the ones I've found.

In terms of wiring the 5v supplies can the 4 be wired to the same 5volt source?



I'm waiting on a couple of components, and the stepper I have is 5volt, so I assume that they can all come off the 5 Volt source on the board?

Also, in terms of running steppers, how many feasibly can be run off one Arduino before processing becomes too much.  the inputs share common earth, so each one has one input

Cheers, and apologies for the newbie question, it's my first foray into stepper motors smiley-grin
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 5 volts are needed for control lines, they draw no current worth talking about (the 1k base resistors should be replaced by slightly higher values BTW). The both NPN transistors work as inverters, this can also be accomplished differently. The enable inputs are just enable inputs...

The number of (stepper) motors you can control from an Arduino depends on your skill of organizing the program....
« Last Edit: September 05, 2010, 06:42:54 am by mpeuser » Logged

Darlington, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Shaamo
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool, so connect those four together on the same source.  That's one sorted.

When you say increase the value of the base, by how much and what does that do?  I'm guessing it makes it less sensitive and jittery?

And so far as "skill of the programme" I'm still starting out with Arduino after a long stint off doing not so techie things... kids, life, wife (although not in that order)
« Last Edit: September 05, 2010, 09:34:43 am by Funky_Diver » Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
..increase the value of the base [ resistor ]
This is not really important. With 1k there will be a waste of 4mA with each transistor. As there is no load at the collector 1/10th should be enough. So I should recommend something between 4k7 and 10k.

Thos resistors form a lowpass in connection with the base-emmitter capacitance, reducing the steepness of the switch signal. The steeper the signal, the less current is wasted in the transistor during the switch.

But I expect the H-bridge to have Schmitt trigger inputs anyway...

So ... this is not really important, and just said to increase the overall awareness for electrical matters in this forum :-)
« Last Edit: September 05, 2010, 10:14:51 am by mpeuser » Logged

Pages: [1]   Go Up
Jump to: