12v Latching on/off switch with momentary function

12vswitches

I'm looking to control a flashing light unit in my car that has several selectable patterns. It uses basic 12v+ to power and a basic +12v momentary to switch to the next pattern in a logical list. These are the only two functions in the unit.

I have a switch in mind that would latch on/off and also provide a momentary 12v+ output in order to pulse the pattern select.

Does such a switch exist as a self contained unit or can I make some other switch switch to suit the purpose?

I found teh Joyluxy QN16C2 on amazon and it's the ideal package. It would be great to see a push down latch on, and still have a reserve throw for momentary function that would not unlatch.

Can such a thing exist? Can I easily convert something else to get similar functions? I'm trying to avoid two distinct switches.

Best Answer

If I understand you correctly, you would like a single push-button to do 3 different functions:

1) if unit is OFF, short press turns the unit on.

2) if unit is ON, short press steps to the next pattern

3) Have some means of turning the unit OFF

The first method that comes to mind is to use a short press for the first two functions above and use a long press to turn the unit OFF.

I would also make the 2nd function (next pattern) operate when the button is released, rather than when pressed. This nicely differentiates between a pattern change and turning the unit OFF.

You can do this either with a small microcontroller - one of the Microchip PIC 6-pin or 8-pin chips would do nicely. Or you can do it with plain ordinary CMOS logic.

Rough sketch follows. Although it isn't a finished design, it should get you going in the right direction.

schematic

simulate this circuit – Schematic created using CircuitLab

This uses two IC packages: a hex Schmitt Trigger inverter package (4584 or similar) and a dual D Flip Flop (4013 or similar). Note that the D FF package available in the circuit editor doesn't show the Set & Reset lines available on the 4013 - I show the Reset line just as a line that enters the block. Same with the unused Set input - it just goes to Ground.

Circuit operation is as follows:

Start with the circuit OFF. Pressing the button clocks a 1 into the FF, which brings Q hi. This turns your unit ON.

Subsequent short presses on the button have no effect because the D input is tied HI.

A long press on the button eventually causes the FF reset line to go HI. This turns the unit OFF. The time constant is set with R3 & C2 and is currently about 2 seconds.

If the unit is ON, a short press on the button pulses the Step To Next Pattern line. You can choose to have this happen on either the rising or falling edge of the button press, depending on whether NOT3 is used or not.

Note that this circuit does NOT show the power supply protection circuit required to protect against transients and load dump.