Skip to content

Alternator Health

The regulator learns what the alternator can produce when conditions are steady, builds a best-ever reference surface from real operating data, and rates present output against it. If the unit later makes less current under matched conditions — or needs more field to make the same current — it reads below its own best-ever and the drift is flagged. It is advisory: no safety logic depends on it.

This works because alternator output is near-deterministic given its inputs — at a fixed operating point the machine produces what physics dictates, so "best-ever ≈ expected." The reference auto-ratchets to the healthy peak; there is no freeze step and no staircase.

The output and its axes

The quantity being learned is output amps, as a function of four equal input axes:

Axis Notes
RPM engine/alternator speed
Excitation temperature-normalized field-drive proxy, exc = (duty × Vbus) / (1 + α·(T_C − 25)), with α the copper temperature coefficient
Bus voltage charging bus volts
Alternator temperature from the digital temperature probe

Output amps is valid in every charge mode (bulk/current-control, absorption/voltage-control, manual) because the physics amps = f(rpm, excitation, temp, Vbus) is the same regardless of why the regulator chose a given field — the mode only decides where in (RPM, excitation) space it operates.

Temperature must be available

If the global ignore temperature setting is on, the entire alternator-health system is disabled — temperature is one of the four axes, so without it there is no valid surface.

How a data point is formed

A point is one steady episode, not a fixed time slice. The detector is the shared steady-run engine (Episode in Xregulator.ino, fed for the alternator from altFold_tick()), the same machinery the sailing-performance system uses:

  1. Sample fast and mode-agnostically — once per control tick (gated on a fresh current sample), reading RPM, duty, Vbus, temperature, and measured amps after the control loop has settled the field. Off / fault / shutdown states are excluded automatically. The detector inputs are lightly low-pass filtered (a short EMA) so the steadiness bands are sized for real operating drift, not sensor noise.
  2. Steady = every axis within its band. Each axis has a user-tunable deviation bound and steady time, tracked independently — a slow axis like temperature can demand a long hold without forcing the fast axes to match it. The output itself (amps) also has its own steadiness band, so a point can only be recorded while the thing being measured is holding still too.
  3. One averaged point per episode. When any axis leaves its band the episode closes and its average becomes a single point; the detector then reseeds the next run from the longest still-compatible tail of recent samples, so good data is reused rather than discarded. Sampling fast means a brief excursion on any axis cannot hide inside a "steady" run.

Each stored point keeps the raw inputs and the derived axis{RPM, duty, Vbus, temp, excitation, amps} — so the excitation can be recomputed and a bad point diagnosed later.

The best-ever front

The reference is a best-ever surface over the four axes, stored as a sparse set of support points (the front, FrontStore in code) — not a percentile, not an average, not a fixed-size buffer. For display, the firmware fits the local slope of the surface through the nearby records (a locally weighted linear fit) instead of averaging neighbors: a convex average is biased high at the edge of the visited region — where every neighbor is a stronger operating point — which is exactly where an engine idles for long stretches.

  • Keep only new bests. A finished episode is kept only if its amps beat the surface at its operating point (the bar is the more conservative of the neighbor average and the local fit); otherwise it is discarded. One exception: the first point in a previously unvisited operating region is admitted unconditionally — it opens that region at its true value, so rarely visited operating regimes (low idle, unusual voltages) are never locked out of the reference.
  • With cloud features enabled, the full history of accepted points is retained in the cloud and the pruned front is derived from it as a rebuildable view — so the reference ratchets up and never decays (the failure mode of older "rolling window" designs, which silently track recent rather than best performance).
  • The device evaluates the held front locally (altHealth_tick() and altSendLive() drive the dashboard values), so rating works offline between cloud syncs.

What you see

  • Live health % with a confidence state — present amps ÷ best-ever for the current conditions, computed once per second and labeled by what the comparison is based on: MEASURED (a recorded best exists at this operating point), ESTIMATED (interpolated between trustworthy nearby records), or learning this operating region / no reference here yet (the recorded data is too one-sided or too far away to grade fairly — no number is shown). The state decision is output-blind: it depends only on where the record book has data, never on the measured output, so a degraded machine cannot relabel itself as "learning."
  • A session plot — every one-second reading since the page was opened, points colored by state, with shaded spans where no fair comparison existed.
  • Trend over engine-hours — average and worst "percent of best-ever," plotted against engine-hours since the baseline was last reset (a Start Over button, e.g. after replacing the alternator, belt, or regulator). Only graded (MEASURED/ESTIMATED) readings enter the buckets, and an engine-hour commits a point only after at least five steady runs — one noisy reading cannot stamp a whole hour. The trend is the signal: a healthy unit reads high-but-not-perfect and roughly flat; a steady decline is the early warning.
  • A high-field alert, independent of the record book: sustained high field drive with low output raises a console message and dashboard flag even where the gauge is still learning.

The same episode/front engine powers the boat-speed reference — see Sailing Performance.

See also the plain-English overview: Charging-system health monitoring.