DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET,...

18
1 DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING LabVIEW By: Vaibhav Singh (Y4466) Vikas Kumar Sharma (Y4482) Under the guidance of Dr. J. John, Professor, Department of Electrical Engineering Indian Institute of Technology Kanpur

Transcript of DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET,...

Page 1: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

1

DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING LabVIEW

By: Vaibhav Singh (Y4466)

Vikas Kumar Sharma (Y4482)

Under the guidance of Dr. J. John, Professor, Department of Electrical Engineering

Indian Institute of Technology Kanpur

Page 2: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

2

Abstract In this project, we have tried to do an experiment of studying the device characteristics of

basic electronic devices like BJT and JFET in virtual lab. The circuit parameters and supply

voltages were varied using a computer interface. The data retrieved from the circuit was then

plotted on the computer. Also, the results and the output characteristic curves of the BJT or JFET

circuit can be accessed from another computer in a remote location on the network.

Page 3: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

3

Acknowledgement

We are deeply thankful to our supervisor Dr. Joseph John for his inspiring guidance and

constant encouragement throughout the progress of our work. We have worked very closely on

the project as a team and we wish to express our deep sense of gratitude to him for his valuable

suggestions and incomparable help.

We would also like to thank Dr. Sanjay Gupta and Pall Sir for their valuable and fruitful

discussion and guidance. We are extremely thankful to Mr. Kapil Deo, Mr. Mukesh and all the

lab staff members who consistently helped us in arranging the all the necessary tools &

instruments, we needed.

We also want to thank Mr. Chaturi Singh and Mr. Rajesh Kumar for their valuable

discussion and suggestions.

Page 4: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

4

Table of contents

CHAPTER 1: INTRODUCTION ............................................................................................. 5

CHAPTER 2: EXPERIMENTAL SETUP ................................................................................. 6

CHAPTER 3: LABVIEW CODE .......................................................................................... 8 3.1 Digital Output ................................................................................................... 8 3.2 Analog Output ................................................................................................... 8 3.3 Analog Input ...................................................................................................... 9 3.4 Current/Voltage Calculation and Front Panel Output ..................................... 9

FRONT PANEL AND BLOCK DIAGRAM ............................................................................ 10

CHAPTER 4: MEASUREMENTS ........................................................................................ 11 4.1 BJT Graphs ..................................................................................................... 11 • Ic vs Vce ........................................................................................................................................................... 11

• Vo vs Vbe ........................................................................................................................................................ 11

• Vbe vs Vin ........................................................................................................................................................ 12

• β vs Ic ............................................................................................................................................................... 12

• Ic vs Vin ........................................................................................................................................................... 12

4.2 JFET Graphs ................................................................................................... 13 • Id vs Vds........................................................................................................................................................... 13

• Vo vs Vgs ........................................................................................................................................................ 13

• gm vs Vgs......................................................................................................................................................... 14

• Id vs Vin ........................................................................................................................................................... 14

• Vgs vs Vin ........................................................................................................................................................ 14

CHAPTER 5 : REMOTE COMMUNICATION ....................................................................... 15 5.1 DSTP communication ..................................................................................... 15 5.2 Web Publishing Tool ....................................................................................... 15 • Setup Connection ..................................................................................................................................... 15

• Application Control ................................................................................................................................ 15

5.3 Advantages of Web Publishing Tool over DSTP ............................................ 16

CHAPTER 6: CONCLUSION AND FUTURE WORK ............................................................. 17

REFERENCES ................................................................................................................... 18

Page 5: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

5

Chapter 1 Introduction

Device characterization is a very important topic to study while working with any semi-

conductor element. Before building and implementing any circuit, one needs to know the characteristics of the devices used. The most basic elements of any circuit in microelectronics are Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward microelectronics. Students can study the characteristics by recording data and later plot it on a graph. They can also use curve tracers which would plot the characteristics when the students are conducting an experiment. This would lead to a more interactive and fruitful understanding of the device. But recording data and plotting it manually take lot of time and curve tracers are expensive. The same curves can be traced on computers in no time which are available in plenty and comparatively much cheaper. In a well equipped laboratory, students can do experiments and understand the device characteristics. In a developing country like India, except a few, other students don’t have access to good laboratories. In this situation, the students are not able to conduct experiments properly or none at all.

