How to reduce noise on high speed digital lines?

I am familiar with using bypass capacitors on powerlines to supply surge current and suppress noise. I am also familiar with using bypass/noise suppressing capacitors with analog signals.

Plot:

I’ve made up an imaginatory circuit (see drawing) with a relay that switches the RX/TX signal pair of two UARTs. When the relay is off the two UARTs is not connected to each other, but when the realay is on they are connected.

The two serial UARTs communicate with the speed 9600 bps. They are connected to the PCB throug connectors (INPUT, OUTPUT).

The same PCB is shared with a circuit that produces noise and this might interfere with the UART signals.

Power circuits on the PCB is bypassed correctly and does not produce nor transmit noise.

Analog relay control line on the PCB is bypassed correctly and does not produce nor transmit noise.

Goal:

Stabilize the UART signal lines on the PCB, making them more robust against noise produced by other circuits on the PCB, reducing flutter and ripple, making cleaner signals without reducing the speed (9600 bps).

Problem/questions:

Can I use capacitors to bypass/eliminate noise on high speed digital lines?

If I can use capacitors to eliminate noise the lines pick up throug my PCB, how do I calculate the capacitance?

Are there any other methods that might be better?

On the drawing I have placed capacitors directry after the input- output lines of the UARTs as well as before and after the relay contacts.

Is this RS-232 or TTL level you want to switch?

Switching serial data with mechanical relays makes problems with “contact bounce”, the relay contacts make noise and the UART gets Rx buffer overflow. I would use MOSFET Opto-couplers. 9,600 baud is not high speed digital line.

The relay coil needs clamp diode.

Thank you for your reply. Good point with the bounce effect, I did not think of that. Did you mean OptoMOS-optocoupler or OptoMOS-optorelay?

And, Yes it is RS232.

I think I’ll try this one:

https://www1.elfa.se/data1/wwwroot/asse … data_e.pdf

OK. This is basicly what I ewnt for.

4 OptoMOS-relays (LAA110) from Clare. Two pushbuttons controls a bi-stable 555 which in turn controls the OptoMOS-relays.

The point of the circut is to switch the TX/RX lines of an Arduino between the computer or an XBee, so I can switch between programming and testing of my program with the XBee. My circuit controls two Arduinos and their connection to either a computer or an XBee.

Here is the PCB drawing. All 0603 components that are grounded is bypass caps of either 0.1uF or 10nF. 0603 components that are not grounded is resistors.

I will make the PCB and test the circuit shortly.

I have had success multiplexing 8 serial lines using two CD4051 CMOS multiplexers. I used one for Tx and one for Rx. These have three select lines, one enable and can switch full RS232 signals, or TTL serial signals. I have only tried them to 9600 baud, but they work perfectly selecting one of 8 serial devices to control from a microcontroller. There are no bounce problems, and if you only mux the TTL signals, then there are no large voltage swing issues. Crosstalk is minimal in the CD4051, channel to channel.

Here is what I made. Circuit is tested and working.

puzzlepiece:

Can I use capacitors to bypass/eliminate noise on high speed digital lines? …

Are there any other methods that might be better? …

Adding capacitors from a digital signal line to ground makes things worse.

See http://massmind.org/techref/electips.ht … s_resistor .

Connecting nothing to the digital signal line would be better than adding capacitors.

Common techniques for reducing noise on a digital signal include:

  • reducing the resistance of the pull-up resistor or bus hold circuit

  • Schmitt trigger circuits

  • increasing output voltage swing (alas, this increases crosstalk noise on other signals)

  • reducing output driver resistance (alas, this increases crosstalk noise on other signals)

  • reducing input resistance and other bus termination techniques

  • reducing transmission line impedance – shorter wires, thicker wires, repeaters, etc.

  • shielding

  • differential signals or current-loop signals (used in MIDI)

  • opto-isolation (used in MIDI)

  • if all else fails: error-correcting codes.

I don’t understand why this circuit (sometimes) connects the Arduino TX to the PC TX – I’m going to assume that’s a minor typo.

This particular circuit isn’t what I would call “high speed”, but I see 2 sources of noise:

  • relay contact bounce – I see you’ve already fixed this by using solid-state devices rather than relays

  • “floating signal lines” – in particular, when the Arduino is talking to the PC, what happens to the XBee input pin? If nothing is connected to an input line, then a little noise in the EM field makes the line appear to randomly and rapidly transition between 1 and 0, so the XBee thinks it’s being told to transmit lots and lots of random gibberish. This is typically solved with a 10 KOhm pull-up or pull-down resistor, although in some cases a [bus-hold circuit rejects more noise and uses less power than a simple pull-down or pull-up resistor.

The XBee has an internal pull-up resistor on its input enabled by default.

Sometimes people add another external pull-up resistor, even to lines already connected to an internal pull-up resistor, to reduce noise even more.

Do your other inputs have pull-up resistors?](http://www.interfacebus.com/Bus-Hold_Input_Pins.html)

Thank you for very good info DavidCary, that helped a lot.

To carify what I meant: The circuit does the following: It makes the Arduino connect to either the computer or the Xbee module. The point is to be able to switch from programming the Arduino, to testing the Arduino and XBee together, without having to pull cabels inn and out every time. I will only use the circuit while developing. When the project is finished, this circuit will not be used.

I have tested it today, switching to audio lines to one input on a HiFi-amplifier. It works as i want to and switches quickly from one audio source fo another, without pop or noise. Excellent audio quality too.

I’m happy! :slight_smile:

Picture 1 is test setup

Picture 2 is the circuit unit (without cover)