I've been working on a circuit to do active noise cancellation, but I'm worried about controlling the phase. Here are my assumptions, and I'd love some help understanding 1)what of my assumptions are wrong, and 2) what should I/should I not worry about with regards to potential problems (listed below)?
This whole ANC will be mono, to simplify things.
If I feed the output of the microphone directly into an inverting op-amp, I should get exactly (?) \$180^0\$ phase shift. So if the microphone and the speaker were in the exact same location (and we considered nothing else in the signal path), it should be a "perfect" ANC. That said, the microphone and the circuit will not be in the exact same place, for calculation sake we'll say they'll be 1 meter apart. For a very low frequency, like 20hz, that's 1/15000000 of a wavelength, which probably doesn't make much difference. For a frequency much higher, say 20khz, that's a difference of 1/15000 which is considerably higher, but I don't know if that's high enough to warrant me worrying about it.
If that IS concerning enough that I'll want to worry about it, what approach should I take - do I want to try to impose a uniform phase shift across all frequencies, or do I want a uniform time delay? I get confused whenever I try to think through it.
Let's complicate the problem further: My speaker (singular, not mega-high-quality) probably can't produce 20hz very well - so I'll want to throw a high-pass filter on the output of the inverting op-amp. Again, my speaker can't produce 20khz very well, so I'll want to put a low-pass filter on. Now I've got a band-pass filter, which imposes some weird phase shifts depending on the exact selection of components. Is THIS a big enough concern that I need to compensate for it? If so, how do I go about it?
I've been looking at an analog solution, but if digital is easier I'm not opposed to it - I just wanted to try analog since I haven't ever approached a problem like this before. Thanks for the input!