«

»

Jun 26

RN52 bluetooth adapter microphone

So lots of folks struggling getting a microphone to work with the RN-52 Bluetooth adapter.

Here’s what I’ve got working. This circuit:

left side mic circuit for use with RN52 Bluetooth adapter.

left side mic circuit for use with RN52 Bluetooth adapter.

I cribbed off the circuit for the eval board. I’ve run R1 at both 1K and 2.2K, both work ok. C1/C2 are 47nF and C3 is 1uF. C3 is ok for electrolytic, but C1/C2 likely need to be film (like FCP1206C473J-H3) or MLCC (like VJ0805Y473JXAPW1BC)

The MIC, the mic I used was a 25LM041. which now appears to be obsolete! But the critical stuff is:

  • Sensitivity: -64 dB or better
  • Operating Voltage: 3 V (or less!)
  • Impedance: 1 kOhms or similar

The RN52 datasheet says you need microphones with sensitivity between –40 and –60dBV so that -64dB is about right. Better to have a little head room because the MIC Bias is probably around 2.7V or less.

Another critical note in the data sheet is that MIC_BIAS requires a minimum load to maintain
regulation and MIC_BIAS maintains regulation within 0.199 and 1.229 mA. So watch the current draw and thus the R1 size and MIC Impedance. High impedance MIC and you’ll probably not draw enough current to stabilize the MIC Bias regulator. Too small R1 + MIC Impedance and you’ll overload the MIC Bias pin. So R1 = 1K is probably pushing it as draw is going to be 1.35ma, but it seems to work OK.

Also critical is quality of the power you feed to the RN52. the delta voltage the MIC produces is about 10 or 20mv, so consider that if you have any power supply noise even close to that range it’s probably going to get into the MIC Bias and thus into the MIC inputs.

Note that the RN52 datasheet talks about the MIC pre-amp in the RN52 having adjustable gain and line and MIC mode. It does, you just can’t get to it. Looks like the RN52 uses a similar base bluetooth module to the BlueGiga WT-32. In fact the RN52 datasheet looks like some of it was cribbed from the WT-32 datasheet or both datasheets started with the same source.

I asked Microchip about the inability adjust the MIC gains even though the datasheet implies it’s there. They said it’s coming. Firmware v1.16 should expose that, but no word when v1.16 will be made available.

Actually the BlueGiga WT-32 has a better microphone circuit design that is actually differential, ie MIC- and MIC+ are opposites. the RN52 example is one sided with one side tied to MIC_BIAS. I did the RN52 on my first board, but will probably move to the WT-32 way on subsequent board.

Bah update, looks like I found a bug in the RN-52 firmware! the first time you turn on the MIC (ie the first time the RN52 enabled the MIC_BIAS output) it comes up at around 2.5V (which is ok even with a 3V mic). However…. any future times that MIC_BIAS is enabled, it only comes up around 1.1V, way not enough for a 3V mic. If you power-cycle the RN52, then again the first MIC_BIAS enable is back at 2.5V, but again 2-n is 1.1V 🙁

Ok, here’s a fix for the busted MIC_BIAS level and it’s got the added benefit of a bit higher bias voltage than the native RN52 puts out and this provides a differential signal to the RN52 mic inputs rather than the single ended example on the evaluation board.

Better MIC circuit

Better MIC circuit

This circuit is similar to what is in the Bluegiga WT32 manual. Be very aware of the capacitors on the output side of the LDO regulator. Don’t skimp and only put one. Multiple caps in parallel are the best. My example uses a 10uF electrolytic in parallel with a 2uF MLCC. If you hear noise in the MIC input, check the output voltage of the LDO. You want rock solid, no noise output.

btw, a hint for testing this. Get a voice/audio recorder for your android phone that works with bluetooth headsets. Makes it real easy to tweak the circuit, record audio, listen to the result. Here’s what I’m currently using: Bluetooth Voice Recorder

Oh, and here’s the that “better MIC circuit” looks like done in “dead-bug” style wiring.
MicCircuit2Phys

9 comments

2 pings

