Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Tester of diodes and bipolar transistors. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Measuring technology

Comments on the article Comments on the article

Most modern testers (multimeters) have built-in functions for testing diodes and sometimes transistors. But if your tester does not have these functions, then you can assemble a diode and transistor tester with your own hands. Below is a tester project based on the PIC16F688 microcontroller.

The logic for testing diodes is very simple. A diode is a PN junction that is known to only conduct current in one direction. Therefore, a working diode will conduct current in one direction. If the diode conducts current in both directions, then the diode is inoperative - broken. If the diode does not conduct in either direction, then the diode is also not working. The circuit implementation of this logic is shown below.

Tester of diodes and bipolar transistors. diode test

This logic can easily be adapted for a bipolar transistor test that contains two PN junctions: one between base and emitter (BE junction) and one between base and collector (BC junction). If both junctions conduct current in only one direction, the transistor is working, otherwise it is not working. We can also identify the type of a pnp or npn transistor by determining the direction of current conduction. For testing transistors, the microcontroller uses 3 inputs / outputs

Tester of diodes and bipolar transistors. Transistor test

Transistor Test Sequence:

1. Turn on output (set to one) D2 and read D1 and D3. If there is a logical unit on D1, the BE junction conducts current, otherwise it does not. If D3 is 1, then the BC conducts current, otherwise it does not.
2. Set output D1 to 1 and read D2. If D2 is 1, then the EBs conduct current, otherwise they do not.
3. Set output D3 to 1 and read D2. If D2 is 1, then the CBs are conducting current, otherwise they are not.

Further, if BE and BC conduct current, then the transistor is npn-type and working. If, however, EB and CB conduct current, then the pnp type transistor is also working. In all other cases (for example, EB and BE conduct current, or both transitions of BC and CB do not conduct, etc.), the transistor is in a non-working state.

Schematic diagram of the diode and transistor tester and description

Tester of diodes and bipolar transistors. Diode and transistor tester circuit
(click to enlarge)

The circuit of the tester is very simple. The device has 2 control buttons: Select (selection) and Detail (more). By pressing the Select button, the test type is selected: diode or transistor test. The Detail button works only in the transistor test mode, the LCD screen shows the type of transistor (npn or pnp) and the conduction status of the transistor junctions.

The three legs of the transistor under test (emitter, collector, and base) are connected to ground through a 1 kΩ resistor. For testing, the pins RA0, RA1, and RA2 of the PIC16F688 microcontroller are used. To test the diode, only two outputs are used: E and K (marked D1 and D2 in the diagram).

Tester of diodes and bipolar transistors. Diode and transistor tester on breadboard

Program

The software for this project is written using the MikroC compiler. During testing and programming, be careful and follow the settings of the inputs / outputs of the MK (RA0, RA1 and RA2). they often change during operation. Before setting any output to 1, make sure the other two I/Os of the MCU are defined as inputs. Otherwise, conflicts of inputs / outputs of the MK are possible.

