First, let me say thanks for taking the time to read/help. I'm fairly new to electronics design, although I have a decent working knowledge (and am not afraid to do the legwork to figure out how something works through my own legwork). Any help would be greatly appreciated. I'm not afraid to go do the legwork to suss out a solution, but I need the help of someone seasoned, as even the most basic suggestions will cut down the time dramatically. Again, thanks for taking the time!

Basically, I have a bill acceptor (takes a variety of monetary notes for payment). This Bill acceptor is designed to output a "pulse" when a bill is inserted/accepted. I have the circuit hooked up as the image below, and it's working properly. I've seen the output pulse on my oscilloscope, when reading between the Credit Pulse(Pos) and Common Ground.

When a bill is inserted, the 5Vdc line pulses on the scope for 250ms. It falls from 5Vdc to around 4-4.2Vdc. What I NEED is to cause this line (at the interrupt pin on the Arduino) to read 0Vdc, as the small change in voltage isn't triggering a HIGH/LOW state change at the pin (the Arduino doesn't recognize the pin as being LOW during the pulse cycle).

Any suggestions you have, or direction you might point me in would be very helpful. I apologize for the rudimentary nature of my schematic, or any faux pas I might have tripped over here. I've tried to be as detailed as possible. Thanks again for your time and assistance!

NOTE: I'm actually using an Arduino Uno Rev3 (I didn't have a schematic symbol for it, but found one that would suffice).

enter image description here

  • 1
    \$\begingroup\$ Far from the direct question, but a hint that may be useful to you - It seems very strange to me such a thing like bill acceptor which is supposed to be kind of universal and work with wide variety of controllers (even some can drive relays directly) to output a pulse 5V/4.2V. I would suggest to try a pull-down resistor to GND because this output may be some kind of PNP-open collector. Another option is that this bill acceptor may be damaged with burned high-side output transistor or ESD diode and you could test a new bill acceptor module to see if its output is the same. \$\endgroup\$ Jun 14, 2017 at 7:44
  • \$\begingroup\$ @TodorSimeonov, Thanks for that. Actually I called the manufacturer of the bill collector, and they told me that this is "normal" behavior (the voltage should "droop" during the pulse event). I agree that it's absurd behavior, but apparently the manufacturer likes absurdity lol... You mentioned that the output may be a "PNP-open collector", and after looking at the (absurdly sparse) technical sheet, I believe that is EXACTLY what it is.. Could you detail for me how I would hookup a pull-down resistor? Take a look here for a snap of the diagram on the manual: bit.ly/2ruAOUg \$\endgroup\$
    – Bradley
    Jun 14, 2017 at 9:22
  • \$\begingroup\$ according to this diagram you should connect pin 8 to GND and pin 7 with a pull-up resistor to +5V Vcc. Then you measure the voltage at pin 7. The resistor's value is not given, but I would try 10k first and decrease it to 1k to see where signal has good shape. The lower the better - signal will be more noise-immune, but from a point below your pulse may not fall down enough. If you manage to get the pulse at pin 7 to fall down to 0.5-1V you would be OK. \$\endgroup\$ Jun 14, 2017 at 10:06
  • 1
    \$\begingroup\$ I finally saw your problem. In your Arduino wiring diagram you are missing the resistor when connecting "credit line (pos)" to 5V Vcc. This way bill collector's transistor tries to pull down, but the power supply is strong enough and does not fall. You can burn bill collector's transistor if you continue this way, because this transistor tries to short the 5V supply. The resistor I mentioned in previous comment (10k down to 1k by test) should be inserted in series with the connection to 5V! \$\endgroup\$ Jun 14, 2017 at 10:23

3 Answers 3


You can use a voltage comparator circuit. You can build one using a specialized comparator chip, as the old LM311, or you can use a jellybean opamp such as the LM358.

To do that you have to keep the following two things in mind:

  1. setting the right input threshold

  2. selecting how to power your circuit, since this might influence the output level you feed to the Arduino pin.

Point 2 is important when using an opamp, since its output will swing, when saturated, between their positive and negative power rail. This means that if you power it at 12V, the output high level will be around 12V and will need to be divided down to 5V to avoid damaging the Arduino pin.

Using a specialized comparator chip, like the LM311, that has an open collector output, you won't have this problem, since you will be able to pull the output high directly toward the Arduino 5V rail.

The right input threshold should be halfway between the two H/L level voltage you have at the input: 5V and 4.2V, so a 4.6V threshold would be good. To set it you'll need some voltage reference: you could divide down the voltage generated by a reverse-biased zener, or use a precise "Zener IC" like the TL431.

Since the two voltage levels are not so widely set apart, it is probably better to use a TL431: the component count is comparable to what you would have using a Zener+voltage divider, they are much more precise and they are quite cheap anyway.



So, as Lorenzo posited, the issue was solved by placing a 3K resistor into the mix. Below is the working schematic, and a screenshot of the result (I didn't have 1 3k resistor, so I used a 1K + 2K series to get it.

Pulse Solution schematic and images


I haven't worked out all the details, but it seems as if you use a comparator for your application. However, what AdamZ says could be also true, that this voltage drop you have observed is not a "real" output pulse but some droop due to the jump of the load.

Set the negative input of the comparator to the threshold that you want (that would be a bit higher than the 4V-4.2V that you have measured), for example with a voltage divider, and the positive input will come from your "bill acceptor".

The output of the comparator (don't forget to put a pull-up resistor here, for open collector output comparators) would go to the Arduino pin. The comparator output will be HIGH when the output from the bill acceptor is higher than the threshold and LOW otherwise. In this case you would have to detect for a high-to-low transition of the output signal. Or else swap the inputs (signal from bill acceptor to the negative input and your reference threshold to the positive input) and the comparator output will be HIGH when the output from the device goes below your reference voltage and LOW when it is above.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.