Using logic buffers to transmit PDM microphone signals over longer distances? - Page 1
Forum section: electronics / projects

author: Spatz
author_rank: Newbie
timestamp: October 15, 2022, 04:22:43 pm
content: Hello everyone,I want to design a fully digital audio (speaker) measurement system (DIY and open source). The system has an ESP32 as MCU, and is portable, so you only need to connect power (for amplifier, MCU etc.) and the speaker.Acoustic data is measured by two MEMS microphones with a PDM interface (two mics to measure on and off axis response simultaneously, for example).For good acoustic measurements, the microphone enclosure should be as small as possible, so my idea is to use a 10-15cm long aluminium (OD=10mm, ID=8mm) tube with the MEMS mic on a small PCB on one end, and a female TRRS connector on the other end (https://ae01.alicdn.com/kf/H66ee440c802a47a789b1cf4897d09848k/10Pcs-PJ-392A-3-5mm-3-4-Pin-Audio-Kopfh-rer-Buchse-3-4-Pole-Stereo.jpg_Q90.jpg_.webp).One microphone tube is directly connected to the main device (the main PCB has a male TRRS connector soldered onto it), while the other microphone tube is connected to the main PCB with a 2-3m long TRRS cable, with a female TRRS connector soldered onto the PCB.The four wires in the TRRS connection are used for VDD, GND, PDM_CLK and PDM_DATA.The idea behind being able to remove the mic tube from the main PCB is easier transport.The PDM clock should be around 4MHz for a good SNR of the acoustic data.I know that this design is not the best considering signal quality, but it is easily buildable with standard parts, so I'd prefer to stick with it.To improve the signal quality, I had the idea to use logic gates as buffers to increase the drive strength of the outputs.As the stereo PDM interface puts the output of one microphone into Hi-Z when the other microphone is transmitting data, I was thinking about using 74LVC1G125 and 74LVC1G126 gates for the left and right mic, and feed the clock signal into the control inputs, so that they only transmit data when it's their turn.The incoming data is then again buffered by a schmitt trigger gate on the main PCB, and the clock output is also buffered by a schmitt trigger gate.You can see the details in the schematic, but please note that the genders of the TRRS connectors are switched in the schematic.As board space is pretty limited (I only have 8mm in diameter for all parts and solder pads), I can only fit the mic, one logic gate, one 0603 resistor and one 0603 capacitor directly onto the PCB. Another 10uF electrolytic cap as placed in the alumimium tube as close as possible to the PCB. The capacitor on the PCB is a 100nF (X7R) in the schematic, but I would prefer a 10nF (C0G) for its better behaviour regarding microphonic effects.So, my questions are:1. Is it okay to use a single 10nF (and a more "remote" 10uF electrolytic) as decoupling capacitor for both mic and logic gate?2. Will the logic gates help with signal integrity?3. Are there other ways to improve the design without giving up manufacturabilty?Best regards,BastianPS: The render of the whole main PCB only has the buffer on the mic PCB on one of the two boards for now.

author: Terry Bites
author_rank: Super Contributor
timestamp: October 15, 2022, 04:49:43 pm
content: Its highly likely that noise is going to couple from your digital lines into your power line. You need good decoupling that works over a wide frequency range:https://techweb.rohm.com/knowledge/emc/s-emc/03-s-emc/7669. A CM filter at the mic end would be a wise precaution. You also might want to put a regulator at the remote end and put a higher supply voltage on the power line.

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 15, 2022, 05:00:44 pm
content: Another possible problem that I see with your design is using the PDM_CLK as enable for the PDM_DATA lines and trying to read the two microphones with a single pin. But it depends on what the microphones output on their data line when clocked and if the signals are held when the clock level changes.I myself would use a third pin on the MCU to read in the two data lines at the same time and not clock the enables of the buffers you plan to use.

author: tggzzz
author_rank: Super Contributor
timestamp: October 15, 2022, 05:09:30 pm
content: Quote from: Terry Bites on October 15, 2022, 04:49:43 pmA common mode filter will introduce inductance into the ground connections, which is usually not a good idea with digital circuits.The OP should realise that 74LVC1G gates switch notably fast; assume 1ns (I've generated <300ps risetimes in other circumstances). Work out the current that will be flowing into the load during transitions, then use V=Ldi/dt(where dt=10-9)to work out the voltage that would be induced across an inductor.If crosstalk in the cable or radiated EMI is an issue, consider transmitting a differential signal or using optical fibre.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 15, 2022, 06:06:50 pm
content: I would definitely use differential drivers/receivers. For 4MHz signals, there are tons of them out there at various prices, some isolated even (which could be interesting here.) Look up RS485 (or similar) transceivers. 10MHz min. is now usual for those.

author: Spatz
author_rank: Newbie
timestamp: October 15, 2022, 08:43:46 pm
content: Quote from: Terry Bites on October 15, 2022, 04:49:43 pmAs you can see in the pictures, there is no space on the mic PCB for more components. So a regulator is not an option.Quote from: pcprogrammer on October 15, 2022, 05:00:44 pmYou can find a datasheet for the MEMS microphoneshere. Information about timing and output are on page 5.Using a third pin could be possible, but I only have one pin of the MCU left in my design, and that one (GPIO12) is also relevant for booting properly, so I'd like to leave it unused if possible.Quote from: tggzzz on October 15, 2022, 05:09:30 pmI included series resistors close to the output gates, to accomodate for the rise and fall times. Do you think that might be enough?Quote from: SiliconWizard on October 15, 2022, 06:06:50 pmI know that differential signaling would be better, but I am limited in board space and the maximum number of pins (4) on the connector. So differential signaling is not possible.

author: tggzzz
author_rank: Super Contributor
timestamp: October 15, 2022, 09:07:53 pm
content: Quote from: Spatz on October 15, 2022, 08:43:46 pmYou can can do.the arithmetic as well as I can!And now everybody sees why it is better not to combine orthogonal replies into a single post.

author: tszaboo
author_rank: Super Contributor
timestamp: October 15, 2022, 09:34:19 pm
content: Quote from: Spatz on October 15, 2022, 08:43:46 pmYou have an entire side almost empty. Since it already has components, you might as well use it with other parts.

author: Spatz
author_rank: Newbie
timestamp: October 15, 2022, 11:05:12 pm
content: Quote from: tszaboo on October 15, 2022, 09:34:19 pmThe other side of the mic PCB is exposed to the environment, so placing parts on this side is not an option. As I have already said: MEMS mic, single SC-70, two 0603s, that's all that fits on the board.Why do most people try to come up with solutions that need a lot more board space even though I clearly stated that board space is one of the limitations in this project?Can anyone answer the first two questions in my initial post?

author: jonpaul
author_rank: Super Contributor
timestamp: October 16, 2022, 08:59:54 pm
content: A few questions please1. max cable legnth ? type of cable?2. measurement desired, freq, dynamic range?3. you are familiar with existing speaker and room acoustic measures, eg SusID, MLS, Audio Précision ?Bon courageJon