Passively lift ground pin 1 while actively grounding another pin to activate a circuit?

Thread Starter

redeyedjim

Joined Jul 14, 2018
28
My basic question:
I have a pin that I need to ground in its normal ON configuration, but float when switched to a momentary (ON) position. The pin in question leads to the green cathode of a common anode bicolor LED.

I'm sure there are several ways of doing this - Optocoupler? SSR? Pair of transistors? - but I could use some help choosing the best method.

Purpose and Considerations:
My goal is to integrate a small battery monitor circuit into an existing, functional 12VDC portable device, running on 3x 18650 LiPo batteries. The battery monitor shares the device's bicolor LED, and uses it in an alternative circuit, activated in the (ON) position of the devices its On-Off-(On) switch.
  • The device's on/off switches power on negative for consistency, as the device uses a MOSFET relay that also switches high current on negative.
  • The physical switch that will activate this meter is a SPDT, On-Off-(On), and I am trying to engage the battery monitor to work in the momentary (On) position.
  • Diodes D5 and D6 are UF rectifier diodes and allow the LEDs to share inputs.
The battery monitor circuit works great on my proto-board, and does exactly what I want. I just need a slick way of simultaneously activating the battery monitor circuit while also floating this otherwise grounded pin, using just the single, momentary, negative-side switch.

This is my battery monitor circuit. For proper display, I would like to ground the red circled pin when the device is ON, and float the same pin when the device is (ON).



What's a reliable, small footprint way to do this?

Thanks!
(Mods - feel free to move to a different forum if this isn't the correct place to ask this question.)
 

dendad

Joined Feb 20, 2016
3,023
An opto transistor across Q1 will work, but there appears to be some problems with your circuit. Where are the current limiting resistors for the LEDs? Without at least one in the "K" lead, the LEDs will die.
 

Thread Starter

redeyedjim

Joined Jul 14, 2018
28
An opto transistor across Q1 will work, but there appears to be some problems with your circuit. Where are the current limiting resistors for the LEDs? Without at least one in the "K" lead, the LEDs will die.
Oops, transcription error. The current limiting R's are integrated into the flying leads of the LED and I forgot to include them in the schematic. But yes, they exist!

>An opto transistor across Q1

Sounds great! Can you explain it is a bit more detail, or point me to a description of the circuit so that I can mock it up? Also, any particular opto transistor to recommend? This is new ground for me and I'm primarily a hobbyist. Thanks!
 

dendad

Joined Feb 20, 2016
3,023

dendad

Joined Feb 20, 2016
3,023
Oops! I just realized, the error of my circuit. Q1 is on when powered. You want to turn it off. I got side tracked by you saying you need to ground Q1 collector. When powered, it is already grounded.
Wire the opto to the base of the transistor, or just add a switch from the base of Q1 to ground.
 

Thread Starter

redeyedjim

Joined Jul 14, 2018
28
View attachment 176015
Something like this should work.
I use a lot of PC357 optos but they are surface mount.
But these will be ok..
https://au.mouser.com/ProductDetail/Sharp-Microelectronics/PC817XNNSZ1B?qs=sGAEpiMZZMteimceiIVCBwOhTfXkD2DS1XBwbcKwuGswjhyO3oyW1w==
It is not really critical, so almost any will work. You may even be able to rescue one from an old dead switchmode power supply.

I did not show the LED wired up to any switch, but that will depend on your application.
Thanks, that looks about as straightforward as possible! Is R1 in your drawing just a standard current limiting resistor for the opto's LED? 180 ohms for a 12V source?

The battery monitor circuit and most of the device's components are SMD, so a PC357 sounds ideal.

So, Pin 1 is connected to ground through PC357 in its "off" (i.e., NC) state, and floated when PC357 is momentarily powered (ON)? (sorry if dumb, looking for absolute clarity)
 

dendad

Joined Feb 20, 2016
3,023
No, sorry. I claim it was be the early morning here, and I could not sleep, so not thinking correctly :)
What is connected to pin1? Or, do you just want to turn Q1 off and Q2 on when you push the button or whatever?
 

Thread Starter

redeyedjim

Joined Jul 14, 2018
28
What is connected to pin1? Or, do you just want to turn Q1 off and Q2 on when you push the button or whatever?
It is really just as drawn above - no other connections. I just want to ground Pin1 when ON, and float it when (on).

The consideration is that it needs to be grounded by actively pushing a switch, and that switch makes a connection to ground. I only have a single SPDT switch with which to activate the battery monitor circuit.
 

dendad

Joined Feb 20, 2016
3,023
OptoOR.jpg
This should be better. Operating this will swap the state of the transistors.
Also, the opto LED resistor of around 1K or so will be ok. 180R is way too small on 12V.
I think that is what you mean. Pin 1 is grounded when ON (powered). I'm unsure what "(on)" is.
Please define "ON" and "(ON)".
 
Last edited:

Thread Starter

redeyedjim

Joined Jul 14, 2018
28

This should be better. Operating this will swap the state of the transistors.
Also, the opto LED resistor of around 1K or so will be ok. 180R is way too small on 12V.
I think that is what you mean. Pin 1 is grounded when ON (powered). I'm unsure what "(on)" is.
Thank you! This looks like a simple and clean way to do this. And yes, a 1k R for the opto LED sounds more reasonable for 12V, I goofed up on the calc.

>I'm unsure what "(on)"

I was trying to denote a momentary state, as that is how I've seen it in datasheets, etc.:
On vs. (On) == latched ON vs. momentary ON

One followup question about your momentary switch drawing. Are you putting the switch between R4 and ground or R4 and Opto pin 4?

Thanks so much for your help, by the way!
 
Top