0
\$\begingroup\$

I am using:

  • ATtiny10 w/ 10Ohm Resistor in series to drive Base of transistor
  • Transistor is ZTX688B
  • Vcc is 5V and 3A source
  • Load is a Raspberry Pi connected to Collector

schematic

simulate this circuit – Schematic created using CircuitLab

The ATtiny is programmed to turn on the Base for 10 seconds and then turn it off for 5 seconds. When I run the circuit it turns on briefly but only manages to 100-200mA (not enough to fully turn on the Pi. How can I make this work? The transistor is rated to handle 3A and up to 12V.

NOTE: I am also open to suggestions of replacing parts. I just need to control the Pis power supply with a MCU.

\$\endgroup\$
15
  • \$\begingroup\$ Where did you get the ZTX688B from? \$\endgroup\$ May 3, 2019 at 18:57
  • \$\begingroup\$ It is from Mouser. I added a hyperlink to the datasheet \$\endgroup\$
    – SChand
    May 3, 2019 at 19:03
  • 1
    \$\begingroup\$ Are you sure PB0 is set to be a push-pull output? That's a plausible current from the pullup resistor given the very high hFE of that part. \$\endgroup\$ May 3, 2019 at 19:16
  • 2
    \$\begingroup\$ @SChand I'm just worried that you plan to use a part with the expectation that it can handle \$3\:\text{A}\$, continuously, when the specifications specifically say that the testing is done with a duty cycle of 2% (you want 100%, I think) and for a very short pulse width. Not to mention that they brag about a high \$\beta\$ but you can't use that value for considering the base current you will need. That TO-92 cannot handle much continuous dissipation. I am not sure you realize the implications. But maybe I don't know your use well. So it could go either way. I am just worried. \$\endgroup\$
    – jonk
    May 3, 2019 at 22:09
  • 1
    \$\begingroup\$ @SChand NFETs are recommended largely because the current you want is a kind of sweet spot for NFETs. At those currents, a BJT needs a lot of recombination current to act as a switch. You can do that with a couple of BJTs and some resistors. But usually people prefer to just go with the NFET. Me? NFETs are >10X the cost of the BJTs I buy (often 100X.) And I have a lot more of them floating around here. So I usually make the BJT work, anyway. But you may want to consider an NFET for this (trivial to use, so it's not even worth writing about it.) If you want a BJT design, I'll offer one. \$\endgroup\$
    – jonk
    May 3, 2019 at 22:30

1 Answer 1

3
\$\begingroup\$

From your schematic, the current flowing from PB0 to T1's base-emitter junction is \$I_B = (5V - 0.6V) / 10\Omega = 440mA\$, which is extremely high for a MCU-pin's drive capability. Thus PB0 may limit the output (I'm not sure, but I hope).

To saturate the transistor, a base current of \$I_{Bs} = \frac{I_C}{ (\beta_{min}/10)}\$ is sufficient (I cannot prove this, but this comes from my experiences). From your circuit, this base current is 3000mA / (400/10) = 75mA, which is still extremely high for MCU's port/pin.

The most efficient way is to use an N-Channel MOSFET (with logic-level gate) instead.

\$\endgroup\$
6
  • \$\begingroup\$ +1 for MOSFET better here. Lots of info around like bildr.org/2012/03/rfp30n06le-arduino. \$\endgroup\$
    – bigjosh
    May 3, 2019 at 19:16
  • \$\begingroup\$ "... 440mA , which is extremely high for a MCU-pin's drive capability." - It's definitely outside the attiny10's absolute maximum rating of 40mA. Although attiny I/O pins are in my experience relatively forgiving for such abuse, it's not impossible he killed the pin. \$\endgroup\$
    – marcelm
    May 3, 2019 at 20:03
  • \$\begingroup\$ Even if the micro could supply that much, it would have to come from the micro's power supply, which may not be sufficient. The OP needs a Darlington pair, a super beta transistor, or a logic-level FET designed for the operating voltage of the microprocessor. \$\endgroup\$
    – TimWescott
    May 3, 2019 at 20:22
  • \$\begingroup\$ Would I be able to use a 2nd Transistor driven by the ATtiny PB0 to provide the adequate current for the B gate? I hope that makes sense \$\endgroup\$
    – SChand
    May 3, 2019 at 21:25
  • \$\begingroup\$ @SChand I would never use BJTs for switching such high currents. Why not use a MOSFET instead? For example, 2N7000 can be a direct replacement to ZTX688B. It's a very common, easy to find and cheap MOSFET. \$\endgroup\$ May 5, 2019 at 19:06

Your Answer

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

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