I have a pair of Hall sensors (Allegro A1101's FYI) feeding into a PIC microcontroller (16F505) (directly into data ports) and I am having a terrible noise problem. The noise arises from the fact that a single DB9 serial cable carries both the sensor signals and power for an electric motor. There is nothing I can do to separate the motor power from the sensor wires so I need to do something at the microprocessor board.
The motor power and power for the PIC are coming from two completely independent power supplies, and the PIC has a bypass capacitor installed across its power supply pins. Currently, I have been using a .1uF ceramic capacitor across the data and ground pins where the sensor input enters the board. This, in combination with some debouncing code in the PIC has worked...alright but I still get some false signals making it into my code. The sensors output a logic zero when the magnetic field is detected and this is what I am looking for in order to send a control signal to reverse the direction of the motor.
In short, what would be a better way (hopefully not too complicated) to filter high frequency noise from the data lines? A bigger capacitor from data->ground? I have about a half second of allowable delay before the magnet completely passes up the sensor (and then we have big problems).