• 0
Phil_D

Driving the scope ADC at full scale for best SNR

Question

Hello,

I'm using the Analog Discovery 2, and am using the API to basically use it as a high speed digitizer.

What signal level would it take to drive the scope channels to full-scale on the ADC?  I see that there are different gain options as well, but I also don't know how to control that with the API, if I even can?

We'd like to set our max swing at full scale so we can get the best SNR.

Thanks,

Phil

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Phil_D

You can use the RangeSet function to select the gain and the RangeGet function to get the calibrated value, full swing.
All the Set/Get function in the API behave like this.
Normally it is not recommended to go with full swing input signal since clipping can occur. Like when the scale top is 5.561V and the input signal reaches 5.562V

dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(-1), c_bool(True))
dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(-1), c_double(5.0))
dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(1))

range1 = c_double()
range2 = c_double()
offset1 = c_double()
offset2 = c_double()
dwf.FDwfAnalogInChannelRangeGet(hdwf, c_int(0), byref(range1))
dwf.FDwfAnalogInChannelRangeGet(hdwf, c_int(1), byref(range2))
dwf.FDwfAnalogInChannelOffsetGet(hdwf, c_int(0), byref(offset1))
dwf.FDwfAnalogInChannelOffsetGet(hdwf, c_int(1), byref(offset2))
print("Scope 1 Range: "+str(range1.value)+"V Offset: "+str(offset1.value)+"V")
print("Scope 2 Range: "+str(range2.value)+"V Offset: "+str(offset2.value)+"V")

# on my AD2 the actual ranges are the following:
# Scope 1 Range: 5.560701917732086V Offset: -2.4933249474501373e-06V
# Scope 2 Range: 5.558373268176409V Offset: 0.00021560932083742462V

 

Share this post


Link to post
Share on other sites
  • 0

Thanks @attila.  This is great info.  Sorry, I should have checked my previous forum questions, but I appreciate the use of the API functions in this response.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now