I am new to Arduino, and I am doing a project where I have a 12v coin acceptor that sends different amounts 12v pulses based on what coin was inserted. I was wondering if I could directly connect the 12v pulses into the A0 pin. I heard somewhere that I could I could directly connect it to the Arduino if I use a built in pull-up resistor. Is that true? I don't need the 12v reading to be accurate I jest need to have the Arduino know when a pulse is sent to it.
The pull-up resistor is used to provide voltage when there is otherwise none, such as when you connect a switch/pushbutton.
There might be a way to wire the coin selector where it doesn't supply it's own voltage form that particular connection. You'd have to check the specs/datasheet.
NEED HELP PLEASE READ
Sometimes I DON'T READ posts with useless non-specific titles.
Could I use a voltage sensor? The pulse from the coin acceptor is very short. Probably like 200-300ms long. I just need the Arduino to recognize when just one pulse happens. For me I made it so the coin acceptor sends one 12v pulse every time a quarter is inserted. Would the voltage sensor be able to read the signal within 200-300ms or would it not register?
I am using a coin acceptor for an Arduino run vending machine. The coin acceptor runs on 12v and I have it set so that when a quarter is inserted it sends one 12v pulse to the Arduino. Since the voltage is too high for the Arduino I want to use a voltage sensor. The pulses from coin acceptor are bout 200-300ms long. I was wondering if the voltage sensor would be able to read and send information to the Arduino fast enough before the pulse ends. I do not need a super accurate reading of the voltage. I jest need the Arduino to know the pulse is sent.
You should have posted post a link to the coin acceptor in your original post, as it is, you’re just making this more difficult for yourself and everyone trying to help. We cannot provide the best response when we have to guess what the actual device is that you intend to you use.
You were given the proper answer in response #1 from AWOL. A voltage divider is all the is required so long as your 12 volt signal is not capable of any higher voltage than the nominal 12 volt value.
A simple voltage divider with R1 = 1K8 and R2 = 1K0 with center junction going to a digital input should work fine. That will give you an output of ~4.3 volts with 12 volts in which the Arduino will read as a digital HIGH.
Yes now I understand. I watched a YT video about it. I"m really new to electronics. So if the input to the Arduino is about 4.5v but there is 3 amps It wont break the Arduino....Right? Also is it true that I can power the Arduino with the 12v through the main power socket?
The input will not be 3 amps! The power supply that supplies the system might have 3 amps available but that does not mean that 3 amps will flow. The actual current that flows in a circuit is a function of the voltage applied and the impedance of that circuit. To learn this, it is easiest to use the terms of : voltage (E), current (I) and resistance in ohms (R).
Google “ohms law” and start reading. Avoid videos, they don’t let the brain absorb things before they’ve moved onto the next topic. Read. Think. Apply. Paper, pencil and a calculator. Write it down. You learn more that way.
Then you’ll understand that so long as the voltage connected to an Arduino input pin is between zero and its operating voltage (typically 5 volts, some are 3.3), the amount of current that will flow is infinitesimal, so low you’d have trouble measuring it. It’s called input impedance but that’s too bit of a bite of the apple to start with. Ohms law is where the journey begins.
BRAD3N:
The pulses from coin acceptor are bout 200-300ms long.
That is a pretty long pulse, not short at all, so very easy to read with an Arduino. Just get a voltage divider on that 12V output (is it even 12V output? Not an open collector output?) and poll the pin state. Nothing to worry about.
A short pulse would be one that lasts <1 ms. An Arduino can easily read pulses way shorter than that 1 ms.
BRAD3N:
I am using a coin acceptor for an Arduino run vending machine. The coin acceptor runs on 12v and I have it set so that when a quarter is inserted it sends one 12v pulse to the Arduino. Since the voltage is too high for the Arduino I want to use a voltage sensor. The pulses from coin acceptor are bout 200-300ms long. I was wondering if the voltage sensor would be able to read and send information to the Arduino fast enough before the pulse ends. I do not need a super accurate reading of the voltage. I jest need the Arduino to know the pulse is sent.
I read posts under this too.
You could use a voltage divider, it will drain some current to ground while the rest continues at lowered voltage. The circuit only needs 2 resistors and you can look it up because hey the good sites will teach the whole lesson with pictures and all.
PS, speaking of PLEASE READ..... there's a thread at the top of this section of the forum you might want to read yesterday titled "How to use this forum - please read."