Propeller as controller button
ti85
Posts: 44
in Propeller 1
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
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.
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)
This makes life easier.
Nevermind my relay suggestion.
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
Now, I want to have the propeller chip Simulate the push buttons by using the propeller pins as output. I’m planning on using 3.3k serial resistors between the rpi gpio and propeller pins. However, my next question is related to powering the two devices. The propeller will be powered by usb on my computer(QuickStart board) and the rpi is powered by an external wall plug. So, do I need to have a common gnd between the two devices, in addition to the gpio pins?
The 3.3K resistors really only needed if you're using the Propeller with a 5V device. The RPi uses 3.3V logic and as long of the pins are set as input, a resistor isn't really needed. 100 ohm resistors could be added if you wanted to be extra safe.
The 3.3K resistors could cause problems in some scenarios. I personally think you'd be better off not using resistors.
Yes, you need to have a common ground between the two devices.