Hello! I am developing a board for the AD3, and I want to utilize its positive and negative power supply to provide +5V and -5V for an op-amp. This works mostly fine, but in some cases, my board loses power, and I suspect it is due to the AD3 limiting its output. Is there some way I can adjust the power limit using the SDK, just as I can adjust the power limit with the WaveForms application?
This is how I activate the power supplies today.
def activate_supply(self, master_state=1, positive_state=1, negative_state=1, positive_voltage=5, negative_voltage=-5):
"""
turn the power supplies on/off
parameters: - device data
- master switch - True = on, False = off
- positive supply switch - True = on, False = off
- negative supply switch - True = on, False = off
- positive supply voltage in Volts
- negative supply voltage in Volts
"""
log("Activating power supplies...", "info")
# set positive voltage
positive_voltage = max(0, min(5, positive_voltage))
dwf.FDwfAnalogIOChannelNodeSet(self.device, ctypes.c_int(0), ctypes.c_int(1), ctypes.c_double(positive_voltage))
# set negative voltage
negative_voltage = max(-5, min(0, negative_voltage))
dwf.FDwfAnalogIOChannelNodeSet(self.device, ctypes.c_int(1), ctypes.c_int(1), ctypes.c_double(negative_voltage))
# enable/disable the positive supply
dwf.FDwfAnalogIOChannelNodeSet(self.device, ctypes.c_int(0), ctypes.c_int(0), ctypes.c_int(positive_state))
# enable the negative supply
dwf.FDwfAnalogIOChannelNodeSet(self.device, ctypes.c_int(1), ctypes.c_int(0), ctypes.c_int(negative_state))
# start/stop the supplies - master switch
dwf.FDwfAnalogIOEnableSet(self.device, ctypes.c_int(master_state))