Hi,
I need to input 24 volt + signal into the Arduino 2560. I was thinking of using a 10k pot and cranking the center tap to 5 volt, and hooking it to the digital input. Would that work, or would it let the smoke out of the Arduino?
Thanks
Dana
Hi,
I need to input 24 volt + signal into the Arduino 2560. I was thinking of using a 10k pot and cranking the center tap to 5 volt, and hooking it to the digital input. Would that work, or would it let the smoke out of the Arduino?
Thanks
Dana
Yes. You could also use two resistors to form the same thing, a voltage divider.
How accurate and stable is the 24 volts? If you mean 24.0 volts, the matter is simple.
If you meant 22 to 28 volts, or something that varied like that, you'd need to use a bit more than a simple voltage divider or the equivalent firmed by a tuned potentiometer.
HTH
a7
The voltage would only go down from 24 volt when the machine is turned off with the Arduino.
A fixed voltage divider would be safer, someone turning the potentiometer too far toward the 24V end could easily destroy the arduino.
Very true... people see a screw and what to start tweeking it.
With a 5 volt input to a digital pin can a person use a 1K resistor and a 10K pull down?
I see people using 220 ohm and 470's, but I want to keep all the current as low as possible.
Thanks!
Consider that the input is a very light load on anything, basically you can assume no current flows into the pin.
So you can use some fairly large value resistors to form you divider.
I used an online voltage divider calculator:
10K and 39K, standard values would yield 4.9 volts, plenty higher than the logic threshold.
I used an online watts/ohm's law calculator: the lower dissipated will be very low, 1/4 watt resistors will suffice.
HTH
a7
I would use a voltage divider then the output of the voltage divider via maybe a 100K resistor to the input of the processor. You can make the voltage divider stiff to keep down noise. If the voltage goes over vcc of the processor it will be drooped by the 100K resistor by being clamped with the processors internal protection. That has a rating of many mills. You need to be careful doing this as you can put enough inputs to pull your 5V up as the regulators normally do not sink current. This works with the processors I have used.
Something like this?
The digital input doesn't need to be 5 volt, you so the Adruino acknowledges it as a high..
With a big enough resistance between the 24V source and the pin you don't even need a voltage divider, the protection diodes in the pin can take care of that. 100k gives 0.19 mA flowing through that protection diode, should be safe.
Or use an additional external (Schottky) diode to clamp the voltage.
Nice!
Thanks!
Why not pick resistors and get something closer to 5 volts? Those logic level values are meant to allow a good margin for yielding a HIGH and LOW, no reason to fly any closer to them than you need to.
2400 ohms for the bottom resistor would give you 4.6 volts.
HTH
a7
With the resistor divider you can sort of pick your threshold voltage. This works very well on 24V DC industrial controls The pull up can be low enough to force enough current to keep the sensor contacts clean. I normally used 74C914 as my input buffers, they will take VCC −25V to GND + 25V, giving me a lot of protection and head room.
How about instead of a voltage divider a resistor and a zener diode of 4.7V?
Cost is higher.
That is a lot, I generally pay about $0.0026 each for 0805 almost any standard value 5% or 1% value. They generally come a few thousand at a time on a reel. China is inexpensive in these and the parts are good.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.