Part Ninja part recognition
The Part Ninja initially tests the part for conduction paths. A conduction path exists if current flows from one pin to the other. Since the Part Ninja ha 3 test pins, number of possible conduction paths is 6. Each 2 pin combination can have conduction paths in both directions.
Since almost all parts have different combinations of conduction paths, it is possible to guess the part type, and pinout through these tests.
What about the 3rd pin that isn't tested for conduction
While the two pins are tested something has to be done with the 3rd pin, cause it's at an undetermined state. We chose to run the tests twice, once while the 3rd pin is briefly held LOW, before it is disconnected, and once when it's held HIGH. This way we know what the state of the pin was prior to testing and can draw conclusions accordingly.
Conduction diagrams for each part type. The arrows are conduction paths, for example, if there is an arrow 1->2, this means there is a conduction path found, with the current flowing through pin 1 and into pin 2, etc..
N-channel Junction FET
Due to it's internal semiconductor construction a N-channel Junction FET has the flowing characteristic conduction paths:
Once the initial testing is done, and the conduction paths are recognized as N-JFET, the pinout is determent at the same time.
P-channel Junction FET
Due to it's internal semiconductor construction a P-channel Junction FET has the flowing characteristic conduction paths:
Once the initial testing is done, and the conduction paths are recognized as P-JFET, the pinout is determent at the same time.
N-channel MOSFETs have an isolated Gate pin, and an internal parasitic diode. In our tests when, the 3rd pin is connected to the gate and is temporally held LOW, the gate to source voltage discharges and the drain->source conduction path is closed (left pictogram). While the gate is temporarily held HIGH, the gate to source voltage charges, and the drain->source conduction path is open (right pictogram). Because of the parasitic diode between source and drain (Anode at source, Cathode at drain), there is a conduction path source->drain, no matter at what charge the gate is.
P-channel MOSFETs have an isolated Gate pin, and an internal parasitic diode. In our tests when the 3rd pin is connected to the gate and is temporally held LOW, the gate to source voltage discharges and the source->drain conduction path is open (left pictogram). While the gate is temporarily held HIGH, the gate to source voltage charges, and the source->drain conduction path is closed (right pictogram). Because of the parasitic diode between drain and source (Anode at drain, Cathode at source), there is a conduction path drain->source, no matter at what charge the gate is.
NPN Bipolar Junction Transistor
As the name suggests BJT transistors have 2 conduction paths. In the case of the NPN type the two paths start at the 'base' pin and end in the 'collector' and 'emitter' pins respectfully.
To differentiate them form Common Anode double diodes, we run an additional test where we connect the suspected 'base' pin to HIGH through a 680 Ohm resistor, and one of the other pins to GND, while the 3rd pin is connected to HIGH (5V) through a resistor. IF there is conduction through the non 'base' pins, it is a NPN transistor, if not it's a 'Common Anode double diode'.
Common Anode double diode
This double diode arrangement has conduction paths stemming from the Anode to the other two pin. In initial testing it acts the same as a NPN BJT transistors so further testing(as mentioned above), is done to differentiate the two.
PNP Bipolar Junction Transistor
Similar to NPN, PNP BJT have two conduction paths, only this time both of them end in the same pin, 'base', while the other two pins are the start points. As with 'NPN' and 'CA', 'Common Cathode double diodes' act the same as PNP transistors in initial testing.
To differentiate them, further testing is done by connecting the suspected 'base' pin to 'GNG' through a 680 Ohm resistor, while one of the other pins is brought directly to HIGH. The last is brought to 'GNG' through a 680 Ohm resistor. If there is conduction in the two non 'base' pins then the Part Ninja knows it's dealing with a PNP BJT transistor, if there isn't any conduction it knows it's a 'Common Cathode double diode'.
Common Cathode double diode
This double diode arrangement has conduction paths conducting towards the Cathode, form the other two pins. In initial testing it acts the same as a PNP BJT transistor so further testing(as mentioned above), is done to differentiate the two.
Diode is the only part that has only one conduction path, and it is the same regardless of how the 3rd pin is connected, since a diode has only 2 pins.
Once initial testing is done, the Part Ninja recognizes it as a diode, and the pinout is quickly determined.
High capacitance Capacitors, low resistance Resistors, (Vx<5v) Zener Diodes, and Anti-parallel double diodes
High capacitance capacitors, low resistance resistors, Zener diodes with Vz<5v, and double diodes in anti parallel configuration all have the same number of conduction paths in initial testing. They act as a bidirectional condition path between two test pins. Further testing is needed to determine which is which.
5 consecutive tests are run to properly identify these devices. The first test connects test pin1 to 5v through a 470k resistor, while test pin 2 is connected to GND. The voltage on the test pin1 is read, and stored. The second test is identical, and is run a few milliseconds after the first. If the second test voltage is higher then the first test by value greater the noise generated, the part is a capacitor that charged during the small delay. if not testing continues.
The third, and forth test use the same configuration as the first two, only the resistor is changed from 470k to 680R. And same as in the first two, if the voltage between the second two tests is different, the part must be a capacitor. If not testing continues.
The fifth test connects the test pin 1 to GND, while connecting the test pin2 to 5v through a 680 resistor. If there is a large difference between the test 4 and test 5 voltages, the part must be a Zener diode, and the voltages are Vz, and Vd respectfully. If not testing continues.
Now the 2nd and 4th test voltages are compared (same setup, only different series resistors) if the voltages are different the Part Ninja concludes the part must be a low resistance resistor, if not then it must be a anti-parallel double diode.
High capacitance Capacitors
Part Ninja identifies a capacitor by the fact that the voltage increases over time as the capacitor charges.
Zener Diode ( Vz<5V )
A Zener is recognized by the fact that when current flows in one direction the gap voltage is larger, then when the current passes in the other direction.
Low resistance Resistors
Part Ninja identifies a resistor by the fact that the voltage when it is connected through another resistor is constant in time, and is the same in any direction you place it. The voltage changes only when a different series resistor is placed.
Anti-parallel double diode
Anti-parallel double diode is recognized by the Part Ninja because no matter what parameter you change in the test circuit the *drop voltage is always the same.
- disclaimer: this is not totally true, as the voltage changes slightly depending on the current flowing through a diode, but this is calibrated to be ignored by the Part Ninja. Same is true for Zener diodes.