Noisy audio samples while using ADC on Arduino pro mini

Hi,
I have built a full duplex wireless audio communication system where the wireless part is taken care by esp12 and using an Arduino as the ADC and DAC (Pin 9 fast PWM based DAC) for audio receiving (using ADC) and production (using PWM DAC). So far I was doing POC and using Arduino UNO, now I want to package the whole thing for use, and for that purpose I replaced the whole UNO board with Arduino Pro mini (5v 16 mhz) because of its size.
Now the problem is I am getting enough noise primarily high frequency hiss like radio static. The mic preamp is fairly quiet and has a good s/n ratio. With the uno the noise was bearable but while changed to pro mini the noise level went to unacceptable state. How should I cure this?
My setup-

  1. Mic preamp gives a 2.5 v offset output that goes directly to A0 pin.
  2. Using a audio amp pam 8403 for the output, and pwm dac on pin 9.
  3. Using timer 2 to synchronize all read writes. the ISR has a serial read and a serial write to send and receive data within same ISR invocation. Serial read data is sent to D9, and ADCH is output via Serial write.
  4. This serial wires are connected to esp8266 rx/tx pins. esp processes the data and send over wirelessly to other end (android).

Problem:

  1. Even if i touch the A0 pin/wire it picks up increased hum/noise along with those high frequency noise components. That means even if i do not connect A0 with mic amp output the noise id still very persistent. This problem was much less in case of Arduino UNO board.

My understanding:
The entire system is running with a single power supply which is powering up the audio amp, mic preamp, arduino, and the esp. Its highly likely that much noise is produced by the audio amp, and as all the devices are on same rail the noise is flowing from one end to another.

I read on ADC, and the doc/forum posts say that I must do something to AVcc, AREF and AGND. So far I have not done anything with these pins and they are left untouched on the pro mini. I think they require some sort of biasing that might prevent this excessive noise.
Possible connections:
AVcc should be externally connected to Vcc,
AGND is already connected to GND as its a Arduino, or some LC filter (Vcc-Avcc 10uh, Avcc to ground 100 nf)

AREF-0.1uf to GND ?

Mic output to A0 pin - Should I put some RC LP filter to remove some HF noises? What are the values?

Can anyone suggest some definitive solution to this problem?
Appreciate you help!

mic preamp.pdf (77.5 KB)

ArduinoAudioTransceiverV4.ino (4.28 KB)

Nobody replied yet. Very strange! Anyways, I will wait for your responses. Simply put I have a mic preamp that works very well with Arduino uno board, but when I connect the same preamp with a 5v/16mhz pro mini, it introduces unacceptable amount of noise. I read on ADCs and it says AREF should be connected to ground with a 100nf. In the pro mini board there is no AREF pin externally available? Any ideas how to provide noise immunity to pro mini?

Thanks, Debojit

You really need separate, linear, regulator for the mic preamp - the noise will be digital hash from the Arduino most likely, nothing to do with the audio amp. Switchmode supplies or sharing digital and analog power rails are two very good ways to get audible noise in such a preamp - microphone amps make microvolt level signals audible.

The main difference between the Uno and Pro Mini that's likely to be relevant is the lack of large electrolytic capacitors on the tiny Pro Mini board. That would account for 10dB of difference in noise nicely.

The 39k R1 resistor injects the noise from the VCC into the audio signal.

MarkT: You really need separate, linear, regulator for the mic preamp - the noise will be digital hash from the Arduino most likely, nothing to do with the audio amp. Switchmode supplies or sharing digital and analog power rails are two very good ways to get audible noise in such a preamp - microphone amps make microvolt level signals audible.

The main difference between the Uno and Pro Mini that's likely to be relevant is the lack of large electrolytic capacitors on the tiny Pro Mini board. That would account for 10dB of difference in noise nicely.

Thanks for the response. Are you saying I should power the mic preamp with separate power supply? Currently I am powering up all the circuits using laptop usb output. Actually currently I am packaging the components so that I can deploy for actual purpose, so the system would normally have a single 5v power supply probably a mobile charger adapter. You have any thought on this as well?

MarkT: The main difference between the Uno and Pro Mini that's likely to be relevant is the lack of large electrolytic capacitors on the tiny Pro Mini board. That would account for 10dB of difference in noise nicely.

So should I put some 100uf on the pro mini power rail to remove some noises?

MarkT: the noise will be digital hash from the Arduino most likely, nothing to do with the audio amp.

Also I do not understand what is digital hash from Arduino?

Thanks, Debojit

Koepel: The 39k R1 resistor injects the noise from the VCC into the audio signal.

Should I reduce it, or add some filter cap to remove some noise in that line?

The 39k R1 resistor injects the noise from the VCC into the audio signal.

Should I reduce it, or add some filter cap to remove some noise in that line?

Re-read reply #2. Another choice is to clean up the power supply (Vcc) so there is no noise to inject.

groundFungus: Re-read reply #2. Another choice is to clean up the power supply (Vcc) so there is no noise to inject.

I did not understand. I think the R1 can't be removed, because electret mic needs some voltage biasing in order to work. Apart from power supply noise I think there is another being caught from environment. I need to cure that as well. Any help on that would be appreciated.

Thanks, Debojit

Start with the power supply noise. A linear regulator should be a VERY effective way of doing that - if you only have a 5V supply available, take a 3.3V regulator and run your amp at 3.3V. Amend R5 and R6 to still get your 2.5V bias.

Then you can worry about environment noise: that probably means shielded wires to your microphone, and maybe building the whole circuit inside a grounded metal case. That should take care of all environment noise.