Zum Inhalt springen

English:Testing and improving an electronic design - Electronics Year 10

Aus MOOCsWiki Staging
aiMOOC-Siegel aiMOOC

Testing and improving an electronic design - Electronics Year 10

QR-Code



Introduction

A simulated classroom equipment tray should show a reminder after two consecutive high sensor readings. Write a testable requirement, find why one version misses a reminder, then prove which part of the correction works and which cases still need testing.


Make a requirement that someone else can test

The tray indicator starts off. The sensor produces a simulated voltage once per second. At least 2.80 V counts as high, including exactly 2.80 V. After two high samples in a row, the indicator must be on. A sample below 2.80 V resets the count and turns it off. While the voltage stays high, the reminder stays on once triggered. These choices are a fictional design specification.

Record the starting state, sample interval, threshold, expected state and the reason for that state. “Turns on quickly” gives little basis for agreement between testers. “On at sample 2 if the first two readings are independently classified as high” gives a decision both people can check. A single high sample is an ordinary negative control. A value right on 2.80 V is a boundary case. A drop between high readings tests whether the count resets.

Record the indicator as either on or off and add a visible symbol or text label so observers can read the output without relying on colour. The test uses a paper or software model.


Predict before observing

Three useful test points are the sensor value, the decision flag for the current sample and the final indicator state. Recording the intermediate flag can show where a mismatch begins. Start with a fresh state for each row in the next table. In a three- or four-sample run, reset the state only at the start of the row.

Case Simulated sensor readings (V) Expected indicator trace First run, version A
Both clearly high 2.81, 2.83 Off, On Off, On
Exact boundary first 2.80, 2.83 Off, On Off, Off
Below the boundary first 2.79, 2.83 Off, Off Off, Off
Interrupted high readings 2.82, 2.75, 2.83 Off, Off, Off Off, Off, Off
Clear after turning on 2.81, 2.86, 2.75 Off, On, Off Off, On, Off
Remain on until clear 2.81, 2.86, 2.82, 2.75 Off, On, On, Off Off, On, On, Off

Observation task: identify how a reading reports a quantity and a unit. Written route: label the virtual sensor readings as voltages and describe the reference in your test record. A reading of 2.80 V and one of 2.80 mV represent different cases. Use evidence from the virtual input before deciding that the output is at fault.

Digital multimeter with selector, display and probes
The instrument photo illustrates the importance of measurement mode. This exercise reads values from a simulated record. Photograph by K.Venkataramana.


Find the earliest signal that differs

For the failing row, the simulated sensor log is correct at 2.80 V and 2.83 V. The first-run decision flags recorded for those two samples are 0 then 1. The written rule needs 1 then 1. The later indicator behaviour is consistent with the incorrect decision flags. The earliest documented mismatch is therefore in classification at the threshold.

One possible cause is use of strictly greater than 2.80 V. Another is comparing with a different threshold just above 2.80 V. A pair of outputs alone does not distinguish them. Inspection of version A shows that its model comparison used strictly greater than 2.80 V. For version B change just that comparison to at least 2.80 V. Keep the original result and label the new run separately.

Use test cases with 2.79 V, 2.80 V and 2.81 V as the first sample, followed by the same high reading. Change one input at a time, keeping the starting state and second sample fixed. This lets the first classification explain the eventual indicator change.


Run the corrected model and record the evidence

Use integer millivolts in the teaching model so the exact boundary is explicit. The simple counter records consecutive high samples. Reset it when a low sample arrives. The same logic can be followed by hand with two tally marks.

def indicator_trace(samples_mv):
    consecutive = 0
    trace = []
    for value in samples_mv:
        if value >= 2800:
            consecutive += 1
        else:
            consecutive = 0
        trace.append("On" if consecutive >= 2 else "Off")
    return trace

for value in [2790, 2800, 2810]:
    print(value, indicator_trace([value, 2830]))

The three outputs are Off–Off, Off–On and Off–On respectively. Re-run the remaining original cases as well. A regression check verifies behaviour that already worked, such as clearing immediately after a low sample.

