I2S MEMS MIC TO ANALOG LINE LEVEL

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Tuhisman
 
Posts: 2
Joined: Wed Aug 04, 2021 3:02 am

I2S MEMS MIC TO ANALOG LINE LEVEL

Post by Tuhisman »

Hi,

Some background, Currently I'm using an analog microphone and preamp that is connected to IP-Camera with Line-in input and through the web interface, I can listen to the MIC. The MIC and the pre-amp are far from the IP-Camera and catching a lot of noise due to the harsh EMI environment, and then I experiencing a lot of static noise in the earphones.
I would like to replace the analog microphone with a digital one, but then I would need a digital to analog converter to connect it to the IP-Camera.
Would these Adafruit products can fit this solution?
1) Adafruit MAX98357 I2S Class-D Mono Amp
2) Adafruit I2S MEMS Microphone Breakout

Thanks in advance.
Attachments
Screenshot_1.jpg
Screenshot_1.jpg (28.23 KiB) Viewed 92 times

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2S MEMS MIC TO ANALOG LINE LEVEL

Post by adafruit_support_mike »

To check my understanding by paraphrasing:

- You want better noise resistance in the path between the mic and the IP camera.
- I2S, as a digital protocol, has better noise resistance than analog.
- The IP camera expects analog input.
- You need to convert the I2S stream back to analog at the camera.

If I got that right, then yeah, the SPH0645LM4H and MAX98357A should do what you want. The MAX98357A is kind of overkill since it’s a speaker driver, but it will do the job and we don’t have any I2S-to-analog devices that cost less.

The MAX98357A has class-D output (basically PWM), so you might need to filter the signal. That’s easy to do though: connect a 1uF capacitor between the IP camera’s audio input terminals, then connect the MAX98357A’s output to the capacitor through 4.7 Ohm resistors on both lines. That will give you a low-pass filter that starts attenuating signals at about 16kHz.

The MAX98357A‘s PWM frequency is about 330kHz, so you should get nice, clean analog to the IP camera.

User avatar
Tuhisman
 
Posts: 2
Joined: Wed Aug 04, 2021 3:02 am

Re: I2S MEMS MIC TO ANALOG LINE LEVEL

Post by Tuhisman »

Thanks, Mike. You got it right, I will try this solution and hope it will do the job.
Just want to make sure I understood the LPF implementation (picture attached), can you approve?
Attachments
Screenshot_2.jpg
Screenshot_2.jpg (17.14 KiB) Viewed 78 times

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2S MEMS MIC TO ANALOG LINE LEVEL

Post by adafruit_support_mike »

You’re mostly right. Put another 4.7 Ohm resistor on the GND side, or use a single 10 Ohm resistor on the A-INPUT side.

A single resistor is okay, but using one on either side of the capacitor will let the MAX98357A pull both inputs to the center of its own voltage range. Neither is necessarily better than the other, but I happen to prefer the symmetric version.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”