5V rail noise when updating 2x16 LCD  - Page 1
Forum section: electronics / projects

author: txescientist
author_rank: Regular Contributor
timestamp: July 30, 2019, 09:56:46 pm
content: Hi to all!Got a "little" problem. When PIC 18F4550 sends data to 2x16 LCD, +5V line gets noise (attached picture).PIC is decoupled with 100nF/10uF, LCD also. Tried adding PI filter and ferrite beads, no good.LCD is connected via ribbon cable, length is about 10 cm. Sorry, I have no pictures.Built on protoboard (soldered). Similar noise is present at the battery pack terminals.It is not bad probing, noise is real.Power is supplied from 9V battery pack and is regulated down to 5V by LF50CV.This level of noise is not a problem generally, but for analog part of electronics is makinga lots of trouble.Anyone have any ideas how this can be solved? Please suggest some good filter, soI can power the analog part from the same battery pack.Thanks!TxeSci

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 30, 2019, 10:06:22 pm
content: Does the 5V regulator have proper decoupling close to its input and output pins too?

author: txescientist
author_rank: Regular Contributor
timestamp: July 30, 2019, 10:22:27 pm
content: Yes, forgot to mention that. Used electrolytic caps and ceramic for LF50CV. Analog part isconnected to the shared battery pack and has its own LF50CV. Still, there is noise in the analogsection also.

