Shop OBEX P1 Docs P2 Docs Learn Events
Noob Alert - I need some help completing a circuit. — Parallax Forums

Noob Alert - I need some help completing a circuit.

BobbyJBobbyJ Posts: 22
edited 2004-12-22 16:03 in General Discussion
I'm trying to modify one of my XBox game controllers. I want to use a PS/2 mouse and full-size acarde game style buttons as inputs for playing games.·So far I have been able to program an SX28 to act as a device host for the mouse.·It currently suports a 3-button mouse with a scroll wheel. As soon as I buy a 5-button mouse, it will support that also. The X and Y axis movement data from the mouse is going to be used to control two 10k ohm digital potentiometers. The XBox game controller has two small analog joysticks that you control with your thumbs. They are called thumbsticks, imagine that. The thumbsticks use two 10k ohm potentiometers to·measure X and Y axis movement. The two digital potentiometers will·replace one of the thumbsticks.

Now I'm stuck on what to do for the buttons on the game controller. The idea is to be able use the mouse buttons and scroll wheel for some of them. I sacrificed one of my XBox game controllers to the gods in hopes of gaining worldly knowledge and unlimited wealth. But unfortunitally, all I got in return was bogus powerball numbers and now I can't find my library card. Luckly, I did gain a little insight on how the game controller works. More importantly, how the buttons are wired. The heart of the controller is an Atmel 43USB353 microcontroller. There are 8 pushbuttons on the controller. 2 of the buttons are simple machanical momentary switches and the circuit design for them is fairy simple...ground---button---I/O pin.

The other 6 are different.·When you press one of the buttons, it presses down on to the back (non-sticky) side of a sticker that is stuck on to the pcb. I have no idea what it is, but there is·some kind of black stuff painted on the sticky side of the sticker, which matches up with more of the·black stuff which is painted on the·pcb.·For each button, the black stuff is painted on the·pcb in two halfs, they do not make contact with each other on the pcb. One half is connected directly to ground, and the other makes it's way to one of the I/O pins on the Atmel chip.·The black stuff on the sticker connects the two halfs, and the contact is constant...it never breaks (unless you·remove the sticker).·When the button is NOT pressed the·buttons show a resistant of 6.2k ohms.·When the button is first pressed, the resistance drops to 5.2k ohm.·The harder you press the button, the lower the resistance goes. It drops down to 2.5k ohms.·Apparently this is by design and there are games that·use this feature and·require you to press the buttons harder or softer to do certain tasks.

this is the circuit for one of the buttons with the black stuff:
ground-----|button|-----+-----Atmel I/O pin (each button has a unique pin)
                        |
                        |
                   4.7k resistor
                        |
                        |
                       |X|
                        |
                        |
                        +-----capacitor (unknown value)------ground
                        |
                        |
                  Atmel I/O pin


Everything above the 'X' is·repeated 6 times, once for each button. They all basically connect at the 'X'.·The potentiometers·used by·the thumbsticks also connect here. One pin connects to ground, one connects to a unique I/O pin, and the third connects to the 'X'.

I need to replace the buttons with something that can be controlled by the SX28 I am using. I don't need the varible resistance feature the buttons on the game controller have, on/off.·My first thought was to use relays that could be triggered by the SX. But, mechanical relays were ruled out right away because I really don't want to listen to them constantly clicking open and closed, and I really don't want to use solid state relays simply because them suckers ain't cheap. I found a web site that showed how some guy modified an XBox controller so he could use·full size arcade style buttons and a single larger joystick. He wired the switches using a common ground and then ran a wire from each switch·that was soldered directly to the I/O pins of the microcontroller. One thing he did stress was to not remove the sticker or any of the black stuff.

So, longer story short...anybody have any ideas?

Comments

  • BobbyJBobbyJ Posts: 22
    edited 2004-12-22 15:30
    I was at work all night not do any work and did some reading on transistors.·I'm wondering if something like this might work:
    ground---|button|--+--------------+---Atmel I/O pin 
                       |              |   (each button has a unique pin)
                       \              |
                       / R2           |
                       \              |
                       /             4.7k resistor
                       |              |
                       |              |
                       |             |X|
                       |C             |
    SX28      R1     B | NPN          |
    I/O ----/\/\/\-----+ transistor   +---capacitor-----------ground
    pin                |              |   (unknown value)
                       |E             |
                       |              | 
                       |              |
                     ground          Atmel I/O pin
    
    
    

    The idea being that the SX28 pin is·configured as an output.·The transistor would act as the button. When the SX pin is set·low nothing happens, the game controller would see what it normally sees when the button is not pressed. But when the SX pin is set high, then the game controller would see it as the button being pressed.

    Anybody have any thoughts on this?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2004-12-22 16:03
    Since noone else is piping up, I'll try to tackle it. But I may not have enough time to properly look at it until I return on the 28th. BTW you are correct that transistors can be used as switches, it looks like there aren't any significant inductive elements so you won't need to worry about flyback issues.

    Paul
Sign In or Register to comment.