1
\$\begingroup\$

I have an rather complex circuit with button micro-switch in the middle (actually, it's RF remote control with 3 buttons).

I would like to be able to simulate the micro-switch click on it with one of the pins from my micro-controller.

To do so, I decided to install transistor in parallel manner. The problem is, micro-switch is neither the last nor the first element in circuit. And as I recall transistor needs to be connected to ground (NPN) and not just "somewhere in the middle".

My non-modified circuit with switch in the middle, between two LEDs (they are there just to make a concept of some "black box" before and after the micro-switch): enter image description here

When I add an NPN transistor and tries to simulate the switch with it, the current is different: enter image description here enter image description here

If remove the part of the circuit that is "behind" switch (to GND), it works as switch simulator just fine: enter image description here enter image description here

What should I do in such case, when the circuit is already built, and I want to simulate switch "click" without moving the switch from it's place?

\$\endgroup\$
2
\$\begingroup\$

It's ok to use an NPN in the 'middle' of the circuit. If you were to use mosfets, there could be problems with Vgs if used in the 'middle', the gate needs to be higher than the source or the mosfet will not turn on.

An NPN transistor will function like a mechanical switch, but will have a voltage drop across it similar to a diode. The NPN transistor most likely needs more current, with the 1k current limiter resistor, it would be wise to either lower the resistance or increase the voltage from 1.1V to 5V so the transistor can be fully on.

\$\endgroup\$
  • \$\begingroup\$ The problem is, as I reduced the resistor from 1K to just about 100, the current went up just from 486μA to about 500μA on simulation - so it's still nowhere near 20mA (and if the transistor is "directly" connected to ground, it gives almost the same current as switch). Am I doing something wrong here? \$\endgroup\$ – PolGraphic Apr 15 at 18:14
  • 1
    \$\begingroup\$ 1.1V is not enough to bias NPN Vbe=0.6+ 2V LED on emitter. So a middle NPN will not work. It must be a PNP with Base Vb going to V+ and 0V thru an NPN switch to 0V \$\endgroup\$ – Sunnyskyguy EE75 Apr 15 at 18:31
  • \$\begingroup\$ @SunnyskyguyEE75 What if we upped the 1.1V to 5V? \$\endgroup\$ – laptop2d Apr 15 at 18:32
  • \$\begingroup\$ @laptop2d I think I should not up the 1.1V to 5V as it's just an "steering" signal from D2 of microprocessor, which I believe is kind of constant here? \$\endgroup\$ – PolGraphic Apr 15 at 18:35
  • \$\begingroup\$ @SunnyskyguyEE75 So, once I have NPN on the "end", it's capable of working as switch. But when I use it in middle it's not? Could you explain in more detail the PNP with base vb? I have problem following as I'm not experienced with transistors. \$\endgroup\$ – PolGraphic Apr 15 at 18:37
1
\$\begingroup\$

Use a 50mA PNP with proper bias or consider a LOW side NPN switch on Cathode of LED. with 5mA base current. at 1.1V in order to drive 50mA or so. (below)

schematic

simulate this circuit – Schematic created using CircuitLab

This is a level shifting NPN-PNP pair switch assuming a CMOS 1.1V driver

Here I assumed that the base voltage was 3V and when closed the collector current is 20mA , but if lower than 3V then a small base resistor is used so that Ic/Ib=20 to 10 for each Q1, Q2 when Vce=Vce(sat)

\$\endgroup\$
  • \$\begingroup\$ I am not sure I understand correctly. My problem is that loads are both "before" and "after" my switch/transistor. I want to plug it in place where the switch is, not at the begin/end (+ / GND) of circuit, if it's possible? \$\endgroup\$ – PolGraphic Apr 15 at 18:20
  • \$\begingroup\$ IF you only have 1.1V drive voltage then you may need a FET logic level shifter to drive a series logic level FET switch or similar BJT NPN to PNP switch to pull up rather than down. \$\endgroup\$ – Sunnyskyguy EE75 Apr 15 at 18:29
  • \$\begingroup\$ So when I have something "after" transistor it's not possible to use it as if there's just GND "after"? Because when it's just GND, I can use 0 - 1.1V to enable/disable circuit of much higher voltages with it (e.g. 12V). But once it's even small diode and resistor "after" transistor/switch on the way to GND, I am no longer able to on/off the circuit with even close to current that I get with micro-switch. \$\endgroup\$ – PolGraphic Apr 15 at 18:32

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.