Trouble reading 0.2v 20mS pulse from a ch-926 coin reader

Hi all, A first post for me, so I hope that I get the etiquette correct.
I am a high school teacher and one of my student is using a ch-926 coin reader.
He has programmed the reader and is using an interrupt to pick up the rising pulse as suggested in numerous posts from the net.
A serial line is then posted to the serial monitor after a pulse is detected. However, no pulse is detected.
I have tested the below code by giving an artificial pulse of 5 volt or 3.3 volt straight onto the interrupt pin with success. (the pulse is read and the serial is displayed). So I believe that the setup of the Arduino and reader is correct.

I checked the size of the pulse from the CH -926 that is present on the interrupt pin on a CRO as 0 to 0.2 volt for 20 mS. This seems very small to me However, the supplier tells my student via email that a 0.2 volt pulse is expected.

The code is below and any help would be much appreciated.

const int coinInt = 0;
//Attach coinInt to Interrupt Pin 0 (Digital Pin 2). Pin 3 = Interrpt Pin 1.

volatile float coinsValue = 0.00;
//Set the coinsValue to a Volatile float
//Volatile as this variable changes any time the Interrupt is triggered
int coinsChange = 0;
//A Coin has been inserted flag

void setup()
{
Serial.begin(9600);
//Start Serial Communication
attachInterrupt(coinInt, coinInserted, RISING);
//If coinInt goes HIGH (a Pulse), call the coinInserted function
//An attachInterrupt will always trigger, even if your using delays
}

void coinInserted()
//The function that is called every time it recieves a pulse
{
coinsValue = coinsValue + 0.05;
//As we set the Pulse to represent 5p or 5c we add this to the coinsValue
coinsChange = 1;
//Flag that there has been a coin inserted
}

void loop()
{
if(coinsChange == 1)
//Check if a coin has been Inserted
{
coinsChange = 0;
//unflag that a coin has been inserted

Serial.print("Credit: £");
Serial.println(coinsValue);
//Print the Value of coins inserted
}
}

source: Ch-926 coin acceptor identify coins - YouTube

Wombalana:
Hi all, A first post for me, so I hope that I get the etiquette correct.
I am a high school teacher and one of my student is using a ch-926 coin reader.
He has programmed the reader and is using an interrupt to pick up the rising pulse as suggested in numerous posts from the net.
A serial line is then posted to the serial monitor after a pulse is detected. However, no pulse is detected.
I have tested the below code by giving an artificial pulse of 5 volt or 3.3 volt straight onto the interrupt pin with success. (the pulse is read and the serial is displayed). So I believe that the setup of the Arduino and reader is correct.

I checked the size of the pulse from the CH -926 that is present on the interrupt pin on a CRO as 0 to 0.2 volt for 20 mS. This seems very small to me However, the supplier tells my student via email that a 0.2 volt pulse is expected.

The code is below and any help would be much appreciated.
source: Ch-926 coin acceptor identify coins - YouTube

Do you have a link to the data sheet?

I think that you didn’t wire the device properly to the Arduino, 0.2V is not a meaningful amplitude. You may have missed to connect Gnd, or to add an pullup resistor.

chucktodd:
Ch-926 coin acceptor identify coins - YouTube

This video show connecting to the coin reader, If you closely review it, you will see that the coin wire is held at 12V by the mech and driven low for each pulse. The video author wired it directly into the UNO, I WOULD not do it that way, the Uno processor has cross bar diodes on each input, I am very SURPRISED his UNO has not exploded.

I would recommend a different circuit. put a 10k resistor in series with the COIN wire, connect a zener diode (1n4732A ) from the digital input to GND. This will protect the UNO's digital pin and allow detection of the pulses.

In this image the V+ is the COIN wire, the IL would connect to the UNO, Rs is 10k

chuck.

Actually I wonder what "CRO as 0 to 0.2 volt" means. What's the other (no pulse) level?

I don't think that the output is normally held at 12V (that's easy to check!), and that therefore pinMode(x, INPUT_PULLUP) has been used in the video.

Thank you for your responses, unfortunately, I haven't solved the problem as yet.

DrDiettrich: The arduino ground is connected to the 12 volt power supplies ground. I mistake that I have made many times in the past but not this time. (:

chucktodd: The pulse is going from 0 volt when there is no output to 0.2 volt as an output. I am not getting a 12 volt output swinging low, perhaps that is the problem. My student emailed the supplier who said that a 0.2 volt pulse is normal.

DrDiettrich: the closest that I can find to a data sheet is a word document on the following link:
https://www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0CCsQFjADahUKEwjrmvzUw4THAhWiLqYKHalOADc&url=http%3A%2F%2Fdoc.diytrade.com%2Fdocdvr%2F775010%2F31752384%2F1360584678.doc&ei=C_m6VavpG6LdmAWpnYG4Aw&usg=AFQjCNE2j_jRHTohSUiv4J4oPbjul00fXw&bvm=bv.99261572,d.dGY

This sheet tells me not to use a pull up resistor. I believe because the output when not pulsed is 0 volt. However, in desperation I have tried a 10 k pull up resistor to the arduino 5 volt supply with no change to the output pulse.
I have not tried the internal pull up before. I will give it a crack and report back.

Thank you once more for your thoughts on this problem.
I have tried adding the line
pinMode(2, INPUT_PULLUP);
as digital pin 2 is the interrupt pin 0.
The internal pull up resistor made no difference to the output pulse on the CRO, still swinging from 0 volt up to 0.2 volt for about 20 mS. Also the internal pull up resistor did not trigger the interrupt code.

I have ordered a new coin reader. Hopefully, it is a faulty unit.