Built-in project · no microcontroller

What is this part?

Two component testers with unknown parts in the sockets: one names a transistor and finds its base, collector and emitter, the other tells an LED from a diode. There is no microcontroller in it: the simulator solves the 4 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.

Teaching? Assign it to your class in one click.

Beginner About 10 minutes to build and run. Runs in your browser. Free, and no account needed.

The parts retail for about $3.20. On Mokxi they're free.

The circuit runs here once the page has loaded.

What you'll learn

  • Transistor legs are not marked, so you have to measure them
  • Telling an LED from an ordinary diode by its voltage drop
  • What gain (beta) means for a transistor
  • Why a component tester can only name one part at a time
  • Difficulty: Beginner
  • Time: About 10 minutes
  • Parts: 3

How it works

There is no code here. Two component testers each have three sockets. On the left, a transistor sits in sockets 1, 2 and 3 (collector, base, emitter). On the right, a red LED sits across sockets 1 and 2, with the anode on 1.

Each tester drives its sockets through twenty-four phases in about a tenth of a second, measures the currents and voltages that come back, and works out what the part must be. The left screen names an NPN transistor, its gain, and which socket holds the base, collector and emitter. The right one names an LED and its anode.

A tester measures one part at a time. If two parts share the sockets, it says it cannot tell rather than guessing.

Parts list

3 parts, plus the jumper wires and 2 bench instruments. The parts retail for about $3.20; on Mokxi they're free, and so are the instruments.

Wiring table

Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.

Part and pinConnects to
Component tester (1) pin 3Transistor (NPN or PNP) pin E
Component tester (1) pin 2Transistor (NPN or PNP) pin B
Component tester (1) pin 1Transistor (NPN or PNP) pin C
Component tester (2) pin 1LED, red pin A
Component tester (2) pin 2LED, red pin C

The notes that come with it

There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.

sketch.ino
// What is this part, and which leg is which?
//
// Two testers, two unknowns. Each one drives its own sockets in twenty-four
// phases over about a tenth of a second, and names what the currents and
// voltages it got back can only be.
//
//   the left one   a small-signal NPN with its legs in 1, 2 and 3. The screen
//                  says NPN, the gain it measured, the base-emitter drop at
//                  the current it measured it at, and (the reading you
//                  actually wanted) which socket the base, the collector and
//                  the emitter are in. A transistor's legs are not marked.
//   the right one  a red LED. LED rather than DIODE, because it drops far more
//                  than a silicon junction does, and the anode is named.
//
// Drag anything else across a tester's sockets and it will give it a try: a
// resistor (value, and which two sockets), a capacitor from about 0.1 uF up, a
// diode, a p-channel or n-channel MOSFET. Turn a part round in the sockets and
// the answer follows it round.
//
// What it cannot do, said plainly:
//
//   One part at a time. Two parts across the sockets at once is one thing it
//   cannot name, and it says so rather than guessing.
//   No inductors: measuring one needs an AC source this does not have.
//   No MOSFET threshold voltage: the gate is driven to one level rather than
//   swept, so what comes back is the on-resistance at 5 V on the gate.
//   No Zener voltage: it tests at 5 V and most Zener knees are above that, so
//   a Zener reads as an ordinary diode.
//   Capacitors under 0.1 uF go to the multimeter's capacitance range instead,
//   which reaches down to a nanofarad.
//
// And the honest caveat: the parts it is measuring are Mokxi's model cards, so
// the gain it reads is the beta the card was given, seen through one operating
// point. A real tester on a real transistor measures a device that is warmer
// than its datasheet and disagrees with the next one out of the reel.

Troubleshooting

The usual mistakes with this circuit, and the fix for each.

  • The tester will not name the part This project
    Make sure only one part is across its three sockets. Two parts at once cannot be told apart.
  • A small capacitor reads wrong or not at all This project
    The tester only handles capacitors from about 0.1 uF up. Use the multimeter's capacitance range for smaller ones.
  • The load never turns on, or is always on, because the legs are in the wrong order. Transistor (NPN or PNP)
    Check the pinout in the datasheet for your part. A 2N2222 or BC547 can have emitter, base, collector in a different order. Flat side orientation is easy to get wrong.
  • The base is wired straight to the pin with no resistor, or the motor has no flyback diode. Transistor (NPN or PNP)
    Put about 1k between the pin and the base. For motors and relays, add a diode across the coil with the stripe toward the positive side.
  • The LED does not light, or it lights once and then dies. LED
    LEDs have polarity. The longer leg (anode) goes toward the positive side. Always add a series resistor, about 220 ohms to 1 k ohm on a 5 V pin.
  • A blue or white LED stays dark on 3.3 V. LED
    Blue and white LEDs drop about 3 V, so 3.3 V leaves almost nothing for the resistor. Use a 5 V supply, or a smaller resistor and a red or green LED.
  • The tester gives wrong or odd results. Component tester
    Insert the part so it makes contact in all of the sockets it needs. Discharge capacitors first. Any part still in a circuit gives wrong readings.
  • A reading is surprising. Component tester
    Check the leg mapping the tester reports, which tells you which leg is which. Large capacitors and tiny values are less accurate, so expect some error.

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.