/*
Project: Diode and Transistor Tester
Internal Oscillator @ 4MHz, MCLR Enabled, PWRT Enabled, WDT OFF
Copyright @ Rajendra Bhatt
November 9, 2010
*/
// LCD module connections
sbit LCD_RS at RC4_bit;
sbit LCD_EN at RC5_bit;
sbit LCD_D4 at RC0_bit;
sbit LCD_D5 at RC1_bit;
sbit LCD_D6 at RC2_bit;
sbit LCD_D7 at RC3_bit;
sbit LCD_RS_Direction at TRISC4_bit;
sbit LCD_EN_Direction at TRISC5_bit;
sbit LCD_D4_Direction at TRISC0_bit;
sbit LCD_D5_Direction at TRISC1_bit;
sbit LCD_D6_Direction at TRISC2_bit;
sbit LCD_D7_Direction at TRISC3_bit;
// End LCD module connections
sbit TestPin1 at RA0_bit;
sbit TestPin2 at RA1_bit;
sbit TestPin3 at RA2_bit;
sbit Detail at RA4_bit;
sbit SelectButton at RA5_bit;
// Define Messages
char message1[] = "Diode Tester";
char message2[] = "BJT Tester";
char message3[] = "Result:";
char message4[] = "Short";
char message5[] = "Open ";
char message6[] = "Good ";
char message7[] = "BJT is";
char *type = "xxx";
char *BE_Info = "xxxxx";
char *BC_Info = "xxxxx";
unsigned int select, test1, test2, update_select, detail_select;
unsigned int BE_Junc, BC_Junc, EB_Junc, CB_Junc;
void debounce_delay(void){
 Delay_ms(200);
}
void main() {
ANSEL = 0b00000000; //All I/O pins are configured as digital
CMCON0 = 0?07 ; // Disbale comparators
PORTC = 0;
PORTA = 0;
TRISC = 0b00000000; // PORTC All Outputs
TRISA = 0b00111000; // PORTA All Outputs, Except RA3 (I/P only)
Lcd_Init();           // Initialize LCD
Lcd_Cmd(_LCD_CLEAR);       // CLEAR display
Lcd_Cmd(_LCD_CURSOR_OFF);    // Cursor off
Lcd_Out(1,2,message1);      // Write message1 in 1st row
select = 0;
test1 = 0;
test2 = 0;
update_select = 1;
detail_select = 0;
do {
 if(!SelectButton){
 debounce_delay();
 update_select = 1;
 switch (select) {
  case 0 : select=1;
  break;
  case 1 : select=0;
  break;
 } //case end
 }

 if(select == 0){  // Diode Tester
 if(update_select){
  Lcd_Cmd(_LCD_CLEAR);
  Lcd_Out(1,2,message1);
  Lcd_Out(2,2,message3);
  update_select=0;
 }
 TRISA = 0b00110100; // RA0 O/P, RA2 I/P
 TestPin1 = 1;
 test1 = TestPin3 ; // Read I/P at RA2
 TestPin1 = 0;
 TRISA = 0b00110001; // RA0 I/P, RA2 O/P
 TestPin3 = 1;
 test2 = TestPin1;
 TestPin3 = 0;

 if((test1==1) && (test2 ==1)){
  Lcd_Out(2,10,message4);
 }
 if((test1==1) && (test2 ==0)){
  Lcd_Out(2,10,message6);
 }
 if((test1==0) && (test2 ==1)){
  Lcd_Out(2,10,message6);
 }
 if((test1==0) && (test2 ==0)){
  Lcd_Out(2,10,message5);
 }

 } // End if(select == 0)

 if(select && !detail_select){   // Transistor Tester
 if(update_select){
  Lcd_Cmd(_LCD_CLEAR);
  Lcd_Out(1,2,message2);
  update_select = 0;
 }
 // Test for BE and BC Junctions of n-p-n
 TRISA = 0b00110101; // RA0, RA2 I/P, RA1 O/P
 TestPin2 = 1;
 BE_Junc = TestPin1 ; // Read I/P at RA0
 BC_Junc = TestPin3;  // Read I/P at RA2
 TestPin2 = 0;

 // Test for EB and CB Junctions of p-n-p
 TRISA = 0b00110110; // RA0 O/P, RA1/RA2 I/P
 TestPin1 = 1;
 EB_Junc = TestPin2;
 TestPin1 = 0;
 TRISA = 0b00110011; // RA0 O/P, RA1/RA2 I/P
 TestPin3 = 1;
 CB_Junc = TestPin2;
 TestPin3 = 0;

 if(BE_Junc && BC_Junc && !EB_Junc && !CB_Junc){
  Lcd_Out(2,2,message3);
  Lcd_Out(2,10,message6);
  type = "n-p-n";
  BE_info = "Good ";
  BC_info = "Good ";
 }
 else
  if(!BE_Junc && !BC_Junc && EB_Junc && CB_Junc){
  Lcd_Out(2,2,message3);
  Lcd_Out(2,10,message6);
  type = "p-n-p";
  BE_info = "Good ";
  BC_info = "Good ";
 }
 else {
  Lcd_Out(2,2,message3);
  Lcd_Out(2,10,"Bad ");
  type = "Bad";
 }
 }
 if(select && !Detail){
 debounce_delay();
 switch (detail_select) {
  case 0 : detail_select=1;
  break;
  case 1 : detail_select=0;

  break;

 } //case end
 update_select = 1;
 }

 if(detail_select && update_select){

 // Test for BE Junction open
 if(!BE_Junc && !EB_Junc){
  BE_info = "Open ";
 }
 // Test for BC Junction open
 if(!BC_Junc && !CB_Junc){
  BC_info = "Open ";
 }
 // Test for BE Junction short
 if(BE_Junc && EB_Junc){
  BE_info = "Short";
 }

 // Test for BC Junction short
 if(BC_Junc && CB_Junc){
  BC_info = "Short";
 }
 Lcd_Cmd(_LCD_CLEAR);
 Lcd_Out(1,1,"Type:");
 Lcd_Out(1,7,type);
 Lcd_Out(2,1,"BE:");
 Lcd_Out(2,4,BE_info);
 Lcd_Out(2,9,"BC:");
 Lcd_Out(2,12,BC_info);
 update_select = 0;
 }    // End if (detail_select)

} while(1);
}

