"Sense" circuit for MCU ADC (STM32 / ESP32 / Arduino etc...)

@ximikas

Yes I read that the chip can handle balanced / SE input's.
Actually I don't have any equipment with balanced output (yet), but my soundcard have balanced input, and I like to have the possibility to use balanced and SE.

Do you have any comment's regarding my schematic ?
Also thinking about the input GND relay switch!?

Thank's...
 
I think GND is always GND , but maybe you mean relay to ground unused negative input, when using input as unbalanced? Active rectifier circuit looking a bit strange to me, a capacitor to gnd should not be connected to gnd from opamp output. But i don't know this ic , so maybe it allows that and all is ok.
 
I think GND is always GND , but maybe you mean relay to ground unused negative input, when using input as unbalanced?
I mean the lower input relay switch witch can be toggled to GND if SE input is provided.

The active rectifier schematic I found somewhere and it's working pretty good.
a capacitor to gnd should not be connected to gnd from opamp output
The output are smooted out with the capacitor, and the ADC input on the ESP32 is working much better this way, but let's see when I will use the external ADC i'am waiting at.

EDIT :: You might ofcause be right here!

Thank's.

Jesper.
 
Last edited:
I think GND is always GND , but maybe you mean relay to ground unused negative input, when using input as unbalanced?
Ahhh ups... I made a mistake in my schematic... the input into the attenuator should be grounded, not the input before 😵

EDIT Like this :

1685617906232.png
 
Last edited:
Why would you need that ground switch? The attenuator could stay differential at all times and the source takes one phase to GND if it is SE.
Well mostly because I see that it's on the L|A Autoranger to switch between SE and Bal. on the input ?

Also I'am a bit confused about the GND connection's, because when input are grounded, then the grounding on the input on e.g. OPA1656 is grounded through the resistorstring in the input attenuator, giving the GND some resistance.
Not sure if I need a clean GND via a relay there ???

Need a bit of help understanding this 🙂

1685623314050.png


Jesper.
 
Actually , conversion from balanced to single ended requires low output impedance of source, in your case , source is resistor divider . If signal is divided twice in converter positive input by 100k/100k , then negative input must be grounded at output of divider. Otherwise signal will be just divided twice, and not amplified twice again by opam , as feedback resistor is not getting proper ground. So negative input of converter must get ground when not single ended mode . Actually , resistances must be equal , probably two buffers needed there, in place after divider and converter to se input.
 
  • Like
Reactions: lykkedk
Hi...

I corrected the resistance values in the input attenuator, and also corrected the input GND connection.
For a start I also added a relaycontactor to the secondary side of the input attenuator.
Relay K9 must then be engaged when used with SE input.

I hope you maybe can explain a bit more what you have in mind @ximikas, now that I corrected the schematic.

Schm2.png


Jesper.
 
Ok ,some explanation. Circuit - balanced to se converter , needs ideally zero ohms source impedance, otherwise not all common mode signal is rejected . If you disbalance resistances , it will work not exactly as it should. Common signal , which mist be rejected ,must have same amplitude on both opamp inputs. Four resistors are 100k , but I'm unsure if converter's input impedance is equal ,for negative and positive input. Also , your voltage divider gives output voltages, but have you specified load resistance in calculation ? There are divider calculation softwares , where you can specify load resistance , and you get lower output with load present . Also it would be harder calculate multi divider like yours , with specified load . Buffer would simplify that, you can calculate as you have no load. But another dual opamp needed then
 
  • Like
Reactions: lykkedk
@ximikas ... 🙂

I need a little time... but in post nr. #32 I attached a .zipped spreadsheet with the values I use + it also calculates with load (I don't know the impedance of my circuit through)
I will along the way, make protoboard test... so it will be a long journey, hope you can help me along? - And other too!

Jesper.
 
Also , noticed that diff to se converter has higher supply voltage than opamp next to it , probably first one will overload second and you get incorrect rectified voltage values . Probably for opa you can use same +5v and add -5v , then levels would be ok.
 
  • Like
Reactions: lykkedk
The second opamp is the 2462 rail to rail, which is acting also as protection to the ADC as it cant deliver more than around 3Vrms this way. Due to the input attenuation and the controller ESP32 code, the first opamp (opa1656 diff to se) will never receive more than 0.875Vrms.

I didn't notice any problems, but actually I could also make the second opamp (active rectifier) with +/-12v because the voltage will never exceed 0.875, but I like the protection the 5v opamp gives me into the ADC through.

Jesper
 
Ahh okay... but I will then probably have the same issue with the other opa1656 (gain control). This one also feed an 2462+active rectifier.
I do think that I will have worse THD+N with opamp with +/-5v instead of +/-12v, but actually I don't know for sure.

Jesper.
 
Look at datasheets of modern opamps . Some have specified distortion parameters for different supply voltages, compare them . Opamps , designed for dual supply , can have benefit with higher supply voltage, but datasheet will tell you that. Difference would be at high gains.
I doubt if opamps in my sound card uses more than +-5v . Also , where from you planning connect sound card input ? Probably after balanced to se converter ? If so , then not to fry sound card is better than try to repair it ,in case of problem .
 
Look at datasheets of modern opamps . Some have specified distortion parameters for different supply voltages, compare them . Opamps , designed for dual supply , can have benefit with higher supply voltage, but datasheet will tell you that. Difference would be at high gains.
I doubt if opamps in my sound card uses more than +-5v . Also , where from you planning connect sound card input ? Probably after balanced to se converter ? If so , then not to fry sound card is better than try to repair it ,in case of problem .
I will look into the datasheet.

The soundcard is supposed to be connected at the output tab, top rightside of my schematic.
Pin 1 and 2 for SE output and pin 1 and 3 for balanced output (all the way from input to output balanced signal is possible)
* Not sure if I should let the unused OUTB in SE configuration float here ???

* Wil it be a good idea to have a buffer there also??? I can't see why that is 🙂



1685635935582.png
 
Hm , sound card with balanced input ? I don't know how much volts their input can withstand, as i see you use +-12V for gain control stage too. In case of ic failure you get almost supply voltage to output jack, maybe you should include there resistors like 100 ohms, several diodes in series, for both polarities, which should never activate with signal in range, also dc blocking capacitors like 100uf .For simple sound card with 3,5 line input jack i suppose signal level is max 2V , so there should be enough 3-4 diodes in series for one polarity, but for balanced i don't know.
Unused output makes no problem i think, its not input, it will not pick-up noise. Making it disconnected from output jack in single ended mode will need to use additional relay , but you can do that.
About buffer - you have two voltage dividers , and several loads , and dual opamp may be included there , as first stage after dividers.