My DIY Soundcard interface for measurement aka' SuperRanger

So it's been some year's since i started my journey into the soundcard as a measurement interface etc...

I'm not expecting that someone is interested in this, but I would offcause publish both gerbers and the Arduino code if someone would like to see that.
- Nothing is secret... I just want to show my creating and have comment's and stuff on it?
There is no doubt that the outputcard could be even better as is, but the last -140dB noise/THD I cannot get rid of, but for sure I'm proud of what I archived.
I did get a lot of inspiration around the net, taking the best and most understandable parts... I'm absolutely no prof. into this.

When I found the thread here Behringer for measurement, @MagicBus warned me o_O that the stuff was addictive, it sure was/is, but what a learning experience for me, thanks.
When I finished my hacked Behringer, witch is a mod with an OPA1632 balanced input card, some autoranger and stuff come to my mind, and I decided to try diy one myself, as at that time there was none availible at the market, lucky me for that.

I now have an useful one here on my desk, two years after, and many many hours reading and testing. - Not saying it's done, there will always be room for improvements.
Well... I figured out, that I would properly not hit the right card the first time, so I decided to make a "Motherboard" which should contain slots for the outputcard, the MCU ESP32 Devkit 1, the attenuator circuit with protection etc...

The current outputcard is balanced out only, so I needed a differential probe designed by @alfredr (Which is btw. very kind to help me out)
The probe is very good, giving me nice measurements.

What it can do or more like what my intention is, but I do think it's working pretty good now ::

  • Outputvoltage (target) can be set somewhere between 0.5Vrms and approx. 8Vrms.
  • The attenuator part can be adjusted in software to proberly fit the target e.g. when shifting to -6dB from -0dB could be done from around 1Vrms to 6Vrms.
- So soundcard accepting say 1Vrms or 4.5Vrms or whatever etc... can be used.
  • It can take more than 70Vrms with the correct inputcapacitor of cause.
  • Attenuatorsteps 0dB, 6dB, 12dB, 18dB, 24dB, 30dB, 36dB and 42dB. The Input impedance should be around 20k. Thank's to this Site
  • With the outputcard I use now, there are 64gain steps (0db to approx 25dB or so).
  • Clipping detection, input overload warning etc... in the software, along with information on the little oled screen.
  • Easy to choose between SE input or Balanced input.
  • Choose between manuel or autoranging.
  • Proberly I forgot something...

The autoranger function is not the fastest, (but sure fast it is), but now REW have the possibility to add a delay when using such autorangers, between measurement's when doing e.g. stepped sine, so it's working very good I think.

Here I tried sweeping from 1 to 35Vrms (Not using REW on this one) -- (Don't mind the minor glitches, some of them are duo to my SignalGenerator).
* Soundcard will allway's be within it's best range, at least it was my intention :)
SRSuperSweep.png

The gainpart (the output card) of the SuperRanger add's some distortion on it's own. (Picture FFT1)
When I tested it with my hacked Behringer soundcard, it look's like the SuperRanger is not adding anything, therefore I decided to upgrade my soundcard to one of the Cosmos ADCiso's, as I read that they are very good.
The yellow trace is where the SuperRangers own distortion can be seen when using the Cosmos ADCiso.
It's the outputcard witch adds this distortion.
As can be seen below on Picture FFT2, where I took a shoot of the attenuator output on the Motherboard, the Motherboard, attenuator part is more or less clean.

FFT1 ::
Victors SuperRanger compare.jpg


FFT2:
Victors to SuperRanger attenuator output to Cosmos.jpg




MB2.png
Outputcard.png

PSU.png


Here is the current outputcard used :
IMG_7240.jpg
IMG_7241.jpg


And some pictures of the whole setup, prototyping, testing etc...
IMG_6735.jpg
IMG_6780.jpg


This is an older picture, the PSU is different now, with some better regulators (Seen on schematics of cause)
The Motherboard without output card plugged in ::
IMG_6674.jpg


Last one just a showoff one sry... :cool:
IMG_7310.jpg
 

Attachments

  • IMG_6781.jpg
    IMG_6781.jpg
    476 KB · Views: 80
  • Like