Skip to comment form

  1. JP

    Hi,
    Thanks a lot for sharing this information.

    I am currently struggling to interface a mic with the RN52.
    I want to use it to do a hand free device with a very old phone (1924 model)
    Everything works fine :
    – PIC Uart is OK
    – firmware upgrade to 1.16 is ok
    – HFP connexion with my android is OK
    – I can compose phoen numbere from the PIC…
    – Audio is going well to the speakers

    BUT unable to have the Mic running…
    I tried 3 electrets wired as the datasheet (your first schema), but doesn’t work… Absolutly no sound.
    I tried to setup the mix volume to max –> no result
    When looking at the current volume (Y,1 command) the answer is always 00

    When scoping the mic differential output there is some mV and sound wave form

    ANy idea please ?

    regards
    JP

  2. sixerdoodle

    What’s your MIC_Bias voltage? ie the actual voltage fed into the resistor at the top of the MIC (as opposed to the MIC_Bias coming off the RN52). As noted above, the RN52 appears to have a messed up MIC_Bias output, so make sure you’re actually feeding the correct voltage into your MIC. If the bias voltage is lower than expected for the MIC you’re using, might not be enough signal to get through the caps on the MIC +/- Inputs.

    Dumb question, but are you sure the MIC isn’t in backward? many of them it’s dang near impossible to tell which is + and which is -. Should be able to tell by how much mV you’re getting. Anything in the 10-20mV range?

    What kind of caps are you using in the MIC +/- lines? Need to make sure they’ve got decent pass through down to audio frequencies.

    Oh and yeah, the current RN52 firmware doesn’t appear to let you set any of the MIC gains / volumes. Appears they’ve got’em all hard-coded internally 🙁

    Ah!!! here’s the thought. Are you using the LEFT or RIGHT RN52 input? Could it be you’re wired up to RIGHT and your phone is only processing LEFT?

  3. Thomas

    Hi all, I am doing a BT mic circuit, and also see a similar circuit which show on the top.
    I only know the “MIC L Minus” pin should connect to MIC IN L, but don’t know what is the purpose.

    Anyone can explain it? Thanks a lot.

  4. sixerdoodle

    The minus and plus actually make up a differential signal. Should be more immune to noise. Ie the audio signal from the mic causes the plus to go up and the minus to down at the same time. You could simply ground the minus and use a single ended signal but will pick up more noise

  5. Jom

    Hello, Is it posible to use the MIC line-In as an Aux Input? I want to make an BL speakers with the possibility of an Auxiliar input for other devices (old ipod, mp3 player).

    Thanks a lot.

    PD: Greetings from Argentina

    1. sixerdoodle

      Should be possible. Right now I’m working with the WT32 from BlueGiga. the input has multiple gain settings. Buried in there are some for mic level in and some for line level in. The datasheet for the WT32 says this

      “the first stage amplifier has a selectable 24dB gain stage for the microphone and this creates the dual programmable gain required for the microphone or the line input

      Also I’m currently testing out the WT32 with Sparkfun‘s INMP401 MEMS Microphone which has a built in amp so the signal levels to the WT32 are pretty hot, and that works pretty well too.

      So there’s hope…

  6. Abhilash

    hey man,

    Thanks for the writeup,
    I am also using RN52 with v1.16 firmware,All of it seems good.
    All commands are working fine,MIC gains ,Speaker gain etc but the microphone voice input isnt routed out to the audio gateway in a call.
    By reading the bluetooth related protocols i know that HFP is used for various call procedures and have set my connection mask to HFP but during a call when i speak over mic i tend to hear my own voice on the adjacent speaker connected to the RN52 and thus the caller(who has dialed me up) doesnt listen a single voice of mine.

    Pls Help me up and give me some insights on this.
    If in case i can solve the problem ill update here thanks.

    1. sixerdoodle

      Are you using the MIC Bias voltage to power the MIC and if so, is the MIC Bias acting correctly? see note above that after the first activation, it didn’t come back with the correct voltage anymore.

      other thought, have you tried something like the Android Bluetooth recorder and does that record the RN52 audio OK and it’s just phone call that does not work?

  7. Steve Walton

    What kind of microphone input levels are you guys providing to the RN52? The eval board levels are between
    40-50mV with the mic that comes with the kit, which sounds pretty low on the receive side. Is there any danger with over-driving the inputs to RN52? thx

  1. Using a microphone with RN52 - Doayee

    […] you want to try this yourself) was within the recommended specification. We looked to this article by sixerdoodle (whom we have to thank for setting us off in the correct direction) and tried to build a circuit […]

  2. Using a microphone with the RN52 Bluetooth Adapter - Doayee

    […] you want to try this yourself) was within the recommended specification. We looked to this article by sixerdoodle (whom we have to thank for setting us off in the correct direction) and tried to build a circuit […]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>