3
\$\begingroup\$

My PCB drives a 1602 LCD in 4-bit mode over a 0.5-1m long AWG28 (0.08mm2) ribbon cable. Sometimes I get nibble sync problems. It can be seen on the LCD as strange or garbage characters.

This does not happen in my test environment (workbench), but on the field, where there are switching inductive loads (relays, solenoids, motors, etc.) it can be seen.

So far I was only able to make a workaround, where I restart the LCD every minute, and the nibbles are in sync again. On my workbench I can recreate the issue by switching a 12V solenoid on and off rapidly near the ribbon cable.

Below is a simplified schematic of my circuit, only focusing on the LCD part. Please take a look at it and tell me if you find anything obvious I could improve to have better noise immunity on the LCD line.

If possible, I want to leave the daughterboard backwards compatible and redesign/rewire it as a last resort.

schematic page 1 of 2

schematic page 2 of 2

Original PDF can be downloaded from:
https://drive.google.com/file/d/13Xz6-iv1__BDDoMWHfCxqTtLst7OPdLC/view?usp=sharing

Edit: (26.11.2023) I was able to get my hands on 10x0.14mm2 shielded cable, a few ferrite beads (round a flat also) and conducted some testing. The noise source was a 12V solenoid - unknown type, around 3 Watts. The results:

  1. Without any shielding or ferrite, the oscilloscope shows the following when measuring the Vcc line of the LCD: Measurement 1
  2. Using 2 flat ferrite beads (twice as wide as my ribbon cable, so I looped my cable twice through it): Measurement 2
  3. Using 10x0.14mm2 round shielded cable with 2 ferrite beads, shielding tied to GND on the mainboard side: Measurement 3

