Issue in basic transistor circuit

Thread Starter

Vindhyachal Takniki

Joined Nov 3, 2014
585
I have three input levels: 0V, 2.5V & 5V.
Output I need is:
A). 5V or 0V input, then output 0V
B). 2.5V input, then output is 5V


Need to made this circuit by using low cost transistors only. I tried making below circuit, but seems like transistor as buffer is not working. Can someone suggest correct method with lowest transistor count


1617266652989.png
 

Thread Starter

Vindhyachal Takniki

Joined Nov 3, 2014
585
@BobTPH thanks I tried simulating in multisim and its working.
Next is to add one more input and get output like this:
I tried simulating by : Inverter+NOR+AND gate (5 transistors) and its working. Is there any way we can reduce number of transistors or use some digital gate IC/comparator for ease of operation and keeping low component count also.



Input1Input2Output
0V0V0V
2.5V0V0V
5V0V0V
0V5V0V
2.5V5V5V
5V5V0V
 

BobTPH

Joined Jun 5, 2013
3,655
If you can use digital logic, it is trivial. Just make sure you use inputs that are well defined at 2.5V. Not sure what logic family will do that.

Bob
 

Thread Starter

Vindhyachal Takniki

Joined Nov 3, 2014
585
@sghioto thanks for circuit. But issue with LM393 is that it has Vcmr = 0V to (Vsupply - 2.0V)
So I dont think we can apply these voltages at inout pins of comparator?

Edit: Max Vcc in system is +5V only.

1617443740748.png
 
Last edited:

sghioto

Joined Dec 31, 2017
2,394
Not really. The outputs are either on or off assuming the input voltages you specified are correct.
I didn't just post the circuit I tested it as well.
 

BobTPH

Joined Jun 5, 2013
3,655
The way you described the circuit, of couse it cannot work in the real world. The input voltages will never be exactly 0, 2.5, or 5V. You have not defined what happens if they are not those exact voltages.

A specification that can work would have to supply ranges for each of the voltages, and would have to include regions where the output is undefined.

Bob
 

peterdeco

Joined Oct 8, 2019
391
Agreed Bob. In the case of the PIC, a byte variable of 256 steps for the ADC reading comes out to about .02V/step. So to check for 2.5V very closely, it would yield an ADC reading of about 128. I would code it to look for a reading between about 100 and 140 to compensate for changes in supply voltage and component tolerances.
 
Top