With the ever increasing availability of internet, this medium can be used to conduct experiments online without the need for the student to be present at the laboratory. This would also save a lot of resources like setting up a whole lab in many locations. These online experiments would enable the students to conduct the experiments without the need to come to the actual laboratory, i.e. learning in the virtual environment. The online portal of these experiments would act as a Virtual Laboratory to conduct the experiments.

The objectives of this project are:-

1. To perform the device characterization experiments using a computer interface. 2. To carry out characterization experiments from any remote computer on the network.

The project would allow users to select their experiment parameters on the computer (current, voltage, resistance values etc.) and carry out the experiment. They would also be able to acquire data from the experimental setup (e.g. a circuit on a breadboard) and use it to deduce and study meaningful results, for example relations between different quantities, some circuit or device parameters etc. Furthermore, people would be able to conduct experiments without having the need to come to the laboratory.

Page 6: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

6

Chapter 2 Experimental Setup

The setup used to study the characteristics of a BJT and a JFET consists of

• Computer with NI software LabVIEW • A BJT circuit and a JFET circuit • NI PCI DAQ card 6221 • NI BNC 2120

NI’s PCI 6221 DAQ card and BNC 2120 are used for the data I/O between the computer and

the circuit. The DAQ card gives a 16 bit analog input and analog output with output range of ±10V. The analog I/Os are used for voltages I/O. It also has 24 bit digital I/O which is used to select the appropriate circuit for the chosen device using the relays and the values of Rb (in case of BJT using the analog multiplexer), Re (also in the case of BJT using relays) and Rc (using relays). The data is communicated from the DAQ card to the circuit through BNC 2120 connectors.

The device characteristics of a BJT were studied using a simple common emitter circuit with emitter degeneration as shown in the figure 2.1. A small signal transistor BC 547 is used along with

• Resistance Rb = 68, 82 and 100 kΩ • Resistance Rc = 77 and 175 Ω • Resistance Re = 47 and 150 Ω Resistance Rb is chosen high to keep the value of Ib low. Re is set to decide what is the

maximum value of Ic we want to set. Rc is kept small so that Vce is high and does not reach saturation even for very large value of voltage.

Similarly, to study the characteristics of JFET, a small signal transistor BFW10 is used

(figure 2.2) along with a resistance Rd = 47 and 150 Ω. Here source is kept at ground, hence no Re is used. Also, there is no Rg as the JFET behaves like a MOSFET and take very little gate current.

Figure 2.1: BJT circuit

Figure 2.2: JFET circuit

Page 7: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

7

These independent circuits were then combined to form one single circuit (figure 2.3).

For this purpose, the additional components which were required are: • LM 324 and LM741 which are used as a voltage follower. • Analog Multiplexer CD 4051 • Relay HJR1-2C

Figure 2.3: Combined circuit diagram

The maximum current which can be drawn from DAQ card is 5 mA. So, if circuit draws

more current, BNC or the DAQ card might get damaged. To prevent this, the Voltage follower (LM 324) is used which allow us to use the same voltage and to draw reasonably high current.

Analog Multiplexer allows us to use multiple values of the resistance Rb. The multiplexer

line gives a resistance of the order of 100 Ω when the line is selected and of the order of MΩ when line is open. Since Rb is of the order of 100 kΩ, hence it can be used to select different base resistances. But, Rc and Re are of the order of 100 Ω which is comparable to the internal resistance of multiplexer and hence Rc and Re can’t be used with multiplexer.

To solve the problem of Rc and Re, we used relays which give the resistances in the order

of mΩs. These relays are also used to select the device (BJT or JFET) to study by the user.

Page 8: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

8

Chapter 3 LabVIEW Code

First a VI is made to obtain the output characteristics of BJT and then that of a JFET

independently and the two VIs were combined and made one single circuit using relays. Now the user can select the device of his interest from the Front Panel and can find the characteristics of the same. This VI runs from a computer in the laboratory where the circuit is kept. The LabVIEW code can be subdivided into four parts in sequence:

1. Digital Output 2. Analog Output 3. Analog Input 4. Current/Voltage Calculation and front panel output

