OLED Audible Noise - Page 1
Forum section: electronics / projects

author: daleykd
author_rank: Newbie
timestamp: January 06, 2017, 11:26:06 pm
content: 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.

author: wraper
author_rank: Unknown
timestamp: January 07, 2017, 12:01:37 am
content: 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.

author: daleykd
author_rank: Newbie
timestamp: January 07, 2017, 12:05:15 am
content: Quote from: wraper on January 07, 2017, 12:01:37 amI 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?

author: tautech
author_rank: Super Contributor
timestamp: January 07, 2017, 12:13:33 am
content: Quote from: daleykd on January 07, 2017, 12:05:15 amGot 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.

author: wraper
author_rank: Unknown
timestamp: January 07, 2017, 12:18:34 am
content: Quote from: daleykd on January 07, 2017, 12:05:15 amCurrent 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.QuoteLCD 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.

author: DaJMasta
author_rank: Super Contributor
timestamp: January 07, 2017, 12:44:18 am
content: 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.

author: daleykd
author_rank: Newbie
timestamp: January 07, 2017, 01:05:00 am
content: Quote from: tautech on January 07, 2017, 12:13:33 amI 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).Quote from: wraper on January 07, 2017, 12:18:34 amAh. Makes sense!Quote from: wraper on January 07, 2017, 12:18:34 amI'd be quite content, I think, with a GLCD. I just don't know where to begin about researching them for use.Quote from: DaJMasta on January 07, 2017, 12:44:18 amIs 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?Quote from: DaJMasta on January 07, 2017, 12:44:18 amI tried to do this on my PCB, but I could probably do a better job of separating the audio from the digital.Quote from: DaJMasta on January 07, 2017, 12:44:18 amI'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.)

author: tautech
author_rank: Super Contributor
timestamp: January 07, 2017, 01:24:13 am
content: Quote from: daleykd on January 07, 2017, 01:05:00 amOnce 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)/

author: amyk
author_rank: Super Contributor
timestamp: January 07, 2017, 02:21:08 am
content: LCD modules may, besides the scanning oscillators already mentioned, contain boost converters to generate the various drive voltages needed for the panel electrodes.

author: KRSO
author_rank: Newbie
timestamp: July 21, 2018, 09:17:19 am
content: 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..

author: ubbut
author_rank: Regular Contributor
timestamp: July 21, 2018, 12:29:24 pm
content: A RLC filter in the power supply to the OLED helped in my case.R about 4.7Ohm, 10uF, 10uHLarger R values might result in a dimmer OLED picture, but can significantly improve noise

author: catmacey
author_rank: Newbie
timestamp: October 24, 2019, 01:04:01 pm
content: 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 theSSD1327 datasheetThe OLED offers a couple of interesting settings.The first is "Set Front Clock Divider/Oscillator Frequency" Command0xB3This 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 be0x00, so that's 535kHz with no divider.Setting it to the lowest frequency and the highest divider0x0fresults 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 of0x01so 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 voltage0xBCand Set COM deselect voltage0xBE.I found that leaving the VCom at the default value of0x05and lowering the Pre-charge value to0x03produced 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 command0xd5with a value of0x60With 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 24, 2019, 01:29:23 pm
content: 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.)

author: wraper
author_rank: Unknown
timestamp: October 24, 2019, 02:02:48 pm
content: Quote from: SiliconWizard on October 24, 2019, 01:29:23 pmNope, 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.QuoteIt's freaking not about audible whine noise from MLCC. It's about electrical noise affecting circuits around it.QuoteApparently not even first few sentences from opening post.

author: catmacey
author_rank: Newbie
timestamp: October 24, 2019, 05:14:23 pm
content: 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.

author: DenTarda
author_rank: Newbie
timestamp: April 22, 2020, 11:53:12 am
content: 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

author: catmacey
author_rank: Newbie
timestamp: April 22, 2020, 03:07:19 pm
content: Hi,I've not used U8g2 but it must have a setup function.After a quick google... Yeah it looks to be herehttps://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_ssd1327.cThere 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: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);}

author: DenTarda
author_rank: Newbie
timestamp: April 23, 2020, 08:13:32 am
content: QuoteBrilliant!Thank you very much for the example and explanations. I will try this!