Electronic – arduino – Simplest circuit to set minimum voltage

arduinopulse

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

Best Answer

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.