The data is sent through NI DAQ card and a BNC. Using DAQmx sub-VIs, both analog

and digital outputs are given to the transistor circuit. 3.1 Digital Output In digital output, the user is enabled to select the four parameters:

1. The device whose characteristics are to be studied. 2. Resistances Rc (for BJT) / Rd (for JFET) 3. Resistances Re (for BJT) 4. Resistances Rb (for BJT)

Then the I32 output in the VI block diagram is converted to a U8 number and then sent to the DAQ card using the DAQmx I/O VIs connected in sequence. For the first three parameters, relays are used. For the fourth parameter, analog multiplexer with digital select (CD 4051) is used. The DAQ cards digital terminals are connected to the relays’ and analog multiplexer’s select terminals.

3.2 Analog Output

In analog output, DAQ card generates two voltages, Vcc/ Vdd and Vin which are fed to the transistor circuit. In case of BJT, for a fixed value of Vin, Vcc is varied from 0V to 10V maximum (a control is provided to vary Vccmax) in steps (Vccmax/100) for 101 loops. The variation of Vcc in turn varies Vce, thus for fixed Vin we get one Ic vs Vce curve. In case of JFET, for a fixed value of Vin, Vdd is varied from 0V to 10V maximum in steps and we get one Id vs Vds curve. For BJT, a change in Ib changes the Ic and hence Vce. So, Vin is calculated for a pre-fixed value of Ib so that we can get the desired Ic vs Vce output. Vin is calculated according to equation [3.1]:

ecbbbein RIRIVV ×+×+=∴ [3.1] where

• Ib: This value is increased from zero with 3μA steps. • Ic: Initially taken as 0mA, this value is also taken from the value measured in the previous

loop for Vcc = 10V. Its value is calculated from the voltage measurements done on the circuit in each iteration.

• Vbe: Initially taken as 0.7V, this value is taken from the previous loop for Vcc = 10V iteratively using shift registers. Its value in the circuit is measured in each iteration.

Page 9: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

9

The iterative values are taken so as to get a value of Vin which would give spacing of 1mA between each curve in Ic vs Vce graph. The no. of iterations is set to 11 so that the saturated value (final) of Ic varies from 0 to 10 mA.

Vin for a JFET is varied from -10V to 0V in the steps of 0.5V and correspondingly 21 Id vs Vds plots are obtained. Since JFET doesn’t work for the positive input voltage and has a threshold voltage of approximately -5V, so we need to generate negative Vin. 3.3 Analog Input Once the input to the DAQ card is sent, the voltages Vin and Vcc/ Vdd on the circuit will change. Hence, the circuit values, i.e. node voltages and line currents, will change. The node voltages are measured through the DAQ card using Analog Input. The node voltages being measured are:

• Vo • Vb (for BJT) and Vg (for JFET) • Output of Votage follower = Vcc (for BJT) and Vdd (for JFET) • Vin • Ve (for BJT) and Vs (for JFET)

The analog output to the circuit (via DAQ card) and analog input from the circuit (via DAQ card) are sent/received through DAQ Assistant Express VIs. 3.4 Current/Voltage Calculation and Front Panel Output

After acquiring the above mentioned voltages from the circuit, these voltages are used to further calculate other voltages and line currents according to the following relations:

For BJT

ebbe VVV −=

ecce VVV −=

c

occc R

VVI

−=

b

binb R

VVI

−=

b

c

II

For JFET

gs g sV V V= −

ds d sV V V= −

dd od

d

V VIR−

=

dm

gs

IgV

=

Note: Resistances are expressed in kΩ so currents are expressed in mA.

Using the values calculated some X-Y graphs are drawn to illustrate the various transistor characteristics to the user. The graphs plotted are:

For BJT

1) Vo(V) vs Vin(V) 2) Vbe(V) vs Vin(V) 3) Ic(mA) vs Vin(V) 4) β vs Ic(mA) 5) Ic(mA) vs Vce(V)

For JFET

1) Vo(V) vs Vin(V) 2) Vgs(V) vs Vin(V) 3) Id(mA) vs Vin(V) 4) gm(S) vs Id(mA) 5) Id(mA) vs Vds(V)

