• Audio
  • High frequency sound (noise) at audio output

I'm using the bela mini for a new piece for saxophone electronics and I'm experiencing an unwanted noise sound at the audio output. I know this could be due to ground issues. So I tried to connect all ground connections, but it didn't work. What would be your approach to try resolve this? I attached the schematics of the project.

schematic-narcosis1-2024-09-10.pdf
105kB

    luis nwanted noise sound at the audio output

    Is it at the audio output or audio input or is it noise coming from sensors that makes the sound noisy? You should narrow down the source of your noise. For instance, record some audio on-board to disk to identify the source:

    • record the raw input signal
    • record the output just before sending it out
      You can use the example Audio/record-audio if you are using C++, or [writesf~] if you are using Pd.

    It looks like you are using a 3.7V -> 5V booster and then using its output without much filtering to provide bias voltage to the microphone? That would mean that any noise on VCC would bleed right into the microphone. You should filter that heavily, and/or get a better voltage reference, for instance 3.3V from Bela would probably be better, or you can get a proper zener.

    Thanks for the quick reply. The mic is not connected to the audio output - is only there for triggering events.
    i could see at the oscilloscope that the unwanted noise is a square wave and it changes the frequency when changing the programs and touching the sensors.

      Can you show me an example of the zener?

        luis Can you show me an example of the zener?

        that's a very common approach to get a voltage reference, see, e.g.: https://www.electronics-tutorials.ws/diode/diode_7.html

        luis i could see at the oscilloscope that the unwanted noise is a square wave and it changes the frequency when changing the programs and touching the sensors.

        Is this the scope on Bela? If so, then it's not a problem with the audio output, but with the sound generation or with the data that controls it, which in turn probably means your sensors. Again, you have to isolate the source of the issue first.

        Another possible source of issues you have there is that you are using the unfiltered 5V for the "SharpIRSensor", which is likely bleeding a lot of that noise into your analog outs. Btw, are you actually using the A0 pin that's on P1.19? If so, I would expect it to blow up the CPU, as that input is only 1.8V tolerant. If you are using the analog inputs on the BelaMini cape, then it's not a risk. Either way, you may benefit from using the much quieter 3.3V power line to power it - if it supports it.

        • luis replied to this.

          giuliomoro that's a very common approach to get a voltage reference, see, e.g.: https://www.electronics-tutorials.ws/diode/diode_7.html

          Thanks. This is supposed to stabilize the output of the Sparkfun 5V/1A LiPo Charger/Booster, right? I'll take a look at it.

          giuliomoro Is this the scope on Bela? If so, then it's not a problem with the audio output, but with the sound generation or with the data that controls it, which in turn probably means your sensors. Again, you have to isolate the source of the issue first.

          No, I saw it on my oscilloscope. In the audio output there is never silence - listen here: http://icem.folkwang-uni.de/~pena/tmp/bela_noise_audio_ouput.wav

          giuliomoro Another possible source of issues you have there is that you are using the unfiltered 5V for the "SharpIRSensor", which is likely bleeding a lot of that noise into your analog outs.

          The Sharp Distance Sensor is currently not connected.

          giuliomoro Btw, are you actually using the A0 pin that's on P1.19? If so, I would expect it to blow up the CPU, as that input is only 1.8V tolerant. If you are using the analog inputs on the BelaMini cape, then it's not a risk

          Okay, I wasn't aware of it. I just remember the analog inputs of the Bela are up to 5 V. So A0 is not the same as the Bela Analog Input?

          giuliomoro Either way, you may benefit from using the much quieter 3.3V power line to power it - if it supports it.

          You mean that the Voltage Booster could be a source of noise?

          Thank you very much for your comments.

            luis Thanks. This is supposed to stabilize the output of the Sparkfun 5V/1A LiPo Charger/Booster, right? I'll take a look at it.

            I assume the 5V supply is very dirty. I was suggesting it specifically to create a low-current voltage reference for the microphone in order to provide better filtering than what would be achievable with passive low-pass only. However, if the issue is that the 5V supply is causing noise on the audio codec that's on the BelaMini cape, this won't help. In that case you'd have to try a combination of series ferrite bead and parallel capacitors to try and remove the nasty noise. Again, we need to find the source of the issue first!

            luis o, I saw it on my oscilloscope. In the audio output there is never silence - listen here: http://icem.folkwang-uni.de/pena/tmp/bela_noise_audio_ouput.wav

            How was this recording made? Did you try what I suggested above to record audio on the device before it hits the DAC? You can extend that approach to monitor all input channels.

            luis I just remember the analog inputs of the Bela are up to 5 V. So A0 is not the same as the Bela Analog Input?

            No it's not: pins on P1 and P2 go directly to the system on chip on the PocketBeagle. Only the other connectors go exclusively to the Bela cape. Anything more than 3.6V on any of the pins of P1 and P2 except for the designated power inputs would destroy the processor and if it's on the pins marked AIN 1.8V, then anything above 1.8V is enough to do damage: .

            Thank you @giuliomoro . I'll investigate this. One more question: from your experience, are power banks more stable than LiPo+Voltage Booster?

            that really depends on the design of either ... power banks use LiPo + voltage booster themselves internally.

            Mind you, I am not saying the problem is not the wiring of the grounds. However, we can't look into it until we figure out the source of the noise! Did you verify via the recording method whether the signal before being sent the DAC is clean?

            I see from the schematics that you are using a PAM8403 breakout board. Did you try listening to the output straight from the headphone output of Bela ? Is that noisy already or does the noise only occur in the outputs of the PAM8403?

            Yes, you are right. I didn't test it yet because I can't change anything now before the concert. I made a PCB with the Bela on it, so it is not easy to change anything, but it certainly is worth trying the Audio Outs instead of the Line Outs. I'll work on it and report here. Thank you again for your precious comments.