Constant DC load
Voltage, current, power and energy in the simplest case.
A 12 V supply into a 12 Ω resistive load. The current follows from the supply and the resistance, and the energy graph is a straight line whose slope is the power.
A simulated low-voltage DC energy monitor: source, load, sensing chain, embedded sampling and energy accumulation, all running in this page. True and measured values are shown side by side so the difference is never hidden.
Source → load → sensing → controller → logging. Select a block to read what the model does at that stage.
Load state — Large numbers are the measurement chain output; the small line under each is the simulated truth.
Hover or focus a chart to read a point.
Solid lines are the simulated truth; dashed lines are what the sensing chain reports. Both come from the same sample set.
Each experiment loads a complete configuration into the instrument above. They all use the same validated model — there is no second implementation for the demonstrations.
Voltage, current, power and energy in the simplest case.
A 12 V supply into a 12 Ω resistive load. The current follows from the supply and the resistance, and the energy graph is a straight line whose slope is the power.
What a step does to power and to the energy slope.
The load current halves part-way through the run. Power halves with it, so the energy trace bends rather than stopping.
Ideal signal against a quantised measurement.
An 8-bit converter on a slowly varying signal. The measured trace is a staircase; every step is one LSB of the sensing chain.
Systematic error, random error, and the correction.
Gain error and offset bias the reading in a predictable direction. Calibration removes the systematic part; the noise remains.
What sparse samples cannot tell you.
A 4 s duty cycle sampled every 2 s. The reported average depends on where the samples land, which is a property of the sampling, not of the load.
Discrete samples do not measure instantaneous power; they bracket it. The model says exactly what it does between two samples.
Computed from the two measured channels after scaling and quantisation, and separately from the simulated truth so the difference can be read directly.
Each interval contributes the average of its two endpoint powers times the actual elapsed time. Power is never summed without multiplying by time.
Accumulators hold joules; the interface shows watt-hours. 1 Wh = 3600 J exactly, with no rounding in between.
Sensitivity, gain error, offset and noise at the pin, then uniform quantisation to the nearest LSB. A channel with 0 bits is treated as ideal.
Every row below is asserted by dcem-reference.test.js and re-derived by a separate method in dcem-independent.test.js. These are the values the test files print.
| Case | Input | Expected result | Why that number |
|---|---|---|---|
| A | 12 V, 1 A, 3600 s | 43 200 J / 12 Wh | exact — constant power, so the trapezoidal rule has no error |
| B | 5 V, 2 A, 1800 s | 18 000 J / 5 Wh | exact |
| C | 10 V, 1 A → 0.5 A at 1800 s | 26 997.5 J / 7.49931 Wh | 0.0093 % below the 27 000 J continuous ideal — the step straddles one interval |
| D | 12 V, 0 A, 600 s | 0 J | zero current, so zero energy, with the voltage still measured |
| E | irregular timestamps, 5 intervals | 77.605 J | hand-checkable; the naive mean × time estimate would give 77.973 J |
| F | 10 V true, +2 % gain, +50 mV offset | 10.4 V uncalibrated → 10.000 V calibrated | analytical; calibrating removes the bias exactly |
| G | invalid datasets | classified and refused | missing, duplicate, non-monotonic, non-numeric, extreme and empty inputs |
Software verification only. Nothing on this page is a measurement of a physical circuit, and no accuracy claim about real hardware follows from it.
The model, both test suites, the documentation and the reference datasets are plain files served from this site. You do not need the dashboard to check the numbers.
node energy-monitor/tests/dcem-reference.test.js
node energy-monitor/tests/dcem-independent.test.js
The model, its tests and its datasets are complete for the scope described in the requirements document.
No sensor, ADC, microcontroller, board or enclosure exists. The hardware plan lists the stages and the approvals required before anything is energised.