0
\$\begingroup\$

I'm using a battery charger/buck regulator IC that turns on if the pin named "shphld" is momentarily pulled low, and turns off if the pin named "shpact" is momentarily pulled high. When the IC is on, it outputs regulated voltage on VOUTB. VBAT is always connected to the battery, the 100K resistor is specified by the datasheet to ensure shphld is not floating while the system is off.

I was wondering if I could use some sort of transistor to allow one button to control both powering the circuit on and off, depending on if VOUTB is outputting or not. I mocked up a schematic with a P-channel mosfet that I think should work, however I do not have a PMOS to test with.

I tested the same circuit wih a BJT (PNP) in place of the PMOS, but that did not work for some reason. Pulling SHPACT high trough the 100k resistor worked fine, but pulling SHPHLD low through the transistor did not.

Since it did not work with the PNP, will it or will it not work with the PMOS?

proposed schematic for the subsystem

\$\endgroup\$
2
  • \$\begingroup\$ BJTs require current limiting on their base. If you just swapped Q1 for a PNP BJT, you'll potentially destroy the BJT when trying to pull it low, depending on what's connected to the SHPHLD and SHPACT labels. You also won't be able to pull the emitter any lower than 0.7 V (assuming VOUTB is restricted to voltages no lower than 0 V), which might not be enough to reliably read as low depending on device thresholds. \$\endgroup\$
    – Hearth
    Commented Dec 4, 2023 at 19:43
  • \$\begingroup\$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. \$\endgroup\$
    – Community Bot
    Commented Dec 4, 2023 at 19:45

3 Answers 3

0
\$\begingroup\$

I think what's happening is that when the regulator is off (floating output) and the switch is pressed, there is a potential divider chain formed from the 100k resistor, Vbe (of the pnp transistor), R1 and the LED which results in SHPHLD not being pulled down far enough (maybe down to 1.5 V) Try adding a 1k resistor between the base of the pnp transistor (VOUTB) and ground. This should result in SHPHLD being pulled to a lower voltage when the switch is pressed (maybe down to 0.5 V). The drawback of this is higher current drain.

If this is the cause of the problem then a pfet may also cause problems because of the Vgs voltage not letting the fet pull the source close enough to ground even though the gate is being held at 0 V by R1 and the LED.

THEORY 2

It looks to me like the regulator's output will cycle on and off whilst the switch is being pressed so, to slow down the cycling try splitting the 100k resistor into two separate series resistors (say two 51k resistors) and add a capacitor (say 10uF) connected from the junction of the two resistors to ground.

Now when you press the switch the regulator's output should change state (on to off or off to on) after a short delay but then the switch must be released before the regulator's output changes state again.

You can adjust the size of the capacitor and the ratio of the two resistors to adjust the timing to suit.

If my theory is correct this should work with a pnp bjt in place of the pfet.

\$\endgroup\$
1
  • \$\begingroup\$ You're right, I was actually able to make this work with the help of your feedback. Adding the 1k resistor on the base did seem to improve things, but as you said, was not able to pull the shphld low enough to exit "ship mode". So I connected an old analog voltmeter acrosss to look at how bad it was, and then it started working! I replaced the voltmeter with a 10K resistor and now it functions just like I wanted. Your 2nd theory is also sound, but not needed, the datasheet specifies that the momentarily pull up/down actually means held up/down for >300 ms). \$\endgroup\$
    – FloydPage
    Commented Dec 7, 2023 at 20:41
0
\$\begingroup\$

rough schematicOne option is to try NMOS instead of PMOS

\$\endgroup\$
2
  • \$\begingroup\$ please include a 10k pull down resistor between gate and source. The MOSFET gate has very low capacitance and very high resistance. It can easily get charged up by stray electric fields and turn the MOSFET on when you least would expect. \$\endgroup\$
    – paki eng
    Commented Dec 5, 2023 at 16:26
  • \$\begingroup\$ This is not a viable solution, in this setup the SHPACT pin is constantly being pulled high by VBAT, not allowing the device to be powered on at all. \$\endgroup\$
    – FloydPage
    Commented Dec 6, 2023 at 15:16
0
\$\begingroup\$

I was able to make it work with the BJT. This is the final setup that made it all come together. As momentarily actually means held down/up for >300 ms, timing the button press by hand is pretty easy. I have no idea why the 10k resistor is necessary, all I know is it works with it and not without it. Yes, it draws 270 uA extra while the system is powered on, but that is not much compared to the LED. When the system is in "ship mode" (aka powered off) it draws 470 nA from the battery, just like the datasheet for the charger claims.

This will make a nice rechargeable bicycle safety light with only one IC component, a few resistors, and a BJT.

final schematics

\$\endgroup\$
2
  • \$\begingroup\$ Have you connected the bjt as shown, it looks to be round the wrong way (collector and emitter). \$\endgroup\$
    – user350400
    Commented Dec 7, 2023 at 21:57
  • \$\begingroup\$ You're right, I had that the wrong way around, still worked though :D \$\endgroup\$
    – FloydPage
    Commented Dec 8, 2023 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.