TactivergeLite

Lite / Building Machines That Respond / Week 18

Project: build, test every row and light the indicator

Your interlock logic passes the rows you tried. Did you try all sixteen? And will its 'RUN' light survive being switched on?

About 45 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

A design is only as good as its evidence. Exhaustive testing is possible for small logic, so engineers do it, and the indicator light that tells an operator 'RUN' is a real circuit with real current limits.

Safety: Everything here is a low-voltage simulation. Never experiment with mains electricity or high-current batteries; real circuits are built only under supervision with a small, current-limited low-voltage supply.

Predict

A 5 V logic output drives a red LED (2.0 V) through 330 Ω. Roughly what current flows?

  1. About 9 mA
  2. About 15 mA
  3. About 30 mA
Guess first, then reveal

I = (5 − 2) ÷ 330 ≈ 9.1 mA: bright enough for an indicator and well under a typical 20 mA LED rating.

Discover

Choose the LED circuit with a red LED on 5 V (standing in for the interlock's logic output). Set the resistor to 330 Ω and read the current and the resistor's power. Try 150 Ω and 1 kΩ too, and pick the value you would use, with a reason. Then test your interlock gates in the logic lab, recording all 16 rows.

What the interactive shows (text version)

In the circuits lab's LED circuit on 5 V with a red LED, 330 ohms gives about 9.1 mA with the resistor dissipating about 27 mW; 150 ohms gives 20 mA, right at a typical LED rating; 1 kΩ gives 3 mA, dim but safe. The interlock's 16 input combinations are tested in the logic lab and logged against the expected outputs.

You can also open the interactive on the full site when you have a faster connection.

Understand

Test every row

With 4 inputs there are only 16 combinations, so test all of them and record the output next to the expected value. Pay special attention to the single-fault rows from the previous lesson. A design that has passed every row has been verified against its truth table.

The indicator circuit

Treat the logic output as a 5 V source when Y = 1. For a red LED (2.0 V) and a target of about 10 mA: R = (5 − 2) ÷ 0.010 = 300 Ω; the next standard value up is 330 Ω, giving I ≈ 9.1 mA. Resistor power: P = 3 V × 0.0091 A ≈ 0.027 W, far under 0.25 W.

Check the output can supply it

Logic outputs can only supply a limited current; many can manage around 10–20 mA, but the real limit is on the chip's datasheet. Keeping the LED near 9 mA leaves margin. A bigger load, such as a motor or relay coil, needs a transistor driver, never a logic pin directly.

The design record

Present: the specification, the truth table, the gate design, the 16-row test log, the LED calculation with its simulated check, and the limitations. That record is what the term assessment looks at.

Explain it another way

Intuitive

Testing every row is like checking every door in a building before locking up, not just the ones you remember.

Technical

Exhaustive testing of an n-input combinational block needs 2ⁿ vectors and proves functional correctness against the specification (not against the specification's own mistakes). Output drive is limited by the gate's output resistance and absolute maximum current ratings.

Mathematical

R = (5 − 2) ÷ 0.010 = 300 Ω → 330 Ω. I = 3 ÷ 330 = 9.09 mA. P_R = 3 × 0.00909 = 0.0273 W. P_LED = 2.0 × 0.00909 = 0.018 W.

Applied

Machine-safety test procedures list every input combination and the required result, and a person signs off each line. Indicator lamps on control panels are sized to be visible without stressing the electronics that drive them.

Worked example 1

The operator wants a brighter light, so you try 150 Ω. Is it within a 20 mA LED rating?

I = 3 ÷ 150 = 20 mA: right at the rating, with no margin for tolerance (a 5% low resistor gives about 21 mA). Stay with 220 Ω (13.6 mA) or 330 Ω.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

mA

mW

Ω

Practice 4. Your interlock passes 15 of its 16 rows in testing; you skipped one because 'it obviously works'. What should you do?
Practice 5. Could the interlock's logic output drive the machine's motor directly?

Apply it

Submit your design record: specification, 16-row truth table, gate design built in the logic lab, 16-row test log with expected and actual outputs, LED resistor calculation checked in the circuits lab, and a limitations list. Use the term project rubric to check your own work before you hand it in.

Reflect

What is one thing your tests proved, and one thing they could not prove?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Project: specify a fault-tolerant interlockA whole computer on one chip →