Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
test-and-measurement:analog-discovery-pro-5250:transistor-tester [2022/09/12 13:49] – changed forum.digilentinc.com to forum.digilent.com jeff.greenberg_ni.comtest-and-measurement:analog-discovery-pro-5250:transistor-tester [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== High Voltage Transistor Tester with the Analog Discovery Pro 5250 ======
 +
 +<WRAP center round todo 60%>
 +This page is under construction.
 +</WRAP>
 +
 +<WRAP group>
 +While you can use the [[test-and-measurement:transistor-tester-adapter:start|]] to test small signal bipolar junction transistors (BJTs) and field-effect transistors (FETs) with the Analog Discovery 2, several mid- to high power devices are out of the range of these devices. In these cases, you can use the variable voltage supply and the digital multimeter on the ADP5250 to create your high voltage test bench and to plot the characteristic curves of power transistors.
 +</WRAP>
 +----
 +
 +===== Inventory =====
 +<WRAP group>
 +=== Hardware ===
 +  * [[test-and-measurement:analog-discovery-pro-5250:start|]]
 +  * [[https://www.diodes.com/assets/Datasheets/ZVN3310A.pdf|ZVN3310A]], or other transistor
 +  * 2x 10W 51Ω ceramic resistors
 +
 +=== Software ===
 +  * WaveForms SDK (installed with [[software:waveforms:waveforms-3:start|]])
 +  * [[https://www.python.org/|Python]]
 +  * a text editor of your choice
 +**Note:** //In this demo, the Python package created in the [[test-and-measurement:guides:waveforms-sdk-getting-started|]] guide will be used. To write the Python script without using this package, check the [[software:waveforms:waveforms-sdk:start|WaveForms SDK Resource Center]].//
 +</WRAP>
 +----
 +
 +===== Connecting the Transistor to the ADP5250 =====
 +<WRAP group><WRAP half column>
 +In this test, the drain current versus the drain-source voltage of the selected MOSFET will be plotted for varying gate-source voltages. Connect the gate of the transistor to the waveform generator and the source to the ground.
 +
 +To limit the maximum drain current to the maximum output current of the supplies, a $R=\frac{V}{I}=\frac{V_{+}-V_{-}}{I}=\frac{25V+25V}{0.5A}=100Ω$ resistor is needed in series with the transistor.
 +
 +The maximum output current of the ADP5250 on the +25V and -25V supplies is 500mA, so the maximum power dissipated by the resistor, in the case of an ideal switch instead of the MOSFET (with 0Ω resistance), would be $P_{R}=I_{Rmax}*V_{Rmax}=0.5A*50V=25W$ which is higher then the rated power of the 10W ceramic resistors. To protect the circuit, two pieces of 51Ω resistors will be used in series, so the voltage is divided equally between them, the dissipated power being only half, which is 12.5W. This is still above 10W so the maximum voltage should also be reduced. If the maximum voltage drop is only 40V, the dissipated power by the resistors will be $P_{51R}=\frac{I_{Rmax}*V_{Rmax}}{2}=\frac{0.5*40V}{2}=10W$
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-5250:transistor_tester_sch.png?600 |}}
 +</WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Connect the ampere meter of the DMM in series with the resistors. As the ampere meter and the voltmeter use the same reference, which is already connected to the drain, connect the positive lead of the voltmeter to the source of the MOSFET. The measured voltage will be inverted, but the results can be multiplied with -1 from software.
 +
 +<WRAP center round important 80%>
 +Use the high scale ampere meter on the DMM!
 +</WRAP>
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-5250:transistor_tester_bbd.png?600 |}}
 +</WRAP></WRAP>
 +----
 +
 +===== Writing the Script =====
 +<WRAP group>
 +The full script can be downloaded {{ :test-and-measurement:analog-discovery-pro-5250:transistor.zip |here}}.
 +</WRAP>
 +
 +<WRAP group><WRAP half column>
 +Import the necessary packages into your script and define the measurement parameters.
 +</WRAP><WRAP half column><code python>
 +from WF_SDK import device, supplies, wavegen, dmm # import instruments
 +import time                     # needed for delays
 +import matplotlib.pyplot as plt # needed for plotting
 +
 +"""-----------------------------------------------------------------------"""
 +
 +# parameters
 +Vd_resolution = 500 # drain voltage resolution in mV
 +Vd_limit = 40       # maximum drain voltage in V
 +Vg_resolution = 2   # gate voltage resolution in V
 +Vg_limit = 12       # maximum gate voltage in V
 +delay_time = 0.1    # time between samples in seconds
 +transistor = "ZVN3310A"
 +</code></WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Connect to the device, initialize the digital multimeter and generate the lists of voltages which will be generated in the following. Also create empty lists for the results.
 +</WRAP><WRAP half column><code python>
 +# connect to the device
 +device_handle, device_name = device.open("Analog Discovery Pro 5250")
 +
 +# check for connection errors
 +device.check_error(device_handle)
 +
 +"""-----------------------------------"""
 +
 +# initialize the scope
 +dmm.open(device_handle)
 +
 +# generate voltages list
 +Vd = range(0, int((Vd_limit  * 1000) + Vd_resolution), int(Vd_resolution))
 +Vg = range(Vg_resolution * 1000, int((Vg_limit + Vg_resolution) * 1000), int(Vg_resolution * 1000))
 +
 +# convert from mV to V
 +Vd = [element / 1000 for element in Vd]
 +Vg = [element / 1000 for element in Vg]
 +
 +# create empty lists for the results
 +Vds = [[] for _ in Vg]
 +Id = [[] for _ in Vg]
 +</code></WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Step through the list of gate-source voltages. Output every voltage on the waveform generator.
 +
 +For every gate-source voltage, step through the list of drain voltages, outputting each on the +25V supply. After the voltage change is commanded, wait a bit for the supply voltage to settle, then use the digital multimeter to measure the drain-source voltage and the drain current. Don't forget to invert the voltage.
 +</WRAP><WRAP half column><code python>
 +try:
 +    index = 0
 +    for gate_voltage in Vg:
 +        # set the gate voltage
 +        print("Gate-Source Voltage: " + str(gate_voltage) + "V")
 +        wavegen.generate(device_handle, 1, wavegen.function.dc, gate_voltage)
 +        for drain_voltage in Vd:
 +            print("\tDrain voltage: " + str(drain_voltage) + "V")
 +            # set the drain voltage
 +            if drain_voltage > 25:
 +                supplies.switch_25V(device_handle, True, True, drain_voltage - 25, -25)
 +            else:
 +                supplies.switch_25V(device_handle, True, True, 0, drain_voltage * (-1))
 +
 +            # delay
 +            time.sleep(delay_time)
 +
 +            # measure the drain-source voltage
 +            Vds[index].append((-1) * dmm.measure(device_handle, "voltage"))
 +
 +            # measure the drain current
 +            Id[index].append(dmm.measure(device_handle, "high current"))
 +        index += 1
 +except:
 +    pass
 +
 +print("Done")
 +</code></WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +When the measurement is finished, close every instrument and disconnect from the device.
 +</WRAP><WRAP half column><code python>
 +# reset the scope
 +dmm.close(device_handle)
 +
 +# reset the wavegen
 +wavegen.close(device_handle)
 +
 +# reset the power suplpies
 +supplies.switch_25V(device_handle, False, False, 0, 0)
 +supplies.close(device_handle)
 +
 +# close the connection
 +device.close(device_handle)
 +</code></WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Finally, plot the results.
 +</WRAP><WRAP half column><code python>
 +# plot results
 +for index in range(len(Vg)):
 +    try:
 +        plt.plot(Vds[index], Id[index], label=(r"$V_{GS}$" + "=" + str(Vg[index]) + "V"))
 +    except:
 +        pass
 +plt.xlabel(r"$V_{DS}$" + "[V]")
 +plt.ylabel(r"$I_{D}$" + "[A]")
 +plt.legend()
 +plt.title(transistor)
 +plt.show()
 +</code></WRAP></WRAP>
 +----
 +
 +===== Testing =====
 +<WRAP group><WRAP half column>
 +Turn on the ADP5250 and start the script. Wait for it to finish. You can save the plotted results by clicking on the respective button. Compare your results to the one presented in the datasheet of the transistor.
 +
 +<WRAP center round important 80%>
 +The resistors and the MOSFET might get hot! Don't let the setup unsupervised!!!
 +</WRAP>
 +
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-5250:output_zvn3310a.png?600 |}}
 +</WRAP></WRAP>
 +----
 +
 +===== Next Steps =====
 +<WRAP group>
 +For more guides on how to use your Digilent Test & Measurement Device, return to the device's Resource Center, linked from the [[test-and-measurement:start]] page of this wiki.
 +
 +For information on the Transistor Tester Adapter, check out its [[test-and-measurement:transistor-tester-adapter:start|Resource Center]].
 +
 +For technical support, please visit the [[https://forum.digilentinc.com/forum/8-test-and-measurement/|Test and Measurement]] section of the Digilent Forum.
 +</WRAP>