• 0
Sign in to follow this  
denis.dantas

Measurement different in scope and script

Question

Hello,

I'm starting to work with custom scripts on my discovery 2 (with oscilloscope extension + probes). I'm trying to setup a measurement environment using the AnalogIn_Acquisition.py sample script. I have a power supply with output voltage at 4V. When I run the scope at WaveForms I get 4V reading, however, when I run the acquisition script I get 2.72V as average voltage. I also tried with the AnalogIn_Sample.py script and also get 2.73V. I wonder why such different results. Pictures bellow:

 

image.thumb.png.3369dbd048e363c9a0a5b29a0f304b03.png

image.thumb.png.b44369ced192d9021c95668b943feffe.png

 

image.png.a9ac878f0d5d9938d0c648d2b32c041d.png

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @denis.dantas

The Scope channels on Analog Discovery have two input gains with pk2pk ranges of ~5V and ~50V. To make sure this ranges are covered after calibration the hardware is designed for a bit higher range of about 5.5V and 60V.
In your script the range is probably at 5V pk2pk and the offset at 0V. The input enters in limitation at about +/-2.75V.

You can increase the range to 50V:
dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(50.0))
or set offset for 0..5V range:
dwf.FDwfAnalogInChannelOffsetSet(hdwf, c_int(0), c_double(-2.5))
dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(5.0))

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
Sign in to follow this