Reactions: 6 users
Hi Jesper,
I was wondering why we didn't hear any news from you lately, but obviously you were working on this! :) Excellent work! To my eyes looks miraculous!

Question: The last graph with the gray trace is the attenuator without the active circuit? Before U3? Is the auto-Super range working when you are measuring this way?
 
Question: The last graph with the gray trace is the attenuator without the active circuit? Before U3? Is the auto-Super range working when you are measuring this way?
Hi Magic :)

EDIT :: Also see the rightside AttOut plug, that's connected to the output jack TRS connector. The "balanced" output is connected to the XLR part of the combo output connector.
EDIT EDIT :: The "gain" part of the circuit is on the outputcard only, the attenuator output is only attenuation, no gain only attenuation.

The output directly after the attenuator circuit is after it's buffered through U3 OPA1612. The resistors R7 & R8 are just 0ohm, and none capacitors at C4, C5.
So the grey trace is after some active circuit. - That's also why I can say for sure that the distortion down at -140 at the yellow trace is not the attenuator circuit but the plugable output card :)

Jesper.

ShootSchm.png
 
Last edited:
  • Thank You
Reactions: 1 user
Just a bit more...

I needed something to help me with calculating all the gainsteps for the code, so therefore I found some Python on the internet somewhere which I mocked up to help calculate all the gainsteps.
I also paste the Arduino code here now.

The PResistor one must be renamed to .py and the SuperRangerV2... must be renamed to .ino (Arduino)
Was the easiest way to get it uploaded here.

Jesper.
 

Attachments

  • SuperRangerV2.0_SingleOpamp_V1.1.txt
    67 KB · Views: 29
  • V1.0_PResistor.txt
    5.6 KB · Views: 17
  • Like
Reactions: 1 user
Just a bit more...

I needed something to help me with calculating all the gainsteps for the code, so therefore I found some Python on the internet somewhere which I mocked up to help calculate all the gainsteps.
I also paste the Arduino code here now.

The PResistor one must be renamed to .py and the SuperRangerV2... must be renamed to .ino (Arduino)
Was the easiest way to get it uploaded here.

Jesper.
I used MC12 as usual.
2024-05-29_14-27-09.jpg
 
Hi Jasper
great work :)
maybe You can consider the double bridged "T" network for the input attenuation
It has constant impedance and it is better than L-pad.
https://www.electronics-tutorials.ws/attenuators/bridged-t-attenuator.html
.
And I can suggest "superbal" OP amp configuration for the BAL-ti-SE section.
it is not much complicated than existing but it gives better results. (Just one OP amp more and few resistors... Dual OP can be used.)
balfig12.gif
cheers
 
  • Like
Reactions: 1 user
Hi @IVX

Thanks for the posting (y)

I did simulate this with MicroCap, as you also suggested in the Discord channel. - I'm getting better and better using this fine program.
Well looking at the yellow trace I posted in post #1 here, the only distortion and a little raised noisefloor is the last remaining bit I cannot solve.
Not saying I'm not satisfied, but I know it would be very hard (for me at least!) to get rid of this last -140dB forrest of noise.

Regarding the use of a lightbulb (I'm not sure if it's tungsteen through), I use this one Mouser :: 606-CM120MB
I allready removed the fuses. But this cannot be seen on the picture I uploaded the other day, as it was an older picture.

Here below is a recent picture, with the "newest" upgrade.

Jesper.

IMG_7331.jpg
 
Hi Jasper
great work :)
maybe You can consider the double bridged "T" network for the input attenuation
It has constant impedance and it is better than L-pad.
https://www.electronics-tutorials.ws/attenuators/bridged-t-attenuator.html
.
And I can suggest "superbal" OP amp configuration for the BAL-ti-SE section.
it is not much complicated than existing but it gives better results. (Just one OP amp more and few resistors... Dual OP can be used.)
balfig12.gif
cheers
Thanks...

Very nice papers about this attenuator circuit :)
I will look into it. - But for now the attenuatorpart is good, as it does not really add distortion. (Well I did not yet test it with my notch)
I have no use for the Bal. to SE conversion. The only place I use this is where it enters the external ADS1115 for reading the voltages.

