Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Logic DPST using a SPST switch?

Status
Not open for further replies.

slow_rider

New Member
I need to control two latching relays using a single momentary SPST switch. Can anyone recomend a good & cheap way to do this? Maybe a DPST logic IC that can be controlled using the SPST switch?

Thanks!
 
I think we need more info.
What are the relays' coil voltage and current?
Are the latching relays 1-coil or 2-coil?
Do you want both relays to switch states at the same time?
Do you want one push of the SPST switch to latch the relays and a second push to unlatch them?

Ken
 
I agree, some details were skipped!

I don't have an exact relay model but we are talking about signal type relays with a 4.5V or maybe 5V coils with a low current draw, 1 coil latching.

Both coils should switch at the same time, and your description is accurate, I want a single push of the SPST tactile to latch them and the second one to unlatch them.

I thought about this a little bit and I remember something called a multiplexer from logic class in university but I admit I forgot almost everything by now but maybe something like that could assist here?
 
I agree, some details were skipped!

I don't have an exact relay model but we are talking about signal type relays with a 4.5V or maybe 5V coils with a low current draw, 1 coil latching.

Both coils should switch at the same time, and your description is accurate, I want a single push of the SPST tactile to latch them and the second one to unlatch them.

I thought about this a little bit and I remember something called a multiplexer from logic class in university but I admit I forgot almost everything by now but maybe something like that could assist here?

Well from a concept basis a SPST momentary switch could be used to clock a flip-flop and the Q & Q-bar outputs of the flip-flop could be used to set and reset the single coil latching relay(s). The fact that you want both relays to operate together means electrically you could treat them as one relay. A SPDT momentary switch would be better because a simple pair of cross coupled NAND gates could be used for the logic with no contact bounce problems to deal with. Simplest of all would be a DPDT momentary center off switch would could be wired directly to the latching relay coil that would require no additional intermediate logic.

In fact some latching relays have DPDT contacts so maybe you can use just one, depending on what you need to switch with the contacts. Here is one low current single 5vdc coil DPDT relay that I have used several times:

**broken link removed**

Good luck;
Lefty
 
Last edited:
I took a second look on the FF, and if I'm not mistaking a JK-FF could be used for this function.

I can hook J & K HI, when clicking on the tactile, CP will be set HI so Q(t+1) = Q-bar(t=0)

Hooking up Q to the relay will give positive voltage when I click, negative on the next and so on...

Is this correct?
 
I took a second look on the FF, and if I'm not mistaking a JK-FF could be used for this function.

I can hook J & K HI, when clicking on the tactile, CP will be set HI so Q(t+1) = Q-bar(t=0)

Hooking up Q to the relay will give positive voltage when I click, negative on the next and so on...

Is this correct?

The relay coil should wire to both the Q and Q-bar outputs, that is the polarity of the voltage applied to the coil must be reversed to switch the coil latch. You have to determine if the current capacity of the FF outputs can drive the coil directly or if you will need driver switching transistors to help supply the coil current requirements.

The other problem is switch bounce on the FF's clock inpout. A switch wired directly to the clock input is bound to be erratic due to switch contact bounce. A R/C filter may help with that problem.

Lefty
 
Thanks for the help! Only one more question... any usefull links about how to actually build a JK-FF? Do they come in IC packages?
 
Thanks for the help! Only one more question... any usefull links about how to actually build a JK-FF? Do they come in IC packages?

Yes they come in IC packages. Here is a link to show how the various flip flops are designed and operate.

**broken link removed**

Lefty
 
With leftyretro's relay (5V/28mA, DPDT), I think this circuit will work. I've combined circuits that I've seen, but have not bench tested it. The paralleled outputs are to get enough current drive for the relay.

Ken
 

Attachments

  • PushOnPushOff74HTC14Latching.gif
    PushOnPushOff74HTC14Latching.gif
    14 KB · Views: 1,268
Thank you very much, I really appreciate all the help from you the guys and the circuit will probably save me some time! :)
 
With leftyretro's relay (5V/28mA, DPDT), I think this circuit will work. I've combined circuits that I've seen, but have not bench tested it. The paralleled outputs are to get enough current drive for the relay.

Ken

Nice circuit design K :)

Lefty
 
The down side is that it doesn't really take advantage of the "latching" function unless you are concerned about loosing +5V power and want to retain the relay state. If that is not a concern, the OP might as well use a conventional relay.

Ken
 
So power has to remain ON at all times to the FF inputs? Anyway around this? Maybe connecting the inputs to the switch that goes to the CP input somehow? The signal has to be stable at the inputs before the CP gets the pulse somehow...
 
Again, more info would help. I'd rather help in solving your problem, than in solving your solution. ;) What exactly are are you trying to do? Details...details...details! :)

Ken
 
Last edited:
OK, here are the details...

Originally I needed a DPDT foot switch to be fitted into a small box but there's not enough room for any switch I can buy. Using a SPST tactile switch with an actuator solves this problem and the actual switching will be performed by the relay. Since this will be battery operated I took a latching relay so it won't draw current while not doing actual switching. Idealy, the switching part of the device will be made out of as few parts as possible and will draw current only when switching to allow the longest battery life possible. I think the suggested circuit could work fine if there's a way to delay the signal to the CP input pin by even 1ms so the FF inputs would be stable before the clock signal reaches max and drops.

I think that's all :)
 
Last edited:
Two more questions. The tactile switch is in the box, but the relay, battery, and toggling circuit will be somewhere else? What is the signal that is being switched by the relay?

ken
 
The relay, battery and all the electronic components are inside the box, a DPDT switch would not fit because of it's height. The signal being switched is an audio signal.
 
Then...another question. What are the dimensions for the available space within the box?

Ken
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top