Trying to mess with an existing circuit to drive a stepper motor. I've got 4 "control" inputs (Take them to ground to turn them on) and 4 motor phases, plus the motor common.
This is an existing circuit that I'm trying to "subvert" to my own nefarious purposes - it resides on a PC board that also handles (Well, handled...) PWM speed control and reversing for a "regular" DC motor, so redesigning the entire circuit is out. I need to "diddle" what I've got to make it work without the rest of the hardware it used to be a part of
- Should be easy enough, as it's a modular board - low voltage power, plus TTL-level control inputs to one side, "high voltage" power and motor outputs to the other, presto, everybody's happy, right? NOT!!!
Control inputs A through B are each wired like so:
Each control input: (four total, sharing +5VDC and +12VDC lines, but otherwise operating independently of each other)
Logic side "High voltage" side
Control X R 4N26 +12VDC o--------1K------, ,-------------------o | | _ B | C LED ^ ==> |< NPN Phototransistor (Base = N/C) | | E
+5VDC | | o----------------' `--------------------o Output X (To A, B, C, or D, below)On the "high voltage" side, I have the following: (If it makes any important difference, the stepper phases are all 7200 ohm loads, in a motor nameplated for 12VDC.)
C ,------------o Stepper Phase A R B | A o-+--410--------+---|< 2N6387 (NPN Darlington) | | | | | R | `--22K--------+-----' E | | | C | ,------------o Stepper Phase B R _' B | B o-+--410------(-----|< 2N6387 | `, | | | | | R | | `--22K--------+-----' E | | | C | ,------------o Stepper Phase C R _' B | C o-+--410------(-----|< 2N6387 | `, | | | | | R | | `--22K--------+-----' E | | | C | ,------------o Stepper Phase D R _' B | D o-+--410------(-----|< 2N6387 | `, | | | | | R | | `--22K--------+-----' E | | | `-------------------o YouNameIt
Note: "YouNameIt" is named as such because I don't have the first idea what I ought to be calling it... It *LOOKS* like it *SHOULD* be a "ground", but read on...
"A", "B", "C," and "D" are connected to one "Output X" from the inputs.
Everything on the "logic" side is doing what it should be doing - Pulling any of the control lines to a logic 0 results in the correct
2N6387 base pin "going hot", with the other base pins remaining "cold". Let the input go to logic 1 or Z (the "Control" inputs were originally driven by a 74LS374 octal three-state D latch), and the base pin of the corresponding Darlington "goes cold", as well as the other ones remaining cold - Exactly as expected so far.I run into trouble when I try to put power to the beast and actually drive the motor.
If my understanding of transistors is anything like correct, I need
+12VDC at the collectors of the Darlingtons - Which implies that "YouNameIt" needs to be plugged into my 12 volt supply's ground, the two "common" wires from the stepper need to be connected to the "hot" side of the 12 volt supply, a jumper needs to go from there to the rail feeding the collectors of the 4N26s, and the individual phase wires from the motor need to be connected to the correct "Stepper Phase" pins (The collectors of the 4 Darlingtons).From that state, taking any of the "control" lines to ground should make the Darlington connected to that control line turn on, letting 12 volts flow through the load - Shouldn't it?
So, substituting my meter for the motor coils, I give it a whirl - Connect the power supply ground to "YouNameIt", connect the meter's "+" probe to the power supply's +12VDC (meter actually reads it as being
12.63 volts - close enough...) line, connect the +12VDC line to the rail feeding the collectors of the 4N26's phototransistors, give the 4N26s a +5VDC source, and connect the meter's "-" probe to one of the "Stepper Phase" lines. Sounds and looks reasonable, no?Do it, leaving *ALL* "Control" lines N/C.
Meter reads less than 1/4 volt, regardless of which "Stepper Phase" line the "-" probe is on. So far, so good - I've got four "turned off" switches, just like I figured.
Now ground the "Control A" line to turn on the "A" 4N26, which should make the "A" Darlington turn on, which should in turn make the meter read +12VDC (Give or take junction drop)
Do it. Meter reads +12.2-something volts. So far, so good!
Disconnect the ground wire from "Control A". Meter drops back to less than 1/4 volt. Still working as planned...
Reconnect the ground wire to "Control A" to get the meter reading
+12.2-something volts again.Now, *WITHOUT CHANGING ANYTHING ELSE*, move the "-" probe of the meter from Stepper Phase A to Stepper Phase B - Meter should go back to reading less than 1/4 volt, right?
Do it.
Meter reads +12.2-something volts.
HUH?!?!? That doesn't seem right...
Move "-" probe to Stepper Phase C
Meter reads +12.2-something volts.
WHAT THE ???
Move "-" probe to Stepper Phase D - Meter reads +12.2-something volts!
OK, something's severely screwy...
Leave the meter "-" probe on Stepper Phase D, and while watching the reading, disconnect the ground wire from "Control A". Meter reading drops to under a quarter volt. Reconnect the ground to Control A - Meter reading returns to 12.2-something volts.
Repeat (and observe exactly the same things) for Control B, Control C, and Control D: When each "Control" line is grounded, the meter reads
+12VDC on *ALL* "Stepper Phase" lines. When no "Control" line is grounded, all "Stepper Phase" lines show the 1/4-ish volt reading.Scratch head.
Pull power supply and meter off of "YouNameIt", set up to probe the base of each of the Darlingtons. All is as expected - When a "Control" line gets grounded, the corresponding Darlington's base jumps to +12VDC, while the other three stay at 0 (or close enough).
Scratch head some more.
Realize I'm in over my head, and build this message in hopes that somebody can tell me where, how, and why I'm screwing the pooch, and how to get things working *PROPERLY*.
Anybody?