Possible to run 4 pin i2c OLED without charge pump?

I am having a struggle with noise in my audio circuit which happens whenever my OLED 1306 .91" four pin i2c display is updated to show something different. I'd like to bypass the charge pump to see if it's the culprit.

I've disabled the pump with the code below and experimented with external voltages on VCC up to 7.5 with nothing displayed.

  //this is copied from the Adafruit display example
  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    for (;;); // Don't proceed, loop forever
  }

  display.ssd1306_command(SSD1306_CHARGEPUMP);    //the register to update
  display.ssd1306_command(0x10);  //send the value which turns off the pump, 0x14 is to enable

Is it possible to bypass the charge pump and get the display to work?

I recommend to check whether the manufacturer's data sheet for that display addresses your question. Adafruit makes them available to download.

The company I bought them from provides the ubiquitous Solomon Systech SSD1306 data sheet with their display. I couldn't find any information specific to my question in it.

The charge pump runs continuously, but you state that the audio problem occurs only when the display is updated. That suggests that the problem may be due to processor activity, or radiation from the I2C connection.

Shielding the audio connections or rearranging the circuitry might help. Otherwise, post the details of your setup and forum members may take an interest.

Thank you for the insight about the charge pump running continuously. Very interesting and it matches what this workaround dealt with. I was thinking that as the load fluctuates when updating the display, it might be having an intermittent impact on the pump that I'm hearing.

I've tried very simple foil shielding of the display and it didn't have an impact.

I've also tried to separate the signals as much as possible - keeping SCL and SDA on opposite corners of the 328P DIP as the audio, grounding the display at the power jack, running audio on the other lane of the breadboard, powering the 3.3 V for the display from an external supply, but no change.

The audible chirping on display updates goes away when the OLED is powered down even though the MCU is still processing changes that would normally be displayed. That's what made me think that it's the display.

Does the 328P stop updating SCL and SDA if the single connected i2c device is powered down? If so, it sounds like it still could be i2c that I need to deal with.

I need to get a simplified schematic and breadboard setup put together to post here.

For audio is ground a great issue. In most cases al the grounds go to one point. A loop makes a great antenne. You can try a capacitor as short as possible by the OLED. A greater one (100µ?) and 100n.

Shielding the audio wires is another issue.

Layout and routing of wires are critical, please post some photos of your project.

I really appreciate the offers to look over the schematic to help identify the problem. I agree that it's very likely a design flaw in my circuit. I am going to try to finish putting a stripped down version together, testing as I go to see when the chirp shows up.

If anyone has been able to run this type of display without the charge pump and are willing to share how they went about it, I'd like to see if it changes anything in my project. Thanks!

This is the stripped-down version which still chirps in the audio output. Here are the the particulars:

  1. The audio is only connected to this circuit through shared grounds.
  2. The chirp in the audio only happens when the OLED i2c display is being updated.
  3. The chirp goes away when the passive guitar off screen on the right has its volume turned down or is unplugged from the jack.
  4. The chirp goes away if an active instrument is plugged in instead of a passive instrument.
  5. The chirp goes away when the black wire on the ground post is connected to the circuit ground.
  6. The problem exists on a PCB prototype where the OLED connection wires are short and the pcb audio jacks are soldered to the board.

Any ideas on how to get rid of the chirp with a passive instrument attached?



After building the simplified circuit on a breadboard with no base, found that when the breadboard sits on the yellow steel Quadhands base plate, the chirp happens when the OLED is updated.

As the breadboard is lifted away from the base, the chirp gets quieter with distance until it disappears.

It seems like the i2c signals from the Mega are resonating with the bases. They are also noisy in the two layer PCB version which has ground pours on top and bottom.

Will pulling the ground pours out from under the MCU help the problem? Any other ideas on how to keep this noise to a minimum on the pcb?

1 Like

I saw your reply #9 yesterday but have not had chance until now to look at it properly or reply.

It does not look to me like the Fritzing diagram and the photos match, which makes it difficult to follow and work out what the problem might be. I was hoping the Fritzing diagram would clarify bits of the photo that are not clear. In particular:

Where is the output? In the Fritzing diagram on the left you show a speaker, is that the output? If not then what is? Where does the sound come from? The speaker is not connected to any source of anything that would intentionally make a sound.

You refer to a 'passive' guitar, I have no idea what a passive guitar is. I know only of acoustic and electric guitars. I am no musician.

There is nothing in the photo that I can see that corresponds to the speaker or the pot that the speaker is connected to. What makes the sound?

There are 2 cables in the photo with jack plugs, no idea where these go or what their corresponding parts are on the Fritzing diagram.

The coiled wires obscure things on the photos.

If I assume that the sound comes from the speaker in the Fritzing diagram then that is because the 2 connections to 0V are in completely different places on the breadboard as shown. There will be current flowing in the breadboard contacts, which will develop voltage across them according to Ohms Law, which will show up as noise in the speaker.

I have yet to study your new post #10, but it looks as confusing as this one.

Regarding the photo in reply #10.

Again, I don't know where the sound comes from.

The 2 things plugged in with jacks just connect to each other and nothing else as far as I can see. Are they the 'passive guitars'? I can imagine that the red wire might pick up noise capacitively through the metal plate you mention. Try connecting the metal plate to 0V.

What is the point of the circuit? Why are there analogue signals anywhere near the digital electronics if the digital electronics don't don't do anything with it?

I don't see any ceramic 0μ1 decoupling capacitors, the capacitors I can see look like tantalum bead capacitors. You should have 0μ1 ceramic capacitors close to the pins of the processor and the display at least. A few extra ones would not do any harm.

