Author Topic: OLED Audible Noise  (Read 12917 times)

0 Members and 1 Guest are viewing this topic.

Offline daleykdTopic starter

  • Newbie
  • Posts: 8
  • Country: us
    • delyk PCBs
OLED Audible Noise
« on: January 06, 2017, 11:26:06 pm »
Guys, I know I'm an absolute noob to all of this.  I chewed off a big chunk o' project and am so close to being done, but this one issue is driving me bonkers.

I've been trying to run a simple audio application, passing a guitar signal through 1/4" jacks into a guitar amp with an I2C OLED (SSD1306: http://www.ebay.com/itm/282174165223).

When I run the OLED, I get some awful noise in my audio path (https://youtu.be/s9LLt7F7W4Q).  As soon as I pull the OLED out, the noise is gone.

I'm stumped and don't even know what questions to ask.  My gut tells me that OLED just isn't nice for audio application.

I'm using an Arduino Pro Micro as my MCU.
« Last Edit: January 06, 2017, 11:53:51 pm by daleykd »
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: OLED Audible Noise
« Reply #1 on: January 07, 2017, 12:01:37 am »
OLED will have the same issue as LED matrix. As rows and columns are constantly switched, power consumption is fluctuating a lot. RF noise will be produced as well, depending on the display driver switching transition speed. Therefore you should be aware about it when laying out power rails and GND.
 

Offline daleykdTopic starter

  • Newbie
  • Posts: 8
  • Country: us
    • delyk PCBs
Re: OLED Audible Noise
« Reply #2 on: January 07, 2017, 12:05:15 am »
OLED will have the same issue as LED matrix. As rows and columns are constantly switched, power consumption is fluctuating a lot. RF noise will be produced as well, depending on the display driver switching transition speed. Therefore you should be aware about it when laying out power rails and GND.
I guess it could be an issue with my PCB layout, sure.  I tried so hard to keep the GNDs separated between the audio and the digital.

In this case, I'm not changing anything on the OLED.  Just having ANYTHING displayed (turned on) means I have the noise.

Would a GLCD have the same issues?  What about the 16x2 LCDs?
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: OLED Audible Noise
« Reply #3 on: January 07, 2017, 12:13:33 am »
OLED will have the same issue as LED matrix. As rows and columns are constantly switched, power consumption is fluctuating a lot. RF noise will be produced as well, depending on the display driver switching transition speed. Therefore you should be aware about it when laying out power rails and GND.
I guess it could be an issue with my PCB layout, sure.  I tried so hard to keep the GNDs separated between the audio and the digital.

In this case, I'm not changing anything on the OLED.  Just having ANYTHING displayed (turned on) means I have the noise.

Would a GLCD have the same issues?  What about the 16x2 LCDs?
Got a scope ? You need to find if it's coming in from RF or implied onto the PSU rails where additional bulk capacitance and/or/more bypass capacitance might solve your issue.
« Last Edit: January 07, 2017, 12:48:39 am by tautech »
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: OLED Audible Noise
« Reply #4 on: January 07, 2017, 12:18:34 am »
In this case, I'm not changing anything on the OLED.  Just having ANYTHING displayed (turned on) means I have the noise.
Current will fluctuate a lot as long as something is displayed. Also, I guess, pixel brightness (if there is) should be PWMed. So even if all of the pixels will display with exactly the same brightness, there still will be current consumption fluctuations.
Quote
Would a GLCD have the same issues?  What about the 16x2 LCDs?
LCD itself have small current consumption, so, most likely, will be much easier to deal with. As long as there is no noisy converter for LED backlight.
« Last Edit: January 07, 2017, 12:20:50 am by wraper »
 

Online DaJMasta

  • Super Contributor
  • ***
  • Posts: 2298
  • Country: us
    • medpants.com
Re: OLED Audible Noise
« Reply #5 on: January 07, 2017, 12:44:18 am »
There's also a chance that even if there's not much noise on the power lines (like if there's a good bit of capacitance on the screen module itself), that there's still some being radiated in your device.  Try to put a metal shield between the screen and the audio board (even tin foil, just make sure that it's not shorting anything), then ground it.  If that helps, at least some of the noise you're hearing is EMI radiated from the screen's switching or backlight driver.


If the screen isn't driving itself somehow, it could also be noise from the digital communications lines driving the screen.  Keeping those transmission lines away from the audio path (off the board is ideal) and keeping the controller away from the audio path could both help, as well as some bulk capacitance for the digital section of the board.

A scope can definitely help because you can see if things are proximity related, you can see if a change you make actually improves it, and finding the frequency of the noise can often help figuring out what's actually producing it.
« Last Edit: January 07, 2017, 12:48:13 am by DaJMasta »
 

Offline daleykdTopic starter

  • Newbie
  • Posts: 8
  • Country: us
    • delyk PCBs
Re: OLED Audible Noise
« Reply #6 on: January 07, 2017, 01:05:00 am »
Got a scope ? You need to find if it's coming in from RF or implied onto the PSU rails where additional bulk capacitance and/or/more bypass capacitance might solve your issue.
I do, and I just ordered probes for it.  They should be here Sunday.  I have NO idea how to use it, but my friend said he'd walk me thru it (I hope).

Current will fluctuate a lot as long as something is displayed. Also, I guess, pixel brightness (if there is) should be PWMed. So even if all of the pixels will display with exactly the same brightness, there still will be current consumption fluctuations.
Ah.  Makes sense!

LCD itself have small current consumption, so, most likely, will be much easier to deal with. As long as there is no noisy converter for LED backlight.
I'd be quite content, I think, with a GLCD.  I just don't know where to begin about researching them for use.

There's also a chance that even if there's not much noise on the power lines (like if there's a good bit of capacitance on the screen module itself), that there's still some being radiated in your device.  Try to put a metal shield between the screen and the audio board (even tin foil, just make sure that it's not shorting anything), then ground it.  If that helps, at least some of the noise you're hearing is EMI radiated from the screen's switching or backlight driver.
Is this like lining the cavity of a Fender P-Bass with aluminum tape and grounding it to create some form of Faraday cage?  Can I use aluminum foil?

If the screen isn't driving itself somehow, it could also be noise from the digital communications lines driving the screen.  Keeping those transmission lines away from the audio path (off the board is ideal) and keeping the controller away from the audio path could both help, as well as some bulk capacitance for the digital section of the board.
I tried to do this on my PCB, but I could probably do a better job of separating the audio from the digital.

A scope can definitely help because you can see if things are proximity related, you can see if a change you make actually improves it, and finding the frequency of the noise can often help figuring out what's actually producing it.
I'll get the o-scope running this weekend/next week.

I was trying to keep my PCB "hush hush" until release, but at this point, I'm dying for help.  Would seeing my PCB layout help?  I tried to keep SDA/SCL away from audio path, and I tried to keep some of the ground pour between them to prevent... uh... capacitance... cross-talk?

(Thanks for the quick replies.  I can't seem to get traction in other forums; I should have come here first.)
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: OLED Audible Noise
« Reply #7 on: January 07, 2017, 01:24:13 am »
Got a scope ? You need to find if it's coming in from RF or implied onto the PSU rails where additional bulk capacitance and/or/more bypass capacitance might solve your issue.
I do, and I just ordered probes for it.  They should be here Sunday.  I have NO idea how to use it, but my friend said he'd walk me thru it (I hope).
Once you've got some handle on the basics be sure to get him/her to show you how to check power rails for noise/ripple and then an example of using the probe like a "near field" probe  with no circuit connection or contact.

Until then do some reading and watching here:
https://www.eevblog.com/forum/beginners/oscilloscope-training-class-(long)/
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: daleykd

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8275
Re: OLED Audible Noise
« Reply #8 on: January 07, 2017, 02:21:08 am »
LCD modules may, besides the scanning oscillators already mentioned, contain boost converters to generate the various drive voltages needed for the panel electrodes.
 

Offline KRSO

  • Newbie
  • Posts: 3
  • Country: no
Re: OLED Audible Noise
« Reply #9 on: July 21, 2018, 09:17:19 am »
If you have a voltage between 7V and 15V volt available, you can use the OLED without the charge-pump. Disabling the change pump might help on noise..
 

Offline ubbut

  • Regular Contributor
  • *
  • Posts: 100
  • Country: de
Re: OLED Audible Noise
« Reply #10 on: July 21, 2018, 12:29:24 pm »
A RLC filter in the power supply to the OLED helped in my case.

R about 4.7Ohm, 10uF, 10uH

Larger R values might result in a dimmer OLED picture, but can significantly improve noise
 

Offline catmacey

  • Newbie
  • Posts: 4
  • Country: es
Re: OLED Audible Noise
« Reply #11 on: October 24, 2019, 01:04:01 pm »
I know this is a very old topic but it's one that shows up well in Google seaches so I think a comment here is valuable for anyone else who might be searching on this issue.

I just wanted to add that how you configure the OLED can also contribute a lot to the amount of noise it produces on the powerline.
Most OLED offer all sorts of arcane commands to setup internal voltages and frequecies.  Tweaking these values can make a lot of difference.  Using less power and operating at lower frequencies alters the amount of noise in the circuit.


In my case my drum-machine project uses a waveshare 128x128px mono (4bit greyscale) OLED with a SSD1327 driver for its UI. 
It's a great display, very easy to use and a nice step up from the typical 128x65 mono SSD1306 OLEDs.

however the default start up code from waveshare resulted in a fantasic amount of noise audible in the output. So much so that it drowned out the actual audio from the DAC.  The noise was a mix of a strong fairly low frequency in the 100's of Hz range plus a lot of harmoics of higher frequencies.

As suggested by others in this thread (plus another thread over at mutable instruments) I added a large capacitor directly to the OLED board.  In my case 330uF seemed to be the optimum for benefit/physical size of capacitor.
This seemed to reduce a lot of the higher frequency noise but still left a lot to be desired.

I also tried taking the display VDD supply from "the other side" of the VReg, ie. unregulated, directly from the VBat in which in my case is 3xAA batteries so around 3.6 to 4.5V. This further reduces the noise to a point where the system was usable but not nice when using headphones. That works as a bodge for now but will require a new board layout which I don't want to do right now.

So I thought I might have a bit of a play with the OLED config and see if there is anything to be gained there and it turns out that there is!

Now onto the config changes. Obviously these are specific to this display but the concept might carry over to other OLEDs.

Here's the SSD1327 datasheet
The OLED offers a couple of interesting settings.

The first is "Set Front Clock Divider/Oscillator Frequency" Command 0xB3
This essentially controls the refresh rate of the OLED a little bit like how a CRT electron beam scans the tube.
Bits [7:4] set the internal RC oscillator freq between 535kHz and 655kHz , bits [3:0] set a divider giving the resulting clock that governs the refresh rate.
The default in the datasheet is stated to be 0x00, so that's 535kHz with no divider.
Setting it to the lowest frequency and the highest divider 0x0f results in a very low refresh rate with visible scanning on the display.  No good as a display but interestingly it drastically reduces the noise produced.  It also clearly indicates that the noise frequecy is in part directly related to refresh rate.  A low refresh rate produces low freq noise.  A high refresh rate produces high freq noise.

My application is only updating the screen every 50ms (20Hz) so I don't need a very high refresh rate so I tweaked the it to be as low as possible without having any visual scanning.  In my case this is a value of 0x01 so that's the lowest fOSC of 535kHz with a divider of 2.   At this point most of the noise is now way down in the very low frequencies where it is almost inaudible.

The next improvement comes by reducing some of the voltage levels used internally. 
Changing these result in the display becoming brighter or dimmer and can make lower greyscale values essentially black.
However it also appears that lowering the voltages reduces the amount of noice produced so worth playing with.
There are two commands here;
Set Pre-charge voltage 0xBC and Set COM deselect voltage 0xBE.
I found that leaving the VCom at the default value of 0x05 and lowering the Pre-charge value to 0x03 produced a good looking display but also reduced the noice level.

Finally turning off 2nd precharge removed some additional noise without seeming to make any visual difference.
That's command 0xd5 with a value of 0x60

With all these changes combined I'm at the point where the noise is low enough to be acceptable.
For the next board revision I will re-route the power to the other side of the vReg after which it will be imperceptible.   

Hope that helps someone else.
 
The following users thanked this post: ubbut, DenTarda

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14475
  • Country: fr
Re: OLED Audible Noise
« Reply #12 on: October 24, 2019, 01:29:23 pm »
Old topic, and haven't read it all.

Just in case it hasn't been said already: most OLED panels require some kind of "high" voltage (most often over 5V), which means in many cases that you'll need to add a boost converter. The most probable cause of noise is the boost converter. And, this has been discussed in other threads, it usually doesn't come from the inductor as many would think (it's pretty rare), but most often from one of the capacitors. If you use a ceramic output cap for instance, it's very likely to produce some noise. A very common, yet little known issue.

See: https://www.murata.com/en-us/products/capacitor/mlcc/solution/naki
(of course you don't have to use Murata's solution, you could either replace the ceramic cap with a tantalum cap, or cut some slots around the cap to minimize vibrations coupled to the PCB.)
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: OLED Audible Noise
« Reply #13 on: October 24, 2019, 02:02:48 pm »
The most probable cause of noise is the boost converter. And, this has been discussed in other threads, it usually doesn't come from the inductor as many would think (it's pretty rare), but most often from one of the capacitors. If you use a ceramic output cap for instance, it's very likely to produce some noise. A very common, yet little known issue.
Nope, noise is because OLEDs within panel are switched rapidly and thus current fluctuates a lot. It's nothing like LCD where LCD panel itself consumes barely any current. And current consumption and fluctuations are directly dependent on image displayed.
Quote
And, this has been discussed in other threads, it usually doesn't come from the inductor as many would think (it's pretty rare), but most often from one of the capacitors. If you use a ceramic output cap for instance, it's very likely to produce some noise.
It's freaking not about audible whine noise from MLCC. It's about electrical noise affecting circuits around it.
Quote
and haven't read it all.
Apparently not even first few sentences from opening post.
« Last Edit: October 24, 2019, 02:06:08 pm by wraper »
 

Offline catmacey

  • Newbie
  • Posts: 4
  • Country: es
Re: OLED Audible Noise
« Reply #14 on: October 24, 2019, 05:14:23 pm »
Just to confirm.
I'm not talking about audible noise from the minute mechanical movement of the coil or caps etc. not a whine, you can't hear it on it's own.
The OLED is effectly silent.
I'm talking about electrical noise in the the circuit caused by the OLED that results in audio noise being present in the final audio path.
You hear it by plugging your headphones in. 
 :)
 

Offline DenTarda

  • Newbie
  • Posts: 2
  • Country: gb
Re: OLED Audible Noise
« Reply #15 on: April 22, 2020, 11:53:12 am »
Hi catmacey,

Thanks for this useful post!
Would you be able to share a snippet of code showing how you implement the suggested initialisation commands?

I am not an expert and am using the U8g2 library, so I am not sure how to change set  Front Clock Divider/Oscillator Frequency or the "pre-charge" voltage :-[
 

Offline catmacey

  • Newbie
  • Posts: 4
  • Country: es
Re: OLED Audible Noise
« Reply #16 on: April 22, 2020, 03:07:19 pm »
Hi,

I've not used U8g2 but it must have a setup function.
After a quick google... Yeah it looks to be here https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_ssd1327.c
There you can see all the initialisation commands. U8X8_CA(....)  These are what you want to change.

Any way I'm not using that library but here's the initilization sequence code I'm currently using (copied from my project).
The _cmd(X) function sets the OLED D/C low for commands and sends a byte via SPI.
LCD_RESET_SetHigh/Low() are macros for setting the reset pin on the OLED (yeah I know it says LCD.... )

Code: [Select]
void lcd_Init(){

LCD_RESET_SetHigh();
delay_ms(5);
LCD_RESET_SetLow();
delay_ms(5);
LCD_RESET_SetHigh();

_cmd(0xae);  //--turn off oled panel

_cmd(0x15);  //set column address
_cmd(0x00);  //start column   0
_cmd(0x7f);  //end column   127

_cmd(0x75);  //set row address
_cmd(0x00);  //start row   0
_cmd(0x7f);  //end row   127

_cmd(0x81);  //set contrast control
_cmd(0x50);
// _cmd(0x00);

_cmd(0xa0);  //segment remap
_cmd(0x51);  //51

_cmd(0xa1);  //start line
_cmd(0x00);

_cmd(0xa2);  //display offset
_cmd(0x00);

_cmd(0xa4);  //rmal display
_cmd(0xa8);  //set multiplex ratio
_cmd(0x7f);

// TODO: Look at this b1 value and see if the default value of 0xf4 would be better.
_cmd(0xb1);  //set phase 1 b[3:0] period, and 2 period b[7:4]
_cmd(0xf1);

// The lower the frequency the less audio noise there is
_cmd(0xb3);  //set dclk
_cmd(0x01);  //80Hz:0xc1 90Hz:0xe1   100Hz:0x00   110Hz:0x30 120Hz:0x50   130Hz:0x70     01

_cmd(0xab);  // Enable/Disable external VDD. 1 = Enable internal VDD regulator
_cmd(0x01); 

_cmd(0xb6);  //set phase length
_cmd(0x0f);

// Setting this low makes the lowest level dim but visible.
// It also makes les audio noise for some reason
_cmd(0xbc);  // Set precharge voltage. bits [3:0]
_cmd(0x03);

_cmd(0xbe);  // Set VComH voltage. bits [2:0]
_cmd(0x5);

// Disabling 2nd precharge seems to make less audio noise
_cmd(0xd5);  // Second precharge b1 = enable 2nd prechage, b0 enable external VSL
_cmd(0x60);

_cmd(0xb9);  // Set default grayscale

_cmd(0xfd);  // MCU protection status. b2 1 = lock
_cmd(0x12);

delay_ms(50);

//Turn on the OLED display
_cmd(0xAF);
}
« Last Edit: April 22, 2020, 03:11:48 pm by catmacey »
 
The following users thanked this post: DenTarda

Offline DenTarda

  • Newbie
  • Posts: 2
  • Country: gb
Re: OLED Audible Noise
« Reply #17 on: April 23, 2020, 08:13:32 am »
Quote
After a quick google... Yeah it looks to be here https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_ssd1327.c
There you can see all the initialisation commands. U8X8_CA(....)  These are what you want to change.

Any way I'm not using that library but here's the initilization sequence code I'm currently using (copied from my project).

Brilliant!
Thank you very much for the example and explanations. I will try this!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf