How to control the output current in when using a transistor as a switch?

Assuming that I have the following circuit where I use a transistor as a switch:

When the transistor is not active Vout will be equal to the Vcc and the current will become very high right? So if I want to add a combinatorial circuit or any other IC what should I do about that?

edit: The circuit that lead me to this question:

S1 simulates what happens if the IR gate is blocked, and U1 is a quadruple NAND gate IC wired to form a NOT gate. I posted this question because XMM2 is measuring extremely high currents. Is that because the simulator is ignoring the saturation limit of the phototransistor?

• In this circuit: When the transistor is not active Vout will be equal to the Vcc -that is true. the current will become very high -if you mean RLcurrent it is zero. The things changes if you connect something to Vout.
– user208862
Apr 1, 2021 at 8:23
• @MichalPodmanický I'm talking about the case where I have something connected to the output. Apr 1, 2021 at 8:27
• If you connect Led between Vout and 0V in this state, the Led will be ON and current thru Led will be I_led=(Vcc-3)/RL. Considering Vcc=5V and RL=1k the Led current will be 2mA. The voltage on Vout will be 3V now due to Led IV curve.
– user208862
Apr 1, 2021 at 8:37
• The whole transistor can be negleted in this state because of its CE resistance more than 1Mohm.
– user208862
Apr 1, 2021 at 8:55

When the transistor is not active Vout will be equal to the Vcc and the current will become very high right?

No, the current through the transistor and RLwill be zero. (Look at your switch equivalent. Where could the current flow to?)

So if I want to add a combinatorial circuit or any other IC what should I do about that?

Adding a second switch in parallel with the existing one will create OR logic. Switching on either one will power the load, RL. In the transistor circuit that means adding a second Rin and transistor.

• "the current through the transistor and RL will be zero" That's what I thought at first but I simulated it on Multisim and it gave me a crazy high current so I got a little puzzled. Do you know why is that so? Apr 1, 2021 at 8:25
• Then the simulator is wrong:) Apr 1, 2021 at 8:26
• @MissMulan yeah probably, when the transistor is active it measures 500kA through the collector. Apr 1, 2021 at 8:35
• Post a cropped screengrab of your simulator setup. What value have you got for the supply voltage and RL? Apr 1, 2021 at 8:52
• @Transistor I'll edit the question. 5V and 100kOhm Apr 1, 2021 at 8:57