Hi everyone and @giuliomoro ,

It has been a long time that I decide to not focus on getting a clean signal from bela. But since my instrument is getting more into profesional level, I have been working together with an electronic engineer student in order to eliminate this problem. I am using 4 piezo mics with this circuit connected to the Analogue inputs from Bela

After measuring the noise, We decided to try to work on the possible items:

1 - To get a clean ground with a customized battery pack
2 - To design a preamp for these type of mic (this preamp also has biasing circuit, whereas the circuit in the bela post mentioned become not necessary anymore, since I would be biasing twice)

After working in these items for a while, we are a bit upset to realize the noise is still here, as you can see in this oscilloscope (the signal and the bela output). We measured this noise a signal of 2.7kHz of 32 dB signal to noise ratio:

alt text

alt text

In the code, I am always using sc code to send the signal from a synthdef:

 (
  SynthDef("help-AnalogIn",{ arg out=0;

  var mic, ampli, freq, hasFreq, sin, flatn, fft,zerox,pitch;
		// mic = SoundIn.ar(4,3);
	
	var in1 = LPF.ar(LeakDC.ar(SoundIn.ar(2,1)),1000);  // To make this easier we first perform some signal conditioning and smoothing to the signal (DC offset filter, full wave rectification and a moving average filter). 
    Out.ar([0,1], in1));

  }).send(s);
  );

  s.sync;
  Synth.new("help-AnalogIn", target: s);

I am start to wonder that this system is beyond my capabilities to solve myself, since it seems to be a digital problem. Any ideas how to solve this problem?

So you are using the analog inputs for this? Could you not use the audio inputs on the minimulti cape you have? Those would be much better suited for this type of signals ...

    giuliomoro I would love to! However, In one the last emails with Andrew I understood that this cape wasnt design for piezo mics. I also remembering burning one mini bela trying to install it, but this could have been for other reasons (missattention for example 🙂).

    I could try again but would you use a different circuit than this one for biasing the piezos?

      RafaeleAndrade In one the last emails with Andrew I understood that this cape wasnt design for piezo mics.

      That's right, it won't be optimal in terms of fidelity (because of impedance mismatch), but it will be much better than trying to use the analog inputs.

      You wouldn't need that circuit. In principle you should be fine connecting the piezos directly to the audio inputs, however we recommend having a 1k series resistor to protect the audio inputs in case of something very loud coming out of the piezos.

        giuliomoro

        I think one part of my big missunderstanding is to keep using analogInputs , I have tested recently the piezos having in between a 1k series resistor in the audio input and it sounds fine to me.

        Applying the piezos in the minimulti cape with the same procedure from above brings me a distorted sound. In an email from Andrew from September 2022, he mentioned to use a resistor of 10k in paralell to the piezo disc.
        I'm not sure where that would be coming from, but piezo discs have a very high impedance where the string preamp is expecting a very low impedance (*very* low, just a few ohms). So one thing you could try to do is to put a 10k resistor (say) in parallel with the piezo disc. This would roll off some of the low frequency energy and might present a more tractable source to the string preamp. You could even try a smaller value, 1k. The lower the resistor, the higher the cutoff frequency of a high-pass filter, so at some point you might not want it to be too small.

        I am about to try this procedure, I just want to double check with you @giuliomoro if this is the right approach and the circuit below would not burn my bela:

        alt text

        giuliomoro Using this circuit mentioned and 1k series resistor I don't hear a very distorted sound coming from the output. I did test with the different inputs and outputs to double check. I do see some coding from console saying:

        (8) analog input and (8) analog output channels, (16) digital channels, and (0) multiplexer channels.

          RafaeleAndrade (8) analog input and (8) analog output channels, (16) digital channels, and (0) multiplexer channels.

          that should be fine. You could look at the input signals on the Bela scope if that is of help, or record them to disk. If the signal is clipping, you can reduce the PGA gain with the corresponding option.

          Btw, for future reference, what you have there is an experimental "String preamp" board and not a regular "BelaMini Multichannel Audio Expander". Also, those DIP switches should also affect the input gain of individual channels.