Introduction
This is a project based on Arduino board which can measure the hfe of npn and pnp transistors. When the transistor that needs to be checked is plugged into the breadboard of hfe meter, the 16*2 LCD displays the hfe value. The project uses an Arduino pro mini boardwhose ADC feature is used along with the concept of Ohm’s law to develop thishfe meter.
Fig. 1: Prototype of Arduino based Transistor hfe Meter
Description
The entire project can be divided into three basic blocks;
1) hfeSensor Unit
2) Processor Unit
3) Display Unit
Fig. 2: Block Diagram of Arduino Pro Mini based Transistor hfe Meter
The hfe Sensor Unit allows the transistor’s input and outputcurrents to flow through it. The Sensor Unit produces two voltages, one is the voltage across the input resistor and other is the voltage across the output resistor.
The Processor Unit can take two input voltages both in the range of 0 to 5V. This unit takes the Sensor Unit’s output as input voltages and uses the ADC to read these voltages. An Algorithm is then applied to calculate the hfe of the transistor. The unit then sends a 4bit data to the Display Unit to display the hfe.
The Display Unit takes the 4bit data from the Processor Unit and produces a 16*2 display for the hfe of the transistor.
1) hfeSensor Unit
The hfe sensor in this project is actually two current sensors[H1] , one of them sense the input current (base current) of the transistor and other one sense the output current (collector current) of the transistor. The current sensors in this project are single low valued resistors through which the current flows to the transistor.
In our project we implement two resistors‘Rb’ and ‘Rc’in the input and output current flowing path respectively of the transistor. As the current flows through them, voltages ‘Vb’ and ‘Vc’ drops across them and we can measure the input current flow ‘Ib’ and output current flow ‘Ic’ with the help of the following equation.
Ib = Vb / Rb
Ic = Vc / Rc
We have selected[H2] a value of Rb = Rc = 10 ohms, and since we know the values of ‘Rb’ and ‘Rc’ we can calculate the ‘Ib’ and ‘Ic’
Fig. 3: Circuit Diagram of hfe sensor for PNP Transistor
Once we obtain the value of current ‘Ic’ and ‘Ib’, the hfe can be calculated using the following equation;
hfe = Ic / Ib
2) Processor Unit
The processor unit in this project is the Arduino board and it uses the ADC module to read the output voltages Vb and Vc from the Sensor Unit. In the Arduino board we are using an 8 channel, 10 bit ADC with the reference voltage pin connected to 5 V. The ADC reads the voltage Vb, Vc and generates an equivalent value ‘ValueADC‘at the ADC register. From this value the algorithm calculates[H3] the voltages Vb and Vc and then the hfe.
Once the values of Vb and Vc are obtained the value of the current flow is calculated using the known values of R = 10 ohms, with the help of equation;
Ib = Vb / 10
Ic = Vc / 10
The value of the ‘hfe’ is then calculate using the values of ‘Ib’ and ‘Ic’ using the previously discussed equation.
hfe = Ic / Ib
The following piece of code calculates the hfe and displays it on the LCD.
dc_current_I0 = (dc_voltage_V1 / resistance_Re) * 1000;
dc_current_I1 = ((4.99 – dc_voltage_V2) / resistance_Rb) * 1000;
npn_pnp_hfe = dc_current_I0 / dc_current_I1;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“hfe “);
lcd.print(npn_pnp_hfe);
3) Display Unit
The Display Unit is a standard 16*2 LCD on which the Arduino displays the ‘hfe’ value of the transistor. The LCD has been wired in four bit mode to reduce the number of output pins of the Arduino board to be used.
Fig. 4: Typical Image of Character LCD
Circuit Description
Fig. 5: Circuit Diagram of Arduino based Transistor hfe Meter
Code Description
The code continuously read the ADC channels A0 and A2 one after the other, each time calculating the values of Vb and Vc.When both the values of Vb and Vc are obtained, the code then calculates the hfe value of the transistor and is displayed on the 16*2 LCD.
The code running in the Arduino used the library function analogRead()to obtain the ADC value and lcd.print()to display the data on 16*2 LCD.

Project Source Code
###
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int adc_value = 0;
int voltage_peak_value = 0;
float voltage_average_value = 0;
float dc_voltage_V0 = 0;
float ac_voltage_V0 = 0;
float dc_voltage_V1 = 0;
float dc_voltage_V2 = 0;
float ac_voltage_V1 = 0;
float dc_current_I0 = 0;
float dc_current_I1 = 0;
float ac_current_I0 = 0;
float dc_power = 0;
float ac_power = 0;
float npn_pnp_hfe = 0;
unsigned long resistance;
unsigned long sample_count = 0;
void setup()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print(" EG LABS ");
pinMode(13, OUTPUT);
}
void loop()
{
//================================== HFE ==========================================
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
{
adc_value = analogRead(A2);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
}
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
{
adc_value = analogRead(A3);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
}
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V2 = voltage_average_value;
dc_current_I0 = (dc_voltage_V1 / 7.5) * 1000;
dc_current_I1 = ((4.99 - dc_voltage_V2) / 100000) * 1000;
npn_pnp_hfe = dc_current_I0 / dc_current_I1;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("hfe ");
lcd.print(npn_pnp_hfe);
//=================================================================================
delay(1000);
}
###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.