Page 10: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

10

Except Ic(mA) vs Vce(V) and Id(mA) vs Vds(V), which shows all the data value obtained in all the iterations, the other graphs show the data for Vcc or Vdd = 10V i.e. for the last iteration of the inner loop.

Front Panel and Block Diagram

Figure 3.1: Front Panel Diagram

Page 11: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

11

Chapter 4 Measurements

BJT Graphs

• Ic vs Vce

Vin was calculated for a given Ib using the equation [3.1]. Then for that particular Vin, Vcc is

varied which in turn varies Vce. For different Vce we measure Ic. Then for a different Ib, we again calculate Vin and repeat the process to get 11 Ic vs Vce curves. In the active region, the curves are not exactly horizontal, implying the presence of Early Effect. From the graph we can also see that Vce sat is around 0.2V.

• Vo vs Vin

The above curve is linear and this shows that the output voltage varies linearly as Vbe is increased. This would mean that Ic follows proportionately to the voltage.

Page 12: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

12

• Vbe vs Vin

The ideal curve for Vbe should start from zero and saturate at around 0.7V. The minimum Vin we have taken is .7V, hence the curve does not take into consideration the values before 0.7V.

• β vs Ic

As we can see from the figure above, β shows a value of around 370 at higher values of Ic. β is not constant for all Ic. The linear increase in β for small Ic can be attributed to the fact that the transistor is not in the linear region of operation for small Ic.

• Ic vs Vin

As we can also see from the curve Vo vs Vin, the values of Ic obtained are proportionate to Vin, hence the curve is linear.

Page 13: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

13

JFET Graphs • Id vs Vds

Vin is given from -10V to 0V in the steps of 0.5V. Then for a particular Vin, Vdd is varied which in turn varies Vds. For different Vds we measure Id and repeat the process for the next Vin to get 21 Id vs Vgs curves. Since the threshold voltage for JFET is around -5V, so Id remains 0 (with some noise) for Vin from -10 to -5V.

• Vo vs Vin

Vo is equal to Vdd for Vgs < -5V. This shows that JFET has a threshold value of around -5V (-5.3V to be precise). For Vgs < Vthreshold the JFET is in OFF state, which means there is no Id and hence Vo = Vdd. For Vgs < Vthreshold, Vo decrease linearly with Vgs.

Page 14: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

14

• gm vs Vgs

gm is zero for Vgs < -5.3V showing that JFET has a threshold value of -5.3V. After that gm shoots up exponentially for low magnitude of Vin.

• Id vs Vin

Id is also zero for Vin < -5.3V showing the threshold value JFET to be equal to -5.3V. After that Id increases linearly for higher values of Vin.

• Vgs vs Vin

Vgs vs Vin graph is completely linear with Vgs = Vin at all points, showing that there is almost no gate current which is desired.

Page 15: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

15

Chapter 5 Remote Communication

One major objective of this project was to enable users to conduct their experiments

without physically being in the laboratory. The rapidly increasing use of the internet aides us in achievement of this goal. We had tried two methods to implement remote communication: 5.1 DSTP communication The connection between the two computers is done through 2 VIs. They communicate with each other through dstp servers. Firstly, the host VI checks whether the user has given the command to run the VI which is done by checking whether the user has actually selected the parameters to be used and has run its VI. We have used the sub-VIs in Functions => Data Communication => Data socket, namely, Data Socket Open.vi, Data Socket Read.vi and Data Socket Close.vi for this purpose. The data obtained is in ‘Variant’ format and is converted into an integer using the appropriate numeric constant. After it has received the controlling parameters, the VI proceeds with Analog/Digital output, Analog input and calculations with front panel display. The data from the graphs is sent to user via dstp again. A dstp server is established externally on the computer and data is written by each X-Y graph through data binding (Right click on the graph => Properties => Data Binding). This data is read by the user using data socket again. 5.2 Web Publishing Tool

LabVIEW remote front panels allow us to view and control VIs through a standard Web browser. We can create a remote front panel Web page with the LabVIEW Web Publishing Tool. LabVIEW uses its own web server to publish the front panel to a web browser (Internet Explorer, Mozilla Firefox) so the VI can be accessed remotely. It creates a Web page with the embedded VI front panel that can be viewed and controlled through any user’s Web browser.

