VGA "wavy-ness" when connecting ground from RS232...
DToolan
Posts: 11
I am working on a text mode VGA display project connecting some computers to a prop through MAX232 level shifters. The VGA is connected to an LCD display. While initially writing the code and debugging, I was using a laptop as the RS232 source (sending RS232 streams captured from the intended host).
After getting everything working, I plugged in the actual host RS232 cables and it caused the VGA display to produce wavy vertical pixels (wavy vertical lines through some text) in various places. It is not terrible but is noticeable. If I disconnect the RS232 ground pins coming from the host, the VGA vertical wavy-ness goes away. The RS232 still works but I don't see this as a solution. I know that for reliable RS232 communication, RX, TX and the reference communication ground should be connected between the two devices. The RS232 cable distance is perhaps 20 ~ 30 feet and the prop is powered via wall wart.
Any suggestions?
After getting everything working, I plugged in the actual host RS232 cables and it caused the VGA display to produce wavy vertical pixels (wavy vertical lines through some text) in various places. It is not terrible but is noticeable. If I disconnect the RS232 ground pins coming from the host, the VGA vertical wavy-ness goes away. The RS232 still works but I don't see this as a solution. I know that for reliable RS232 communication, RX, TX and the reference communication ground should be connected between the two devices. The RS232 cable distance is perhaps 20 ~ 30 feet and the prop is powered via wall wart.
Any suggestions?
Comments
Some VGA cables are very poorly constructed internally an are nothing more than a multicore with an overall shield. Any ground currents would transfer to the core easier on these.
I learned about ground loops when I was a teenager playing around with audio amplifiers - they are really obvious because you suddenly get a loud hum when you plug one device in. A quick and dirty solution is to remove all but one ground link, but then you have to remember which cables have ground connected and which don't.
Another solution is to use a "star" configuration where all grounds come to a common central point.
I'd be interested to know if the wavyness goes away if you disconnect the prop download cable. That will test if it is a ground loop problem or not.
If that does not solve the problem then we need to think more about it. RS232 per se should not cause wavyness if there is no data flowing.
There are other causes for wavyness too - I get it with two VGA monitors side by side, but they are old-school CRT monitors.
There is always an opto-isoloated solution, but it will involve some more components and soldering and probably is not necessary.
A 30 foot cable is fairly long and will start acting as an antenna, picking up hum from mains wiring in the house. If this is the problem there are solutions but they are different to the ground loop solutions.
And another problem I once saw was a preamp my dad built that was powered by a wallwart with a long lead. There was all sorts of hum until my dad added some fancy filtering as the DC came out of the wallwart. If I recall it was some inductors and capacitors as well as some ferrites. It worked really well because it was designed by some electrical engineers at the local university.
Could you post a photo of your setup by any chance?
Are you willing to experiment?
I read that ferrite beads are a power supply filter. Some need to be carefully selected. Why don't you try one or two with your circuit and watch how it behaves. Other than that, try a capacitor.
As Peter says the identification of this is easy as the PSU just has to be disconnected and the change in the interference observed, or not.
There is that possibility that you are within range of some interference source, such as a MF transmitter etc, and the cable lenths have just happened to be some magic length that allows that to be picked up. Shortening or lengthening the lenths would show this. I had a local church that complained of Sky News coming out of its simple PA system. It turned out to be a LW transmitter about 15 miles away that used Sky as its news source (not the searing radiation from a satellite as the Vicar thought). That problem could only be got around by adding another 10 yards of mains lead into the PA supply, nothing else touched it!
I must admit that one time I had a similar strange VGA issue and this turned out to be the problem...