I have 22 arduino's around a model railway running colour light signals. Some actions are triggered by pins being switched by the points (turnouts) and some actions are triggered by trains fitted with magnets passing over Hall effect sensors.
The sensors physically nearest the arduinos are working perfectly, but all those that are located 5+ meters away don't trigger at all, no matter how strong the magnets are or how long or close you place them to the hall sensor. The arduino reads a normally high (pulled up) signal from them and actions are triggered when the hall sensor dips briefly to ground.
I have a 1uf cap across ground and 5v at all the sensors and the cables are twisted pair LAN cable. The sensor pins are pulled to 5v via a 330ohm resistor AND ground via a 10k resistor. Odd arrangement, I know... This is because the proto boards the arduinos are soldered to have been designed to be used with light sensors in a voltage divider arrangement (with a different set of code). I wanted to be able to use the same boards with either light sensors OR hall sensor without physical modification. This way I figured when I add the 330ohm pull-up for the hall sensor, the pull to 5v is much stronger (around 4.8v) and would work in 'reverse'.
Hmmmm.... Actually as I write that last paragraph I'm thinking that may be where my problem lies.... Perhaps my pull up is too strong, or perhaps I will have to hard-modify my circuits after all....
The only other things that springs to mind, though I haven't had a chance to test yet, is perhaps voltage drop over distance, but 5 meters doesn't seem far enough for that, even for 5 volts...? And if that was the case wouldn't the sensor pin simply receive too low a voltage in the first place?
I'm not sure if this would effect things but for the furthest sensors, to avoid running unnecessary long lengths of cable, I have fed the earth connection of the Hall effect sensors to a ground connection on the nearest arduino rather than the one it's sensor pin is connected to. All the arduinos on the layout are powered by the same common 12v bus via their v-in and ground pins. My relatively limited knowledge tells me that should be ok....?
Any insights would be appreciated!