Differential audio to single, MAX9722B please help with design - Page 1
Forum section: electronics / projects

author: rosak
author_rank: Contributor
timestamp: December 15, 2016, 10:04:09 pm
content: Hi.I'm struggling with simple project. I'm designing a BlueTooth audio module for my car. Easy. CSR8645 + headphone amplifier into the car radio. Cheap chinese BT modules have everything needed but I want to create my own on my PCB. So in order to change the differential audio output from CSR8645 to single ended needed by ma radio I need ie. PAM8901/8 which is widely used in these BT modules. But it is obsolete. So I searched my favourite store (RS) and found MAX9722B, bought it. Apart from turning differential into single I also need to amplify it from 600mV RMS (CSR8645 output) to about 1-1.5V RMS as my car radio has very low input sensitivity. MAX9722B should do the job, it's probably even an overkill for this application. I thought I'll read the datasheet and everything should be easy. Unfortunately it turned out that I'm not smart enough for that task. Datasheet is a bit unclear for me. Most of it is about MAX9722A. I don't know whether I should connect all 4 outputs to 4 inputs or just 2 negative ones and bridge the positive inputs?? Should I use a 15k 0.1% resistors array as Rin2 and Rf2?Any help appreciated.https://datasheets.maximintegrated.com/en/ds/MAX9722-MAX9722B.pdf

author: DaJMasta
author_rank: Super Contributor
timestamp: December 15, 2016, 11:52:12 pm
content: Did something vaguely similar in a mic preamp circuit, going from a balanced mic level input to a single line signal... just used an opamp. You run each of the ends into the opamp inputs, then you add your resistors for a normal inverting amplifier on the inverting side and resistors for a noninverting amp on the noninverting input and make sure to match them (1% tolerance is probably fine, but if given the option and fidelity is a high concern, individually measuring and matching is better).Provided the output is a differential output and not a left and right channel, this should do just fine. the cheap way would be to just ignore one of the signals and use the other - none of the noise rejection that the differential pair affords you, but you still do get the signal.Then you just set your gain to 2.5 and use an appropriate load resistor to ground on your output to minimize harmonic distortion and you should be good given a decent audio opamp. A few more resistors (or better yet a rail splitter) and some AC coupling caps and you can do the same design on a split supply, and since the input impedance of opamps is high, the coupling caps don't need to be that large for good low frequency performance.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 16, 2016, 01:05:12 am
content: As suggested - differential amplifier. Gain can be set by the resistor ratio. I too have the CSR8645 module (probably not the same one) and for testing just used a TS922 as a headphone amp. Not sure if it was ideal, just knocked it up for testing with headphones.Explanation page:http://www.electronics-tutorials.ws/opamp/opamp_5.htmlI didn't bother with precision resistors, but I would have thought 1% would be fine. Also in case you're not aware, the outputs are biased at roughly VDD/2. This is handy because it means we can get away with a single supply for the opamp - no negative rail, but it also means you'll need capacitors on the output. If you're driving low impedance, such as earphones/headphones, these caps will have to be rather high value as to not attenuate the bass. 470uF.The MAX9722B looksidealfor your purpose, although you say you don't need higher current drive for headphones, this shouldn't matter. You bought it, so might as well use it if you're getting a PCB made anyway. The 'B' variant has a gain of -2, which will bring your 600mV to 1.2V, and also invert the signal, but this does not matter for audio as both left and right are inverted. It's on board charge pump provides the negative supply, meaning the outputs are 0V referenced - that's its selling point, no output caps - no pop/click when plugging it into something.QuoteJust the 4 outputs (L+,L-,R+,R-) to the 4 inputs. No need for external resistors. Bridging the outputs of the CSR8645 probably won't hurt it much, but you'll add cross-talk and noise because of course they are independent outputs, and schematics showing the negative left and right commoned - for use with headphones that often have a common ground - will just ruin the sound quality. Differential to single ended is the way to go, and the device you have looks perfect for it (just ordered one myself after your post..).

author: rosak
author_rank: Contributor
timestamp: December 16, 2016, 01:19:33 am
content: Thanks guys. I'll take everything you wrote into consideration later as I'm at work now.I went through the datasheet again and what I mainly don't get is that sentence:"The RIN1 and RF1 of the MAX9722B are internal, set RIN2 = 15k? and RF2 = 30k?.However, for best results, use the MAX9722A."What? Does it mean I'll get best results with MAX9722A and poor results with MAX9722B?As for external resistors, datasheet says I need RIN2 and RF2 but they specify 15k and 30k.I will be driving a car radio ext input, so probably 33k or 47k impedance.The CSR8645 module I have is that popular "F-3188 v2.0" from China.I'll draw the schematics later or tomorrow and post here so you can check.Thanks again.