Two traces on an oscilloscope screen with ramps and high and low plateaus
Separate traces can help relate an input change to an output change. This instrument photo is illustrative. Photograph by Xato.

Observation task: notice how signals can be related to a time axis. Written route: in a paper timing diagram label sample 1, sample 2 and the corresponding indicator states. Show where the state changes if the previous sample was already high.


Justify the improvement and state its scope

Summarise the change with the requirement, the failing test, the first mismatched signal and the evidence from the retest. Here, the correction makes the simulated model count exactly 2.80 V as high while preserving the observed responses below the boundary, above it and after a reset.

A separate design question is what happens if physical sensor uncertainty moves readings across the threshold. One possible improvement would require a stated uncertainty allowance or a tolerance band. That would be a different requirement with new expected cases. Ask what delay or ambiguity the user can accept before proposing it.

Test evidence should name the model version and allow another person to reproduce the result. Include a table or trace and an explanation of which cases you actually checked. Software and paper evidence in this course address the stated model. An equipment test would need its own design limits, supervision and measurement evidence.


Interactive Tasks


Quiz: Test Your Knowledge

What must happen at exactly 2.80 V in the stated requirement? (It counts as a high sample.) (!It is automatically discarded.) (!It is always treated as low.) (!It turns the reminder on immediately on the first sample.)



Why start each table row with a fresh state? (To keep earlier cases from affecting the new one.) (!To change the threshold every time.) (!To eliminate the need for expected results.) (!To avoid checking what happens within each row.)



What is expected for 2.82, 2.75 and 2.83 V? (Off, Off, Off) (!Off, Off, On) (!Off, On, Off) (!On, On, On)



Which first-run case failed? (The case starting exactly at the boundary.) (!The case with both values clearly high.) (!The case with an interrupted run of high values.) (!The case that clears after turning on.)



Where was the earliest documented mismatch? (In the intermediate flag for the boundary sample.) (!In the recorded sensor voltage for both samples.) (!In the indicator reference photo.) (!In the first run’s sample spacing.)



Why test 2.79 V, 2.80 V and 2.81 V? (To look below, on and above the boundary while keeping the next value the same.) (!To treat different units as equivalent.) (!To create three unrelated thresholds.) (!To show that every high reading should turn the reminder on immediately.)



What change does version B make? (Include equality in the high comparison.) (!Turn on after one high sample.) (!Keep the count after low readings.) (!Compare with a value above 2.80 V.)



Why repeat the cases that originally passed? (To check that the change did not break them.) (!To increase the count without testing the rule.) (!To make the previous failure disappear from the record.) (!To assume the threshold can no longer be tested.)



What is the corrected trace for 2.81, 2.86 and 2.75 V? (Off, On, Off) (!On, On, Off) (!Off, Off, On) (!Off, Off, Off)



What needs a separate requirement? (A rule for the effect of sensor uncertainty near the threshold.) (!The unit of an already specified input voltage.) (!The existing version A observations.) (!The description of the unchanged simulation clock.)





Memory Game

Expected result Prediction from the requirement before running a test
Observed result Value recorded in a particular run
Two consecutive high readings Indicator turns on in the stated design
One reading below threshold Count resets and indicator is off
Version A Used the strict threshold comparison
Version B Includes the exact threshold value





Drag and Drop

A high sample followed by a below-limit sample Check that the consecutive count resets
2.80 V followed by 2.83 V Check that equality is included
The input readings match but the flags differ Inspect the threshold classification stage
An already passing case is repeated Check for regression
A new rule for uncertain sensor values Write a revised requirement and new test cases





Crossword Puzzle

Requirement Statement of behaviour a design must satisfy
Boundary Value exactly at a limit in a decision rule
Regression Check of previously working behaviour after a change
Sample One simulated reading at a stated time
Decision Intermediate result that classifies the current reading
Trace Sequence of states recorded across time





LearningApps

Optional extra practice. Choose an appropriate activity with your teacher. If the external collection is unavailable, use the native activities and independent tasks in this course.


Cloze Text