Based on what I can see and can infer, which might be wrong, I think the noise in the first circuit comes from voltage developed across the 0V connections due to bad layout and in the second circuit it is due to capacitive pick up. This means that the second circuit does nothing to simplify the problem because it just creates noise for a different reason.

Hi there.
I have some audio knowledge, but i could be wrong, nevertheless my memories are saying me, that OLED displays and not the best option to use in audio circuits/ projects. Please try another type of display. Maybe wrong, but displays cost not so much nowadays.
Thanks,
Vadim.

Ps. And Arduino either. It's, according to my knowledge, not optimized for audio.

Thank you for your replies, Perry. I'll try to answer your questions.

The audio output is the speaker in the Fritzing diagram. In the pictures, it's the 1/4" jack on the left which runs to an instrument amplifier.

The sound comes from a guitar, which is supposed to be represented by the coil and the potentiometer in the Fritzing diagram. In the pictures, it's off to the right and connected with the 1/4" jack. I just installed Fritzing for this purpose and there wasn't a stock guitar pickup component. By passive, I just mean that there are no powered electronics in the guitar. When I use an active instrument, the chirp doesn't happen. When the volume control for the passive guitar is at its lowest, there is no chirp.

I don't understand why you say there there will be current flowing in the breadboard contacts. For this experiment, they are only tied to the electronics through their grounds. The signal wires are tied together but isolated from the MCU.

Yes, connecting the metal plate to ground quiets the chirp. Why is that?

The yellow caps are ceramic, not tantalum. In my simplification, I excluded caps from the display leads, but I just added a .1 uF ceramic back which made no noise change. I've also had versions with bulk caps close to the display pins, but also no improvement.

What other processor points should have decoupling caps?

I'd like to improve my design, so when you say bad layout can you describe how it can be made better?

You say the problems in the second circuit may be due to capacitive pick up. Can you explain what that means and how I can try to eliminate that problem?

Thanks, Mega. I hate to give up on OLED, but my optimism is on the decline!

Generally I don't like Frizing diagrams but in this case I was hoping the one you did would be helpful. You have confirmed what I thought: the diagram does not represent what is on the breadboard. You say the output is from the speaker, which is on the right of the Frizing diagram, but on the left of the breadboard in the photo. This makes the Fritzing diagram useless. The Fritzing diagram should be an accurate layout diagram showing actual connections. Not having the exact right component is a small detail that can be explained, having a completely different layout defeats the whole purpose of the diagram. As the pot and inductor represent components in the guitar, not on the breadboard, it would be clearer to show them off the breadboard, perhaps on a different breadboard, along with an explanation.

However...

By passive, I just mean that there are no powered electronics in the guitar.

I suspected that was the case, but as I have never had anything to do with guitars, electric or otherwise, I thought it best not to assume.

I don't understand why you say there there will be current flowing in the breadboard contacts. For this experiment, they are only tied to the electronics through their grounds. The signal wires are tied together but isolated from the MCU.

In the photo the problem is not there. In the Fritzing diagram in reply #9 you have the left hand contact of the pot going to 0V at the top of the breadboard and the inductor (pickup) going to 0V at the bottom of the breadboard. You might think those 2 points are electrically the same but they are not, especially from a noise point of view. They are a long way apart and in the path between them there are other circuits, especially the display, that draw current through the 0V connection. If you don't already know Ohms law please stop and learn it. The long path between those 2 connection points has resistance. Current through resistance results in voltage across the resistance, varying current through resistance results in varying voltage. Varying voltage equals noise. The noise will show up between the 2 connection points and find its way into the audio path.

What other processor points should have decoupling caps?

There should be a ceramic 0μ1 capacitor physically close to the power pins of the processor and the same for the display. The one you have is pretty close, but could be closer if you put it right next to the 2 power pins on the breadboard.

Yes, connecting the metal plate to ground quiets the chirp. Why is that?

You say the problems in the second circuit may be due to capacitive pick up. Can you explain what that means and how I can try to eliminate that problem?

Do you know how a capacitor works? 2 metal plates with an insulator between them? That's what you have in the second circuit, with the metal plate acting as one side of a capacitor and the rest of the circuit as the other side. 2 (or more) capacitors actually, with the plate as common between them. The plate picks up noise from the circuit and transfers it to the audio circuit. If you connect the plate to 0V you short out the interference signal and stop it getting into the audio circuit.

Unfortunately, I am at my limit of what to tell you. I still don't understand why the audio is even on the breadboard at all as nothing happens to it there. You say that a guitar with a built in amplifier does not have the problem; as I mentioned I have no experience with guitars but I suspect that the signal from a guitar pickup is at a very low level, making it susceptible to noise. If it is amplified at the guitar it will be both a much higher level and lower impedance, both of which will vastly reduce its susceptibility to noise. The answer might be a separate amplifier, in the same box of electronics as the processor and display, to amplify the guitar signal. If you do this then I suggest it should be in a grounded (connected to 0V) metal box with only 3 connections: input, output and power. The power should come from a separate power supply, preferably from a linear regulator, not a switch mode power supply (less noise), or batteries (less noise). Unless someone else can offer better help that's about all I have for you. I know there are people here who will have better answers (and might teach me something), obviously it's up to them if they wish to contribute.

Play around and see if you make any progress, but please, if you post a Fritzing diagram make sure it accurately reflects what you have on your breadboard.

Thank you for trying to help, Perry! You raised some great points.

In case someone stumbles across this post who is trying to quiet i2c OLED display noise in a mixed signal circuit, what ended up working for me was filtering the audio signal input and then buffering it. The ground is shared with the digital section of the circuit.

Thanks for the update, glad you found a solution to your problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.