← All insights

From ESP32 Sensor to Realtime Dashboard: A Prototype Architecture

How to structure a connected-product prototype across device firmware, communication, ingestion, dashboards, control, and field testing.

Connected ProductsBy 4 min read

A connected-product prototype spans several failure domains at once. A sensor can drift, a device can lose power, wireless connectivity can disappear, the backend can reject data, and the dashboard can display a value without enough context to interpret it.

The goal of an early prototype is not to hide those risks. It is to expose the most important ones quickly and produce evidence for the next engineering decision.

Start with the question the prototype must answer

“Build an IoT device” is too broad. A useful prototype question is specific: can this sensor produce stable readings in the intended environment, can the device report them for eight hours, or can an operator safely control a motor with acceptable delay?

Choose one or two high-risk questions. The first version can use development boards, external power, and a local network if those choices let the team learn faster. A polished enclosure does not compensate for an untested sensing assumption.

Separate the system into clear responsibilities

A practical architecture has five parts:

  1. Device layer: reads sensors, applies basic calibration, controls outputs, and reports health.
  2. Transport layer: moves telemetry and commands using a defined protocol.
  3. Ingestion layer: authenticates the device, validates messages, and records data.
  4. Application layer: turns device data into domain state, alerts, and operator workflows.
  5. Interface layer: shows current status, history, uncertainty, and safe controls.

This separation makes failures easier to locate. It also prevents the web interface from depending directly on firmware-specific message details.

Design the device message before the dashboard

Telemetry should include more than the sensor value. Include a device identifier, firmware version, timestamp or sequence, measurement unit, and device-health fields such as uptime, signal strength, and supply voltage when available.

For example:

{
  "deviceId": "pond-monitor-01",
  "sequence": 1842,
  "recordedAt": "2026-07-02T10:30:00Z",
  "firmware": "0.4.0",
  "metrics": {
    "temperatureC": 28.4,
    "batteryV": 4.91,
    "signalDbm": -67
  }
}

The backend must validate type, range, unit, device identity, and message size. A syntactically valid number is not necessarily a physically credible measurement.

Use commands with acknowledgements

Remote control is more consequential than telemetry. A button changing color is not proof that a physical action happened.

A command should have a unique identifier, requested action, parameters, expiry, and issuing user. The device acknowledges receipt and later reports completion or failure. The interface shows those states rather than pretending the network and hardware are instantaneous.

For motors, pumps, heaters, or any action that can cause damage, enforce limits in firmware as well as the server. A disconnected device must fail safely without depending on the cloud.

Pick transport based on the environment

WebSocket or MQTT can support low-latency bidirectional communication. HTTP can be sufficient for periodic telemetry and simpler infrastructure. The right choice depends on message frequency, power, connection stability, network topology, and how commands need to behave during interruption.

Prototype the worst expected connection early. A system that works only beside the development router has not answered a field-connectivity question.

Make uncertainty visible in the dashboard

Display the measurement time, device connection state, unit, and whether the value is live, delayed, or estimated. Charts should handle gaps rather than drawing a continuous line that implies missing data never happened.

An operator usually needs exceptions before detail: devices offline, readings outside a safe range, commands awaiting acknowledgement, and sensors that have not been calibrated recently.

Record evidence during field tests

Keep firmware and hardware versions with every test. Record environment, duration, power source, connectivity, sensor references, observed failures, and changes made during the session.

Useful prototype outcomes include:

  • a sensor was unsuitable in the target environment;
  • the wireless range was lower than required;
  • enclosure placement distorted the reading;
  • power consumption exceeded the budget;
  • or the operator workflow needed a physical override.

Those are not failed prototypes. They are decisions made before expensive production work.

Know when the prototype is not a product

Moving toward production introduces electrical safety, environmental protection, component availability, manufacturing test, firmware update security, regulatory requirements, and support procedures.

A responsible prototype documents these gaps explicitly. The value is not a demonstration that looks finished; it is a system that reduces uncertainty about what should be built next.