author: coppercone2
author_rank: Super Contributor
timestamp: July 30, 2019, 10:34:01 pm
content: does the PI filter operate within the noise spectrum of the noise signal?ferrite beads are hard to choosedid you take measurements with and without filter to see magnitude change?Does it still occur with a lower impedance source then a 9V battery (which is 6 1.5 cells in series, it has high ESR kind of).Like, probe before and after the filter to see the effect that its transfer function has. And overlay the two signals. Then you can compare the expected attenuation (difficult because of unknown source and load impedance) and the actual attenuation if any. You might need a higher order filter or different topology.Do you daisy chain or star ground?Keep in mind there are Pi and T filters (which use inductors, but be careful because you need to known inductor SRF to get actual expected performance (since the parasitic capacitance can turn it into a partial pi filter).*I think they mean source not high on the top of the table*https://interferencetechnology.com/selecting-proper-emi-filter-circuit-military-defense-applications/You need to think about the signal path. If you blocked it with filters its either bypassing or the filters are not working correctly for whatever reason.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 30, 2019, 10:56:34 pm
content: Yeah. Then again, if you're 100% certain it's not a probing issue, that much noise on the 5V supply coming for a linear reg, with just an MCU and an LCD display is not that normal IMO. Before adding a fancy filter, I would start with adding a beefier capacitor on the 5V supply, something like 100µF or so.

author: coppercone2
author_rank: Super Contributor
timestamp: July 30, 2019, 10:59:10 pm
content: still useful to probe and measure because you know what a filter does then, perhaps its only attenuating by a fraction of a dB because its not designed with the correct values.

author: floobydust
author_rank: Super Contributor
timestamp: July 30, 2019, 11:51:14 pm
content: These LCD controllers and displays are low current and should not make so much noise on 5V.Check your firmware, that the LCD is never writing data at the same time as the MCU. This would give bus contention and high current draw.You need a delay after doing a read from the LCD before you can write to it. The LCD controller is quite slow.

author: txescientist
author_rank: Regular Contributor
timestamp: July 31, 2019, 05:49:02 am
content: LCD is using 4bit for data, E and RS lines. R/W is tied hard to ground.Not reading data from the LCD, but will check the firmware.Tried before with 100uF and 1000uF, nothing.Everyting is star grounded, but the LCD is daisy chained from PIC +V, GND and data lines.Thanks for the help, will investigate it further and report.

author: 2N3055
author_rank: Super Contributor
timestamp: July 31, 2019, 06:18:24 am
content: You need to decouple a the point where current spike happens. 0,1uF/10uF combination is an old school TTL recipe. You might need smaller ceramic cap closer to source of current spike.I agree with others that if you can measure it on a battery that something is funny...These look like resonance, it may even be that you need HIGHER ESR capacitors somewhere to dampen resonance...

author: txescientist
author_rank: Regular Contributor
timestamp: July 31, 2019, 12:33:34 pm
content: Attached pictures are probed RS and E pins. Noise is coming from digital transitions.Don't know are there should be 8uS pulses. Think that PBP is messing something up.Will investigate that further.

author: MasterT
author_rank: Frequent Contributor
timestamp: July 31, 2019, 02:02:59 pm
content: Have you powered LCD by 3.3V and interfacing by 5V logic?Anyway, text display usually slow devices, put 10k in series with data lines. Other options would be to limit drive strength from the micro, stm32 has I/O slew control, not sure if pic has this future.

author: txescientist
author_rank: Regular Contributor
timestamp: July 31, 2019, 02:10:49 pm
content: MasterT:LCD and PIC are powered from the 5V.PIC doesn't have that capability as I know.

author: AndersJ
author_rank: Frequent Contributor
timestamp: July 31, 2019, 02:23:24 pm
content: Could be capacitive coupling between conductors in the ribbon cable.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 31, 2019, 03:42:51 pm
content: Could be. Make sure there is at least one GND wire between the +5V wire and data lines in the ribbon cable...But again, if the OP is certain there is no short-circuit of some kind due to a bad IO configuration or something, then it just looks like improper decoupling...

author: AndersJ
author_rank: Frequent Contributor
timestamp: July 31, 2019, 03:59:31 pm
content: Or bad probing, after all.Probe ground loop, or coaxial connection?

author: duak
author_rank: Super Contributor
timestamp: July 31, 2019, 04:27:43 pm
content: Txe, you have a number of digital signals changing state in the same cable at the same time. This charges and discharges the parasitic capacitances of the cable and LCD display and causes short current transients in the +5V and ground signals as well as in the PIC itself. I would increase the rise and fall times of the drive signals from the PIC to reduce the amplitude of the current transients. If this cannot be done by programming, placing resistors of 22R to 100R in series with the signals near the PIC can help. You may find that an RC network of 100R in series with 1n0 from each signal to ground at the display end may help because it damps the reflected signal from the unterminated end.As already suggested, increase the number of ground signals in the cable to the display. If you can get some copper or aluminium foil, try wrapping the cable with the foil and connect it to circuit ground at both ends. This will form a shield and provide a low impedance return path for current transients.

author: txescientist
author_rank: Regular Contributor
timestamp: July 31, 2019, 05:00:01 pm
content: duak,It is not the bad probeing. Probed it with soldered coax and 50 ohm termination, still got the noise.As you said it is the current transients in the cable. Just tested it with 100R, not significant improvement.With 10k in series it works a lot better.Many of you know Jim Williams app note on switching regulators:https://www.analog.com/media/en/technical-documentation/application-notes/an101f.pdfThink that the best path is to filter out these spikes from the analog part of the circuit. As I said,these spikes get trough LF50CV. Funny part is that ferrite beads did not helped in this case.They helped when I used them with the buck switchers and linear post regulators to get niceclean voltage...

author: AndersJ
author_rank: Frequent Contributor
timestamp: July 31, 2019, 05:23:35 pm
content: 10K seems a bit high.Use a smaller R, and add capacitance instead,as has been previously suggested.The beads fail because the frequencies are low.Also,the source impedance of the drivers is lowwhich makes it difficult for beads to have an impact.It is better to not create the transients in the first place,rather than trying to suppress them afterwards.

author: MasterT
author_rank: Frequent Contributor
timestamp: July 31, 2019, 06:30:33 pm
content: I'd suggest to probe a data line across 10k using a scope, see if there is substantial current passing. Could be that even LCD powered correctly by 5V, internal circuits / input buffer of the LCD is running at lower voltage, 4.5V or whatever clever china engineer comes up with. And all transient noise is due to current injection into inputs, so some kind voltage converter may be better remedy than resistors.

author: mikerj
author_rank: Super Contributor
timestamp: July 31, 2019, 06:59:20 pm
content: Quote from: AndersJ on July 31, 2019, 05:23:35 pmAgreed, seems too high to me as well. Something in the few hundreds of ohms range should be fine, you only need to slow down the edges a little. Resistors should be close to the micro end of the cable.

author: AndersJ
author_rank: Frequent Contributor
timestamp: July 31, 2019, 07:09:35 pm
content: Good point mikerj, about micro end of cable.Wrong end of cable will do no good.

author: txescientist
author_rank: Regular Contributor
timestamp: July 31, 2019, 07:27:10 pm
content: Good idea MasterT,Probed across 10k resistor (picture 1 print107).Also, probed PIC side and LCD side. LCD side has 1V DC offset (picture 2 print110 and 3 print109).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 31, 2019, 10:37:54 pm
content: Pics of layout?Guessing there's a good chance you see the noise even probing ground to ground (i.e., clip the probe tip to the ground clip, and touch that to circuit ground). That means common mode noise, which means you don't have enough grounding and shielding around the signal traces, or the signals are going too fast, or...Tim

author: Someone
author_rank: Super Contributor
timestamp: July 31, 2019, 11:12:55 pm
content: Quote from: T3sl4co1l on July 31, 2019, 10:37:54 pmYes, this is where it would likely be revealed. Taking this cue:Quote from: txescientist on July 31, 2019, 05:49:02 amStar layouts are usually misapplied, they can be required for extreme cases but for most cases perform worse than just using a plane/network ground. If you cannot explain where and how the isolation of separate wires for power or ground connections are needed, then you shouldn't use it.