0
\$\begingroup\$

I'm trying to use the output of the following transistor circuit as an input for XOR gate. It doesn't seem to work, I'm out of ideas. Any help would be appreciated.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Can you give a truth table of how you want it to behave. \$\endgroup\$ – winny Nov 4 '17 at 11:04
  • \$\begingroup\$ As a regular XOR gate but it's inputs are transistors instead of batteries or switches. \$\endgroup\$ – Okita Sougo Nov 4 '17 at 11:07
  • \$\begingroup\$ Where does the e-c current for the transistor come from? \$\endgroup\$ – RoyC Nov 4 '17 at 11:07
  • \$\begingroup\$ What I'm trying to do is making water level indicator by using logic gates and transistors (XOR gates). Using transistor to sense the level of water by having its base terminal submerged in water alone with the positive terminal of Vcc and when water reaches the desired level the transistor becomes on and make the gate's input high and using gate's output to light an LED. I plan using 3 levels and using XOR gates to do the math and light the correct LED. \$\endgroup\$ – Okita Sougo Nov 4 '17 at 11:29
  • \$\begingroup\$ The question fails to define the analog input spec for detection ( dielectric or leakage of water? ) leakage is a poor method for water and the proposed use of Q is a poor solution for water detection. Further the use of an XOR gate has properties with no given expectations or requirements. It can be an invertor or not. You need to define the truth table to define your design. This is mainly an anlog to digital conversion with comparators with suitable sensing. ( like capacitance or attenuation at some f) \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Nov 4 '17 at 11:45
1
\$\begingroup\$

It would be interesting if you set up a pull-up resistor in the transistor collector, that would make your circuit work properly.

What happens in your circuit is that the transistor collector is floating, so you´ll have problems to work the XOR gate.

\$\endgroup\$
2
\$\begingroup\$
  • You have the lower input of your XOR gate tied to ground so it will never switch. (You probably are aware of this.)

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Correct application of the pull-up resistor.

  • Your notion of how to wire a pull-up resistor is incorrect. Figure 1 shows the correct method. When Q1 is off R1 pulls the input high. When Q1 is on it pulls the input low.
  • R1's value is unnecessarily low. 50 mA will flow when Q1 is on. 10k would be fine.
  • R3 is low too. Most logic chips won't supply more than a few mA.

Response to comment:

I want the circuit to work the other way, when transistor is on logic gate's input becomes high.

schematic

simulate this circuit

Figure 2. To eliminate the inversion caused by Q1 just eliminate it. R4 is required to pull the input low when the switch opens.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the clarification. I want the circuit to work the other way, when transistor is on logic gate's input becomes high. Should i use inverter before the wire connecting the collector to the logic input to achieve that ? \$\endgroup\$ – Okita Sougo Nov 4 '17 at 11:21
  • \$\begingroup\$ See the update. \$\endgroup\$ – Transistor Nov 4 '17 at 11:30
  • \$\begingroup\$ I forgot the pull-down resistor on the input. R4 added to Figure 2. \$\endgroup\$ – Transistor Nov 4 '17 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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