Results 1 to 11 of 11

Thread: How to delay a switch signal

  1. #1
    Registered
    Join Date
    Jan 2005
    Location
    USA
    Posts
    628
    Downloads
    1
    Uploads
    0

    How to delay a switch signal

    I have a question for those that are smarter than I am regarding a project I am working on. I am going to make a CNC control panel using a circuit board out of a USB keyboard. Some of the shorcuts are 2-key combos. I plan to use dpst pushbuttons. For example, for "shift-a" I would have "shift" hooked up to one half of the DPST and "a" hooked up to the other half. Since the shortcuts require the keystrokes to come in the right order, for example "shift" then "a", I would have to delay the "a" keystroke somehow on the dpst to insure that "shift" goes first. I'm an electronics amateur and was thinking a small capacitor may do the trick, but if any of you more knowledgeable folks can tell me if there is a proper way to do it I would appreciate it. Hopefully a single component on each switch can do it since I have many to do this way.

    Thanks in advance.

    John B.


  2. #2
    Registered lwill's Avatar
    Join Date
    Aug 2005
    Location
    USA
    Posts
    144
    Downloads
    0
    Uploads
    0
    What software are you using? It may be possible and much simpler to remap the key combinations to single keys in the program.
    Keyboards use a scanned matrix.(not just a simple switch to ground) It would be very dificult to "delay" the key press in any simple way.


  3. #3
    Registered
    Join Date
    Jan 2005
    Location
    USA
    Posts
    628
    Downloads
    1
    Uploads
    0
    Quote Originally Posted by lwill View Post
    What software are you using? It may be possible and much simpler to remap the key combinations to single keys in the program.
    Keyboards use a scanned matrix.(not just a simple switch to ground) It would be very dificult to "delay" the key press in any simple way.
    I know that a keyboard isn't just a switch to ground and I have that part figured out. Each keyboard button connects 2 pins on the circuit card and I have those all mapped out and have tested that part using a keyboard test program and jumper. For example "left shift" is pin 12 shorted to pin 20 on this board, and "a" is pin 1 shorted to pin 21. So for a pushbutton to do shift-a I would have one side of the dpst connected to pins 12/20 and the other side connected to pins 1/21. I just need to make sure that pins 1/21 get shorted after pins 12/20. Only by milliseconds.

    I'm using EMC2. I figured out how to re-map most of the keys I need to in this link, so I can get them mapped to single stroke keys. Like I said though, I would rather not if there is an easy enough way to do it . At least for a few shortcuts I don't think I figured out how to re-map though. For at least those I would need to figure out some kind of delay.


  4. #4
    Registered john_100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    577
    Downloads
    0
    Uploads
    0
    Hi John

    may be you could use a resistor and capacitor to delay the switching of some thing like the 4066 quad bilateral switch or even a reed relay

    http://www.nxp.com/documents/data_sh...HC_HCT4066.pdf

    http://docs-europe.electrocomponents...6b800289aa.pdf




    John


    PS how about a micro switch actuator like this

    Best Price Push Button Actuator 6-Terminals SPDT AC Micro Switch | Facebook

    if it can be modified so one switch operates later than the other
    Attached Thumbnails Attached Thumbnails How to delay a switch signal-key_delay.jpg  
    Last edited by john_100; 05-09-2012 at 08:02 AM. Reason: add PS


  • #5
    Registered vger's Avatar
    Join Date
    Jan 2006
    Location
    usa
    Posts
    685
    Downloads
    0
    Uploads
    0
    I used to work on a machine that used a DPST microswitch that operated one set of contacts before the other. When pressing the roller lever actuator you could hear first one click then another.

    There are some small square panel mount pushbutton switches that use microswitches at the bottom end. I would probably be possible to modify one slightly to get sequential actuation of the switches.


  • #6
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    14
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by vger View Post
    I used to work on a machine that used a DPST microswitch that operated one set of contacts before the other. When pressing the roller lever actuator you could hear first one click then another.

    There are some small square panel mount pushbutton switches that use microswitches at the bottom end. I would probably be possible to modify one slightly to get sequential actuation of the switches.
    That reminds me of a camera shutter button...

    I've seen staggered microswitches under a single button to allow a similar action, such as:
    Homebrew Wired Remote for Canon EOS 350D Camera


  • #7
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2495
    Downloads
    0
    Uploads
    0
    As lwill eluded to, I doubt you can easily add a delay to one matrix point without adversely affecting the operation of the rest of the circuit. For example, adding an RC filter may make one button appear always pressed. Not good.

    I think the easiest solution may be to hack your switches to get sequential actuation. Most any switch should be able to be modified this way with the proper application of some glue and a little "shim" of wood or something.

    Matt


  • #8
    Registered
    Join Date
    May 2012
    Location
    USA
    Posts
    10
    Downloads
    0
    Uploads
    0
    If you will entertain non-electronic solutions, you could make one mechanical button actuate two switches, either by a stepped actuator extension pressing on switches mounted at the same height, or by a balancing, articulated T-bar pushing on switches with different spring strengths. You could also build a little open-sided box and stack the switches vertically, using different-strength springs again, ensuring one switch is fully depressed prior to its partner.

    You your "shift + whatever" keys on a sub-panel, supported by a couple (redundant) microswitches... very light touch, small travel... acting as the shift key switch. Heavier-push switches would be the "whatever" key. So pushing the key would result in a minute subpanel movement, (causing a "shift" microswitch to close) followed by the main switch closure.

    A cookbook capacitive switch might be employed, but tuning it to act only on the target switches could be challenging.

    In the ultimate Rube Goldberg execution, a single front-panel switch would trigger two solenoids pushing our target switches with calibrated plunger depths.

    Remapping is lookin' pretty good to me, but it's not my box...

    Chip


  • #9
    hgk
    hgk is offline
    Registered
    Join Date
    Nov 2008
    Location
    usa
    Posts
    24
    Downloads
    0
    Uploads
    0
    Give this a look if your controller is running under a windows OS.

    The Microsoft Keyboard Layout Creator

    regards,
    George


  • #10
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2495
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by hgk View Post
    Give this a look if your controller is running under a windows OS.

    The Microsoft Keyboard Layout Creator

    regards,
    George
    He stated EMC2 earlier which means Linux OS

    Matt


  • #11
    hgk
    hgk is offline
    Registered
    Join Date
    Nov 2008
    Location
    usa
    Posts
    24
    Downloads
    0
    Uploads
    0
    I'm not a linux user but a quick google looks like it's doable under linux as well.

    xmodmap: mapping multiple keys to equal one key - Mombu the GNU Linux Forum

    Maybe a post to a linux board would also get some usable info.
    best of luck
    -George


  • Similar Threads

    1. New PCB issues ... Sorry for delay
      By Larken in forum Viper Servo drives
      Replies: 0
      Last Post: 05-20-2010, 12:02 PM
    2. Newbie- 1.6V-3.0V random signal voltage parallel signal from output – Any advice?
      By cjchands in forum Mach Software (ArtSoft software)
      Replies: 0
      Last Post: 11-12-2009, 05:36 AM
    3. Spindle delay
      By mkc2 in forum Mach Mill
      Replies: 3
      Last Post: 01-06-2009, 07:56 AM
    4. Replies: 2
      Last Post: 08-15-2007, 09:32 AM
    5. peirce delay
      By Redline in forum Mach Plasma / Laser
      Replies: 1
      Last Post: 09-01-2006, 09:18 AM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.