Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: APAC concerns  (Read 2808 times)

0 Members and 1 Guest are viewing this topic.

Ropi Jo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:January 30, 2024, 04:26:37 pm
  • I want to build my own arcade controls!
APAC concerns
« on: June 15, 2020, 06:08:43 pm »
A post I read earlier has got me a little concerned about the behavior of the APAC.

In my mame build I'm having hot-swap CPs. The APAC will already be plugged into the USB socket before the CP with pots is plugged in.

My concern is that the APAC will stay in digital mode when I plug in the CP with pots as it was booted without pots.

Can anybody confirm or refute this please? Or suggest a workaround?

Thank you.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 04:10:03 am
  • Designated spam hunter
Re: APAC concerns
« Reply #1 on: June 15, 2020, 09:12:24 pm »
The workaround is to mount the A-Pac on the removable CP.

That way, the pots are always connected to the A-Pac and the USB cable is all you plug/unplug.

If you disconnect the pots from the A-Pac, you'll leave the analog inputs floating which will almost certainly cause erratic inputs due to ElectroMagnetic Interference (EMI) when the wires from the A-Pac to the panel-disconnect connector act as antennas for a wide variety of signals.

One possible down-side to mounting the A-Pac on the panel is the Windows controller renumbering issue, but there are several ways to fix that.   ;D


Scott

Ropi Jo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:January 30, 2024, 04:26:37 pm
  • I want to build my own arcade controls!
Re: APAC concerns
« Reply #2 on: June 16, 2020, 04:07:34 am »
The workaround is to mount the A-Pac on the removable CP.

That way, the pots are always connected to the A-Pac and the USB cable is all you plug/unplug.

If you disconnect the pots from the A-Pac, you'll leave the analog inputs floating which will almost certainly cause erratic inputs due to ElectroMagnetic Interference (EMI) when the wires from the A-Pac to the panel-disconnect connector act as antennas for a wide variety of signals.

One possible down-side to mounting the A-Pac on the panel is the Windows controller renumbering issue, but there are several ways to fix that.   ;D


Scott

Thank you Scott.

That's what I thought. Bit of a bummer. I don't want to put the APAC in the CP as there will be maybe 3 CPs, and the Windows numbering issue I've has problems with in the past when swapping USBs.

What about this scenario...if it's booted with a pot connected, so it's in analogue, then the pot is disconnected, will it stay in analogue? Or will it go to digital immediately the pot is disconnected?

Or... if one input on the APAC has a pot connected will the whole APAC be in analogue or only the input with the pot?

I really hadn't anticipated this scenario. I had no idea the APAC would default to digital.

The build currently has a JPAC (just for digital... no video), an APAC and and OPTIPAC, which were planned to be left permanently connected.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 04:10:03 am
  • Designated spam hunter
Re: APAC concerns
« Reply #3 on: June 16, 2020, 12:24:14 pm »
What about this scenario...if it's booted with a pot connected, so it's in analogue, then the pot is disconnected, will it stay in analogue? Or will it go to digital immediately the pot is disconnected?
Brentglov observed that the A-Pac would only auto-detect pots and set the input to analog when the board booted up.

It wouldn't make sense to re-check and reconfigure the board during normal operation.

Andy would have designed it with the most efficient code loop possible ==> fastest possible sample/update rate and least lag.

Or... if one input on the APAC has a pot connected will the whole APAC be in analogue or only the input with the pot?
Only the input(s) where a pot is auto-detected should be set to analog.   :dunno

I really hadn't anticipated this scenario. I had no idea the APAC would default to digital.

The build currently has a JPAC (just for digital... no video), an APAC and and OPTIPAC, which were planned to be left permanently connected.
There's an easy way to sidestep having the CP with pots connected during power-on -- add fake pots to the other CPs.

A normal pot has 5v (red), wiper (yellow), and ground (black) connections.



For your fake pots, just use two resistors of the same value. (R1 and R2)
- The rating of R1 and R2 is not critical since the A-Pac can use a wide range of pot resistance values so a pair of 2.2k, 3.3k, or 4.7kOhm resistors should work fine.
- Match the resistance of R1 and R2 as close as possible so the fake pot is "centered".
- Wattage rating isn't important since Ohm's Law shows a 5k pot will only draw 1mA of current from a 5v source (5v/5kOhms=1mA) and when you apply that current draw to the DC power formula you get 5v * 1mA = 5mW.

    5v ---- R1 ----wiper ---- R2 ---- ground

The fake pot(s) will ensure the A-Pac initializes properly and keep the input(s) from floating.  When you swap panels, the A-Pac shouldn't reboot/reconfigure.   :cheers:


Scott

Ropi Jo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:January 30, 2024, 04:26:37 pm
  • I want to build my own arcade controls!
Re: APAC concerns
« Reply #4 on: June 16, 2020, 02:42:24 pm »
There's an easy way to sidestep having the CP with pots connected during power-on -- add fake pots to the other CPs.
Scott

That's a realy good idea. Thank you. Just to pick holes... If I booted with no CP I'd be on a 'sticky wicket' (don't worry... us Brits speak a different version of English)

How about this... I've got a box of relays and timer relays. I could rig up a simple circuit to connect said resistors (or a pot even) for 1 minute from boot then disconnect. I could use the 12V from the ATX PSU to run the circuit. Even if an analogue CP was already connected that would just change the pot value during that time. As long as the APAC didn't throw a wobbly when the pot value changed I think this could be a goer. Only time this may be an issue would be if I did a re-boot and the 12V didn't cut out during that time the APAC would then see no pots and reset to digital (picking holes again) on the re-boot. I'll have to have quick work out of how many relays this would require.

Ropi Jo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:January 30, 2024, 04:26:37 pm
  • I want to build my own arcade controls!
Re: APAC concerns
« Reply #5 on: June 16, 2020, 02:48:01 pm »
And confirmed by Andy in an email ...

The board will detect the type of device connected. The check is done at power on, then is retained until power is off.

I can definitely work with this.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 04:10:03 am
  • Designated spam hunter
Re: APAC concerns
« Reply #6 on: June 16, 2020, 05:11:29 pm »
You're already making this harder by insisting on using a hardware approach (A-Pac mounted in the cab) instead of a software approach.
- Once again, there are several ways to deal with the Windows controller renumbering issue.
- Fix that issue and you will avoid the "holes" you mention.
------------------
Even if you refuse to consider the software approach, forget the Rube Goldberg machine relay approach.   ::)

Fake pots for the non-analog CPs is the easiest way.
- Just have a panel conected when you boot up the system.
-- Odds are that the panel you used last session will still be installed when you boot up or you'll swap panels before (or after) the A-Pac initializes.
- If you mess that up, connect a panel then reboot.


Scott

Ropi Jo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:January 30, 2024, 04:26:37 pm
  • I want to build my own arcade controls!
Re: APAC concerns
« Reply #7 on: June 16, 2020, 06:07:31 pm »
Yes. You are right Scott. I am overcomplicating it big time.

And... now I realise that, I can make your method even simpler.

Each CP connects to the machine via re-ourposed ethernet cables. There are 2 RJ45 sockets ready for the analogue connectors in the bulkhead of the machine going directly to the APAC. I can simply leave a plug in each with the necessary resistors terminated into them to mimic the pots. There's about a 3" gap once the CP is locked into position so the RJ45s can just stay in place and I'll remove them when i want to plug in the analogue CP.

It's so simple.

Thank you so much for you help.