I would like to start with my sincere apologies, I have no excuse or shame, you have been super kind to me and I didn't get to respond despite continuing to work on the project intensely.
Mains hum is always a problem with low level audio signals - stray mains voltage in the air is at a suprizingly high level, 20V or more isn't unknown. This means the screen for the microphone cable needs to be solid braid for best results. Also using twin-core plus screen cable is typical, with the microphone signal on the core wires (signal and return), and the screen separately connected to ground - the screen shields the core wires from mains signals, and any noise currents in it don't pollute the microphone signal or signal ground. Using simple coax means noise currents on the screen corrupt the microphone signal.
Can you provide a wiring diagram for your current setup ?
Also MarkT, yes, I did this simply and almost nonsense scheme after reading your post to have a visual representation, but I think you want to know a little bit more than this:
Also, for AntiLoop question
do you still use the mic you posted the photo before?
Yes, I've been using this mic for all the tests, and I've to say that It worked fine with the PC, you're right with the fact that in any line in input by themselves doesn't work as expected, but from the PC, they work pretty fine.
The main issue is the "calibration" for them, or the sound curve applied, looks like is designed to be the best they can for the human voice range and in the rest of the frequencies, well, good luck, sometimes is fine, sometimes is trash.
I made a test playing some sine tones at different frequencies to evaluate the capabilities for medium and low, just because I can't start making tests for the thesis without knowing the limitations of the hardware, and is quite interesting.
As you can see, between 400 Hz and 700 Hz there's a performance problem, the microphone is "deaf", specially at 600 hz, so I had to avoid those frequencies.
And also, for this:
Have you tried those kind of mic boards ? VCC = 2,5V-> 5,5V
I remember,they sound good.
Is a great option too, the idea behind project is to illustrate that it is possible to build a functional system with easily accessible elements, such as that microphone or the one I use, and even the issues are relevant to show the importance of using the right transducers to obtain the desired performance.
Also, the device affects to the quality of the system, because I tested some situations where the system works better than it feels to the ear, and some other situations where is the opposite, and that's a little bit (I assume) because as humans, and as the previous test shows, microphones have their own subjective sound signature, so some are more sensible than other to certain frequencies, and also more sensible than our ears.
So just for the end, the "subsytem" works, I have had results really impressive, about 10 dB attenuation when I tested at 300 Hz, but is working with a pretty basic setup, where the Teensy is more like a simple FIR filter in the process, because the calculation of the coefficients is previously done in MatLab on a computer.
I think that should be possible to do hard work to implement something similar just as an option, like all the different blocks in the Audio System Design Tool, just you have to add like one "X" for the noise sample, one "Primary" for the raw noise source from the point where we want to cancel it, and also a "X1" and "Secondary" for the calibration of the control audio source and the sample to calculate its transfer function.
Right now I'm using a simple FX-LMS algorithm which is from a laboratory exercise in one of my university's master's degree programs, so is really basic and academic, and I think it can be polished a lot more and give a new use to the Teensy.
I want to thank all of you for your help and patience, you helped me a lot to understand some vital things in order to get the work on track in the direction I wanted and to simplify other procedures that would have made my trials much more complicated.
If you have any more questions about the project, or curiosity, do not hesitate to ask me, this time I promise to answer much sooner, it has been a complicated few months for several factors, and I do not like the feeling of ghosting with which I left you.
Thank you very much again, my best regards and good wishes to all of you in this year 2025.