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.

  • \$\begingroup\$ It's not clear what you're asking for. If it's a push button (such as what you referenced), how would it tell between a press meaning "turn on/off" and a press meaning "change pattern"? \$\endgroup\$
    – DoxyLover
    Commented Aug 25, 2015 at 18:35
  • \$\begingroup\$ Most of flashlights have a slide switch with an integrated momentary pushbutton. Is this what you are looking for? \$\endgroup\$
    – Eugene Sh.
    Commented Aug 25, 2015 at 18:39
  • \$\begingroup\$ @DoxyLover i'm expecting that there is a two stage detent. First stage does not latch, 2nd stage does. If discussing in travel of the switch; a 5mm depress would latch the on/off. The switch would spring back 3mm after latching. Another press of only 1mm would create the momentary action. \$\endgroup\$
    – iamfromit
    Commented Aug 25, 2015 at 18:40
  • \$\begingroup\$ So you need a three-position toggle switch with two locking positions and one momentary. They are easily found. \$\endgroup\$
    – Eugene Sh.
    Commented Aug 25, 2015 at 18:42
  • \$\begingroup\$ @EugeneSh. ; that may be the best ready made option, however I'd much rather have it be a flush mounted barrel if someone knows of such a switch. something I can screw to a dashboard or console panel \$\endgroup\$
    – iamfromit
    Commented Aug 25, 2015 at 18:43

1 Answer 1


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.


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.


Your Answer

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

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