Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Esp32 with speaker and electret microphone in headset connected with RJ9

Status
Not open for further replies.

Orizine

Newbie
Newbie level 4
Joined
Dec 14, 2021
Messages
5
Helped
1
Reputation
2
Reaction score
0
Trophy points
1
Activity points
99
Hello,

Sorry for if the question if I'm not clear, i'm not nor développer, nor electronician , but i've done a small project with esp32 to do a full duplex audio stream, well done 😅, but now I have a problem to connect the microphone i want to use without have too noise.

I want to use a old headset of phone in what i have an electret microphone and speaker with RJ9 wire (4 connector), one pair is for speaker, that work perfectly, and the other pair, is for the electret microphone CMA-4544-PFW in the headset, and i have to connect to a max9814 near to my esp32 with an rj9 cable with speaker pair in the same. The module work perfectly when the microphone is directly connect on the max9818, but when it is far and connect with the RJ9 where the two pairs of wire are in the same cable i have really too much noise. I know my problem is not really an electronic or developpement problem, but i really dont know how to correct this audio connection problem, and i hope some of you know something that could help me 😁.
I think as the headset was already connect with the same type of microphone to a telephone like this https://www.google.com/aclk?sa=L&ai...wif_sSBzeH0AhXD7OAKHft5DF4Qwg96BAgBEBo&adurl= without noise problem even if the speaker is active, i suppose there is a method ( capacitor? Resistor ?) To make that possible...

I'm sorry that i can't share my code project nor the electronic schem, but actually, i don't know how to do 😅 as i said, it's the first Time i use a microcontroller board and first time i devellop something other that HTML/PHP things, and first time also i work on an audio project... Really sorry 😅

I prey for tour help 😅😁.
Thanks, i promise to share all that as soon as possible 😅.
 

Solution
It is the speaker amplifier, not the mic preamplifier that must be linear class-AB.
The speaker amplifier output power is high enough to blow up a handset speaker and destroy your hearing.

If you are making a loudspeaking intercom or speaker-phone then when the microphone can hear the speaker at both ends you will have loud acoustical feedback howling. Intercoms and speaker-phones use a push-to-talk button or a half-duplex switching circuit (only one end talks at a time) to avoid the feedback.
when it is far and connect with the RJ9 where the two pairs of wire are in the same cable i have really too much noise.

The mic signal is very low amplitude. When sending it through a long run it's wise to use shielded cable. That's the way to minimize hum. I assume the noise is 60 cycle hum.
 

Hey :D

thanks for your answers :D i understand what you says, and sure, when i can i allways use shielded cable for my microphones... but for this prohect, it's not possible, cause the microphone and the speaker are in an "old" headset, with a RJ9 cable i can't change.
The phone as it's sold, work fine, in full duplex, without any noise :D so i suppose it's possible to do something to make that possible. Maybe i should just ask, how it's possible to use a microphone and a speaker in a headset like this one? with the RJ9 connection... maybe i have to use particular frequency, or something... i really wonder how it's posiblle :D

Thanks again^^
 

    KlausST

    Points: 2
    Helpful Answer Positive Rating
Old phones never used a modern electret mic. instead they used an old carbon mic that I think had a much higher output level and no low frequency response so it did not have the hum problem.

Wait a minute. A phone with an electret mic also never produced low frequencies and the handset coiled cord was not a shielded cable so it was the electronics that did not produce hum frequencies and maybe the mic was balanced and not single-ended which cancels interference.
 
Last edited:

Hey, indeed, it's not a Real old phone that's why i five a link ok what type of phone or it is.
I've try to determine what kind of noise it is 😅, and when the speaker is not connected to th RJ9, i have just a few hum noise. But when the speaker is connected to the rj9, i have a big snow noise liké that.

You said as the mic is not single ended witch canceled interference, maybe it's that, but how Can i do that? Electronics or code ?

Also, there is an other thing i shouldn't do 😅, The speaker is connected to esp32 with a MAX98357A amplifier with a very low volume. Sound is 16bit pcm, 44,1khz. Maybe thé amplifier is too more powered anyway, and a very small volume not enough to reduce the signal in the cable ? Should i change for a smaller amplifier?

Thx thx thx 😁😁😅
 

Hi,

pictures say more than a lot of words.
Thus I recommend to show some sketches about how you operate all this.

Especially now you mention the Class D amplifier with bridge type output (is it suitable at all?). I wonder whether you used filters and how you connected it.

Klaus
 

I've try to determine what kind of noise it is 😅, and when the speaker is not connected to the RJ9, Ihave just a few hum noise. But when the speaker is connected to the rj9, Ihave a big snow noise liké that.
The "static" is random noise. If the speaker is not connected then there is aloud noise but what produces the noise when the speaker is not connected? Is the noise produced by another speaker somewhere?
We need to know how you built the mic preamp and speaker amplifier. They probably will not work or will work poorly and with the random noise if they are built on a solderless breadboard with many long wires all over the place. Are you using modules made by Adafruit?
Are you making a digital Bluetooth wireless telephone??

You selected a MAX98357A speaker amplifier that is class-D which oscillates at 300kHz that sprays its very high level into the mic input wire in the coiled unshielded cable which severely overloads the mic preamp circuit.
You need a class-AB linear electret mic preamp circuit instead.
 

For the pics, schémas and others, i will do that tonight probable.

Indeed for the project, it's a digital wifi phone with some other control like voice modifier from the pc.

What I use exactly is:
https://raspiaudio.com/produit/muse-proto for my esp32, with i2s built in ADC and max9814 https://www.gotronic.fr/art-module-micro-amplifie-max9814-ada1713-22179.htm but the différence i have to do is that the electret capsule is not directly on the max9814 board but After a 60cm spiral rj9 cable (one pair, the other is for the speaker)

For the speaker i use i2s DAC the integrated amplifier ( MAX98357A ) on the muse proto board.

The complete module work perfectly in diverse use (intercom, talkie-walkie and some others) but for this phone i haven't thé ppossibility to keep the electret capsule on the board and i have to use this horrible RJ9 that make me crazy 😅 (ok, i know i don't really know all thé technology of all that 😅).


I will try to changé the electret preamp and capsule for AB Class, any suggestions of which i Can use?
I will try also to not use thé integrated amplifier, i have some lm386 like that https://www.fruugo.fr/module-amplificateur-de-gain-lm386-200x/p-52179125-105042087# i Can use.

Thanks a lot for all your reply... I know how that could be complicated to explain all that to a newbie like me 😅
 

It is the speaker amplifier, not the mic preamplifier that must be linear class-AB.
The speaker amplifier output power is high enough to blow up a handset speaker and destroy your hearing.

If you are making a loudspeaking intercom or speaker-phone then when the microphone can hear the speaker at both ends you will have loud acoustical feedback howling. Intercoms and speaker-phones use a push-to-talk button or a half-duplex switching circuit (only one end talks at a time) to avoid the feedback.
 

Solution
Yep, i was conscient if this problem i will have with full duplex mode, i have done some ajustment for talkie-walkie and intercom to have a good sound without toi much acoustical feedback as you said... With the phone not a problem to have a few 😁.
Thx again for the info about the amplifier i will do that 😁👍.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top