Arduino and BV20 Bill Acceptor/Validator

Have you considered writing a small bit of code to act as the BV20 so you can test your code.
For example, a routine that will say, output on another pin some pulses with the correct timing delays and and then a longer delay pause.

Initial delay
Send 5 pulses out to pin x with 50mSec on time and 50mSec off time
end of bill delay, say 5 seconds
repeat pulse train for another bill.

Then you will be able to see how your code works.

I had a thought that if the BV20 output was a relay contact than you would have contact bounce issues, but I believe it is transistor logic.

PS, of course for the above test, you will need to tie your output pin of the test routine back to the input pin 2.

Paul