0

Super Game Pi - Joystick issues
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Super Game Pi - Joystick issues

by jberries on Tue Jan 03, 2017 12:14 am

Hello
I have been struggling with this Analogue Joystick issue for several days now and I am out of ideas and was hoping someone might be able to shed some light on the issue.
I have been working on an incarnation of the Super Game Pi (called Super Game PiSP) which basically uses the same electronics as Super Game Pi. I am running a Raspberry Pi 2 with Retropie installed. My issues is the analogue joystick is doing strange things, up and left don't register as being pressed. Whereas right and down double registers. A right joystick movement registers a left and right together and a down movement registers a up and down together. See below output from running "/usr/local/bin/retrogame" in putty.
putty.jpg
Putty output
putty.jpg (130.22 KiB) Viewed 336 times

Here is the Joystick to Cupcade PCB wiring.
20170103_133445_resized.jpg
Joystick to Cupcade PCB wiring
20170103_133445_resized.jpg (540.64 KiB) Viewed 336 times

Here is the Raspberry Pi to Cupcade PCB wiring
20170103_160452_resized.jpg
Raspberry Pi to Cupcade PCB wiring
20170103_160452_resized.jpg (822.46 KiB) Viewed 336 times

Any help would be greatly appreciated.
PS: I thought it might be a flux residue issue, but I have wiped the PCBs multiple times.

jberries
 
Posts: 5
Joined: Mon Jan 02, 2017 9:07 pm

Re: Super Game Pi - Joystick issues

by pburgess on Tue Jan 03, 2017 4:15 pm

Soldering looks totally fine from here. Those 90 degree bends on the wires always give me pause, so if you have a multimeter, I'd suggest testing continuity from each of the 6 pins in use from the Cupcade PCB to the Pi's GPIO header (can do this from the backside of the Pi, since there's a jumper wire blocking each pin).

On the software front, I noticed the Super Game Pi guide is a bit out of date. I'm gonna make a pass through cleaning that up, but do you recall what steps you used to get retrogame running? I see you're using the new version with the config file, but the guide still shows the oldschool code and other setup stuff...it's all done in a script now. I wonder if there's two versions running simultaneously and they're conflicting, or something.

Can all be done with the installer script shown here:
https://learn.adafruit.com/retro-gaming ... nd-install
The "initial setup" directions in the Super Game Pi guide are for the oldschool code and that's what I'll be updating.

I don't have the -exact- Super Game Pi hardware here, but do have a Cupcade PCB and did the same jumpers-and-stick combo, and it's working as expected. So I think it's either in those sharp bends or the retrogame install.

pburgess
 
Posts: 4045
Joined: Sun Oct 26, 2008 2:29 am

Re: Super Game Pi - Joystick issues

by jberries on Tue Jan 03, 2017 6:45 pm

Thanks pburgess for your great response, you gave me some clues on getting closer to the issue. At this stage I think the software is ok and I am focusing on the joystick and Cupcade PCB. As you suggested, I used a multimeter and measured volts. I put it on the ground of the analogue joystick GND and tested the Xout and Yout. The results look ok, but I would have expected more variation in voltage in a joystick movement, as below the voltage change is sometimes only 0.3v (is that ok?). The highlighted values are the values that change on a joystick movement
Circuit_volts_joystick.jpg
Circuit_volts_joystick.jpg (17.61 KiB) Viewed 307 times

The next table is where the issue shows up with the Cupcade PCB. It shows that a change in voltage happens to both the Up and Down wires that go to the Raspberry Pi when a down is pushed on the joystick. The same happens for when a right is pushed on the joystick, the left and right Raspberry Pi wires voltage change.
Circuit_volts_cupcade.jpg
Circuit_volts_cupcade.jpg (25.17 KiB) Viewed 307 times

Is this an issue with the Cupcade PCB or the Analogue Joystick?
Many thanks

jberries
 
Posts: 5
Joined: Mon Jan 02, 2017 9:07 pm

Re: Super Game Pi - Joystick issues

by pburgess on Tue Jan 03, 2017 7:07 pm

Sounds more like a Cupcade PCB issue. Can you get a clear shot of both the front and back sides of the board? Especially near the comparator (the larger IC on the board). Possibly a solder bridge around there somewhere. Otherwise, may need replacing.

pburgess
 
Posts: 4045
Joined: Sun Oct 26, 2008 2:29 am

Re: Super Game Pi - Joystick issues

by jberries on Tue Jan 03, 2017 8:30 pm

Ok thanks pburgess. Here is some images
20170104_125845_resized.jpg
20170104_125845_resized.jpg (970 KiB) Viewed 293 times

20170104_132001_resized.jpg
20170104_132001_resized.jpg (813.58 KiB) Viewed 293 times

20170104_125800_resized.jpg
20170104_125800_resized.jpg (954.45 KiB) Viewed 293 times

jberries
 
Posts: 5
Joined: Mon Jan 02, 2017 9:07 pm

Re: Super Game Pi - Joystick issues

by zener on Tue Jan 03, 2017 8:59 pm

I don't understand the analog voltages measured in the first table. Shouldn't the centered voltages be around 2.5V?

zener
 
Posts: 4483
Joined: Sat Feb 21, 2009 2:38 am

Re: Super Game Pi - Joystick issues

by pburgess on Tue Jan 03, 2017 9:20 pm

In theory, yes, unless the comparator circuit is pulling it one way or another. Just in case though, could you also get a pic of the back side of the joystick board? Thanks.

Only way to be sure would be to desolder the wires from the joystick board, then measure the resistance between GND & Xout and GND & Yout (should be 0 to 5K-ish as the pots sweep, though maybe with a few hundred Ohm buffer at either extreme, e.g. 500-ish Ohms to 4.5K-ish)

pburgess
 
Posts: 4045
Joined: Sun Oct 26, 2008 2:29 am

Re: Super Game Pi - Joystick issues

by jberries on Tue Jan 03, 2017 9:42 pm

Yeah zener, I didn't get that either, but I don't know much about what it should be. (ok just read pburgess post) I believe the joystick has two potentiometers in it, one for left/right, one for up/down. Should/can these be adjusted or calibrated perhaps?

pburgess I could de-solder the joystick, maybe simpler to just cut the 4 connecting wires and then do the ohm test - would that give the same result? (oups sorry, just reread you post, nevermind you say the same)
Also pic as you requested.
20170104_143256_resized.jpg
20170104_143256_resized.jpg (685.71 KiB) Viewed 280 times

jberries
 
Posts: 5
Joined: Mon Jan 02, 2017 9:07 pm

Re: Super Game Pi - Joystick issues

by jberries on Wed Jan 04, 2017 3:31 am

Hi All,
After a lot of debugging I got to the bottom of it, I de-soldered the joystick. The joystick ended up being fine, it was the joystick PCB that was playing up. I have ended up still using the joystick PCB, but have hacked it, cut the PCB circuits and rewired it manually. Worked straight away! Thanks for your help, especially big thanks to pburgess for helping me zone in on the issue. Couldn't have sone it without you.
Regards

jberries
 
Posts: 5
Joined: Mon Jan 02, 2017 9:07 pm

Please be positive and constructive with your questions and comments.