1

I have an element represented by the two resistors in between NODE1 and NODE2.

I want to be able to open and close the circuit before and after the element, just like having two switches before and after it.

At the moment I have this schematic. (The 5 V sources with switches are supposed to represent an Arduino):

schematic

simulate this circuit – Schematic created using CircuitLab

My thought is that when SW1 is closed transistor Q3 allows the current to go through the transistor and to the base of Q1. Q1 is a PNP transistor and this would mean that when SW1 is closed, there is no current going to NODE1, just like having an open switch.

The second switch is much easier since it is after the element and I can use a simple NPN transistor to open/close it.

When I open SW1 and close SW2, I get a voltage of 11.98 V at NODE1 and almost 0 V at NODE2 which is what I am expecting.

However, nothing changes when I close SW1.

Is my schematic flawed and if so, how can I fix it to achieve my goal?

Update: Here is the updated schematic that now works.

schematic

simulate this circuit

2 Answers2

5

Q1's base is always connected to 0V. When Q3 is turned on, it lets some extra current through R6 but doesn't affect Q1's base.

Instead of connecting Q1's base to Q3's emitter (bottom side), connect it to Q3's collector (top side). Also, put a resistor in series with Q1's base.

user253751
  • 11,998
  • 2
  • 21
  • 37
  • Yeah this works! Do you happen to know if there is an easier way to do this without needing 3 transistors? – Maxence Lapatrie Mar 25 '23 at 02:11
  • @MaxenceLapatrie what's the reason you need to disconnect both sides of the unspecified circuit element? – user253751 Mar 25 '23 at 02:12
  • I am building an ESC for a brushless motor. I have three cables A, B, C and need to be able connect each cable to either positive, ground or nothing. It's a bit hard to explain like this but here is a link with a simple diagram that explains what I'm trying to do a bit better. https://howtomechatronics.com/wp-content/uploads/2019/02/Brushless-motor-star-connection.png The diagram I have drawn represents the image without the switches that are not used. – Maxence Lapatrie Mar 25 '23 at 02:20
  • 1
    @MaxenceLapatrie you are making the well-known "H-bridge" circuit (but with 3 phases, does that make it an ┠H-bridge?). The overall idea you have is fine but you will find that most H-bridges are built to make the transistors switch as quickly as possible which your circuit does not do. [In someone else's experiment](https://electronics.stackexchange.com/questions/387044/npn-transistor-slow-to-turn-off-even-when-operated-outside-of-saturation-region) they had their transistors lingering on for many microseconds after being commanded to turn off, and that matters for this purpose. – user253751 Mar 25 '23 at 02:46
  • 1
    the other main thing to be aware of with H-bridges that if you ever have both transistors on at the same time for the same cable, they will be trying to short-circuit the power supply and one or both will probably burn out. This includes the time they linger on after you said to turn off! – user253751 Mar 25 '23 at 02:50
  • 1
    @MaxenceLapatrie To simplify it further, you can get rid of one of the switches and Q3 so the remaining switch controls both Q1 and Q2 at the same time. But I would heed the warnings above about using such a simple discrete BJT circuit for what you're trying to do. Usually special driver ICs and MOSFETs are used for this kind of stuff. – Ste Kulov Mar 25 '23 at 06:45
  • 1
    The circuit is just fine for making something high or low or neither. The problem is that in an ESC you want to do it hundreds of thousands of times per second and with high amounts of current going through, and that means paying attention to all the details. Ideally you just buy a few chips from someone who already worked it out. – user253751 Mar 25 '23 at 07:04
2

Problem number one, as already mentioned the the e-b of Q1 has 12V across it.

It looks to me like the base of Q2 really should go to the collector of Q3. Then, when sw1 and sw2 are closed (or the arduino pins are both high) current flows, and when they are both open (or the pins are low) the resistors are isolated, and essentially connected to nothing.

Doug Crowe
  • 292
  • 4