Hi!
So I'm doing a small project it is a 4 bits DAC with a R-2R resistor ladder, what I have to do is to control the 4 outputs from the resistor ladder with 4 electronic switchs which are controlled by a microcontroller.
Each switch must have 2 throws, one must be connected to ground, the other throw must be connected to a sum node, and it must have 1 pole so only one throw can be connected at the time.
I'm using a bc327 bjt pnp transistor and a bc547 bjt npn transistor, both of them have its base connected to the same microcontroller bit output, the μC 4 bit sequence its a simple counter (0 to 15), the idea is simple: 4 outputs of the μC will be connected to 4 pairs of pnp and npn transistor.
What I 've done is that when the μC sets a 0 on one output, its respective pnp will be close and its respective npn will be open, also when the μC sets a 1 (5V) on the same output, its respective pnp will be open and its respective npn will be close.
I checked the logic with a pair of transistors, a pair of 100kΩ Rb for both bases , a LED and a 330Ω Re (for the pnp) and another led and 330Ω Rc (for the npn).
So its almost working, I mean that when the μC sets a 0 on the bit output, the led from the pnp transistor is on and the led from the npn transistor is off. When the μC sets a 1 on the bit output, the led from the pnp transistor is weakly on and the led from the npn is completely on.
What it means is that the pnp is not completely open when I put a 5V on its base, I'm supplying the leds with a 6V battery and the idea it's ok for a simple on-off leds, but it's a big problem since the R-2R ladder works currents smaller than 0.5 mA.
Is there a way to make a pnp operate as a completely open switch?
So I'm doing a small project it is a 4 bits DAC with a R-2R resistor ladder, what I have to do is to control the 4 outputs from the resistor ladder with 4 electronic switchs which are controlled by a microcontroller.
Each switch must have 2 throws, one must be connected to ground, the other throw must be connected to a sum node, and it must have 1 pole so only one throw can be connected at the time.
I'm using a bc327 bjt pnp transistor and a bc547 bjt npn transistor, both of them have its base connected to the same microcontroller bit output, the μC 4 bit sequence its a simple counter (0 to 15), the idea is simple: 4 outputs of the μC will be connected to 4 pairs of pnp and npn transistor.
What I 've done is that when the μC sets a 0 on one output, its respective pnp will be close and its respective npn will be open, also when the μC sets a 1 (5V) on the same output, its respective pnp will be open and its respective npn will be close.
I checked the logic with a pair of transistors, a pair of 100kΩ Rb for both bases , a LED and a 330Ω Re (for the pnp) and another led and 330Ω Rc (for the npn).
So its almost working, I mean that when the μC sets a 0 on the bit output, the led from the pnp transistor is on and the led from the npn transistor is off. When the μC sets a 1 on the bit output, the led from the pnp transistor is weakly on and the led from the npn is completely on.
What it means is that the pnp is not completely open when I put a 5V on its base, I'm supplying the leds with a 6V battery and the idea it's ok for a simple on-off leds, but it's a big problem since the R-2R ladder works currents smaller than 0.5 mA.
Is there a way to make a pnp operate as a completely open switch?
Last edited: