# Sanity check

Hey folks, just need to make sure I'm not wrong on this and would appreciate another pair of eyes on this.

I have pins on my Arduino that will be set to INPUT_PULLUP. I'd like to be able to pull those pins low through some toggle switches on a little panel that I intend on mounting far away (let's assume 50 ft). I was thinking of running cat5 between the Arduino and the panel and using RJ45 connectors and sockets to interface and do the hardware.

The concern is how far away the panel is and how I'd be using Cat5. I have 4 pairs of 24 gauge solid wire. I've read that the internal resistor is at 20k ohms(I've seen 20k-50k, so I'm going to figure off 20), which means the Arduino is drawing 0.25mA just keeping the pin pulled high.

Calculating 100ft round trip, with 24 gauge wire, it seems like the voltage drop (at 1mA draw, which I'm rounding up to), would result in only 0.1% voltage drop, which is negligible.

So, I'm under the impression that there would not be any problems doing this. I'm not sure I see any problem with getting only 1 wire from a pair and using that as the ground and then having up to 7 switches.

Anyone see any reason that I would have an issue doing this?

The internal pull ups are kind of "weak". If you have noise issues with long wires, add lower value external pull ups (1K minimum, start with 10K). Also a 0.1uf cap across the switch will help to filter out noise (and adds hardware debounce).

Hi,

Your analysis is correct the voltage drop in the CAT5 will be negligible.

However even though the CAT5 is twisted, there will still be some AC pickup (likely 60 Hz, or 50 Hz in EU)

To filter out this AC "pickup' you can:

Near the Arduino input connect:

Arduino input ----100 resistor-------Capacitor to Arduino Ground ---- 100 ohm resistor ----- Long CAT5 to switch.

Functions:

1st resistor: protects the Arduino when you turn it off. If the Capacitor was at 5V (open switch) and you turned off the Arduino, the capacitor will try to power the arduino through the protection diodes until the cap has been discharged.

Capacitor (value 0.1 to 1 uF crude estimate) Filter out the AC voltage picked up on the wires.

The resistor in series with the switch is to not have the capacitor discharge directly into the switch. For a hefty panel switch it likely doesn't matter but for a reed switch it a requirement so as to not weld the fragile contacts.

Good luck

Thank you both for your input! It's greatly appreciated