Need advice on how to trigger coin hopper

Hi everyone, I am working on an installation that has a coin hopper that needs to be triggered from an Arduino. The salesman who sold us the machine promised help but has gone AWOL so I could really do with some help. The coin hopper in question is American changer AC-1000 series. The aforementioned person sent me a diagram as following and mentioned that the pulse should be industry-standard 50ms on / 50ms off on pin 2 (Bill In) as per the diagram in image 1. Based on the diagram, I connected the wires as seen in image 2.

I connected the signal pin to pin 9 on arduino Mega and tried the following code:

[color=#222222]void loop() {[/color]
[color=#222222]
digitalWrite(9, HIGH);[/color]
[color=#222222]delay(50);[/color]
[color=#222222]digitalWrite(9, LOW);[/color]
[color=#222222]delay(50);[/color]

[color=#222222]}[/color]

This does not seem to work but when I removed the common ground pin from the arduino. The machine randomly dispensed the coins sometimes but I couldn't really understand what was happening or where I was going wrong. I am at my wit's end so any help will be appreciated.

Thank you in advance!

Image 1.png

Image 2.png

Image 1.png

Image 2.png

Does pin 2 BILLIN require a 24V high-level?

Thanks.. I shall look into it. I am currently using an Arduino Mega and I assumed that it would work with a 5v signal.

aboltaabol:
Thanks.. I shall look into it. I am currently using an Arduino Mega and I assumed that it would work with a 5v signal.

Don't just connect 24V to it as it may damage the input circuit if it's not meant for it.

Verify through documentation and research before risking damage to the unit.

Hey! Thank you for replying. Today, I tried pulsing pin 2 but that didnt work but funnily, when I short pin 2 and ground pin for a small time (<1 second), it dispenses a coin.

Post your setup() code, this might work, depends on how pin 9 is configured.

void loop() {
digitalWrite(9, LOW);
delay(50);
digitalWrite(9, HIGH);
}

DO NOT connect 24V to an Arduino I/O pin, you may need a switching transistor depending what is being switched. (solenoid)?

aboltaabol:
Hey! Thank you for replying. Today, I tried pulsing pin 2 but that didnt work but funnily, when I short pin 2 and ground pin for a small time (<1 second), it dispenses a coin.

If this is the action that you want, then you're almost there. As others have stated, if there is 24v on the hopper pin, do not connect it directly to the Arduino. Use an NPN transistor (eg 2N3904) switch:
Arduino output --> 1k resistor
1k resistor --> base of transistor
Emitter of transistor --> ground
Hopper pin 2 --> transistor collector
Arduino ground --> hopper ground
Google "simple transistor switch" if you want a diagram.
I'm assuming that the hopper doesn't mind having its pin 2 shorted to ground. It would not hurt to verify this and could hurt a lot not to.
From there, the code fragment that you wrote should work (i.e., 50 ms logic high to dispense a coin).
S.

Hey everyone,

So it worked. Turns out it needed to be pulsed from HIGH to LOW. Thank you all for brainstorming along!

digitalWrite(coinPin,HIGH);
delay(50);
digitalWrite(coinPin,LOW);
delay(50);
digitalWrite(coinPin,HIGH);

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.