Transistor research

Get input and output characteristics of bipolar transistor 2n3904

1. Structure. Connection diagram. Ranges and ratings selection

Addressing those issues required
  • 33 kOhm resistor
  • resistor of 1 kOhm
  • transistor 2n3904
  • breadboard
  • Fork

In order to obtain characteristics, we need to measure voltages and currents. Voltages are easy to measure, but currents will have to be calculated through a voltage drop on resistors. The maximum current per AO channel without reducing the output voltage may be 10mA. This will be our maximum current in the collector in this experiment. The maximum voltage on the channel 10 V therefore resistor on the collector should be 1 kOhm. According to datasheet we have that at 10mA hfe equals about 150. From this we conclude that the maximum current in the base is 66 μA. Now we calculate the limiting resistor 10V/66 μA = 35087 Ohm or 33 kOhm, the nearest power rating of the resistor/resistor value. We have the 2 following diagrams.

2. Input and output characteristics

The input and output characteristics describe the reaction of a quadripole with a low signals. Its parameters are connected by the following equations:

∆Ub = h11∆Ub + h12∆Uc
∆Ic = h21∆Ub + h22∆Uc
Where Ub is base voltage, Ib is base current, Uc is collector voltage, Ic is collector current.
H - parameters that are not constant and also depend on currents, voltages and temperature, but here we will not review it.

There are two main types of characteristics: base current dependence on base voltage with different Vc = const, and collector current dependence on collector voltage with different Ib = const. We will ontain those during our experiment.

3. Getting results in Python

For this purpose, we will write a script in Python and use a library for Fork (library that implements fork). From the library we will need two commands, these are aoSet () and aiGet (). To make the diagram, we need to add a matplotlib library. Links how to install and use matplotlib. It is obvious that in the cycle we will supply voltage sequences to the circuit inputs and drop voltages at the collector and base. Let's start with the input characteristics. Since the input characteristic is exponential, the characteristics will first apply the voltage with a smaller step/pitch.

V_B_IN=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,3,4,5,6,7,8,9,10]

V_B_IN=[0,0.1,0.2,0.3,0.4,0.5,0.6,
0.7,0.8,0.9,1.1,1.2,1.3,1.4,1.5,1.6,
1.7,1.8,1.9,2,3,4,5,6,7,8,9,10]
We record the characteristics for two values of voltage on the collector
Now we do it for output characteristics. There is a cycle in the cycle to pass different values of the base current. By the way, it is necessary not to forget to get the current of the base at the end of measurement of each branch, as we set the input voltage, not the current.
As you can see, if we connect all ends of the branches, we get a straight line, which is a load characteristic for a circuit/diagram with a common emmiter. In fact, this is our diagram (that we pursue).

4. Getting results in JavaScript

To measure the characteristics in Javascript, we need to do the same actions with Fork as we did in Python. Here we will use the API commands to set the voltage on the AO channels and receive it at the AI inputs.

http://192.168.0.205/control?AO0=3.3'
http://192.168.0.205/control?AI7
Next thing we need is to submit a sequence of AJAX requests. The script has a ready function for this

make_ajax_req_onok('GET',url_path
    'control?'ao_ch_b"="V_B_IN[i_v_b_in],
        function(){
            setTimeout(get_base_volts_pr
         ocess,get_volts_delay);
            }
    );
Here we need to know how the url is formed. In the url_path our ip is recorded, in ao_ch_b the literal of the AO channel is recorded, which controls the base, and V_B_IN[i_v_b_in] it is an array of voltages that we will sequentially apply to the AO.

We will use the https://www.chartjs.org/ library to display the diagrams.
Input characteristics
Output characteristics

5. References to the code examples

Links
Link to Python script input characteristics
Link to Python script output characteristics
Link to Javascript script input and output characteristics
Subscribe news
© All Rights Reserved, 2022 Privacy policy forktestlab@gmail.com