Or pulldown. But what do you mean by additional?So 10-20 meters will not be a problem?Maybe shielded cable?I also have some water flow sensors here - here also I ask myself how long I can makethe cable.
what is the maximum cable length to connect a tactile button to the Arduino?What cable would be the best (awg)?
Quote from: MrGlasspoole on Dec 21, 2012, 02:13 amwhat is the maximum cable length to connect a tactile button to the Arduino?What cable would be the best (awg)?I dunno, but it's a looooooong way.Do the math:At 5V DC the AVR chip recognizes anything below 1V as "LOW" so you can afford to lose 4V over the wire.The internal pullup resistors are about 30K Ohms so a pin will put out 0.15mA when configured as an input with pullup enabled.Here's a table of wire gauges with resistances in ohms per kilometer (or kilofeet if you're still using old-fashioned units):https://en.wikipedia.org/wiki/American_wire_gauge#Tables_of_AWG_wire_sizesYou've now got two of the variables in Ohm's law (current and resistance) so the rest is easy.V = R * 0.00015Any value of R that gives an answer less than 4V over your required distance is good enough (though you may want to limit it to 1V just to be on the safe side...)
So 10-20 meters will not be a problem?Maybe shielded cable?
I dont think the resistance is the problem... I would more worry about induced currents and capacitance. Therefore it mainly depends on your environment.
Quote from: Arty on Dec 21, 2012, 03:27 pmI dont think the resistance is the problem... I would more worry about induced currents and capacitance. Therefore it mainly depends on your environment.I don't think capacitance matters for a push button.
You can probably go pretty far, may need to add addtional pullup resistor to ensure a good high level when the switch is open.
A long wire is an antenna. It picks up electrical and magnetic noise. The stronger pullup increases the signal-to-noise ratio.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16