I need to send a 4khz square wave via 12 feet of untwisted pair 22 AWG cable (two wires).
To do this, I am using a PIC. The output of the PIC goes to an optoisolator (the LED part) with a series resistor. The optoisolator "output" is a NPN transistor. The collector is connected via the 12 feet of wire to the UP input of a 74HC193 counter. The input is pulled up to +5V (on the counter side) via a 1k resistor. The GROUND of the counter is connected to the emitter of the transistor via 12 feet of wire. The optoisolator will sink (or is it source?) about 5ma of current through the pullup. Power supplies for the PIC and 74HC193 are totally seperate. The only connection between the two is the 12 feet of wire.
My question is, I imagine that 12 feet of wire connected to the input of HC logic is going to have problems. I suppose it acts like a huge antenna and all kinds of high frequency junk will get on it and cause random switching of the input. How can I prevent this? I was thinking maybe a low pass RC filter on the counter side, or perhaps chokes on the input and the GND line. Anyone have any experience with this kind of thing?
Thanks!
Asa