author: whollender
author_rank: Regular Contributor
timestamp: December 16, 2016, 02:27:00 am
content: Quote from: rosak on December 16, 2016, 01:19:33 amThey say that because the common mode rejection of the differential to single ended conversion depends on resistor matching between RIN1/2 and RF1/2.If you use the -A, you get to select all four resistors, so you can make sure to get ones with tight tolerances.The -B, however, has two internal resistors so it's much harder to match the resistances, and you'll get worse CMRR. That said, it will still work just fine, it may just be noisier than it would be otherwise.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 16, 2016, 02:32:07 am
content: But those internal resistors are perfect for getting your signal up to 1.2V RMS. And in terms of CMRR, I very much doubt you willhearnoise using the B variant, unless your power supply is extremely noisy.The input impedance of your car, or whatever you will be plugging into will not matter much unless it is very low (<32 ohms). The device is designed to drive earphones, for which it does a fine job, its noise figures will be even better when plugged into a line-in.I have the F3188 as well. I get some faint noise when it is idle, but that could well be my setup. If you're still having issues when I get the MAX9722B, we can swap notes, but from the datasheet, I'm confident it will work perfectly.

author: rosak
author_rank: Contributor
timestamp: December 16, 2016, 02:50:57 am
content: That makes sense now.I thought I'll buy some 0.25% arrays but if Buriedcode says I shouldn't hear the difference then I'll try normal 1%.Power supply will be a car alternator through AMS1117 so shouldn't be much noisy.I shouldn't have any issues but let's share the results.I only need to read datasheet again to find out which capacitors to use, just an ordinary aluminium electrolitycs or something else.Also, do I need to put a resistor between output and ground as suggested by DaJMasta?As for noise, it may be from CSR8645. I have a headphones EP650 with this chip, I think they are quite well designed and I also hear noise between audio tracks when it's quiet.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 16, 2016, 03:19:09 am
content: If you hear noise through your headphones with it.. how are they connected? As I said in a previous post, most, if not all headphones have a common ground - you can't just use one of the negative outputs as the ground for that, as each channel will have a positive and negative output. Using the negative of one for both channels will introduce cross-talk between left and right and distortion.Imagine the left channel outputs a 1kHz sine wave, and the right a 2kHz one. The positive of the left channel will appear as a sine wave... and its negative will be that sinewave, inverted. If you were to use the negative of the left channel for the common ground of your headphones, on the right channel, one side of the speaker will be a 2kHz sine wave, whilst the other will be am inverted 1kHz sinewave, and the speaker will have the difference between those across it. Connecting both the negative outputs means they are fighting against eachother producing a voltage that varies with the music. Its generally a bad idea.As for 0.25% resistors, I'm sure 1% will be fine, and only required on the positive inputs of the device (the negative inputs has the resistors built in). They should of course have the same ratio as the ones in the device (30/15 = 2).For capacitors I would say X5R ceramic, rated minimum 10V (their value drops significantly at even half their rated voltage).Also, I would recommend perhaps a better regulator. The AMS1117 will work of course, but a cars power supply is horrendous. Lots of noise, large transients and can be well over 80V. If you can, I've used the LM2941 which at least has some protection against current dumps and large transients.

author: rosak
author_rank: Contributor
timestamp: December 16, 2016, 03:56:26 am
content: I know the difference between differential and single, you misunderstood me. My headphones August EP650 do have a BT module built in. It consists of CSR8645 and PAM8901 and I can hear a noise.As for capacitors, do I need Cin ? They suggest electrolityc or tantalum but I'm not sure if it's needed in this application.I can of course use better voltage regulator, LM2941 or anything else you suggest.Any better part you suggest I'll be happy to use. It's not a mass production so I can focus on quality no matter of costs.You'll probably have it assembled sooner than me. I ain't got much time for my hobby and that's a bit bigger project. It consists of Atmega, CAN controller and transceiver and this BT witx MAX. I have to finish this part of schematics with MAX, then design PCB, etch it, make some case etc.I'm off to sleep now, it's 4am, my brain doesn't want to work anymore..