Jesper.
 
Member
Joined 2004
Paid Member
What you are building is a measurement front end. The software and uControllerare really nice. I'm attaching a survey of different front end solutions from various instruments.
The Shibasoku is probably the highest performance. Later units have a full balanced version (lots of parts). The cleanest part is the constant input Z (100K) and the output level is maintained by the processor at +/- 1dB. (again lots of relays) The amp circuit is really good but quite involved. A good FET input OPAMP may well be able to match its performance.
The Boonton is unusual because it can handle 300V. The designer told me the goal was to be able to measure AC line distortion.
One important test- first measure the distortion from a lowZ source (Victor). Then insert a 10K series resistor. Many inputs will have the distortion rise a lot. Its the nonlinear input C of the active devices.
The light bulb input protection has been used by a number of companies. It needs some low leakage diodes to the supplies. The bulbs won't introduce distortion since the voltage across them is zero until they are needed. I could not find any small 250/300V lamps when I was looking. It will get progressively harder as incandescent lamps are phased out.
 

Attachments

  • Measurement Front Ends.zip
    3.6 MB · Views: 34
  • Like
  • Thank You
Reactions: 2 users
This 606-CM120MB light bulb was suggested by Pete Millett for his PC interface. It is 120V device chosen deliberately for this. From what I recall, in that circuit it introduced noise much worse than plain resistors. But in my diy soundcard it works great, perhaps because of better CMRR. Good to see it also works in Jesper's circuit.

EDIT; Pete Millett used 1N4148 protection diodes. I used BAV199. Maybe this is the reason for lower noise?
 
Last edited:
  • Like
Reactions: 1 user
@1audio I like the attachment's, thank's for that... allway's good with some inspiration.

Soo...

I have made provision for both sending the input through the bulb's OR the attenuator resistors. (-K5)
If I compare directly at the "attenuator" output, there are no difference at all, so the bulb's are not adding any distortion in this circuit within the range of the Cosmos ADC ofcause :)

The circuit is tested belive me... sometimes when I take a sweep with my tonegenerator through an toroidal transformer for a gain of x7, there will be say 20v into the input at a short time o_O I did not manage to kill anything as for now that is! - I do belive it's the diodes and the bulb's eating all this and sending some of it back into the supply.

Yesterday I raised the two "feedback" capacitors in the outputcard from 470pF to first 560pF and than last to 680pF, this lowered the noisefloor a bit, and removed some of the grass around 7 - 12kHz area (I don't have the screenshoots here at work, but I can post it later today)

It's soo good, that I actually told myself I was finish now.


Jesper.
 
After some more studying I tried changing the feedback capacitor another time.
Now they're 680pF + 680pF = 340pF, and both noisefloor and "FFT Grass" is lowered some, but 9kHz SuperRanger Bump :giggle: still remains.
I have to say, I tried also with my balanced S.M.S.L to test other freq. etc... there are not really any difference here.

It look's like there is a minor/small difference in using balanced (SMSL) and SE(Victors) signal source
I did keep the level at the same when measuring.

Anyone any idea howto get rid of the 9kHz bumb, or should I just leave it as is ?

Jesper.

Compare Feedback capacitor.jpg


OutPutCardCorrected.png
SMSL vs SR.jpg
 
Good to see some suggestions...

Have you tried without feedback caps? Also, I can't see what regulators you are using but please check datasheet for possible max allowed capacitance especially at the output.
Yes I tried without feedback caps, but the THD are very bad then (unfortunately I did not take a screenshoot of this one)
I use TPS7A4901DGNR & TPS7A3401DGNR, I've seen them in circuits with highish capacitor's, but I will try my other PSU with good old linear regulators just too see.
I also did design the PCB with the suggestions from the datasheet for this TPS7A psu, same goes for the OPA1612 in the "half" instrumental amp. I use to give ESP32 controlled gain in 64step's.

Are R3 and R4 = 0 ohm as shown in the schematic?
Yes, I've tried both 50ohm and 200ohm, but the input impedance of the CosmosADC is rather low (around Diff. 1.66kohm) Doesent do any change, except voltage is dragged down.

Jesper.