connection issues/advice on hx616 coin slot to usb decoder for work project

Thread Starter

TimG199

Joined Apr 17, 2023
2
Hey all,

I'm currently building an escape room & have decent good electronics knowledge, however, I'm on a project that has stumped me:

We have an arcade machine built with a custom mini game running on a pc, the controller joystick and buttons operate via a usb decoder & are fully functional: https://thepihut.com/products/zero-delay-arcade-usb-encoder-and-wire-set

We also have a coin slot that we need to fire the game on coin insert (think retro insert coin graphic): https://thepihut.com/products/coin-acceptor-programmable-4-coin-type

Both above links are the actual products used.
So Far the wiring is as follows:

Coin slot:
12v+/GND from 12v mains supply
'Coin' cable to negative pin of one of the button pins on decoder (as suggested in video linked below)

USB decoder:
5v/GND/data=/- from usb
buttons connected in correct coded pins

Video of how has been done before:

The only reason I can think the video's way is not working is that the coin slot is on a 12v mains supply and not from the PC, but I wouldn't have thought that would be enough to stop the 'Coin' output from sending out 5v.

The 'button' connections on the usb decoder are outputting 5v continuously and when touched together they fire up as would be expected. so I'm stuck with: a pair of cables that need to be connected to trigger and a single trigger cable that should send 5v (doesn't but unknown if pwr supply issue looking into tomorrow)

Has anyone come across this issue/ does anyone have any ideas on how I can get this working?

Many thanks!

Tim
 

djsfantasi

Joined Apr 11, 2010
9,163
Is the ground of the coin slot connected to the PC or if the coin acceptor and USB decoder grounds are connected? You can’t send a 5V signal without having a common ground.
 

Thread Starter

TimG199

Joined Apr 17, 2023
2
Is the ground of the coin slot connected to the PC or if the coin acceptor and USB decoder grounds are connected? You can’t send a 5V signal without having a common ground.
thanks for your reply!

the ground of the coin slot is connected into a dedicated 12v mains adapter, I tried to connect the grounds together and the usb decoder started flashing and disconnecting from the pc. My thinking was that it wouldn't be able to send 5v without a ground but when I connected the ground & 'coin' cable it didn't give a solid voltage reading (was in the mv range).

I did remove the 5v+/- from the usb pins and ran it in parallel from the 12v utilizing a 12v-5v step-down but the pc faild to reconise the decoder was plugged in.
 

djsfantasi

Joined Apr 11, 2010
9,163
thanks for your reply!

the ground of the coin slot is connected into a dedicated 12v mains adapter, I tried to connect the grounds together and the usb decoder started flashing and disconnecting from the pc. My thinking was that it wouldn't be able to send 5v without a ground but when I connected the ground & 'coin' cable it didn't give a solid voltage reading (was in the mv range).

I did remove the 5v+/- from the usb pins and ran it in parallel from the 12v utilizing a 12v-5v step-down but the pc faild to reconise the decoder was plugged in.

I think it’s time for you to draw out how you’ve connected everything together. Your descriptions are too vague. What’s a “dedicated 12V mains adapter”?

Are you aware of different types of grounds? The ground of a mains plug is earth ground. Then, signal grounds are a different animal. That “ground” is a reference point for voltages. And all components must have a common reference point or ground. In many cases, it might be the negative terminal of a DC circuit.

Please sketch out or supply a schematic of how you’re connecting the various bits.
 

Ya’akov

Joined Jan 27, 2019
9,170
In order for the USB device to detect the coin acceptor pulse it will need a path for a circuit.
According to what you say the video suggests (I didn’t watch it), it appears the intention is to pull the USB device’s input low—that is, to connect it to the 0V rail of the supply. For that to work they have to be sharing the same +12V that is powering the coun acceptor, and they aren’t.

If the USB device can be set to accept an active high signal, that is, a connection to a local high, you can connect the coin acceptor through a resistor and make the grounds common. If not, you will have to work out how to power the USB device from the same supply, which shouldn’t be too hard.
 
Top