0
\$\begingroup\$

I have a push button switch that is single-pole, that I need to independently control two circuits. The button will be connected to a digital pin of two different microcontrollers. So its a low current application. Unfortunately, in this case, a two-pole button cannot be used. Is there a way of doing this?

Obviously the first that springs to mind is opto-coupling, however, there is a chance that one circuit is not powered, which would mean there is a chance the opto-coupler is not powered.

It cannot be guaranteed that these two circuits share the same power supplies, hence the complications. Technically the two circuits should be +5V, however the grounds aren't necessarily common.

\$\endgroup\$
4
  • \$\begingroup\$ The button would enable current flow through the diode of the optocoupler, so there is not problem if it is un powered \$\endgroup\$ Apr 28, 2017 at 21:43
  • \$\begingroup\$ You really need to describe your problem if you want a worthwhile answer. Is this a signal (low current, low voltage) or power (higher current, higher voltage) application. For example it could be a 110 V switch for a light circuit ....or it could be a switch input to a microprocessor at 5 V maximum. Describe your two power domains. \$\endgroup\$ Apr 28, 2017 at 21:50
  • \$\begingroup\$ Added some more information to the original question @JackCreasey. The circuits are both 5V circuits. \$\endgroup\$ Apr 28, 2017 at 21:59
  • \$\begingroup\$ If you don't have either a power supply that is available when either of the two controlled is active or a shared power supply common, you probably can not do what you want to do. \$\endgroup\$
    – user80875
    Apr 28, 2017 at 22:33

3 Answers 3

2
\$\begingroup\$

How about a DPST Relay? Ideally, you'll want the COILVOLTAGE to be one of the voltages you are using for 2 circuits (VCC1, VCC2).

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
7
  • \$\begingroup\$ What happens when coilvoltage is 0? \$\endgroup\$ Apr 28, 2017 at 21:49
  • \$\begingroup\$ Nothing useful. The relay just stays open. \$\endgroup\$
    – Hearth
    Apr 28, 2017 at 21:53
  • \$\begingroup\$ DV for a Page 1 Line 1 error: missing a diode off the relay coil and scorching your switch contacts. \$\endgroup\$
    – TonyM
    Apr 28, 2017 at 22:05
  • \$\begingroup\$ @TonyM. Small switches are rated for 125 V AC and 12 VDC typically .....and they don't need protection diodes across relays. There will be a spark on breaking the circuit, but it won't impact switch life significantly at all. Certainly not worth a DV. \$\endgroup\$ Apr 28, 2017 at 22:47
  • 1
    \$\begingroup\$ @jackcreasey, the arcing will damage the switch contacts and needlessly. No ratings on these switches here. Are you advocating saving a 2p diode to see if you can get away with it? But above that, the schematic is generic and therefore should always clearly show good design practice. Add a diode, I'll scrub the DV, \$\endgroup\$
    – TonyM
    Apr 28, 2017 at 22:58
0
\$\begingroup\$

A simple diode isolation will work for you:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ That's how the circuit is currently done, however I cannot guarantee that both the grounds are at 0V. \$\endgroup\$ Apr 28, 2017 at 22:48
  • 1
    \$\begingroup\$ The 0 V level for each system would be connected together by the switch. It does not have to be a true ground terminal. I don't see a way to connect a switch to two system without a zero V reference in each system. For example you could have two battery powered Arduinos ...completely floating from a real ground, but you could connect as above and have the switch work. \$\endgroup\$ Apr 29, 2017 at 2:24
0
\$\begingroup\$

Hmm.. tricky set of conditions...

You can do it with transformers and a function generator to make a fake isolated supply to drive the led of an opto-coupler.

Though if you are willing to detect a modulated signal back you could probably get rid of all that regulator stuff.

schematic

simulate this circuit – Schematic created using CircuitLab

Though I am pretty sure there is a way to do this from the primary side, but I cant seem to simulate it.

Or, you can use one of these

enter image description here

schematic

simulate this circuit

\$\endgroup\$

Your Answer

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

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