Connect with us

USB multiswitch

Discussion in 'General Electronics Discussion' started by Catcher, Jan 21, 2013.

Scroll to continue with content
  1. Catcher

    Catcher

    5
    0
    Jan 21, 2013
    Hi guys & gals, looking for hardware advice on a very basic electronic part of a larger software project.

    I need to mount 4 physical switches that fire a state change signal to a USB port when any switch is flipped. If necessary, I can continuously poll the port instead for state change.

    This type of thing would be trivial if lpt ports still existed, but alas..
    Any recommendations?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,532
    2,656
    Nov 17, 2011
    Could you use a USB mouse with multiple buttons? Re-wire the buttons to your switches, evaluate the state change of the buttons by typping into the mouse driver.
     
  3. Catcher

    Catcher

    5
    0
    Jan 21, 2013
    Creative idea, but unfortunately the switches need to be around 6' apart.
    2 are rollover switches. The other 2 are push button switches, but those are optional.
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,532
    2,656
    Nov 17, 2011
    By re-wire I mean place your switches where they are needed and use some wire to connect them to the mouse's electronic (just solder them to the pads of the mouse's original switches).

    Or use a USB I/O card like for example this one.
     
  5. Catcher

    Catcher

    5
    0
    Jan 21, 2013
    Ahh, I see. So I would just buy switches and solder them to the relay pins on the I/O card?

    How difficult would the mouse rewire be? Sounds very simple, but I am a software guy. :)

    Thanks very much for the ideas!
     
  6. donkey

    donkey

    1,297
    56
    Feb 26, 2011
    hey catcher, if its all about reading serial data via USB try one of the many microcontroller assemblies out there. A quick glance at Arduino shows a schematic to hook up a single button and one for analog input as well. theseare both printed to the serial monitor.
    http://arduino.cc/en/Tutorial/DigitalReadSerial
    http://arduino.cc/en/Tutorial/AnalogReadSerial
    just a thought for you any way, expanding on that design won't take too much as long as your programming is good lol
     
  7. Catcher

    Catcher

    5
    0
    Jan 21, 2013
    All great info, thanks guys. I'll respond here if (when) I have more Qs.
     
  8. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    I was going to add the following

    but then I had a thought or two. There must be countless damaged USB keyboards out there with nothing more wrong with them than missing keys. They can be had for nothing or next to nothing. Each key contact is an available switch input.

    Chris
     
  9. Catcher

    Catcher

    5
    0
    Jan 21, 2013
  10. donkey

    donkey

    1,297
    56
    Feb 26, 2011
    I too am playing with raspberry pi. they have a huge section on items like this. if you are good at programming I should add you cos I hate linux buthave so many ideas for my little pi's (I have 3 atm lol)
    check their gertboard section as it might be the best thing for you.
    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=42&t=13037
     
    Last edited: Jan 22, 2013
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.
Similar Threads
There are no similar threads yet.
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-