Built-in project · no microcontroller

TL431 5 V reference

A TL431 on 12 V through 680 ohm with two 10 k resistors: Vka = 2.495 V x (1 + R1/R2) + Iref x R1, about 5.0 V on the meter. There is no microcontroller in it: the simulator solves the 6 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 15 minutes to build and run. Runs in your browser. Free, and no account needed.

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

The circuit runs here once the page has loaded.

What you'll learn

  • Analog
  • School
  • Choosing and reading a resistor
  • Using the DC jack and adapter
  • Difficulty: Beginner
  • Time: About 15 minutes
  • Parts: 6

How it works

A TL431 on 12 V through 680 ohm with two 10 k resistors: Vka = 2.495 V x (1 + R1/R2) + Iref x R1, about 5.0 V on the meter.

There is no code. The simulator solves DC jack and adapter, TL431 shunt reference, Multimeter, Resistor, 680 Ω, Resistor, 10k Ω as it is wired, so change a value in the editor and watch the result.

Parts list

6 parts, plus the jumper wires and a bench instrument. The parts retail for about $7.45; 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
Resistor, 680 Ω pin 1DC jack and adapter pin V+
DC jack and adapter pin V-Ground
TL431 shunt reference pin AGround
Multimeter pin COMGround
Resistor, 10k Ω (2) pin 2Ground
Resistor, 10k Ω (1) pin 2TL431 shunt reference pin REF
Resistor, 10k Ω (2) pin 1TL431 shunt reference pin REF
Multimeter pin VTL431 shunt reference pin K
Resistor, 680 Ω pin 2TL431 shunt reference pin K
Resistor, 10k Ω (1) pin 1TL431 shunt reference pin K

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
// A TL431 5 V reference.
//
// There is no microcontroller here. Press Run and the simulator solves the
// circuit; the meter shows the cathode voltage and the number under the
// TL431 is the current through it.
//
// WHAT IT IS. A TL431 is a Zener you can set. It sinks whatever current it
// takes to hold its REF leg 2.495 V above its anode, and no more. R1 (10 k,
// cathode to REF) and R2 (10 k, REF to ground) are a divider, so the cathode
// has to sit at twice REF before REF reaches 2.495 V:
//
//     Vka = 2.495 V x (1 + R1 / R2) + Iref x R1
//         = 2.495 x 2 + 2 uA x 10 k = 5.01 V
//
// The 2 uA is the current REF itself draws, the datasheet's second term.
// The meter reads 5.00 V: the reference also drops 1.4 mV for every volt on
// the cathode (TI's dVref/dVka), 3.5 mV here, and twice that at the cathode.
//
// THE FEED RESISTOR. 680 ohm from 12 V carries (12 - 5) / 680 = 10.3 mA.
// The divider takes a quarter of a milliamp and the TL431 the rest, about
// 10 mA. It needs at least 1 mA (0.4 mA typical) to regulate at all.
//
// THINGS TO TRY. Make R2 4.7 k: 2.495 x (1 + 10/4.7) = 7.8 V. Make R1 a wire
// (0 ohm) and take R2 off: REF on the cathode, a 2.495 V Zener. Make the feed
// resistor 47 k: about 0.15 mA, under the minimum, and the output sags. Put a
// 1 k load on the output: it takes 5 mA from the TL431, and the output moves
// by only the 0.2 ohm dynamic impedance times 2, a couple of millivolts.

Troubleshooting

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

  • Board gets too much voltage and overheats or dies. DC jack and adapter
    Check the adapter voltage before plugging in. Boards like the Uno want 7 to 12 V on the jack. A 5 V part wired to a 12 V supply can be destroyed.
  • Nothing powers on, or the polarity is backward. DC jack and adapter
    Most barrel jacks are center positive, but some are not. Check the label on the adapter, and make sure the adapter can supply enough current for the load.
  • The reading is zero, negative or nonsense when measuring voltage. Multimeter
    Set the dial to volts first, then touch the probes across the part, in parallel. Red goes to the more positive point. A negative number just means the probes are swapped.
  • Measuring current gives zero or blows the meter's fuse. Multimeter
    Current must flow through the meter, so break the circuit and put the meter in series. Never put an amps setting straight across a supply. Start with the highest current range.
  • The LED is dim, burns out, or the pin reads wrong because the resistor value is off. Resistor
    Read the color bands again. A 220 ohm to 330 ohm resistor suits a typical LED on 5 V. 10k is a common pull-up or pull-down value. Check with a multimeter if unsure.
  • A pull-up or pull-down resistor is missing, so the input floats and reads random values. Resistor
    Tie the input to 5 V or ground through about 10k. Or use INPUT_PULLUP and wire the switch to ground.

Change it and keep it

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