Maker Pro
Maker Pro

Detect 5v button push on separate system

I need to detect a 5v button press (single wire in/out on the button) on an alternative system, and close/ground a 3.3v circuit on the local system when that 5v button is pressed on the separate system. I am sure this is super basic but I am stumped, any help is greatly appreciated.

System A:
---------5v_in----button----5v_out------------

SystemB:
---------3.3v_in--- close_this_when_5v_detected ----ground-------
 

hevans1944

Hop - AC8NS
Energize the coil of a small relay from 5V_in using the push-button switch to connect 5V_out to the relay coil. The other terminal of the relay coil connects to the "common" or "ground" of the 5V supply.
This would be your System A:

For your System B: Use a pair of normally-open contacts on the relay (contacts that close when the relay coil is energized) to connect the 3.3V input to ground. Presumably, the relay coil being energized is "pruf enuf" that 5V has been detected.

And welcome to Electronics Point forums, @kevinsjv!
 
Last edited:
I need to detect a 5v button press (single wire in/out on the button) on an alternative system, and close/ground a 3.3v circuit on the local system when that 5v button is pressed on the separate system. I am sure this is super basic but I am stumped, any help is greatly appreciated.

System A:
---------5v_in----button----5v_out------------

SystemB:
---------3.3v_in--- close_this_when_5v_detected ----ground-------

The relay suggestion above is good, especially if you choose a solid state DC relay. For example...

https://www.amazon.com/Kyoto-Electr...dc-dc+solid+state+relay&qid=1650253750&sr=8-3
 

hevans1944

Hop - AC8NS
Solid-state relays (SSRs), especially those that switch DC loads, are attractive for many applications. However, the OP wants to ground s 3.3V line, which leads me to suspect that said line might be a relatively large source-impedance, logic-level, signal line... perhaps used as an active-low "power on" command to another power supply (System B) that the OP wants to turn on in sequence after the first 5V supply is turned on.

If that were the case, then mechanical contacts on an electro-mechanical relay might be necessary to ensure a logic-zero is presented when the 3.3V line in System B is connected to "ground." It might even be possible to use a small-signal NPN transistor in System B to assert the "3.3V grounded" condition in response to the System A 5V_out line being asserted by the push-button switch. But the details of that one-transistor plus one-resistor circuit depend on information not given in the original post.
 
Solid-state relays (SSRs), especially those that switch DC loads, are attractive for many applications. However, the OP wants to ground s 3.3V line, which leads me to suspect that said line might be a relatively large source-impedance, logic-level, signal line... perhaps used as an active-low "power on" command to another power supply (System B) that the OP wants to turn on in sequence after the first 5V supply is turned on.

If that were the case, then mechanical contacts on an electro-mechanical relay might be necessary to ensure a logic-zero is presented when the 3.3V line in System B is connected to "ground." It might even be possible to use a small-signal NPN transistor in System B to assert the "3.3V grounded" condition in response to the System A 5V_out line being asserted by the push-button switch. But the details of that one-transistor plus one-resistor circuit depend on information not given in the original post.

I think so, circuit A with the 5v button is the system we are monitoring, and when that button presses we want to ground or pull to zero a trigger on a different system. The trigger on system B can be set to look for a high (3.3v) or low (grounded) condition to trigger, the default is grounded but we can change that if it makes the circuit design easier.

I have successfully tested a circuit that works using a low level mechanical relay, but have realized a high level relay would work better. I think the SSR would also work, but the conditions you raised may make it a less attractive choice over the mechanical. Or maybe I just need a pull down or pull up resistor to ensure the signal is always high or low and then could use an SSR?
 

hevans1944

Hop - AC8NS
As always, the "best" solution is the (1) one that works and (2) the one you can afford. I have several solid state switches designed to switch mains-voltage resistive loads such as incandescent lamps. I assume these are TRIAC-based devices that commutate (switch off) each time the AC line current goes through zero, as it does twice each AC line cycle. I've never tried to use these on DC loads because, unless the current is interrupted my some other means while they are conducting, they will not turn off after being commanded to turn on. Your mileage or kilometers may differ.

Or maybe I just need a pull down or pull up resistor to ensure the signal is always high or low and then could use an SSR?
Or maybe your push-button switch needs to be a DPST or DPDT (more common) switch. You can use the other set of switch contacts to short to ground your System B signal, or raise it to 3.3V potential above ground... that is, assuming the switch actuation actually causes the 5V from System A to occur. In other words you don't need to sense that 5V is present from System A, as long as when the button is pushed System A is already supplying 5V. No relay, SSR or otherwise, needed.

