So much noise

Hi,

from a brand new daisy seed, I notice that just passing the input (yellow) buffer to the output (cyan) buffer in the main audio loop, I get crazy amount of noise

Is this normal operation ?

  • yes AGND is connected to DGND
  • I tried powering the daisy from usb 5V and I tried with a 9V transfo
    (I use the stlink to program it)

thanks for your help

#include "daisy_seed.h"
#include "daisysp.h"
#include "arm_math.h"

using namespace daisy;
using namespace daisysp;

DaisySeed hardware;

#define WINDOW_SIZE 48

void AudioCallback(AudioHandle::InterleavingInputBuffer in,AudioHandle::InterleavingOutputBuffer out, size_t size)
{
    for(size_t i = 0; i < size; i += 2)
    {
        out[i+0] = in[i+0];
        out[i+1] = in[i+1];
    }
}

int main(void)
{
    hardware.Configure();
    hardware.Init();

    hardware.SetAudioBlockSize(WINDOW_SIZE);

    hardware.StartAudio(AudioCallback);

    for(;;)
    {
    }
}

I don’t have a scope handy right now, but it might be interesting to see what happens using an Oscillator object, to narrow this down to noise on input or output.

It seems we need to add an analog lowpass filter (at e.g. ~30 KHz corner freq), you can just use a 1-pole RC, I used .022 uF, 220 ohms. Still puzzling how filtering out the out-of-band signal can change the in-band signal.

yeah I though about R/C’ing the output, but I am surprized nobody noticed this beforehand

Many have noticed noise before.

After adding a 220ohms/22nF RC I get a better output but hiss is still noticeable (plugged into a guitar amp, especially when using a fuzz/dist pedal, it gets amplified)

should I use a second filter ? not sure how to figure the values though

I tried with an osc, I get the same noise issue

#include "daisy_seed.h"
#include "daisysp.h"
#include "arm_math.h"

using namespace daisy;
using namespace daisysp;

DaisySeed hardware;
Oscillator osc;

#define WINDOW_SIZE 48

void AudioCallback(AudioHandle::InterleavingInputBuffer in,AudioHandle::InterleavingOutputBuffer out, size_t size)
{
    for(size_t i = 0; i < size; i += 2)
    {
        float sig = osc.Process();
        out[i+0] = sig/3; 
        out[i+1] = sig/3;
    }
}

int main(void)
{
    hardware.Configure();
    hardware.Init();

    float sample_rate = hardware.AudioSampleRate();
    osc.Init(sample_rate);
    osc.SetWaveform(Oscillator::WAVE_SIN);
    osc.SetAmp(0.5f);
    osc.SetFreq(670);

    hardware.SetAudioBlockSize(WINDOW_SIZE);

    hardware.StartAudio(AudioCallback);

    for(;;)
    {
    }
}

How are you wiring up your Seed? e.g. is it on a bread-board? maybe post a picture of your setup?

I noticed these spikes appear as I just have contact between the pc usb-c cable ground to the circuit

I have full gnd connecivity from there to the scope ground and the daisy ground

I added a 100nF and ferrite bead from the usb gnd, but the noise is still there

I migrated everything in a new aluminium box, same problem

at this point, any idea is welcome :slight_smile: