In this Arduino project, I am going to show you how to make an interesting Arduino based basic Electronic Component Tester. We can test many components with this single tester like transistors, diodes, resistors, capacitors, thyristors, MOSFETs, inductors, LEDs and many more. In this article, I will discuss how I made this device at minimal cost and how it works.
For quite some time I asked myself how is it possible to build such a versatile component tester for under 10 dollars. After searching too many component testers in the online market it is found a little bit costly. Most people have at least seen those component testers on Chinese websites for around 10 dollars. So I decide to make such an electronic components tester using some basic components and to reduce the total costs.
Must Read Arduino Capacitance Meter
History of Electronic Component Tester
According to history, Markus Frejek had the idea and did the first implementation of such a tester. Then Karl-Heinz-Kubbeler and others enhanced the design as well as the software. There are many device implementations on the internet but all are based on the original design and software.
All models have a few things in common, they have three test pins including a display, a button to start and a battery. Also, some have a nice looking graphical display and some have a rotary encoder for driving an extended menu system.
Principle Behind Electronic Component Tester
For testing an electronic component, first, we need to insert it in a 3 pin socket. Then by pressing a push-button the testing device test the component and gives us some values. These include what is the part, which type of component, pin arrangement, and the value of the component. At last, the result will display on an OLED display via an I2C port.
- Arduino Nano
- OLED Display
- 470KΩ Resistor (x3)
- 680Ω Resistor (x3)
- Push Button
- Connection Wires
- Vero Board
- 9V Battery
For removing messy wiring and give a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I prefer PCBWay.
Gerber file for Electronic Component Tester Gerber.
Order PCB From PCBWay
There are so many forums or communities for electronics online in today’s technical world, and one of the famous ones for PCB manufacturing is the PCBWay. PCBWay is a place that brings manufacturers and customers together. They have more than a decade of experience in this field of fabrication prototyping and assembling PCBs. PCBWay have proved their focus to their customers’ needs in terms of cost-effectiveness, delivery, and quality.
How PCB Manufacturing Process Done in PCBWay
Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity by quality control in designing and manufacturing. At first, they ensure accuracy, clarity, validity of the PCB files that we sent to them.
Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Tester, X-Ray Inspection Machine, Automated Optical Inspection (AOI) Machine. PCBWay are having 50+ new engineers on the daily basis around the world using PCBs for their work, who trust for their reliable quality. They produce high-quality pink, orange, grey, even transparent solder mask. Moreover, according to people needs, they can also provide Black core PCB. Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.
Features of PCBWay
PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.
PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.
Open Source Community: It not only offers PCB Prototype & Assembly service but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.
3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.
PCBWay Store: More boutique gift modules are waiting for you to discover, giving your creativity wings. You can order all types of electronic equipment, components and many more with exciting offers. Go with the link and buy your needs, PCBWay Store.
Services: PCBWay offers great servicing of their products. It takes only 3 to 15 days according to courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.
Circuit And Working Principle of Electronic Component Tester
How do we connect the legs to the test pins?
There has a simple answer even if one tester has six pins and more, we need not worry about that. Because all devices have only three test pins and the remaining pins are somehow connected to these three pins.
Also, we thought about which test pin is used for what, where is ground and where should we connect both 2 legs and 3 legs components in the same three pins socket? The answer is we do not need to know that we just need to insert the components. The tester will find the pinout itself automatically.
How does the tester do it?
For that, we have to dig a little into the circuit diagram of the electronic component tester as well as the Arduino chip used in it. Let’s first talk about the Arduino chip. We all know that we can switch a pin as input or as output using the “pinMode” command. It has three possibilities ‘OUTPUT’, ‘INPUT’ and ‘INPUT_PULLUP’.
How do the engineers of Atmel solve the problem of creating these universal pins?
Here is the simplified diagram of a pin of an ATmega chip. It has three resistors and three switches as well as a connection to the analog to digital converter. Also, it has two diodes that protect the chip if you accidentally connect the pin to a negative voltage or two more than VCC. Here is also the secret behind the 5V compatibility of the ESP8266 for example.
On the ESP8266, VCC is only 3.3V and if you connect 5V to a pin, the diode D1 starts to conduct. If you would connect your power supply to the pin a very high current would flow across the D1 diode and it would destroy the chip in a millisecond. But if you connect the output pin of a sensor to the pin, the current is limited by this resistor inside the sensor chip. The diode reduces the voltage too little above VCC and the ESP is not destroyed.
Now come to our main project electronic component tester. Here we can forget about two diodes and also the pullup resistor because they are not needed. Let’s assume we configure our pins as an output. Then the switch SW is closed and the pin is either connected via 22Ω resistor to VCC or via 19Ω resistor to ground. These values are only approximations and can differ in reality.
Now we can switch the level of the pin using the command ‘digitalWrite(LOW)’ or ‘digitalWrite(HIGH)’. This command moves this switch but what happens to the level of the pin if we select pinMode input. Then SW is opened and the pin has a high impedance. It is only connected to the ADC (Analog Digital Converter) and has nearly no current that can flow. Each pin can have three different states i.e. ground, VCC and open. This is why such pins are also called three-state pins.
Markus knew about that. But he had a huge problem to overcome. The only thing such a pin can measure is voltage from 0V to 5V. and because all MCUs use clocks, they also can measure time.
He connected two resistors to each of the three test pins and then he connected these resistors to pins of the Arduino. Besides that, he attached one Arduino pin directly to the test pin. But as with all great things it has to be simple. If we simplify the drawing and arrange it a little different, we can choose seven possibilities for each test pin.
- Ground or VCC by a 680Ω resistor.
- Open ground or VCC via 470KΩ resistor, ground and VCC.
In addition to these seven possibilities, we can measure voltage. Now let’s connect a resistor between test pins 1 and pin 2. If we connect pin 1 to VCC and pin 2 to ground a current flows through the resistor. But I said Arduino only can measure voltage, no current. So Markus selects the 680Ω resistor for pin 1 and creates a voltage divider. Now the Arduino can measure the voltage at test pin 1 and calculate the resistor we insert it between test pin 1 and pin 2.
Of course, we can see limitations. The accuracy of the measurement heavily depends on the accuracy of the VCC of the 680Ω resistor and the ADC in the Arduino. VCC is usually not very precise. Then the suppliers should use precise 680 and 470KΩ resistors. If we talk about accuracy, we have to mention the reason for the 470KΩ resistor. It is used if we insert a high resistor of for example 1MΩ. Then the voltage at test pin 1 would be very close to VCC. Then the software changes to the 470KΩ resistor and the voltage are much lower. This is the next trick Markas used to get the vast range of detectable parts which acceptable accuracy. Now we are done with understanding the principle.
Let’s look at the next problem Markas faced. Here you have the whole mess of many different parts to distinguish and test. If we start with the passives, he has to detect resistors capacitors and inductors. Then Three Types of diodes. I know diodes usually are not passive. But the space here on the slide was handy to put them here.
By the way, do you know how to separate a standard diode from a Schottky diode? The Schottky diode has a much lower forward voltage of only around 0.3V. The standard diode has approximately 0.7V. This is why we often used Schottky diodes in power supplies. Now you see how Markas worked. He had to find a fingerprint for each part category and not only that but you had also to make sure that not two-part types have the same fingerprints.
Let’s go to the active components. If we start with transistors we have Bipolar Junction Transistor or BJT and Field Effect Transistor also called FET. In the BJT, we have NPN and PNP transistors. Then we have two categories of effect both available in N and P channel versions. But that’s not all we also have IGBTs, Thyristors and Triacs.
I don’t know how he thought that he could create a distinctive fingerprint for each category in this mess. But obviously, he believed it. On top of that, we never should forget this device has no clue which leg is inserted in which pin an additional complication. One thing you should also remember some of these parts are very delicate and can be destroyed by overvoltage or overcurrent especially if you do not know which pin is which and insert them the wrong way. So he has to make sure that the device never starts with a lethal voltage if it’s not 100% sure.
How to measure resistance with this tester?
To see the tester work, let’s have a look at the voltages of the three pins. The tester tries various things and based on each measurement, it selects new tests until it is clear that a resistor is between pin 1 and pin 2. Then it measures its resistance and displays the result. The resistor by the way is a 1.5KΩ resistor and the multimeter measures 1.45KΩ and the component tester measures it as 1.47KΩ. If we connect the same resistor between test pin 1 and pin 3, the tester has to select a different test pattern. But in the end the reading is the same.
Now let’s try with a capacitor. Here we have to talk a little on how we can measure capacity with this poor Arduino which is blind on nearly all eyes. Only can measure voltages and time. If we connect a resistor in series to a capacitor, it is charged over time. As you know now the tester easily can create such a diagram by connecting VCC via 680 ohm resistor. If we wait a specific time, we can switch pin 1 OFF and measure the voltage. Now we can calculate the capacity because we know all parameters of the formula. Let’s see the result.
Click here to download the code.