I would like to measure the current in an AC signal using an AD2.
To do this, I have a set of shunt resistors that I could use with different values. The plan was to:
Connect each channel of the AD2 scope on each side of the shunt resistor.
Put it in the circuit I want to measure.
Calculate the voltage difference in each sample and then calculate the AC current.
The first super-basic test I am doing is connecting the DC power supply providing always a fixed value (e.g., 1V) to each channel with no shunt resistor: just two wires directly from the power supply to each channel. The difference should be zero (or very close). When measuring the difference, however, I get up to 10mV of difference (mean=~4.4mV; median=~4.3mV), which would not allow me to measure the current in the milliamps range that I want (and impossible in the microamps that I would love to support).
With this resolution, I cannot proceed to the next steps (adding the shunt resistor and later on using an AC signal).
Is there any way in the API to get only the difference between both signals directly (e.g., without comparing with GND), or running measurements (RMS of the difference) at the AD2 directly, or any other way to obtain higher precision of the difference between both signals?
Just in case I did something wrong in the code:
scope.open(self.device_data, sampling_frequency=12500000.0, record_length=25000.0, buffer_size=500)
scope.trigger(self.device_data, channel=0, enable=True, timeout=1.0, edge_rising=True, level=0.0, source=scope.trigger_source.analog)
scope.channel(self.device_data, enable=True, channel=0, amplitude_range=8.0, offset=0.0, attenuation=1.0)
scope.channel(self.device_data, enable=True, channel=1, amplitude_range=8.0, offset=0.0, attenuation=1.0)# set up the instrument
dwf.FDwfAnalogInConfigure(device_data.handle, ctypes.c_bool(False), ctypes.c_bool(True))# read data to an internal bufferwhileTrue:
status = ctypes.c_byte()# variable to store buffer status
dwf.FDwfAnalogInStatus(device_data.handle, ctypes.c_bool(True), ctypes.byref(status))# check internal buffer statusif status.value == scope.constants.DwfStateDone.value:# exit loop when readybreak# copy buffer
buffer_ch1 =(ctypes.c_double * scope.data.buffer_size)()# create an empty buffer
buffer_ch2 =(ctypes.c_double * scope.data.buffer_size)()# create an empty buffer
dwf.FDwfAnalogInStatusData(device_data.handle, ctypes.c_int(0), buffer_ch1, ctypes.c_int(scope.data.buffer_size))
dwf.FDwfAnalogInStatusData(device_data.handle, ctypes.c_int(1), buffer_ch2, ctypes.c_int(scope.data.buffer_size))
Question
poll
Hi!
I would like to measure the current in an AC signal using an AD2.
To do this, I have a set of shunt resistors that I could use with different values. The plan was to:
The first super-basic test I am doing is connecting the DC power supply providing always a fixed value (e.g., 1V) to each channel with no shunt resistor: just two wires directly from the power supply to each channel. The difference should be zero (or very close). When measuring the difference, however, I get up to 10mV of difference (mean=~4.4mV; median=~4.3mV), which would not allow me to measure the current in the milliamps range that I want (and impossible in the microamps that I would love to support).
With this resolution, I cannot proceed to the next steps (adding the shunt resistor and later on using an AC signal).
Is there any way in the API to get only the difference between both signals directly (e.g., without comparing with GND), or running measurements (RMS of the difference) at the AD2 directly, or any other way to obtain higher precision of the difference between both signals?
Just in case I did something wrong in the code:
Where scope.channel is:
Thank you very much in advance!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now