Connect with us

configuring hardware key with pc

Discussion in 'General Electronics Discussion' started by jishnu1985, Aug 9, 2012.

  1. jishnu1985

    jishnu1985

    2
    0
    Aug 9, 2012
    hai,

    I am having a visualization software made in C#.net, which displays a set of images needed for work on pc. the only button assigned for this software is "Next" and we use mouse to click NEXT button to see the next image in that software. Presently we use mouse to do the clicking. Now i need to produce a single switch hardware, which can be used instead of mouse. so that when i click on this switch, the NEXT button will work on pc. Connectivity i wish between the switch and pc is through USB. Any other methods of connectivity is also welcomed. How can this be acheived. Is there any hardware available or any circuit diagram like this. Please help.
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,136
    1,844
    Nov 17, 2011
    Make the "next" button the default action so you can use the "Enter" key of a conventional keyboard.

    Connect the pushbutton in parallel to the "Enter" button of the keyboard via some wire. Hide the keyboard.
     
  3. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    If the 'Next' button is the only active control that Windows sees then it will have the focus. As Harold said the 'Enter' key will then be active. The 'Space Bar' key should also work and is much bigger and more convenient.
     
  4. dahhal

    dahhal

    58
    0
    Jul 17, 2012
    Do you want an io board such that available here for usb. http://www.phidgets.com/products.php?category=0? Saying this the raspberry pi is cheaper and much more capable hardware and has some GPIO's that you can use.. http://www.raspberrypi.org/

    I can see why a keyboard is a good option as its much cheaper. If your keyboard has any extra keys, like media keys, You may be able to bind the keys your own program.
     
  5. jishnu1985

    jishnu1985

    2
    0
    Aug 9, 2012
    Thanks Mr. Herald Kapp your suggestions were most valuable. But what if there is something around 50-60 meters between PC and the machine? will such a parallel connection from Keyboard work?
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    9,136
    1,844
    Nov 17, 2011
    It will work, but will be very unreliable and prone to noise. In that case, you should at least decouple the remote button from the keyboard by an isolating mechanism.
    You could, for example, use a photocoupler. Connect the transistor of the photocoupler across the "Enter" key's contacts (observe polarity or use a photomos relay if uncertain about polarity). Put a current limiting transistor in series with the LED of the photocoupler. Attach button plus a voltage source (battery) to the LED such that the LED wil light up when the button is pressed (you can''t see this, the LED is enclosed within the photocoupler). Now by pressing the button the LED will light up, ths making the transistor in the photocoupler conductive and simulate pressing the "Enter" key.
     
  7. dahhal

    dahhal

    58
    0
    Jul 17, 2012
    In light of the new 50 / 60 meter requirement, it may be best to skip the keyboard idea, and make use of a embedded device just as an arduino or raspberry pi that has General Purpose through ethernet to the c# application can respond to and web request and call the function that you do if you were to press next. It could also have the advantage to make the application become focused (in case any pop ups or anything stole focus) when the button is pressed, or focus could be another button all together.
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    9,136
    1,844
    Nov 17, 2011
    Possible but definitely a lot more expensive.
     
  9. dahhal

    dahhal

    58
    0
    Jul 17, 2012
    hehehe. more expensive though could be fun.

    Harald I think I misunderstood your description.

    Did you describe instructions to extend the entire keyboard 60 meters. Or just a single pair of wires to turn the led on. The second option doesn't seem so bad at second read as you could just use a single strand of twisted pair to power the led.
     
  10. Harald Kapp

    Harald Kapp Moderator Moderator

    9,136
    1,844
    Nov 17, 2011
    I was talking just about a single pushbutton as "remote control" for the "Enter" key.
     
  11. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    I don't like the idea of hard wiring directly into the keyboard "Enter" key circuit. Does your mouse have to be over the "Next" button to click it or can it be anywhere in that window?
     
  12. Harald Kapp

    Harald Kapp Moderator Moderator

    9,136
    1,844
    Nov 17, 2011
    The photocoupler, as I suggested, will decouple the remote button from the keyboard.
     
  13. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Actually, I was going in a plug and play (mouse click circuit) direction, which is why I asked this. You're OptoCoupler would still be used. On the other hand keyboards are dirt cheap, so I guess tapping into the Enter key is no biggy.

    Chris
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-