1

What is the transistor circuit which acts as a SPST switch given: 1) +24vdc, 2) ground, 3) a "floating" pin that the switch takes to ground when triggered (there is no "load")? I can use either +24vdc, ground, or the closing of a dry contact as a trigger -- whichever is simplest to implement the transistor switch described.

toolic
  • 5,637
  • 5
  • 20
  • 33
CuriousOne
  • 31
  • 3
  • you may look here: https://electronics.stackexchange.com/questions/18884/switching-dc-with-mosfet-p-channel-or-n-channel-low-side-load-or-high-side-loa – Jens Jun 18 '22 at 21:11
  • Jens -- Thank you, but I am not dealing with high voltages; don't need MOSFETs. Any utility PNP or NPN transistor will do ... I just don't know the circuit and the resistors needed on emitter or collector given VCC +24vdc, and resistor for base to make transister pull the floating pin to ground when triggered. I can use a SPST relay, but that is "stupid" for what I need -- a transistor and and couple of resistors will do the josb, if I knew the values and how to connect them. Thanks. – CuriousOne Jun 18 '22 at 21:53
  • research `open collector output` – jsotola Jun 19 '22 at 01:05

3 Answers3

0

Example for NPN with emitter connected to GND and the load in the collector path:

  1. Define the expected load current and voltage, here e.g. 100 mA and 24V
  2. Find a transistor, that can operate with a continous collector current of at least a bit more, and that can sustain the supply voltage + margin, here we take 2N3904TA, limits are 200 mA and 40 V
  3. Now we take the minimum DC current gain (hFE) of that transistor, the datasheet says 30 at 100mA. Because we want to be on the safe side and the value may be lower, we calculate with 25 here.
  4. To calculate the needed base current, we divide the collector current by the gain, here 100 mA / 25 = 4 mA
  5. To calculate the base resistor we must know, what voltage is used as source for the base current, here we take 5 V. The basis-emitter junction will subtract about 0.6 V from this.
  6. Rb = (5V - 0.6V) / 4 mA = 1.1 kohm will turn on this transistor
  7. Sometimes there is a second resistor between basis and emitter, either to force the transistor off if the other resistor is unconnected, or to speed up the switching frequency. But this is worth another question.
  8. We calculate the heat in the transistor and decide if cooling is necessary. Vce (sat), the remaining voltage between collector and emitter in conducting state is tpypically 0.5V, but for safety we take 1V. P = 1V * 0.1A = 100 mW. The thermal resistance of this case is 200°C/W, so we expect a temperature rise of 20°C. This is no problem for a TO 92 case, no cooling needed here, but it is not a cool design. A MOSFET is much better in this context.

We have calculated 1.1 kohm here, 1 kohm is a good final choice. There is some estimation in here, but I didn't want to overload this.

Jens
  • 5,598
  • 2
  • 7
  • 28
  • Thank you. I am taking a TTL-level floating line to ground . I want to literally "short" the floating line to ground (where the floating line acts as trigger for some TTL logic chips). I cannot connect that line to +24v. Perhaps voltage divider resistors on the collector side, and connect the floating line there? I don't know -- I don't want to "blow" any of the TTL logic with the +24v. I just want to simulate a mechanical momentary switch which now shorts the floating TTL line to ground, and all I have are 1) +24v, 2) ground, and 3) the floating TTL line + trigger to transistor's base. – CuriousOne Jun 19 '22 at 01:24
  • @CuriousOne So your input side is 24V and your output side is 5V, but the calculation method is the same. The load current for standard TTL input is around 1.6 mA, take 10 for the calculation. – Jens Jun 19 '22 at 02:41
  • From what both you and Simon told me, a MOSFET is preferable to a bipolar transistor for this application. So, looking at the 3rd drawing that Simon provided, seems like I might be able to use +24v on IN to trigger the MOSFET to pull OUT low. If I use that circuit, then can I leave IN floating when I want the MOSFET not to conduct? (same question I asked Simon). Thanks much, again. – CuriousOne Jun 19 '22 at 03:59
0

ttflist": [ { "fname": "fonts/ttf/STIXGeneralBolIta.ttf", "name": "STIXGeneral", "style": "italic", "variant": "normal", "weight": "bold", "stretch": "normal", "size": "scalable", "class": "FontEntry

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 19 '22 at 13:22
0

If we call the potential you use to control your switch "IN", and the node to be pulled down "OUT", any of these will do:

schematic

simulate this circuit – Schematic created using CircuitLab

Q1 will connect OUT to ground if IN exceeds about +0.8V. That will be the case regardless of which bipolar transistor you use. Q2 would pull OUT low when IN exceeds about 2V. The MOSFET you choose will decide the actual switching thresholds.

Q2 might not like a control signal "IN" higher than +20V or so (or lower than -20V), depending on your choice of MOSFET. You can "scale" IN down with a resistor divider, if there's a chance that the potential at IN might lie outside of the MOSFET's comfort zone. The bottom version protects Q3's gate using resistors to divide IN by 2. For this reason, Q3 will require IN to be 4V or more to switch on.

Note that there's no need for +24V in any case.

The bipolar junction transistor (BJT) Q1 will not work to "pull up" a negative potential at OUT (OUT must be floating or positive), but the MOSFETs can do that. The MOSFET behaves more like a physical switch than a BJT.

Q1, being bipolar, cannot pull OUT all the way to ground. It can get within 0.2V or so of ground (0.1V if you're lucky), but the MOSFETs will perform much better in this respect.

The top-right implementation is attractively simple, but be aware you may never leave a MOSFET's gate (IN) floating. There must always be a potential explicitly applied there. That means a simple switch from IN to +10V (for example) will not work, because the gate will float when the switch is open. The other two (top-left, bottom) do not have this problem.

If OUT is unloaded, as you suggest is the case, all of these transistors may leak enough current to pull down OUT even when they are "off". They are not perfect on/off switches. Without knowing more about your application, it's not possible to say what measures need to be taken to solve this issue.

Simon Fitch
  • 27,759
  • 2
  • 16
  • 87
  • Thank you! I almost get it. (It's sad to be this dense!) Question: Does your Q3 example warrant the same warning as you gave for Q2, i.e.,, don't leave MOSFET gate floating? Or does R4 hand that, even when IN is open? By the way, the "floating" OUT that I want to pull to ground is a TTL logic circuit signal which does whatever when polled low. I know you said there is no need for +24v, but the only lines available to me are 1) +24v, 2) ground, and 3) the TTL-level floating OUT + a switch to trigger the MOSFET's gate. – CuriousOne Jun 19 '22 at 03:51
  • @CuriousOne Resistor R4 does indeed prevent Q3's gate from ever floating. You may use a switch between IN and +24V, knowing that R4 takes care of the "open" switch state. These circuits work with *any* source of potential difference between ground and IN. If the voltage source you have is +24V with respect to ground, and that's all you have, then you may apply that potential directly to IN (via a switch, if that's your intent) in both Q1 and Q3 implementations. – Simon Fitch Jun 19 '22 at 04:07
  • 1
    Simon, Excellent! Clear. Thank you. – CuriousOne Jun 19 '22 at 04:18