Author Topic: 5V rail noise when updating 2x16 LCD  (Read 1880 times)

0 Members and 1 Guest are viewing this topic.

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
5V rail noise when updating 2x16 LCD
« on: July 30, 2019, 09:56:46 pm »
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 making
a lots of trouble.

Anyone have any ideas how this can be solved? Please suggest some good filter, so
I can power the analog part from the same battery pack.

Thanks!
TxeSci
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14892
  • Country: fr
Re: 5V rail noise when updating 2x16 LCD
« Reply #1 on: July 30, 2019, 10:06:22 pm »
Does the 5V regulator have proper decoupling close to its input and output pins too?
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #2 on: July 30, 2019, 10:22:27 pm »
Yes, forgot to mention that. Used electrolytic caps and ceramic for LF50CV. Analog part is
connected to the shared battery pack and has its own LF50CV. Still, there is noise in the analog
section also.
 

Offline coppercone2

  • Super Contributor
  • ***
  • Posts: 9928
  • Country: us
  • $
Re: 5V rail noise when updating 2x16 LCD
« Reply #3 on: July 30, 2019, 10:34:01 pm »
does the PI filter operate within the noise spectrum of the noise signal?

ferrite beads are hard to choose
did 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.
« Last Edit: July 30, 2019, 10:49:54 pm by coppercone2 »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14892
  • Country: fr
Re: 5V rail noise when updating 2x16 LCD
« Reply #4 on: July 30, 2019, 10:56:34 pm »
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.
 

Offline coppercone2

  • Super Contributor
  • ***
  • Posts: 9928
  • Country: us
  • $
Re: 5V rail noise when updating 2x16 LCD
« Reply #5 on: July 30, 2019, 10:59:10 pm »
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.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7199
  • Country: ca
Re: 5V rail noise when updating 2x16 LCD
« Reply #6 on: July 30, 2019, 11:51:14 pm »
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.
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #7 on: July 31, 2019, 05:49:02 am »
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.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6992
  • Country: hr
Re: 5V rail noise when updating 2x16 LCD
« Reply #8 on: July 31, 2019, 06:18:24 am »
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...
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #9 on: July 31, 2019, 12:33:34 pm »
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.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: ca
Re: 5V rail noise when updating 2x16 LCD
« Reply #10 on: July 31, 2019, 02:02:59 pm »
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.
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #11 on: July 31, 2019, 02:10:49 pm »
MasterT:
LCD and PIC are powered from the 5V.
PIC doesn't have that capability as I know.
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: 5V rail noise when updating 2x16 LCD
« Reply #12 on: July 31, 2019, 02:23:24 pm »
Could be capacitive coupling between conductors in the ribbon cable.
"It should work"
R.N.Naidoo
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14892
  • Country: fr
Re: 5V rail noise when updating 2x16 LCD
« Reply #13 on: July 31, 2019, 03:42:51 pm »
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...
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: 5V rail noise when updating 2x16 LCD
« Reply #14 on: July 31, 2019, 03:59:31 pm »
Or bad probing, after all.
Probe ground loop, or coaxial connection?
"It should work"
R.N.Naidoo
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1046
  • Country: ca
Re: 5V rail noise when updating 2x16 LCD
« Reply #15 on: July 31, 2019, 04:27:43 pm »
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.
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #16 on: July 31, 2019, 05:00:01 pm »
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.pdf

Think 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 nice
clean voltage...
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: 5V rail noise when updating 2x16 LCD
« Reply #17 on: July 31, 2019, 05:23:35 pm »
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 low
which 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.
 
"It should work"
R.N.Naidoo
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: ca
Re: 5V rail noise when updating 2x16 LCD
« Reply #18 on: July 31, 2019, 06:30:33 pm »
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.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3290
  • Country: gb
Re: 5V rail noise when updating 2x16 LCD
« Reply #19 on: July 31, 2019, 06:59:20 pm »
10K seems a bit high.

Agreed, 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.
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: 5V rail noise when updating 2x16 LCD
« Reply #20 on: July 31, 2019, 07:09:35 pm »
Good point mikerj, about micro end of cable.
Wrong end of cable will do no good.
"It should work"
R.N.Naidoo
 

Offline txescientistTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: cs
Re: 5V rail noise when updating 2x16 LCD
« Reply #21 on: July 31, 2019, 07:27:10 pm »
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).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21972
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 5V rail noise when updating 2x16 LCD
« Reply #22 on: July 31, 2019, 10:37:54 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4677
  • Country: au
    • send complaints here
Re: 5V rail noise when updating 2x16 LCD
« Reply #23 on: July 31, 2019, 11:12:55 pm »
Pics of layout?
Yes, this is where it would likely be revealed. Taking this cue:
Everyting is star grounded, but the LCD is daisy chained from PIC +V, GND and data lines.
Star 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf