liveBook · Manning

Sensor

As explained in Digital Twins in Action

A sensor is a device that detects a physical condition and produces a corresponding measurement or signal.

A sensor detects a physical condition and turns it into a measurement a digital twin can use. Temperature, vibration, water flow, and human activity reveal how a system behaves now, rather than how its design model says it should behave. The goal is not to collect every possible reading: deploy sensors that support a specific decision, whether monitoring a condition, predicting a failure, or adjusting a system. section 3.0 section 3.1

A measurement reaches a digital twin through a signal chain:

  • A physical change affects a sensing element, which converts it into an electrical signal. section 3.1.1
  • Electronics amplify and filter the signal; an analog-to-digital converter samples it into digital values. section 3.1.1
  • Processing applies corrections and filtering before formatted data is transmitted. A thermistor, for example, changes resistance with temperature; calibration converts its sampled signal into a temperature reading. section 3.1.1
Listing 3.1 Analog-to-digital conversion quantizing a voltage signal
def adc_read(voltage, bits=10, vref=3.3):  #1
  max_val = 2**bits - 1
  return int((voltage / vref) * max_val)  #2

def to_moisture(adc_value, dry=850, wet=400):
  if adc_value >= dry: return 0
  if adc_value <= wet: return 100
  return 100 * (dry - adc_value) / (dry - wet)

print(f"{to_moisture(adc_read(1.5)):5.1f}%")

The Python listing converts voltage into a 10-bit ADC value, then maps that value between dry and wet calibration readings to produce a moisture percentage. Conversion and calibration are distinct steps: a raw digital value is not yet the measurement the twin needs. section 3.1.1

Conversion also limits what can be observed. In a simplified example, sampling a changing voltage once per second with a 2-bit converter misses a brief drop. If that drop matters to the decision, the sensing and conversion characteristics must change. section 3.1.1

Select and deploy sensors by working backward from the decision:

  • Identify the failure or outcome of interest, then the parameter that signals it earliest. Establish its operating range, rate of change, needed history, and acceptable update delay. section 3.2.1
  • Match accuracy, sampling rate, and latency to that parameter—not to the highest available specification. Check placement, weather or industrial exposure, access, mounting, and power. section 3.2.2
  • Before purchase, verify network compatibility, platform support, payload format, decoding work, and calibration needs. A working device is of little use if its readings cannot reach the twin. section 3.2.3

A home sensing network

Energy and water decisions call for different measurements: electricity use, water flow, rainwater storage, occupancy, temperature, and humidity. Locations and power availability shape the network. Battery-powered sensors use LoRaWAN, while devices near outlets use Wi-Fi and send readings to a common message broker. An electricity-meter pulse counter instead syncs over BLE to a phone, so its data must be exported manually. section 3.2.4 section 3.3.3

Figure 3.6 A hybrid sensor network that uses LoRaWAN and Wi-Fi to send electronic sensor readings to a common message broker
figure

The hybrid-network diagram shows LoRaWAN and Wi-Fi readings converging at a message broker. Sensor placement, power, and existing infrastructure can justify more than one communication path. section 3.3.3

Electronic sensing need not cover every gap. A manual pool test can be more practical than an expensive automated chemistry sensor, and an optical meter sensor can provide finer-grained electricity readings than a delayed utility portal—though phone-only transfer prevents automatic ingestion. Once readings arrive, they still need decoding, standardization, and processing. At scale, plan for monitoring, firmware management, and calibration. section 3.4.2 section 3.8

How Digital Twins in Action covers it

How deep it goes
Works through the signal chain and practical selection checks, including conversion limits, integration, calibration, and deployment constraints.
Examples
Illustrates conversion with a thermistor and moisture-reading code, then applies sensor choices to home energy and water monitoring.
What it assumes
Builds from physical changes through digital conversion, while requiring a defined objective to guide sensor selection.
What you can do after
Evaluate/understand it by matching measurements, performance, placement, power, and integration requirements to a digital twin’s objectives.
How it connects
Links sensing to digital twins, analog-to-digital conversion, predictive maintenance, wireless networks, and data processing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Digital Twins in Action. The section links point to the parts of the book it draws on.