I got the same results when probing the RS or EN pin. The test setup was: Voltcraft 4005 bench power supply, Owon XDS3062A oscilloscope (10x probe, AC coupling, probe attached directly on the display's pins), the solenoid was fed from the same power supply, as the mainboard. I repeated the tests by feeding the solenoid from a 12V lead-acid battery. The peak-peak voltages were about 30% lower, but still enough to confuse the display sometimes.

Next I tried to add a common mode choke before the input terminals. It again improved a bit on noise immunity, but still not enough to say it is a rock solid solution. The choke was not measured or calculated beforehand, I used one that was laying around (extracted from an old ATX PSU).

Edit (06.12.23): I may have found a way to overcome this problem. I would not call it a solution, but definitely an improvement. I added 1nF capacitors to the data lines on the LCD side of the cable (capacitors' other end tied to GND), and it improved more, than adding ferrite beads and shielded cable together. Before this hack I could scramble the display by switching a solenoid near the LCD cable about 6 times out of 10 tries, after this modification maybe 1 out of 50. I would like to add, that this works for my exact situation, and I am not sure this is applicable on other designs. I was allowed to put these caps on my signal lines because the frequency of my signal is rather low (<100kHz) and it does not degrade the rise up time significantly. Also, after reading through many design notes, I suspect I have common mode noise on these lines when the inductive load switches off. For this, I will try to improve my PCB, adding a common mode filter after the 12V-5V buck converter.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ Did you try adding a large common-mode ferrite at both ends of the ribbon cable? There are clamp-on ferrites for ribbon cables. \$\endgroup\$ Commented Nov 23, 2023 at 16:09
  • \$\begingroup\$ @Mattman944, I can make scope measurements, what exactly are you interested in? Supply voltages ripple, data lines glitches? \$\endgroup\$
    – Yohnsee
    Commented Nov 23, 2023 at 21:59
  • \$\begingroup\$ @JonathanS., this did not cross my mind yet. I quickly grabbed 2 of these clamp-on ferrites (I only have round hole types laying around) and installed them. It might improved the immunity a bit (or I want to believe it did), but I am still able to create garbage characters on screen by switching a solenoid. \$\endgroup\$
    – Yohnsee
    Commented Nov 23, 2023 at 22:02
  • \$\begingroup\$ Kind of an unpleasant circuit to deal with in a hostile EMI environment. Have you considered replacing it with a serial LCD using RS-232 levels? \$\endgroup\$ Commented Nov 23, 2023 at 22:52
  • \$\begingroup\$ I would look at RS, RW, E and a data bit to be certain that you have sufficient timing margins. Then, see if you can see the glitches that are causing the issue. \$\endgroup\$
    – Mattman944
    Commented Nov 24, 2023 at 0:49

2 Answers 2

3
\$\begingroup\$

The equivalent circuit is explained in detail here: Cable shielding (best practices)

In short, the sparse grounding in the cable, or lack of shield, allows common-mode noise incident on the system to divide along both signal and power lines, thus supplying erroneous logic levels and scrambling the display's state.

If you could afford to periodically send a reset, init, and refresh the DDRAM, you could correct intermittent errors; but not sustained ones due to ambient RF fields (typically radiotransmitters). Also I think the timing is usually slow enough on HD44780 and clones that you wouldn't be able to do this without visual impact (i.e. the display will blink and go non-functional for a fraction of a second).

Ribbon cable is best used with every other line grounded (any AC supernode counts, i.e. VDD is an RF ground due to the bypass caps joining it to GND at both ends). This still leaves the signal lines open to ambient fields, but it at least provides a "first stop" around them, reducing interference by, say, 10 or 20dB. That won't be enough to deal with impulsive noise (which can be in the ~kV), but it's a good start. And yes, the downside is needing almost twice as many pins as you thought you needed.

A ferrite bead is especially effective for frequencies around where the cable acts as a 1/4 wave (or multiples thereof) antenna or resonator, but this is only relevant at frequencies well above the clock rate, so RFI can be filtered out very easily. (You should have a ferrite bead and small capacitor, and probably ESD diode(s), at both ends of the cable to provide such RFI filtering.)

At low frequencies, the fact that the display is floating means 1. a ferrite bead would have to be extremely large to do anything, but also 2. interference is much less significant or severe. We are less concerned about low frequencies; how much less, is proportional to how far from this characteristic / resonant frequency we're considering.

Otherwise, a screened or shielded multiconductor cable can be used, or shielding wrapped around the ribbon cable. The shield must be solidly grounded (as in, making a wide connection, at multiple points surrounding all the signal lines), at both ends, and this can then afford considerable immunity (60dB+), enough to ride through even high voltage inductive spikes.

Also, mind that this is contingent on using a ground-plane PCB design at both ends, whether a well-stitched 2-layer or a 4-layer with inner planes or more. A loose design, just traces in free space, is Swiss cheese for EM fields. Put another way: all the above doesn't stop applying outside of arbitrarily-defined cables, the shield must extend around the entire signal path.

\$\endgroup\$
4
  • \$\begingroup\$ Your collection of best practices is awesome! I read through the link you provided, and it revealed a few design mistakes I made. I have read many application notes and watched countless videos on good PCB design practices, but still feel that somewhere along the route I made a mistake. Also, what can not be seen from the schematic alone: the PCB is 4-layer, the inner 2 layers are power and GND, the outer 2 layers are signals. The signal layers have copper pour everywhere, and it is connected to GND with many VIAs. \$\endgroup\$
    – Yohnsee
    Commented Nov 24, 2023 at 8:51
  • \$\begingroup\$ Yes, I can afford to re-initialize the LCD periodically. By periodically I mean I already doing it once a minute. Maybe I can redesign the connector and double the pin count, and send the signal as you mentioned - interleaved, one signal, one GND, one signal, one GND. Just out of curiosity: every article I read on the internet wrote that shielding must only be connected to GND on one end of the cable. You wrote to ground both ends. Which is best practice? \$\endgroup\$
    – Yohnsee
    Commented Nov 24, 2023 at 9:04
  • 1
    \$\begingroup\$ Grounding one end gives electrostatic shielding only, and lets 100% of shield current (say due to incident, induced or conducted EMI) onto the wires within. The main contraindication is if galvanic ground loops would be problematic, but in that case you have bigger issues and the correct solution is a differential input or full isolation. \$\endgroup\$ Commented Nov 24, 2023 at 9:20
  • \$\begingroup\$ @TimWilliams I hadn't noticed the resource you posted 9 days ago (in the link you provided), it is extremely valuable information. Thank you for spending the time to write it out and share it with us. \$\endgroup\$
    – Pxl
    Commented Nov 24, 2023 at 16:46
2
\$\begingroup\$

For cases where you need long cables to transfer digital data in noisy environments, it is best to work with differential pairs to eliminate EMI, or shield your cable (Usually both are employed at the same time).

Using the differential pair approach will require you to convert your parallel digital data to serial, then convert it to a differential signal. Then on the receive end doing the opposite.

Using the shielding approach will require you to use copper foil tape to cover the entirety of your ribbon cable then solder bonding wires from the copper shielding tape to the ground connection of both circuits (each end).

Before you do any of these, try using Ferrite beads to eliminate noise. Make sure to use the flat style ferrite cores made for cables, otherwise you wont have effective EMI suppression. It also helps to know which frequencies the interference is occurring at to better suppress it with the proper ferrite material.

This is a pdf that may help with cable shielding and EMI suppression in cables.

\$\endgroup\$
3
  • \$\begingroup\$ I ordered ferrites from few different manufacturers, especially made for flat cables. They will arrive in the next few days, and I will test again and share my findings with you. \$\endgroup\$
    – Yohnsee
    Commented Nov 24, 2023 at 8:36
  • \$\begingroup\$ @Yohnsee Sounds good. I am eager to hear the results! \$\endgroup\$
    – Pxl
    Commented Nov 24, 2023 at 16:23
  • \$\begingroup\$ I made the experiments. Unfortunately, neither the ferrite beads, nor the shielded cable gave me the results I was looking for (even combined). I even tried with CAT7, where every twisted pair is shielded individually plus the whole cable is shielded with foil AND braid. The induced noise was always there, causing disturbance on the display. I edited my original post, as I found a workaround, maybe this helps others too. I am very glad you shared your ideas with me and showed me what to try. \$\endgroup\$
    – Yohnsee
    Commented Dec 6, 2023 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.