1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics USB based button set... Ideas?

Discussion in 'Modding' started by dynamis_dk, 11 Nov 2011.

  1. dynamis_dk

    dynamis_dk Grr... Grumpy!!

    Joined:
    23 Nov 2005
    Posts:
    3,761
    Likes Received:
    339
    Without giving away too much before I start a log, I'm after some details as it may change how I do things.

    I'm after something with I can mod into a set of buttons to control media functions on my new htpc case front (for next, stop etc).

    My ideas are:

    A) try to hack apart a USB keyboard or something to create the buttons

    B) is there something else around I could use?? I saw some pre-made programable USB thing (tweeny maybe)

    Anyone any ideas?
     
  2. arakis

    arakis What's a Dremel?

    Joined:
    24 Aug 2011
    Posts:
    44
    Likes Received:
    6
    here are a few depending on your skill with microcontrollers.

    probably the cheapest solution would be a Atmel or Microchip uC with on board usb.
    PIC18f2550 is pretty common, and it comes in DIP packages so you can breadboard your design easily.

    USB bit whacker is a cool open source project that you could build yourself from the files supplied here
    http://www.schmalzhaus.com/UBW/
    or buy a preambled version from SparkFun
    http://www.sparkfun.com/products/762

    the price is similar to the Arduino so maybe that's a better option, its simpler to program, and there are many examples. There are some pretty cheap open source Arduino compatible boards out there that you could build yourself as well.
     
  3. dynamis_dk

    dynamis_dk Grr... Grumpy!!

    Joined:
    23 Nov 2005
    Posts:
    3,761
    Likes Received:
    339
    I can solder ok but does really have any circuit building skills.

    Pre-made and easy to program sounds good as I'll take a further look.

    Generally speaker, how is the data from a controller passed to windows?

    Ideally I'd like to be able to setup as a game controller or something similar so i can map a button press to an eventghost action
     
  4. GuilleAcoustic

    GuilleAcoustic Ook ? Ook !

    Joined:
    26 Nov 2010
    Posts:
    3,277
    Likes Received:
    72
  5. arakis

    arakis What's a Dremel?

    Joined:
    24 Aug 2011
    Posts:
    44
    Likes Received:
    6
    I think the standard arduino uses a ftdi chip to emulate a serial port. So data is sent to the computer over a serial port. I don't think its possible to directly emulate a keyboard USB HID class with the Arduino.
    I think it would be much easier for you to emulate a ps/2 keyboard, any uC (including Arduino) can do it and there are many examples around. And then just use a usb-to-ps2 adapter to get the USB.
     
  6. arakis

    arakis What's a Dremel?

    Joined:
    24 Aug 2011
    Posts:
    44
    Likes Received:
    6
  7. 13eightyfour

    13eightyfour Formerly Titanium Angel

    Joined:
    9 Sep 2003
    Posts:
    3,454
    Likes Received:
    142
    How about the I-PAC?
     
  8. dynamis_dk

    dynamis_dk Grr... Grumpy!!

    Joined:
    23 Nov 2005
    Posts:
    3,761
    Likes Received:
    339
    I like the look of that I-PAC system... could be very easy to setup.

    I've got a plan for something free once I get a few bits from work tomorrow so I'm going to test my free method first then if it doesn't work out or I need a better solution I'll look at the I-PAC system afterwards.

    Case should arrive tomorrow / Tuesday so I'll have a better idea what I'm up against in the next few days. Could involve me making a few stripboard PCB's or even etching at home (I already got the gear just never got round to trying it lol)
     
  9. dynamis_dk

    dynamis_dk Grr... Grumpy!!

    Joined:
    23 Nov 2005
    Posts:
    3,761
    Likes Received:
    339
    Well, I've tried the free keyboard method and it worked just fine but I've decided to go with the I-PAC2 system. Main reasons are it will allow me to wire the ground connection on my PCB in a daisy chain and the software based programming will allow very simple changes to the mapping without any re-wiring (which the keyboard modding wouldn't).

    Cheers for the advice and suggestions
     
  10. GuilleAcoustic

    GuilleAcoustic Ook ? Ook !

    Joined:
    26 Nov 2010
    Posts:
    3,277
    Likes Received:
    72
    I-PAC is a good solution. I have look at it for an arcade stick (this is IMHO the best solution if you want a ready to use controler).
     
  11. Byron C

    Byron C Multimodder

    Joined:
    12 Apr 2002
    Posts:
    9,880
    Likes Received:
    4,493
    That wouldn't have been my first thought, but that's a pretty neat idea. A word of advice though, the one in that link will not retain it's programming when it's powered down - the full I-Pac does, but not the VE model. By default, the keys are mapped to the MAME standard keyboard controls; if you want to use a different keymap then you'll have to reprogram it every time you power down/boot.

    May not be a problem for you though, as long as the inputs you use aren't mapped to keys that would control whatever front end you are using; e.g., your "skip" button is connected to an input that maps to the "P" key, but the "P" key is actually used by the software for play/pause.
     
  12. dynamis_dk

    dynamis_dk Grr... Grumpy!!

    Joined:
    23 Nov 2005
    Posts:
    3,761
    Likes Received:
    339
    Ah, but I read the details before I purchased - I bought the non-VE version :idea:

    cheers for the heads up tho :clap:
     

Share This Page