← Validation Lab Bench 1 · Temperature monitor I2CUARTPython simulator
Clean run STR-TMP-002: ready

Stage 01 · Clarify

Before any test: what does the spec not say?

The brief arrives as one paragraph, like in an interview. It becomes numbered requirements only after the questions below.

The brief, as given

v1.0

A temperature monitor reads an I2C sensor and sends TEMP <value> over UART once per second. It measures -20 to 85 °C with ±1 °C accuracy. An LED turns on above 80 °C and turns off again with hysteresis. It must work across the 5 V supply tolerance and behave in a defined way outside the measuring range.

How would you test it?

Blocks found while reading: sensor (I2C) → measurement → threshold & LED → UART formatter, with supply across all of them. Each block gives rows to the matrix.

Requirements after review

v1.1
IDRequirementVersion
TMP-01Accuracy ±1 °C across -20 to 85 °Cv1.0
TMP-02One message per second, period 1000 ± 50 msv1.1 · Q1
TMP-03Format TEMP <integer>, negatives as TEMP -5v1.1 · Q7
TMP-04LED on above 80 °C, off below 78 °C. At exactly 80 °C the LED stays off.v1.1 · Q2 Q3
TMP-05Works across a 4.75 to 5.25 V supplyv1.1 · Q6
TMP-06Outside -20 to 85 °C: send ERR RANGE, no readingv1.1 · Q5
TMP-07Sensor not answering: ERR SENSOR within 2 s, recovers by itselfnew · Q4

Questions to the spec

Seven questions before the first test, twelve still open.

19 questions 5 changed 1 new requirement 1 clarified 12 open
Q1What does "once per second" allow?TMP-02 → v1.1

Why it matters

A period without a tolerance can never fail, so it cannot be tested.

Assumed answer

1000 ms ± 50 ms between consecutive messages.

Effect on the spec

TMP-02 → v1.1

Q2What is the hysteresis?TMP-04 → v1.1

Why it matters

Without it the LED test has no expected result on the way down.

Assumed answer

The LED turns off below 78 °C.

Effect on the spec

TMP-04 → v1.1

Q3At exactly 80 °C: on or off?TMP-04 clarified

Why it matters

"Above" is ambiguous right at the edge, where bugs live.

Assumed answer

Strictly above: at 80 °C the LED stays off.

Effect on the spec

TMP-04 clarified

Q4What if the sensor stops answering?TMP-07 added

Why it matters

The most common field fault is missing from the spec.

Assumed answer

ERR SENSOR within 2 s, readings resume by themselves.

Effect on the spec

TMP-07 added

Q5What is "defined behaviour" outside the range?TMP-06 → v1.1

Why it matters

An undefined result cannot be checked.

Assumed answer

Send ERR RANGE and never publish the value.

Effect on the spec

TMP-06 → v1.1

Q6Which supply band is "5 V tolerance"?TMP-05 → v1.1

Why it matters

The configuration tests need real numbers.

Assumed answer

4.75 to 5.25 V.

Effect on the spec

TMP-05 → v1.1

Q7How are negative values and resolution sent?TMP-03 → v1.1

Why it matters

The format check must cover the minus sign.

Assumed answer

Whole degrees, TEMP -5.

Effect on the spec

TMP-03 → v1.1

Q8Within how long must readings resume after the sensor answers again?open · TMP-07

Why it matters

"recovers by itself" has no time limit, so it can never fail.

Assumed until answered

Readings resume within 2 s after the sensor answers again, the same limit as the way into ERR SENSOR. TC-TMP07-UPG-01 and TC-TMP07-FI-02 use 2 s.

Effect on the spec

open · TMP-07

Q9Does the LED compare the raw sensor value or the rounded whole number, and is the value rounded or truncated?open · TMP-03 TMP-04

Why it matters

At 80.4 °C the device reports "TEMP 80", so an LED that is on looks like a bug.

Assumed until answered

The LED compares the raw sensor value. The value on the line is rounded half away from zero: 80.5 °C gives TEMP 81, -0.5 °C gives TEMP -1. Python's round() uses banker's rounding (round(80.5) is 80), a known bug source at x.5.

