Using Particle Photon to control an arcade game

Hi,

I am trying to use a Photon to control an arcade-style video game cabinet. The game PCB is the standard 60-in-1 JAMMA board which includes wiring for a coin door. http://www.jammaboards.com/jcenter_jamma_pinout.html

I have connected the 5V and ground wires from the game to the VIN & GND on the Photon. The Photons turns on and breathes cyan.

I have also connected the coin wire POS & GND to PIN D6 and GND on the Photon. PinMode for PIN D6 is set to Output. The idea is to set DigitalWrite to High to trigger a ‘Credit’ for the game and allow the player to select a game to play.

PROBLEM:
With this wiring configuration, the game displays a ‘COIN JAM’ error message. I’m guessing I am missing something fairly simple here, but I cannot get it to work.

I have tried setting the DigitalWrite delay in several increments from 1000ms all the way down to 2ms with no improvement.

Also, when I connect the Photon to the 5V power I hear intermittent interference noise coming through the game speaker.

I verified I am using the correct wires from the JAMMA wiring harness by touching the POS to GND. This successfully triggers a game credit.

My simple Photon code is below. Am I missing something obvious?

Thanks,

Darryl

Sorry if this is a stupid question since I know next to nothing about your setup, but are you only getting that error when you the credit() function is run or right at the beginning of execution? Could you try setting D6 to the default state of LOW in setup()?

Also, you say that touching it to GND is what triggers a credit, but your credit() function seems to assume a default state of LOW and momentarily switches it to HIGH?

1 Like

While the JAMMA docs are a bit unclear here

I suppose @indraastra is right and it should be "GROUND signal".

So you'd rather want to pull active LOW and since the Photon GPIO HIGH level is 3.3V I would suggest to set the pin high impedance (INPUT) when not triggered.

void setup()
{
  ...
  pinMode(D6, INPUT);
}

int credit(String args)
{
  Serial.println(args);
  pinMode(D6, OUTPUT);
  digitalWrite(D6, LOW);
  delay(200);
  pinMode(D6, INPUT);
  return 1;  
}
1 Like

Indraastra/ScruffR,

Sorry about my lack of response. I had waiting to see an email notification alerting me to responses, but I must not have my settings configured to enable notifications. Anyway, thank you both for your replies. I appreciate it,

You are definitely correct regarding the ground signal, I now believe my wiring is wrong because i still cannot complete the circuit correctly to result in a single machine credit. I know I’m missing something simple here, but I’m too novice to figure it out so far. :slight_smile: I’ll keep plugging away in my spare time…

Darryl

Good luck, know the feeling. When you get it working it will be a rush! Perhaps you could try to disconnect 5 volts +ve, you only need a common ground also 5 volts on a spark is not good, it is 3.3 volts, perhaps that is the issue? You might need to level shift the signal, easy circuit to make with a 2n7000 mosfet and a couple of 10k resistors and is bidirectional and works with I2C at full speed…