Design Methodology · Study deck

Virtual Hardware: Evidence Transfer

Saying code ran in a named tool is not test evidence.

Blueprint Bina is your guide for this deck.

simulatinghardwareprogramming
Blueprint Bina, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: For: Transfer From Simulation to Hardware, these labelled responsibilities give A simulation pass should feed a controlled hardware-transfer gate, not replace it its place in the running narrative.
  • Explain: A first virtual run might use an ESP32 or Arduino Uno in Wokwi with a DHT22 or DS18B20-style temperature input, one LED, and serial logging.
  • Explain: Those advantages do not establish supply stability, sensor accuracy, pull-up sizing, interrupt jitter, radio coexistence, current peaks, thermal behavior, enclosure effects, or component variation.
  • Explain: The better claim tests firmware handling and leaves sensor accuracy to calibration evidence.
iotclass.org

Major section

Define the Model Boundary

Simulation quality depends on the model boundary.

  • The model boundary describes what the simulator represents and what it leaves out.
  • Expected order of transactions, device address use, command framing, and basic response handling.
  • Display text, LED behavior, button state transitions, alarm states, and serial command flow.
iotclass.org

Major section

Simulation Pass Is Not Release

Simulation can clear a development gate.

  • The left Physical Hardware column names ESP32 boards, sensors, and wires, while the right: Simulation column uses virtual components and a simulated microcontroller; those are different evidence surfaces even when the same firmware logic runs.
  • Those advantages do not establish supply stability, sensor accuracy, pull-up sizing, interrupt jitter, radio coexistence, current peaks, thermal behavior, enclosure effects, or component variation.
A simulator can exercise firmware behavior, but physical claims still need bench evidence.
A simulator can exercise firmware behavior, but physical claims still need bench evidence.

Try it: Simulation Pass Is Not Release in the chapter

iotclass.org

Major section

Build a Repeatable Virtual Circuit

A virtual circuit should be treated like source code.

  • It should be reviewable, versioned, and tied to a design assumption.
  • This path can keep pin maps, source version, test inputs, logs, and pass notes repeatable.
  • A reviewer needs the board target, build flags, wire names, test values, and link faults to repeat the run.
A Wokwi-style virtual circuit can make the firmware path reviewable, but the captioned model still needs separate bench checks for ADC accuracy, Wi-Fi behavior, power, and dashboard integration.
A Wokwi-style virtual circuit can make the firmware path reviewable, but the captioned model still needs separate bench checks for ADC accuracy, Wi-Fi behavior, power, and dashboard integration.
iotclass.org

Major section

Build a Repeatable Virtual Circuit (continued)

The lower edge then limits the claim.

  • A model can test control flow, but not ADC error, Wi-Fi behavior, current peaks, or the real screen link.
  • Wiring Pin map Keep virtual wiring aligned with the schematic, datasheet pin names, board variant, pullup plan, and connector assignment.
  • Evidence Run record Save logs, screenshots, waveform exports, pass/fail notes, and known limitations in the same run folder.
iotclass.org

Major section

Interpret Simulation Evidence Carefully

The better claim tests firmware handling and leaves sensor accuracy to calibration evidence.

  • Simulation evidence is strongest when the claim is phrased narrowly.
  • "The firmware enters the fault state when the virtual I2C sensor is missing.".
  • The better claim separates sequence evidence from physical timing evidence.

Try it: Interpret Simulation Evidence Carefully in the chapter

iotclass.org

Major section

Transfer From Simulation to Hardware

For: Transfer From Simulation to Hardware, these labelled responsibilities give A simulation pass should feed a controlled hardware-transfer gate, not replace it its place in the running narrative.

  • Bench setup: Prepare power limits, serial logging, logic analyzer channels, sensor inputs, and safe actuator handling.

Why it matters

The transfer gate prevents a clean virtual run from becoming a false release decision.

A simulation pass should feed a controlled hardware-transfer gate, not replace it.
A simulation pass should feed a controlled hardware-transfer gate, not replace it.

Try it: Transfer From Simulation to Hardware in the chapter

iotclass.org

Major section

Incremental Examples

A first virtual run might use an ESP32 or Arduino Uno in Wokwi with a DHT22 or DS18B20-style temperature input, one LED, and serial logging.

  • The simulation claim is narrow: the firmware enters normal, warning, alarm, and sensor-missing states and prints the expected diagnostic message.
  • A Raspberry Pi Pico or RP2040 firmware build may use an I2C BME280 or SHT31 sensor model, an OLED display, and a button.
  • The virtual circuit can test the pin map, state transitions, wrong I2C address handling, missing-device timeout, display text, and repeated button input.
iotclass.org

Major section

Virtual Sensor Node Review

A team is building a small sensor node that reads a digital sensor, displays a status indicator, and sends an event to a gateway.

  • The physical board is not ready, but firmware work can start.
  • Virtual circuit uses the same named GPIO pins as the schematic draft and records the bus address.
  • Serial log shows the node starts safely with sensor present, sensor absent, and invalid reading.
  • Simulated disconnect produces retry limit, fault indicator, and no unsafe output.
iotclass.org

Deck summary

Key takeaways

Simulation quality depends on the model boundary.

  • For: Transfer From Simulation to Hardware, these labelled responsibilities give A simulation pass should feed a controlled hardware-transfer gate, not replace it its place in the running narrative.
  • A first virtual run might use an ESP32 or Arduino Uno in Wokwi with a DHT22 or DS18B20-style temperature input, one LED, and serial logging.
iotclass.org

Retrieval practice

Recall checks 1–2 of 3

Blueprint Bina says: answer from memory, then check your reasoning.

Q1What specifies the firmware behaviour a virtual hardware experiment is meant to test?

AModel Scope
BDesign Claim
CVirtual Build
DTest Stimuli
Show answer

Answer: B The claim states which firmware behavior the virtual experiment is intended to test.

Q2A virtual board simulation shows that firmware enters a fault state when a sensor is missing. Which conclusion is strongest?

AProduction hardware is validated because the simulator covered the missing-sensor branch.
BDatasheet review can be skipped because the virtual sensor returned the expected fault.
CBench testing can skip missing-sensor recovery and focus only on nominal readings.
DSimulator covers fault branch; bus timing, wiring and recovery still need bench proof.
Show answer

Answer: D Simulation evidence should be phrased by claim.

iotclass.org

Retrieval practice

Recall check 3 of 3

Blueprint Bina says: answer from memory, then check your reasoning.

Q3A simulated waveform shows the intended order of SPI transactions. What must still be checked on physical hardware before release?

AUse the simulated waveform as release evidence for transaction order and timing, and let the assembled board inherit the simulator's chip-select timing and peripheral response.
BCheck integrity, voltage, timing, chip select and peripheral behavior on hardware.
CCompare virtual pin labels against board silkscreen and approve if they align.
DHave peers replay the simulator model as the physical verification step.
Show answer

Answer: B Simulation can show intended sequence and firmware behavior.

iotclass.org

Print reference

Answers

Answer key.

  1. B · The claim states which firmware behavior the virtual experiment is intended to test.
  2. D · Simulation evidence should be phrased by claim.
  3. B · Simulation can show intended sequence and firmware behavior.
iotclass.org