Example Code

Building a MOSFET IV Trace with the LabVIEW Instrumentation API

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Description

LabVIEW can be used to quickly and simply automate a sequence of tasks and record the data. The built-in IV Analyzer is perfect for BJT and diode analysis but if you want to go further and automate your own MOSFET analysis LabVIEW is the perfect tool for the job.

How to Use

To test a MOSFET we need to set the gate voltage and then sweep the drain voltage while monitoring its current. We then repeat this for a series of gate voltages. This results in a graph like this:



Figure 1: Output Characteristics Graph for ZVN2110A

When written in LabVIEW, this is implemented using nested for loops where the outer loop sets the gate voltage and the inner loop sweeps the drain voltage.


Figure 2: Sweeping gate and drain voltages

The Function Generator and the Variable Power Supply will be included within the code to fulfill the functions we need. 
 
The Function Generator will control the gate voltage while the Variable Power Supply will control the drain voltage. The Variable Power Supply instrument will report the actual output voltage and current. 

Implementing this results in the following example code:
 


Figure 3: Completed MOSFET IV curve trace



All that is now needed to test the code is to grab a MOSFET. To Utilize a MOSFET:
 

  1. Download the full, completed example code attached.
  2. Place the MOSFET onto the prototyping board and add a jumper wire to each MOSFET connection
  3. Connect a BNC Scope Probe to Function Generator CH 1 and a pair of Banana to Alligator Clip Set to the Variable Power Supply Ground and +15V.
  4. Connect probes to MOSFET jumper wires as shown below:
     



Figure 4: MOSFET Jumper Wire Connections

 

Click run on the example code and view the VI to display the graph of the automated measurements.



Figure 5: Example Code Front Panel

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.