Quick "avoiding the smoke" query. I'm less familiar with Arduinos than some other processors, and while the specs seem clear enough I'd like to double-check for this install I've been drafted into performing for a colleague. I have an NPN NO inductive probe, and it has been tested functional on the bench. Without getting into all the details, the goal is to connect this in parallel with a NO switch (which shows nominal 5v Vcc on one pin, so I know there's presumably an internal pullup on the Arduino configured on that input). The probe is being powered by nominal 12v from the same unit supply, and I'll be using a typical 10K/15K divider on the probe output to bring the voltage down into a hopefully suitable range for the Arduino . The probe has its own internal pullup of an unspecified value. Now the question. In practice with Arduino, how much voltage over the input pullup voltage can they tolerate (keeping in mind the not all that great tolerance of the resistors in the divider?) Equally important, can the Arduino tolerate the external pullup resistor of the probe being connected as well as the internal pullup on the Arduino input? In this instance, the Arduino firmware cannot be modified, so disabling the internal input pullup resistor in the Arduino is not an option. Thanks for any advice. Have a good new year.
The internal pullup is very weak. In any case, co not exceed VDD+0.5 V on the input, VDD being a practical maximum.
since the prox sw is 12volt what i did is used a 4n25 opto coupler and fed prox signal into the led side via 1.2k resistor and on the transistor side i used arduino 5volt and gnd with a 1k collector resistor to +5 with vout on collector but i used a pnp no that puts out 12v when triger yours will have 12 when idle and go to gnd with trig minor modifications
Equally important, can the Arduino tolerate the external pullup resistor of the probe being connected as well as the internal pullup on the Arduino input?
The value of the pullup resistor (any combination of internal and external) is irrelevant to the Arduino input, as long as the voltage at the input does not exceed Vcc+0.5 or become more negative then -0.5 V.
Low values of pullup resistors waste power, but may be useful to overcome electrical noise on the sensor signal lead.
This appears to be working fine with a voltage divider made from a ~10K and a ~15K resistor (carefully selected). Thanks all!
The probe has its own internal pullup of an unspecified value. Now the question. In practice with Arduino, how much voltage over the input pullup voltage can they tolerate (keeping in mind the not all that great tolerance of the resistors in the divider?)
The input protection diodes will clamp the voltage to Vcc +0.5 max. So the important thing is how much current can the protection diode tolerate. Its generally accepted that its safe to keep the currrent <= 1mA.
The probe is being powered by nominal 12v from the same unit supply, and I'll be using a typical 10K/15K divider on the probe output to bring the voltage down into a hopefully suitable range for the Arduino.
This gives 4.8V out, as long as you have 12V---15K---4.8V---10K---GND.
Equally important, can the Arduino tolerate the external pullup resistor of the probe being connected as well as the internal pullup on the Arduino input?
The internal pullup has no effect on what the Arduino can tolerate.
The external pullup of the probe (if pulled to 12V) will have an effect, but it won't cause a problem if the current is <= 1mA. For example if this pullup is 10K, then the current through Arduino's input pin is (12-5)/10000 = 0.7mA