2
\$\begingroup\$

I need to implement a switch that closes a circuit twice for a short time - when pressed and then when released. The switch needs to be really small (should fit inside a 3.5mm TRRS headphone jack, meaning that the male jack would be the button itself, no wires will come out of it).

The jack itself only needs to connect the top ring and the sleeve (when pressed), and doesn't need to transfer audio in the other rings (so it can be hollowed out to fit the electronics inside).

I have a few about mechanical solutions, but thought that maybe an electrical one could be more reliable.

Any suggestions how to implement that?

\$\endgroup\$
  • \$\begingroup\$ @DiegoCNascimento I added more details to the question, hope it helps. Thanks. \$\endgroup\$ – Geva Tal Sep 11 '13 at 9:32
5
\$\begingroup\$

If you can live with using a regular pushbutton in your headphone plug and have access to the interface behind the plug's socket, here's a little logic diagram that might do the trick:

                                                    +------+
                                       +-> Delay -> |      |
                                       |            |      |
Switch (w/ Pull Up/Down) -> Debounce ->+            | EXOR |-> Pulse on Edge
                                       |            |      |
                                       +----------> |      |
                                                    +------+

The pull-up/-down resistor and everything else would be behind the socket.

You use your switch with a pull-up or -down resistor and debounce the output. The clean signal is fed into an Exor gate - using a delayed and a direct line. Every time there is a positive or negative edge when you press or release the switch, the Exor will have two different input signals as long as the delay time, giving you a positive pulse.

The delay can probably be as simple as an RC combination, maybe you can even create a clever debounce circuit that outputs both the direct and the delayed edge.

This simple logic circuit can likely also be implemented using a programmable logic device or a uC.

\$\endgroup\$
  • \$\begingroup\$ Nice and simple answer +1 \$\endgroup\$ – Andy aka Sep 11 '13 at 10:22
  • \$\begingroup\$ And how does this fit inside a 3.5mm tube? How does it get powered? \$\endgroup\$ – Dave Tweed Sep 11 '13 at 11:15
  • \$\begingroup\$ @DaveTweed I have edited the answer and added the bits about what needs to go where. \$\endgroup\$ – zebonaut Sep 11 '13 at 19:19
  • \$\begingroup\$ I may have misunderstood, but I think the OP is asking about something that can plug into an unmodified iPhone/iPod/iPad or similar device. \$\endgroup\$ – Dave Tweed Sep 11 '13 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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