2 position latch circuit with a single momentary button

Thread Starter

DesignDrive

Joined Aug 27, 2023
3
Hey! Just new to the forum. I am trying to build a circuit that uses a single momentary button to control a 2 position switch. First press turns on one relay, second press turns on a second relay, third press turns it off. The circuit is for heated seats in a vehicle. The first press turns on the system and puts the seat heaters in series (low setting). The second press keeps the seat heater on but puts it into parallel. The third press turns the whole thing off. When power is removed from the system, it resets the whole system to off. I already have a parallel/series 2 relay set up, but I just have to figure out the switch circuit with a single button press.
Thanks I’m advance!
 

dl324

Joined Mar 30, 2015
16,111
Welcome to AAC!
First press turns on one relay, second press turns on a second relay, third press turns it off.
Your requirements aren't clear.

What happens to the first relay on the second button press? What does the third press turn off? Relay 2 or both?

TLDR - word salad after succinct requirement statement.
 

Thread Starter

DesignDrive

Joined Aug 27, 2023
3
What happens to the first relay on the second button press? What does the third press turn off? Relay 2 or both?
Sorry, you are right. I meant to say it turns off the whole system. So resets both relays off. And it would be nice if the whole system looses power, ie, ignition is turned off, the whole system resets to off as well.
 

djsfantasi

Joined Apr 11, 2010
9,126
Even better is a 2-bit counter with reset. This circuit counts 0 (all on), 1 (only first relay on), 2 (only second relay on) then on the pushbutton press it resets to the “all off” position.

The enable input can be permanently tied high. And you can remove the OR gate and do without a separate reset input.

You still need to connect your debounced pushbutton to the clk (clock) input AND use an appropriate driver circuit for the relay (transistor, MOSFET, et.al. + back-EMF protection disk ) on the outputs.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
16,473
The function described is exactly the way it works in both of my cars, a 017 and a 2005. So it has been in production for a while. And quite possibly it can be achieved without any electronics. Certainly, powering the controls from the engine-run circuit will assure that the heaters reset to off when the vehicle is shut down, so that is a starting point. So a module to deliver that function may be available at an auto salvage yard, unless it is controlled by that massive "body control module."
 

crutschow

Joined Mar 14, 2008
33,325
Below is the LTspice sim of a circuit using two JK flip-flops (one IC package) to generate the desired sequence.
Using JK flip-flops allows the desired sequence generation without any added logic circuits, which I think a circuit using a counter or D-FFs would need, and it doesn't require an asynchronous reset (except for power-on).
The input circuit of D1, C1, and R2 provide the required debounce function with the fast risetime clock pulse the FF requires.
C2 and R3 provide a power-on reset.
A small N-MOSFET is used to drive the relay coils.

The first PB press (green trace) turns on the U3 first relay (yellow trace), the second press turns on the U4 second relay (red trace), and the third pulse turns them both off.
The fourth PB press restarts the sequence.

1693674415487.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
16,473
No simple way to do that with a "D" FF, I concluded to myself. JK is the way to go. It got complicated doing it with relays and diodes, also.
 
Top