Propeller as controller button

I have a cheap usb “snes controller” that I want to use for usb input on my computer through a propeller chip. So instead of a person pushing a button on the controller, I want the propeller to control the button. I have taken apart the controller and I found the contact pads. How do I interface the contact pads to the propeller? I can solder wires to the pads, but how do “hook up” the wires to the propeller? Thank you for any suggestions

Comments

  • Duane DegnDuane Degn Posts: 10,136
    edited 2020-07-30 - 22:34:14
    The safest bet is to have the Propeller control relays to make the desired connections.

    You might be able to use a simpler approach if the hardware allows. A lot depends on the way the controller poles the switches. Often times the switches are multiplex which makes controlling a switch with direct connection callenging.

    Here's a link to an old project of mine. I used relays and an old cell phone to allow a Propeller to send text messages. There are a zillion better solutions to the one I used but my solution sure made a lot of fun relay noise.

    Edit: The cell phone buttons were multiplex. I couldn't figure out a way to simulate a button press without using the relays.
  • Generally, one side of each button pad will be going to ground, the other into a pulled-up input pin on the IC.

    To simulate a press on such a buttons, simply pull the input side of the button circuit low. Since the controller is most likely using 5V, you might need to use some kind of transistor circuit to do it.
    (Another note: if you are not powering the propeller from the same computer's USB ports, you must also connect the grounds together)

    Also, if you simply want to give controller inputs to the PC, you can bypass the middleman and use some software on the PC to accept inputs over the Propeller's COM port. See the instructions and Spin code for my SNES2COM program (which is designed to read a real SNES controller and make it available to the PC)
  • Wuerfel_21 wrote: »
    Generally, one side of each button pad will be going to ground, the other into a pulled-up input pin on the IC.

    This makes life easier.
    Nevermind my relay suggestion.
  • Thank you for the info

    After some research I might have found another approach. I’m trying to interface the propeller to a raspberry pi (not serial) but as a joystick/keyboard (HID). Adafruit has some software that will use raspberry pi gpio pins to make keyboard functions. https://github.com/adafruit/Adafruit-Retrogame This should work for my project...however, can I just directly hook my propeller output pins to the rpi gpios? Then I could skip using the cannibalized game pad
  • Yes, you can directly hook propeller pins to raspberry pins, but ideally put some 3k-ish resistors in series for safety.
  • Why don't you just use serial? Doesn't anybody have a program that runs on the Pi that reads serial input and turns it into keyboard input?
Sign In or Register to comment.