Jump to content

Maintain a Switch Position until Power Off

mister_s

I've got an interesting problem in which I have two circuits. For simplicity, let say that circuit A powers an LED at 3.3v with a switch, and circuit B powers a load at 5v. Circuit A is in fact a voltage regulated portion of circuit B.

Now lets say I want to be able to complete circuit A and have the LED on but the switch for completing circuit A will only function while circuit B is off. So if I have chosen to turn on the LED, once I complete circuit B (giving power to A) I can no longer turn circuit A off until circuit B is off again.

 

Essentially, I only want to be able to use/interact the switch on circuit A while circuit B is open. Once circuit B is closed, whatever position the switch for circuit A is in, will remain in that position until circuit B is opened again.

Thanks for any help!

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, mister_s said:

I've got an interesting problem in which I have two circuits. For simplicity, let say that circuit A powers an LED at 3.3v with a switch, and circuit B powers a load at 5v. Circuit A is in fact a voltage regulated portion of circuit B.

Now lets say I want to be able to complete circuit A and have the LED on but the switch for completing circuit A will only function while circuit B is off. So if I have chosen to turn on the LED, once I complete circuit B (giving power to A) I can no longer turn circuit A off until circuit B is off again.

 

Essentially, I only want to be able to use/interact the switch on circuit A while circuit B is open. Once circuit B is closed, whatever position the switch for circuit A is in, will remain in that position until circuit B is opened again.

Thanks for any help!

I'm a little confused. I've got that you only want A to work while B is not working. So let's see if I'm correct:

  • Circuit B is the master circuit
  • Circuit A is the sub circuit
  • Circuit A should only be able to be cycled when circuit B is off.
  • When circuit B is on, the state of circuit A should remain the same (whether that state is on or off).

Did I get this correct?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, straight_stewie said:

I'm a little confused. I've got that you only want A to work while B is not working. So let's see if I'm correct:

  • Circuit B is the master circuit
  • Circuit A is the sub circuit
  • Circuit A should only be able to be cycled when circuit B is off.
  • When circuit B is on, the state of circuit A should remain the same (whether that state is on or off).

Did I get this correct?

Yes that is correct

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

So I don't know of a way to do this without logic gates, so that's the way I did it. Please note that in the example below, if circuits A and B require more than 5 (or 3.3) volts, you will need to have this logic circuit that I am showing drive bigger transistors or even relays/solenoids to power your circuits. Of course, if your switches are only handling 5 (or 3.3) volts, then you might be able to get away without using transistors on the switch side, but I would use them anyway.
Circuit.PNG

 

EDIT:: Ignore that circuit. It's still not perfect. No matter what, when B turns on, A will turn off.
 

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry for my error above @mister_s. I guess that's forever written in stone.

The error that I made was using an SR latch instead of a D latch. With the SR latch, Circuit A will always toggle whenever Switch B transitions from low to high. With the new circuit, that is avoided, because Switch A only works when Switch B is off, and Switch A enables it's own latch. This circuit will work to do what you want to do. The total cost should be less than 10 dollars.
Circuit.PNG

The reason that I have transistors (at the output you could use relays) to drive everything is because this circuit will either be at 5 volts or 3.3 volts depending on which components you decide to get, and I don't know what your actual circuits/switches need to run at. In either case, this is the control logic for making sure that circuit A will only switch states when circuit B is off.

What are you building anyway?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

A super tiny microcontroller (a pic10 or pic12 or a attiny for example at less than 50 cents, excluding the programmer cost but programmer can be used for other projects) and a couple of tactile buttons and a couple of n-channel mosfets would solve your problem. the microcontroller can run at something like 100-250kHz and use less than 1mA so it could run 24/7

 

I think your problem can also be translated a bit into something like this ... When circuit B is working, disable manual switch of circuit A (disable the button).

If you use a double throw switch on circuit A, you could combine that switch with a mechanic relay that remains in the last position (doesn't have to stay energized to be on or off) , so the A switch will simply move the relay contacts between light on or off.

Circuit B switch would simply short out or break the wires of switch A leaving the relay in its last working state. 

Something like this is more expensive and bigger and the relay is heavy and mechanical (lasts hundreds of thousands of switches but it's still not infinite)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×