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