The user’s computer must meet one of the two requirements to access the remote front panels.

• User’s computer must have LabVIEW (version 6.1 or advanced) installed. • The user’s computer must have LabVIEW run-time engine installed.

I. Setup Connection

The first step in using remote front panels is to enable the LabVIEW Web Server which

is built into LabVIEW. Once the web server has been enabled, the next step is to publish our VI to the Web. This is done by going to Tools => Web Publishing Tool, then selecting the VI that we like to publish to the Web from the drop-down list or browse to the VI we want to publish. Then we select the Embedded Viewing Mode which will allow the user to view and control the VI remotely. II. Application Control

Once connected to the remote laboratory, the user’s connection will automatically be in a monitor state. If another user is controlling the remote laboratory, the owner (in the main Lab)

Page 16: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

16

will be able to monitor the actions of the controlling client. To request control of the program, user has to right click on the front panel and select Request Control. Once selected, one of two possible messages will appear. Either the user will be granted control (Control Granted), or the user will see a message indicating that control is currently granted to another user (Waiting for control: Either the server is locked or another client has control). If another client has control, the controlling client will be notified that control time has now become limited. Once the timeout occurs or the controlling client has released control, application control is automatically switched to the requesti.

5.3 Advantages of Web Publishing Tool over DSTP

The major drawback of data socket server is that it requires IP address of the user who wants to communicate. So, every time a new user comes, first it has to send its IP address to the host computer, and then only it is able to communicate. This is very much user unfriendly. This drawback is overcome using Web Publishing tool in which there is no need to know the user’s IP address. Another limitation of data socket server is that it uses UDP protocol to transfer the data which is not reliable for wireless network. Generally some data get lost in wireless network using UDP protocol. However, Web Publishing Tool uses TCP/IP protocol and hence compatible with any kind of network.

One more advantage of using Web Publishing Tool is that the URL required to open the webpage is in http protocol and hence can be accessed from any of the commonly used web browsers (Internet Explorer, Mozilla Firefox), while data socket server uses dstp protocol and hence can not be used through web browser. It can be opened only through LabVIEW.

It is because of these advantages of web publishing tool over DSTP communication that we have finally used the former in our project.

Page 17: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

17

Chapter 6 Conclusion and Future Work

In this project, we have been able to study the device characteristics of a BJT and a JFET.

This was done by allowing the user to select which device he/she wants to use along with the circuit parameters (Voltage supply and the value of resistances). Accordingly, the user receives the voltage readings which are then shown using graphs plotted for appropriate values (current, voltage etc.).We have used the power of internet to enable users to control the VI and study the results from a remote computer. This was achieved using LabVIEW’s in-built web publishing tool.

This project can be used to check whether a device is working properly or not. We can

further use this project to study the characteristics of MOSFET and medium power transistor in the same manner without making any significant change in the code. Power transistor can also be studied if we provide it with high current drive (~A). In addition to device characterization, this project can also be used as a model to setup and conduct other experiments on the internet in the same manner.

Page 18: DEVICE CHARACTERIZATION WITHIN VIRTUAL LAB USING … · Bipolar Junction Transistor (BJT), MOSFET, JFET etc. Understanding their characteristics would be among the first steps toward

18

References 1. S. Gupta, J. John, Virtual Instrumentation Using LabVIEW, New Delhi: Tata McGraw-Hill

Publishing Company Limited, 2005.

2. A. S. Sedra, K. C. Smith, Microelectronic circuits, New York: Oxford University Press, 2004.

3. Low cost M-series Multifuctional DAQ, http://www.ni.com/pdf/products/us/

20044546301101dlr.pdf. 4. LM324 – Low Power Quad Operational Amplifier datasheet, National Semiconductor. 5. LM741 – Operational Amplifier datasheet, National Semiconductor 6. CD4051 – CMOS Analog Multiplexer/Demultiplexer datasheet, Texas Instruments. 7. HJR1-2C – Relay, Ningbo Tiangbo Ganglian Electronics Co. Ltd. 8. BC547 – BJT, Fairchild Semiconductor 9. BFW10 – JFET, Motorola