Tester of diodes and bipolar transistors. Tester at work

Author: Koltykov A.V.; Publication: cxem.net

See other articles Section Measuring technology.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Artificial leather for touch emulation 15.04.2024

In a modern technology world where distance is becoming increasingly commonplace, maintaining connection and a sense of closeness is important. Recent developments in artificial skin by German scientists from Saarland University represent a new era in virtual interactions. German researchers from Saarland University have developed ultra-thin films that can transmit the sensation of touch over a distance. This cutting-edge technology provides new opportunities for virtual communication, especially for those who find themselves far from their loved ones. The ultra-thin films developed by the researchers, just 50 micrometers thick, can be integrated into textiles and worn like a second skin. These films act as sensors that recognize tactile signals from mom or dad, and as actuators that transmit these movements to the baby. Parents' touch to the fabric activates sensors that react to pressure and deform the ultra-thin film. This ... >>

Petgugu Global cat litter 15.04.2024

Taking care of pets can often be a challenge, especially when it comes to keeping your home clean. A new interesting solution from the Petgugu Global startup has been presented, which will make life easier for cat owners and help them keep their home perfectly clean and tidy. Startup Petgugu Global has unveiled a unique cat toilet that can automatically flush feces, keeping your home clean and fresh. This innovative device is equipped with various smart sensors that monitor your pet's toilet activity and activate to automatically clean after use. The device connects to the sewer system and ensures efficient waste removal without the need for intervention from the owner. Additionally, the toilet has a large flushable storage capacity, making it ideal for multi-cat households. The Petgugu cat litter bowl is designed for use with water-soluble litters and offers a range of additional ... >>

The attractiveness of caring men 14.04.2024

The stereotype that women prefer "bad boys" has long been widespread. However, recent research conducted by British scientists from Monash University offers a new perspective on this issue. They looked at how women responded to men's emotional responsibility and willingness to help others. The study's findings could change our understanding of what makes men attractive to women. A study conducted by scientists from Monash University leads to new findings about men's attractiveness to women. In the experiment, women were shown photographs of men with brief stories about their behavior in various situations, including their reaction to an encounter with a homeless person. Some of the men ignored the homeless man, while others helped him, such as buying him food. A study found that men who showed empathy and kindness were more attractive to women compared to men who showed empathy and kindness. ... >>

Random news from the Archive

Car cam 21.03.2002

DriveCam Video Systems from San Diego (USA) has developed a miniature camera that is mounted on the rear-view mirror of a car. The device records the situation on the road and the actions of the driver.

After a collision, the camera automatically continues shooting for 30 seconds. If necessary, it can be turned on again manually. Interchangeable memory cards are used as storage media, which simplifies the processing and viewing of footage.

Automotive "black boxes" will avoid numerous disputes and lawsuits arising from the conflicting testimony of participants in road accidents.

Other interesting news:

▪ Livescribe 3 pen for digitizing handwritten notes

▪ Odor meter

▪ Next Generation Solid State Drives from Toshiba

▪ center of shame

▪ Innovative battery will last for decades

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Visual illusions. Article selection

▪ article In a difficult moment of life ... A popular expression

▪ article Why don't hedgehogs, contrary to children's drawings, carry apples on their backs? Detailed answer

▪ Mamura's article. Legends, cultivation, methods of application

▪ article Relay for turning on the rear fog lights. Encyclopedia of radio electronics and electrical engineering

▪ article Power supply unit with a quenching capacitor, 220/3 volts 0,5 amperes. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024