3
$\begingroup$

I want to use a NPN (2n4401) and PNP (2n3906) with both base connected to a single microcontroller output in order to switch voltage to two inputs off and on. I'm not sure how to create the circuit I need. Tried a basic switching circuit without getting expected results.

Here are additional details: I am using an attiny85 to control the circuit, 0-3.3v at input to base pins of the transistors. I'm switching two lines of an led display (ltd-2601). I want to switch the two lines every `10ms in order to drive the display. So the inputs to the 2601 would be 0v and 3.3v for 10ms and then 3.3v and 0v for 10ms. That's what I hope to accomplish using the npn and pnp transistors together (shared base pin) driven by the single line of the microcontroller. Basically, when the micro-controller line is low the npn output would be 3.3v and the pnp 0v and vice versa when line is high. The goal here is to use only 1 line of the attiny to switch the display rather than two lines.

$\endgroup$
2
  • $\begingroup$ Welcome to engineering SE. Can you share some of circuit configuration you have tried. Can you add a few more details as to what you are trying to achieve, the type of micro controller and voltages. $\endgroup$ Aug 7, 2016 at 19:13
  • $\begingroup$ Thank you for updating the question. I have little bit better understanding of what you are trying achieve. I have added example drive circuitry. Are you trying to drive pin 6 and pin 9 of the LTD-2601. $\endgroup$ Aug 8, 2016 at 3:34

3 Answers 3

1
$\begingroup$

Either transistor inverts when used in the common emitter configuration. This is how they are used if you feed the base from a digital output (via a resistor), and the emitter is grounded in the NPN case, or tied to the supply in the PNP case. The difference is which direction they will actively drive. They each go to high impedance in the other direction.

If you want two digital signals, each the inversion of the other, controlled from a single digital output, then use a inverter chip. Single inverters come in the same SOT-23 package small transistors do. Using a inverter is both simpler and will yield better results. All you need is the inverter chip and it's bypass cap. The transistor solution requires at least a transistor and a resistor, so at best takes the same space.

$\endgroup$
1
  • 1
    $\begingroup$ The inverter chip sounds better. What would you suggest ? thanks $\endgroup$
    – ricg
    Aug 9, 2016 at 3:55
1
$\begingroup$

Here is an example circuit configuration where a TM4C123G (Tiva) is driving a NPN transistor to switch a voltage On and Off. I hope this help you to get started.

Tiva Micro driving NPN transistor

Below are two example circuits for high active and low active.

enter image description here

References:

$\endgroup$
1
  • 1
    $\begingroup$ thanks for your help. i'll give that a try and let you know. $\endgroup$
    – ricg
    Aug 8, 2016 at 17:19
0
$\begingroup$

I am not too sure of there reason behind using the transistors. I am sure there is a good reason, below is a another suggestion. Here below is a quick sketch.

enter image description here.

This will need an additional inverter logic gate IC. I random picked 74HC05

$\endgroup$

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.