In electronics, as is true for most problems, there is always more than one way to solve a problem, if there exists any solution at all. Some problems cannot be solved, but yours is not one of them. This forum is for electronics experimenters. We love to assemble real parts to perform real functions, and most of us know how to make use of what we happen to have on hand. Of course with China supplying the parts, and if you can tolerate the shipping delay as well as the uncertainty that the parts you buy from China will actually work, you can try many different solutions really cheap. But caveat emptor; you usually get what you pay for, so trust but verify. That may be why some of us (even me, sometimes) will simulate a circuit before actually building it with real parts. Nothing wrong with that if your intention is to actually build something, or to try to understand something with or without actually constructing it. There are no hard and fast rules in the electronics hobby except this one: stay away from the high voltage.
 
Last edited:
As always, the "best" solution is the (1) one that works and (2) the one you can afford. I have several solid state switches designed to switch mains-voltage resistive loads such as incandescent lamps. I assume these are TRIAC-based devices that commutate (switch off) each time the AC line current goes through zero, as it does twice each AC line cycle. I've never tried to use these on DC loads because, unless the current is interrupted my some other means while they are conducting, they will not turn off after being commanded to turn on. Your mileage or kilometers may differ.


Or maybe your push-button switch needs to be a DPST or DPDT (more common) switch. You can use the other set of switch contacts to short to ground your System B signal, or raise it to 3.3V potential above ground... that is, assuming the switch actuation actually causes the 5V from System A to occur. In other words you don't need to sense that 5V is present from System A, as long as when the button is pushed System A is already supplying 5V. No relay, SSR or otherwise, needed.

In electronics, as is true for most problems, there is always more than one way to solve a problem, if there exists any solution at all. Some problems cannot be solved, but yours is not one of them. This forum is for electronics experimenters. We love to assemble real parts to perform real functions, and most of us know how to make use of what we happen to have on hand. Of course with China supplying the parts, and if you can tolerate the shipping delay as well as the uncertainty that the parts you buy from China will actually work, you can try many different solutions really cheap. But caveat emptor; you usually get what you pay for, so trust but verify. That may be why some of us (even me, sometimes) will simulate a circuit before actually building it with real parts. Nothing wrong with that if your intention is to actually build something, or to try to understand something with or without actually constructing it. There are no hard and fast rules in the electronics hobby except this one: stay away from the high voltage.


Thanks for the help and descriptions. I will tinker a little more and see what works.
 
As always, the "best" solution is the (1) one that works and (2) the one you can afford. I have several solid state switches designed to switch mains-voltage resistive loads such as incandescent lamps. I assume these are TRIAC-based devices that commutate (switch off) each time the AC line current goes through zero, as it does twice each AC line cycle. I've never tried to use these on DC loads because, unless the current is interrupted my some other means while they are conducting, they will not turn off after being commanded to turn on. Your mileage or kilometers may differ.


Or maybe your push-button switch needs to be a DPST or DPDT (more common) switch. You can use the other set of switch contacts to short to ground your System B signal, or raise it to 3.3V potential above ground... that is, assuming the switch actuation actually causes the 5V from System A to occur. In other words you don't need to sense that 5V is present from System A, as long as when the button is pushed System A is already supplying 5V. No relay, SSR or otherwise, needed.

In electronics, as is true for most problems, there is always more than one way to solve a problem, if there exists any solution at all. Some problems cannot be solved, but yours is not one of them. This forum is for electronics experimenters. We love to assemble real parts to perform real functions, and most of us know how to make use of what we happen to have on hand. Of course with China supplying the parts, and if you can tolerate the shipping delay as well as the uncertainty that the parts you buy from China will actually work, you can try many different solutions really cheap. But caveat emptor; you usually get what you pay for, so trust but verify. That may be why some of us (even me, sometimes) will simulate a circuit before actually building it with real parts. Nothing wrong with that if your intention is to actually build something, or to try to understand something with or without actually constructing it. There are no hard and fast rules in the electronics hobby except this one: stay away from the high voltage.


On the list of "cost effective methods", do you see any issues with using an photocoupler like this? Where the 5v side would power the LED/emitter, and that would close the collector circuit on the 3.3v side completing the grounding?

https://www.mouser.com/datasheet/2/408/TLP627M_datasheet_en_20181206-1659132.pdf
 

hevans1944

Hop - AC8NS
I have used photocouplers many times to routinely galvanically isolate an output signal intended to control something in the "real world." It should be fine for your purposes, provided you pay attention to its limitations of speed, voltage, and current as described in the datasheet. An infrared emitter optically coupled to a Darlington-pair phototransistor seems to me to be "overkill" for your application, but if the price is right go for it. I often use a 4N27 (see datasheet for 4N25, 4N26, 4N27, and 4N28) for this purpose, but that's mainly because I happen to have some on hand. You will need a small-valued current-limiting resistor is series with the infrared emitter diode so as not to "fry" it from a low-impedance 5V DC voltage source.
 

hevans1944

Hop - AC8NS
Is it required to latch on.
It isn't explicitly stated that the System B must "turn on if System A 5V is present" and "stay turned on (latched) even if the 5V from System A goes away." In fact, I believe that System B is intended to be active if and only if System A is simultaneously active. Perhaps the OP can clarify this.
 
Top