Complete the explanation.
A testable design begins with a

. Write the expected result before recording an

. A

test uses a value right at the decision edge. After a reading below the threshold, the count must

. A repeated check of previously working behaviour is a

test. The record includes the model

.



Open Tasks


Easy

  1. Read the boundary: Which value starts the high classification in the specification?
  2. Find the reset event: What happens to the count after a sample below threshold?
  3. Separate evidence: Name one predicted value and one observed value in the failing case.
  4. Read the trace: What happens on the second sample of the clearly high case?


Standard

  1. Trace a sequence: Predict the indicator states for 2.79, 2.80, 2.81 and 2.79 V in order.
  2. Explain the mismatch: Use the decision flags to say where the first-run comparison failed.
  3. Design a boundary check: Choose two readings to test the exact threshold and explain the expected output.
  4. Select a regression check: Choose an earlier passing case that checks the clear behaviour.


Advanced

  1. Distinguish explanations: Explain why the two observations alone do not identify a strict comparison versus a shifted threshold.
  2. Write a new requirement: Specify one policy for a reading with uncertainty that crosses the threshold and provide a test case.
  3. Test a longer run: Choose a trace that tests a third high sample and a later reset.
  4. Prepare evidence for a partner: Describe the versions, starting state and signals another tester would need to reproduce your result.



Learning Check

  1. Make a precise test rule: Give the expected behaviour after two successive readings exactly at the threshold.
  2. Trace the intervention: At 2.80 V followed by 2.83 V, compare the version A and version B outputs.
  3. Locate the discrepancy: The log shows the expected voltages but an unexpected first comparison flag. Where should the next check focus?
  4. Choose a regression test: How would you verify that a low reading still clears an on reminder?
  5. Use a negative case: From a fresh state predict 2.79 V followed by 2.83 V in version B.
  6. Limit the claim: What does a successful software retest tell you, and what new concern would call for more evidence?


Worked checks and assessment guidance

  1. Each counts as high. With a fresh count the first leaves the indicator off and the second turns it on.
  2. Version A gives Off then Off because the first sample was excluded. Version B gives Off then On because both samples are counted.
  3. Check the threshold value and the comparison operator at the classification stage, before changing the indicator.
  4. Start with two high readings to switch it on. Then make one reading less than 2.80 V and expect the indicator to go off and the count to reset.
  5. The first sample is low and the second is the first consecutive high sample, so the output remains Off, Off.
  6. It shows that the stated simulated rule passes the tested cases. An uncertainty policy for measurements around the threshold would need its own requirement and tests.


Learning evidence

Submit the written requirement, the completed expected and observed columns for versions A and B, a labelled decision trace, and two new test cases. Justify the changed comparison with the exact boundary evidence. State a further limitation and explain what new requirement or evidence would address it.


OER and Wikipedia

Department for Education, GCSE Electronics subject content. Eduqas, GCSE Electronics guidance for teaching. SparkFun, Check, Test and Recheck. The design, numerical traces, outcomes and simple program are original synthetic teaching examples.

Digital multimeter, K.Venkataramana, CC0 1.0. Oscilloscope screen, Xato, CC0 1.0. Both files are from Wikimedia Commons.

How to Use a Multimeter and How to Use an Oscilloscope, SparkFun Electronics. Both observation activities have written routes.

iFrame blockiert

Diese externe Quelle ist für aiMOOC-iFrames nicht freigegeben.


Linked learning areas


aiMOOC Projects



Schulfach+




aiMOOCs



aiMOOC Projekte









MOOCwiki · Deutsch

Nach dem Lernen ist vor dem Lernen

Entdecke direkt den nächsten Lernkurs. Weitere Inhalte erscheinen, wenn Du weiter nach unten scrollst.

Zur MOOCwiki-Hauptseite

Mediathek

Suche verfeinern

Dein Lernplan bestimmt, was oben steht. Alle anderen Inhalte bleiben erreichbar. Seitenaufrufe beeinflussen die Auswahl nicht.

Inhalte werden geladen ...

Mediathek wird aus dem Wiki geladen ...