Effect on the spec

open · TMP-03 TMP-04

Q10Are -20 °C and 85 °C inside the valid range?open · TMP-01 TMP-06

Why it matters

The edges are where range bugs live (see B3).

Assumed until answered

-20 °C and 85 °C are inside the valid range: TEMP -20 and TEMP 85 are readings. The range check compares the raw value, the same as the LED, so 85.1 °C and -20.1 °C give ERR RANGE.

Effect on the spec

open · TMP-01 TMP-06

Q11Is the ±50 ms limit per message only, or is there also a long-term limit, such as messages per hour?open · TMP-02

Why it matters

Slow drift can pass every single interval (see B5).

Assumed until answered

The ±50 ms limit applies to each interval only. There is no long-term limit, so TC-TMP02-STR-01 checks every interval over 12 h and nothing more.

Effect on the spec

open · TMP-02

Q12What is the LED state at power-up and during ERR SENSOR or ERR RANGE?open · TMP-04

Why it matters

The fault states have no expected LED result.

Assumed until answered

Fail-safe. During ERR SENSOR the LED is on. During ERR RANGE above 85 °C it is on, below -20 °C it is off. At power-up it is off until the first reading. After an error the hysteresis continues from the LED state shown during the error: on after ERR SENSOR and after ERR RANGE above 85 °C, off after ERR RANGE below -20 °C. There is no memory of the state before the error. No case checks the LED in these states yet (TMP-04 UPG gap).

Effect on the spec

open · TMP-04

Q13During an error, is the ERR message sent every second or only once?open · TMP-02 TMP-06 TMP-07

Why it matters

The timing tests need to know which messages count.

Assumed until answered

While an error lasts, one ERR message replaces each reading, every period. Until the answer, cards accept one ERR or one per period, and the period during an error is not checked (TMP-02 FI gap).

Effect on the spec

open · TMP-02 TMP-06 TMP-07

Q14Which line ending and UART settings are used, and is -0.4 °C sent as "TEMP 0" or "TEMP -0"?open · TMP-03

Why it matters

The format check needs exact bytes.

Assumed until answered

115200 baud, 8N1, each line ends with LF. -0.4 °C is sent as TEMP 0, -0.5 °C as TEMP -1, never TEMP -0. The simulator has no baud rate; the real lab uses these settings.

Effect on the spec

open · TMP-03

Q15What must happen outside 4.75 to 5.25 V?open · TMP-05

Why it matters

A brown-out must never produce a wrong reading.

Assumed until answered

Outside 4.75 to 5.25 V the device may go silent or send an ERR line, but never a wrong reading or a corrupt line. Above 5.25 V the device is silent with the LED off. After the supply returns it sends its first reading within 2 s.

Effect on the spec

open · TMP-05

Q16How fast must the LED react after the threshold is crossed?open · TMP-04

Why it matters

A card expects "within 1.5 s", but no requirement says so.

Assumed until answered

The LED follows a threshold crossing within 1.5 s, the value of the design's model card.

Effect on the spec

open · TMP-04

Q17Does the device expose diagnostics such as error counters or logs?open · TMP-06 TMP-07

Why it matters

The OBS cards need a source.

Assumed until answered

The device has no diagnostics beyond its UART lines and the LED. The OBS cards check the error lines only.

Effect on the spec

open · TMP-06 TMP-07

Q18Does the device read anything on UART RX?open · TMP-03

Why it matters

SEC is not applicable for the bench only if there is no input path.

Assumed until answered

The device reads nothing on UART RX. With no input path, SEC is not applicable for the bench.

Effect on the spec

open · TMP-03

Q19Must one failed sensor read trigger ERR SENSOR, or only a failure that lasts longer?open · TMP-07

Why it matters

One bus glitch would raise a false alarm.

Assumed until answered

The first failed sensor read triggers ERR SENSOR. A single bus glitch therefore gives one ERR SENSOR line.

Effect on the spec

open · TMP-07

In a real project these go to the system engineer. Here the answers are assumptions, written into the STP under Assumptions.

Next: the test plan →