0
\$\begingroup\$

I have a commercial PCB. On it is an IC with a pin that is pulled down to ground by a normally open switch. I want to turn on supply to a load when the switch is closed.

schematic

simulate this circuit – Schematic created using CircuitLab

It's not possible to modify the switch as it is in a sealed unit. I can only tap into the cable between the pin and the switch. The cable between the switch and ground is common to 2 other switches which take their respective pins low when closed.

The pin is high at 5V. Battery is a 3S lipo. The load consumes 560 mA at 12V. The load is a set of LEDs, with some circuitry to regulate power and provide some protection.

I don't have any information about the IC, as it is an unlabeled 8 pin package. I measured 1.2 mA between the pin and ground when the switch is closed. The IC is supplied 5V, regulated from the same 12V source.

I want to attach something between the pin and switch that will turn the supply of power to the load, when the switch is closed and the pin is taken low.

I gather I need a P-Channel enhancement mode MOSFET here. Is this appropriate? If the power supply was a constant 12V, then a Vgss of -7V to -12V would be good, however the supply voltage may dip a few volts when the switch is closed. I'm struggling to measure how low, it might be as low as 6V. What components should be placed around the MOSFET to support and protect it?

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

That won't work. The pin would have to go up to +12 to turn the load fully off, which would more than likely fry whatever is in the black box.

You can do something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Pick a MOSFET with low enough Rds(on) to handle your load with very little dissipation, and that can withstand Vgs of something like +/-20V. If its Rds(on) is specified at 10V that will allow a bit of drop in the 12V bus.

How it works: When the input is high (+5V) Q2 is turned on via base current through R3 (about 430uA). That pulls the base of Q1 down to 100mV or less, sinking the 1.3mA through R2. Q1 then turns off allowing the gate of M1 to be pulled up to +12V through R1 and M1 turns off, turning the load off. The opposite happens when the input is low, Q1 is on and the gate of M1 is pulled down to near ground, so Vsg is almost 12V.

\$\endgroup\$
5
  • \$\begingroup\$ Do you think that adding a 10K load to the switch wire might interfere with the IC function. It's almost certainly got a pullup resistor internally. Adding an external resistor to a transitor base would probably pull the voltage on that pin down unless the pull up resistor on the board was much lower in value than the 10K resistor used. \$\endgroup\$ Feb 14 at 23:20
  • \$\begingroup\$ It might. Generally IC outputs are push-pull but your one might not be. If you are concerned, replace Q2 with a 2N7000 or 2N7002 which presents only a capacitive load. I generally prefer the BJTs because they're a little more resistant to abuse. \$\endgroup\$ Feb 14 at 23:31
  • \$\begingroup\$ That's the thing, you wouldn't use a push pull output to drive a switch used for input. It's got to be a pull up resistor. Getting the current supplied by the IC when the switch wire is shorted to ground through a multi-meter would confirm this but intuitively, if the IC pin was a high set push pull output, closing the switch would burn out the push transistor in the IC from over-current. \$\endgroup\$ Feb 14 at 23:41
  • \$\begingroup\$ @RichardThiessen I measured 1.3 mA between the pin and ground. \$\endgroup\$
    – Nicolas
    Feb 15 at 17:32
  • \$\begingroup\$ If you're willing to cut the wire leading to the switch and add a component in line, The 1.3mA can be used to switch on an NPN BJT as in the following circuit tinyurl.com/y2j4pcou. This is the simplest possible design. \$\endgroup\$ Feb 15 at 22:34
1
\$\begingroup\$

OK, so first thing, you need to avoid applying a high voltage to that pin. The IC shown in your diagram would likely be damaged if more than 5V was applied to its input pin. It's also important to avoid interfering with whatever the IC was doing with that pin. Most likely it was just applying a pull up resistor. If that's the case then using it to drive a BJT through another resistor might be problematic.

There are other issues related to how the circuit detects that the switch is closed. You need to play nice with the existing circuit. The module might also lose power and some circuits might detect that incorrectly as the switch being closed. For this reason I recommend the circuit below. It's the safest circuit in terms of reliably detecting that the switch is actually closed and not interfering with or back-powering the module if the module 5V supply fails.

link

enter image description here

Notice here that the voltage on the switch terminal is never driven above 0.7 volts which is important if the load power supply is ever on and the module 5V power supply is not. This is the safest circuit in terms of interfering with existing operation.

Any circuit that relies on the switch terminal to supply current or rise in voltage can't tell the difference between a loss of power on the board and the switch closing. It might turn on the load without warning if the board loses power. Likewise any circuit that drives current into the switch node will also see a loss of 5V power as the switch closing since it will back-power the module sinking enough current to turn on the mosfet it in the process.

The following circuit will also work but requires access to a 5V rail from the module. It uses a transistor in cascode mode to drive the gate of a P-channel Mosfet and switches the high side of the power rail. This has the advantage of (almost) zero power consumption when the load is off.

link

enter image description here enter image description here

\$\endgroup\$

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.