Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: brentglov on June 12, 2020, 08:46:24 am
-
Hi All
First post here.
I have a LA Machineguns cab with the positional guns (pot controlled). Fully functional but I wanted to expand it with more games.
So...I am sypmathetically making it into a multi game gun cab.
I purchased an apac board and traced the guns back to the connector boards at the rear of the machine
VCC
GND
X Channel
Y channel.
The apac has:
GND
Left
Right
Up Down
I went directly from the pots in the gun to test and I can get it working as joystick in the control panel but...it only jumps from corner to corner - there is no (and i am not sure if there should be) smooth movement along the x and y axis when I move the gun around just corner to corner jump.
I tried it out in mame and its the same thing.
Am I missing something simple here - i understood the apac automatically detected potentiometers and behaved accordingly.
To test, I wired in another standard pot and it behaved the same.
Obviously as I have everything else wired up at the rear of the machine I would rather wire the apac from the connectors there but am at a loss how to wire a single X and Y channel into 4 channels.
Can anyone shed any light on this please
Thanks
Brent
-
I went directly from the pots in the gun to test and I can get it working as joystick in the control panel but...it only jumps from corner to corner - there is no (and i am not sure if there should be) smooth movement along the x and y axis when I move the gun around just corner to corner jump.
Sounds like swapped wires.
Am I missing something simple here - i understood the apac automatically detected potentiometers and behaved accordingly.
To test, I wired in another standard pot and it behaved the same.
Obviously as I have everything else wired up at the rear of the machine I would rather wire the apac from the connectors there but am at a loss how to wire a single X and Y channel into 4 channels.
You don't need 4 inputs to connect a positional gun, there are two analog inputs ("up" and "right" - yellow wiper wires), 5v ("down" and "left" - red wires), and ground. (black wires)
- The pot acts as a voltage divider. The position of the knob determines the output voltage on the center (wiper) tab.
- You can connect your daisy-chained VCC wire to either "down" or "left" to power both pots.
- One thing that can cause confusion is that Andy uses the same PCB for I-Pacs (note the "I-Pac" silk-screened near the USB) and A-Pacs.
(https://www.ultimarc.com/images/1/apac_step1.jpg)
Connect the center (wiper) tab of your potentiometer to an analog input (labeled "up" or "right"), connect one outer tab to 5v (labeled "down" or "left"), and connect the other outer tab to ground. (labeled "gnd")
- If the axis moves in the opposite direction, swap the outer tab connections.
More info about analog encoders and pots at http://wiki.arcadecontrols.com/index.php/Analog_Encoders#How_a_potentiometer_provides_the_voltage_for_an_analog_encoder_to_measure (http://wiki.arcadecontrols.com/index.php/Analog_Encoders#How_a_potentiometer_provides_the_voltage_for_an_analog_encoder_to_measure).
(http://wiki.arcadecontrols.com/images/thumb/3/3e/Potentiometer_Internal_Parts.jpg/533px-Potentiometer_Internal_Parts.jpg)
Scott
-
Thanks very much for that info and the link explaining it better.
For clarification - when in windows gamepad setup - should normal behaviour be smooth movement around the box or jumping to all (correct) corners and center when centered?
I thought with the APAC translating the pots to analogue it should be smooth and accelerating to the edges.
Brent
-
For clarification - when in windows gamepad setup - should normal behaviour be smooth movement around the box or jumping to all (correct) corners and center when centered?
I thought with the APAC translating the pots to analogue it should be smooth and accelerating to the edges.
The normal behavior is movement that matches the wiper voltage.
- Linear pot taper ==> linear response. (positional guns and analog joysticks use linear pots)
- If you position the pot 1/2 way between left (0v) and center (2.5v), wiper voltage should be 1.25v and the crosshairs should be half-way between the left side and the center of the box.
The A-Pac converts the analog wiper voltage into the corresponding digital position value using 12-Bit analog to digital conversion.
- There are 4096 (212) possible position values
- There's a 0.001220703125v difference between each position
- 0v ==> position 0
- 2.5v (centered) ==> position 2047
- 5v ==> position 4095
EDIT: Looks like instead of the usual voltage measurement method, the A-Pac uses a "ratio comparison method" during the A/D conversion process.
Normally, you should see smooth movement as you change the position of the pot.
If you're seeing jitter/jumpiness, that could be the result of a poor wire connection or dirt or corrosion causing a poor/intermittent connection between the wiper contact and the resistive element.
- In this example, the resistance caused by corrosion drops an additional 2v so the wiper is at 2.5v instead of 4.5v.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=147803.0;attach=341195;image)
Scott
-
I have tried this now on 2 laptops and main PC same results on all
So I am trying with JoyTester as USB Gamepads in Windows 10 was always showing the big jump to each extremity.
Manufacturer ID: D209
Product ID: 1571
Product Name: Microsoft PC-joystick driver
RegKey: DINPUT.DLL
OEMVxD:
X range: 0 to 65535
Y range: 0 to 65535
Z range: 0 to 65535
Number of buttons: 28
Period range: 10 to 1000
R range: 0 to 65535
U range: 0 to 65535
V range: 0 to 65535
Capabilities: 0
Maximum axes: 6
Number of axes: 2
Maximum buttons: 32
I still get even when wired direct to a single pot on the gun that I know works as it works when running original cab game.....
full left - 0
Centre - 32767
Full Right - 65535
Absolutely nothing in between just the jumps to 3 locations only.
I ripped another pot out of an old bit of kit and same behaviour.
Tried on both guns on both axis - all same.
Is it out of the realms of possibility that my A-PAC isn't behaving correctly? or flashed correctly?
I ordered it as:
A-PAC Analog/Digital Dual Gamepad Interface
and yes as you said before Scott it is an IPAC silk screened ultimarc with an A-PAC sticker on it. It detects in Windows installed game controllers just as A-PAC.
Totally at a loss here.
Thanks
Brent
-
That is a real strange behaviour! Did you ever try a "normal" pot (e.g. 100k linear)?
There must be an unknown variable in your configuration...
Do you have a measurement device for measuring the output values of the pot?
-
Yes.
My goto "test" pot is a 5k Type EJ Extra Life pot from an old cocktail table. I have 2 and both were nigh on the same readings.
Reads 5.88 kohm on outer pins
reading from the wiper I get a smooth increase from 0.01 to 5.89 kohm.
No problems there.
So am at a loss as this gives the same erratic movements.
Brent
-
https://www.ultimarc.com/control-interfaces/a-pac/a-pac/ (https://www.ultimarc.com/control-interfaces/a-pac/a-pac/)
Inputs auto-detect whether pots or buttons.are connected.
Sounds like the auto-detect isn't working on your board. :dunno
One last test to confirm:
- Disconnect all controls from the A-Pac.
- Connect just the three wires from one of your test pots to the P2 side of the A-Pac.
- Connect the USB cable and plug it in.
- Move the pot through the full range of motion and stop at an off-center position.
If that axis behaves like button presses, e-mail Andy.
Scott
-
Embarassing update and closure :)
so i am offically a :tool:
Turns out the problem all along was the simplest.
I wasn't rebooting the a-pac with the pots wired so it was straight into digital mode.
All working good now on both guns plus added buttons from the rear of the machine so full steam moving forward on multi game front end.
Massive thanks to all who helped in this thread!!!!!
Brent
-
Glad you got it working. :cheers:
Scott