I'm having a problem that probably has a relatively simple solution...just not one that I'm aware of. Basically, I'm designing an add-on that makes use of a logic-level (5v) RS-232 communication port for data transfer. (This is for an already-existing commercial product, so changing the design of the already existing PCB is out of the option. No MAX232 or other chip as an option.) It's a 5v logic level signal direct from a Microchip PIC, with no buffer IC or anything on it.
The commercial product is a very high wattage power supply (easily capable of several kilowatts), so there is understandably a very large amount of EMI in the chassis. (My add-on board mounts in the chassis as well.) As would be expected, the higher the load, the more invalid data packets are encountered.
I've experimented with RS-232 speeds (as well as polarity), currently running @ 19,200 baud. (Can't go much slower than that.) RS-232 speed does not have as much of an effect as you might expect: the problem is the random "spikes" induced in the waveform, causing random false "1"s and "0"s, regardless of speed.
On my add-on, I have made use of a 74LVC2G17 (one each way) in an attempt to strengthen TX drive, and also ignore some of the noise on RX with the Schmitt trigger. I was hoping that would be the Holy Grail...but alas, there is practically no difference between having the buffer in place or completely absent.
For now, the cable is roughly 18" of 3-conductor unshielded untwisted regular wire (TX, RX, GND). Yes, a shorter wire would help...but if I can solve the problem with a longer wire, then I know it's doubly solved with a short wire!
I have experimented with wrapping several turns of the wire around a ferrite bead (seems to help some, but not enough).
Are any of the following viable options?
Any other suggestions?
The commercial product is a very high wattage power supply (easily capable of several kilowatts), so there is understandably a very large amount of EMI in the chassis. (My add-on board mounts in the chassis as well.) As would be expected, the higher the load, the more invalid data packets are encountered.
I've experimented with RS-232 speeds (as well as polarity), currently running @ 19,200 baud. (Can't go much slower than that.) RS-232 speed does not have as much of an effect as you might expect: the problem is the random "spikes" induced in the waveform, causing random false "1"s and "0"s, regardless of speed.
On my add-on, I have made use of a 74LVC2G17 (one each way) in an attempt to strengthen TX drive, and also ignore some of the noise on RX with the Schmitt trigger. I was hoping that would be the Holy Grail...but alas, there is practically no difference between having the buffer in place or completely absent.
For now, the cable is roughly 18" of 3-conductor unshielded untwisted regular wire (TX, RX, GND). Yes, a shorter wire would help...but if I can solve the problem with a longer wire, then I know it's doubly solved with a short wire!
I have experimented with wrapping several turns of the wire around a ferrite bead (seems to help some, but not enough).
Are any of the following viable options?
- 0.1uF capacitor from RX (input of the 74LVC2G17) to GND? Obviously, too big of a capacitor will attenuate the signal quite a bit. In a brief test, it doesn't seem to harm the RS-232 data too badly...though it does not completely eliminate the random spikes.
- Small ferrite beads / "inductors" in series with the connector on the add-on PCB? I recall disassembling a "VTech Precomputer Navigator" children's play laptop, and every single wire coming off of the main board had a miniature ferrite on the PCB in series with the connector's pin. Thoughts?
- Shielded cable? If this is the golden ticket, then that's what I'll go with. Or is it not so effective against EMI spikes?
Any other suggestions?