5
\$\begingroup\$

I am currently working on a project that involves an arduino mega 2560, one 74154 demux and 16 stepper motors. I want to be able to control which stepper motor turns at a given time. For this, the 74154 "tells" which stepper motor to turn when I throw LOW or HIGH from the arduino to the demux.

The stepper motors I have are rated for 5V and are driven by ULN2003AN driver boards that came with the package. The steppers should turn for about 6-7 seconds (completing one revolution). I want to have a separate 5V supply for my steppers and for this purpose, I am planning to put transistors to act as switches that will only turn on when an output from the demux is given.

Since the 74154 has ACTIVE LOW outputs, I think using PNP transistors would be a good idea (if my understanding of PNP transistors is correct) given that PNPs "turn on" with a negative base voltage.

Regarding the 74154, when I feed 0000 to the demux's ABCD input pins and 00 to both G1 and G2, Y0 produces an ACTIVE LOW output (while all output pins are ACTIVE HIGH), correct? Does this mean that, that ouput pin is producing 0V to the base terminal of the first transistor, and not any voltage at all? I should need any voltage lower than my 5V supply in turning on the transistor and allowing current to flow from the emitter to collector to the VCC pin of the first ULN2003A driver board and turning the first stepper motor. Is my understanding correct, or perhaps not? If I am wrong, can anyone enlighten me on this? :)

Also, I still have a dilemma about using TIP125 (a PNP transistor), if it is the best PNP transistor to use, and the values of my base resistor and whether I should put a resistor before connecting to my load, or not.

Any opinions and answers are truly appreciated! Thank you. ^^

Edit: This is the schematic I drew, hehe. enter image description here

\$\endgroup\$
14
  • \$\begingroup\$ Any BJT needs a base signal to turn it on period. Think again! \$\endgroup\$
    – Andy aka
    Commented Jan 7, 2017 at 11:50
  • \$\begingroup\$ With that, you mean when the 74154 outputs an ACTIVE LOW on one of its pin, it solidly outputs 0V and no voltage at like, say, 2.5V at that? ^^; I'm new to thesw things an am appreciating your help. \$\endgroup\$
    – Rain Han.
    Commented Jan 7, 2017 at 11:53
  • \$\begingroup\$ if the biasing allows the flow of current from emitter to base, PNP will turn on. Draw or share schematics link. one picture says 1000 words. share the link of the image in comments or question and somebody will update the question on behalf. \$\endgroup\$
    – User323693
    Commented Jan 7, 2017 at 12:15
  • 1
    \$\begingroup\$ TTL 75154 has Vout high of about 3.5V with Vcc at 5V so you'd need to design your PNPs to not operate at this level. The CMOS 74HC154 has higher Vout no load but drops if loaded. As your PNP bases are a pullup this should be OK. || Connect PNP emitter to +5V, base to HC154 outputs with say 1K resistors, collectors to stepper. You will need to drive stepper wity correct stepping sequence. TIP125 is darlington and "OK" but olde tech. A P Channel MOSFET needs zero current drive and is a better match. Rating depends on stepper current needed. \$\endgroup\$
    – Russell McMahon
    Commented Jan 7, 2017 at 13:01
  • \$\begingroup\$ Hello, sir @Umar. ^^ I'm having trouble uploading the picture of the schematic I drew but I'll keep trying. :) \$\endgroup\$
    – Rain Han.
    Commented Jan 7, 2017 at 14:54

3 Answers 3

1
\$\begingroup\$

Prinzipal your selection with 74154 is a bad chip, because you can never switch off all outputs and more bad this solution makes you not free to use every Stepper separate. Better you use the SPI serial bus of the MCU and connect it to 2x 74HC595. Reset the #OE Pin 13 75HC595 Connect follow Pins to the chips:

1) MOSI from MCU to SER(pin14, first 74HC595)

2) QH from first '595 to SER second '595

3) SPI_CLK from MCU to both '595 at pins SRCLK(11)

4) SPI_CS from MCU to both '595 at pin RCLK(12)

5) #SRCLR pins connect over 47k resistor to VCC

6) Than you can connect all outputs to 4x Resistor array 4x47k to VCC

7) connect all outputs to ULN-Chips.

\$\endgroup\$
1
\$\begingroup\$

I know it's a bit late, but the PBSS5320T,215 pnp super beta transistor has a min HFE of 200 at 1A and it's a 20V part. It would only need 5ma of drive for a full 1A drive.

\$\endgroup\$
0
\$\begingroup\$

In principle, your circuit might work, and in principle it might not. Depends on which principle gets you into trouble.

First, the circuit as you have drawn it can, indeed, work. Using a PNP in this manner is perfectly acceptable, and with 5-volt stepper supplies there is no obvious problem with 74154 output levels. A flyback diode across each PNP would be a good idea, though, to protect the transistor from switching transients.

However, there is no guarantee that your circuit will actually work, since you have not specified the current drawn by your steppers. The ULN2003 is only rated for 500 mA/output, so a 4-phase unipolar stepper might draw as much as 1 amp and still be within driver ratings. Let's take this as being the case.

You need to understand that, for your application, transistors cannot be operated assuming large (~100) current gains. In order to turn a transistor hard on (for a voltage drop of <0.5 volts), the transistor is operated in saturation, and this will only occur for gains of about 10 to 20, as a rule of thumb, and I always work with an assumption of 10. If you don't do this, a) the transistor will get hot, perhaps fatally, and b) the voltage to the stepper controller will be reduced, perhaps to the point that the stepper will not operate properly.

So, assuming a gain of 10 in your PNPs, and a maximum current of 1 amp, you'll need to plan for 100 mA of base current. Standard 7400 ICs are only rated for 16 mA with a 0.4 volt output level, and will not provide anywhere near 100 mA on a reliable basis. Of course, if your steppers only draw 100 mA/phase you're in luck, since a load of 200 mA (2 phases active) only needs 20 mA of base current, and that's close enough to 16 mA that you can get away with it, especially if you relax your gain requirements a bit.

If you are trying to drive a higher-current stepper, the obvious approach is to switch from bipolar to MOS for your transistors, although you would need to be careful to use logic-level FETs - ordinary MOSFETs will not switch reliably with TTL levels. Plus, a small pullup resistor at each output to guarantee that Voh limits don't get you in trouble.

Alternatively, you would need to buffer your outputs to provide more base drive, and since you only need to boost your current by a factor of 5 at the most I'd expect that to be pretty trivial, although it would require two stages of buffer to keep your polarity right.

And while I'm at it, I'd recommend that you look carefully at your steppers to make sure that they can be operated properly with a ULN2003. An awful lot of steppers require more current than that chip can provide.

\$\endgroup\$
1
  • \$\begingroup\$ TIP125 are Darlingtons. As per my comment above, base to Vcc resistors allows certainty of transistor drive design BUT it will very likely work without them. \$\endgroup\$
    – Russell McMahon
    Commented Jan 8, 2017 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.