AFE IP Walkthrough

How the metering AFE converts mains voltage and current into samples

The analog front end (AFE) is the measurement block of the smart-meter SoC. It samples the mains voltage and current 4,000 times per second and delivers each sample as a signed 24-bit word, from which the processor computes power and energy. This page traces the signal through each block of the Dolphin Metro-PM-MFE, using one worked example throughout.

Operating point used throughout

All charts and calculations use the same operating point, so every value can be traced from input to output.

Mains voltage230 V, 50 Hz
Load current10 A
Loadinductive, 30° lag (PF 0.87)
Mains period20 ms
PGA gain (I)×8
Output rate Fs4 kSPS (0.25 ms)

Signal chain at a glance

The AFE samples the mains voltage and current 4,000 times per second and outputs each sample as a signed 24-bit number. The chain has six stages:

  1. Scaling (board). A resistor divider and a current transformer reduce 230 V and 10 A to millivolt signals with the same waveform.
  2. Gain (buffer / PGA). Each signal is sized to the converter's input range: large enough to stay above noise, small enough not to clip.
  3. Conversion (Σ-Δ modulator). The signal is converted to a 1-bit stream at 1.024 MHz whose density of 1s follows the input.
  4. Decimation. Each block of 256 bits (0.25 ms) is filtered into one 24-bit word, giving 4,000 words per second.
  5. Correction. DC offset is removed (HPF), the sensor phase error is compensated (phase shift), and gain and offset errors are calibrated out.
  6. Output. Each word is sent serially on three wires per channel (SCLK, SSYNC, SDATA) for V, I and T.

Reading the charts

Horizontal axisTime. One mains cycle is 20 ms, so most charts span 0–20 ms.
Vertical axisSignal value. The unit is given under each row name (V, A, mV, % of full scale, or output code).
Yellow cursorThe selected instant. The labels beside it give the exact values at that instant.
ColoursBlue = voltage channel (V). Orange = current channel (I).
5.00 ms
The yellow cursor marks this instant in every chart. The input/output boxes and the worked calculations update to the values at this instant.
STEP 1 · SENSORS AND FILTER (ON THE CIRCUIT BOARD, BEFORE THE CHIP)

Scale the mains to millivolt-level signals

The AFE inputs accept only a few hundred millivolts. Board components scale the 230 V mains and the load current down to that level: a resistor divider for voltage and a current transformer (CT) with a burden resistor for current. A 1 kΩ / 10 nF anti-alias RC filter on each pin removes high-frequency noise before sampling.

Goes in

mains voltage and current
➜

Comes out

millivolts on the chip pins
PRINCIPLE

The sensors scale the mains down to the millivolt range and keep the waveform shape unchanged. The resistor divider attenuates the voltage by 1,500. The CT produces a secondary current 2,500 times smaller than the load current, and the 10 Ω burden resistor converts that current into a voltage.

230 V is the rms value. The peak of the sine wave is √2 × 230 = 325 V, which is why the voltage chart spans ±325 V.

Worked calculation

Voltage (V channel)Current (I channel)Largest signal the pin accepts
What about the T channel? A second CT measures the current in the neutral wire. Normally it equals the phase current, so T looks exactly like I. If someone bypasses the meter, T and I stop matching, and that is how tampering is detected. T goes through the same steps as I.
Details for engineers (from the Dolphin spec)
ItemValueSource
V pin limit±300 mV peak, 212 mV rms (SENSOR_VP)§3.2.2.1
I/T pin limit at ×8±275 mV peak diff, 194 mV rms§3.2.2.1
Anti-alias RCRAA 1 kΩ, CAA 10 nF → 15.9 kHz corner, 0.18° lag at 50 Hz on every pin (ignored in the charts)§1.2
Divider 1:1500, CT 2500:1, burden 10 Ωexample board valuesexample
PinsSENSOR_VP/VN, SENSOR_IP/IN, SENSOR_TP/TN§2
STEP 2 · BUFFER (V) AND PGA (I, T) · ANALOG

Size each signal to the converter input range

The Σ-Δ converter in Step 3 has a fixed input range. A signal that uses too little of it is degraded by noise; a signal that exceeds it is clipped. The voltage signal is already well sized, so it passes through a unity-gain buffer. The current signal is small, so a programmable gain amplifier (PGA) raises it. The gain is fixed at configuration time; this example uses ×8.

Goes in

millivolts on the pins
➜

Comes out

amplifier output, and how full the converter is (100 % = full scale). I full scale after ×8 = 275 mV × 8 = 2,200 mV
PERCENT OF RANGE

Each channel has a maximum input. V: 300 mV. I at gain ×8: 275 mV.

% of range = signal ÷ maximum. V at its top: 216.8 ÷ 300 = 72 %. I at its top: 56.6 ÷ 275 = 21 %. 100 % is the limit; above it the signal is clipped.

Why the PGA is needed. The PGA multiplies the current signal and its limit by 8 (56.6 → 453 mV, 275 → 2,200 mV), so the percentage stays 21 %. Without the ×8, the current would fill only 56.6 ÷ 2,200 = 2.6 % of the converter, too little to stay clear of its noise.

Worked calculation

VoltageCurrent (after ×8 in the last row)Current without gain, for comparisonFull scale (100 %); above this the signal is clipped
Row 1 is what reaches the pins. Row 2 is the voltage after the ×1 buffer: unchanged, 72 % of its 300 mV full scale at the top. Row 3 is the current after the ×8 PGA: 8 times bigger, 21 % of its 2,200 mV full scale at the top. The dashed line in row 3 shows how small the current would be without the PGA.
PGA gain10 A usesCurrent that fills 100 %Good for a meter rated up to
×410 %97 A60–80 A
×8 (this page)21 %48 A40 A
×1641 %24 A20 A
×3283 %12 A10 A
Details for engineers
ItemValueSource
PGA_GAIN_I / _T (0x27)010 ×4 (reset) · 011 ×8 · 100 ×16 · 101 ×32§7.6.12
V pathunity-gain buffer, no PGA§1.1
Low-power modePGAs bypassed, ×1 on all paths, ±1.1 V peak§3.2.2.2
Gain error±1 % raw, <0.1 % after GAIN_ERR_x§3.3.1
Amplifier output valuesnominal Vin × gain (V ×1, I ×8). Dolphin does not publish the internal node voltage or the modulator full scale; 2,200 mV is the pin limit × gainnot in spec
STEP 3 · Σ-Δ (SIGMA-DELTA) MODULATOR · ANALOG → BITS

Convert the analog signal into a 1-bit stream

The Σ-Δ modulator is the analog-to-digital converter. At 1,024,000 samples per second (one clock tick every 0.977 µs) it outputs a single bit, 1 or 0. The proportion of 1s tracks the input: mostly 1s near the positive peak, mostly 0s near the negative peak, and an even mix at zero. Individual bits have no meaning on their own; the density of 1s represents the signal.

The modulator runs continuously and has no notion of "256". The grouping into blocks of 256 bits happens in Step 4, because the modulator produces 1,024,000 bits/s and the output rate is 4,000 words/s: 1,024,000 ÷ 4,000 = 256 bits per word.

Goes in

signal as % of range
➜

Comes out

bits; share of 1s in the current 0.25 ms
PRINCIPLE

The modulator outputs one bit per clock tick at 1.024 MHz. The density of 1s follows the input: 50 % 1s at zero input, 100 % at +full scale, 0 % at −full scale. A single bit carries no information; the average over many bits does.

Density of 1s = 50 % + (signal % ÷ 2). At the voltage peak (+72.3 %) this gives 86 %.

How one input value becomes a string of 1s and 0s

Input119 mV Σ +− difference Integratorkeeps a running total Comparatortotal ≥ 0 → 1, else 0 every 0.977 µs Bit out1 0 1 1 0 1 1 1 … 1-bit DAC (feedback)1 → +300 mV · 0 → −300 mV
  1. Subtract the feedback from the input. The feedback is +300 mV (full scale) if the previous bit was 1, and −300 mV if it was 0.
  2. Add the difference to the integrator, a running total.
  3. Compare: if the running total is ≥ 0 the output bit is 1, otherwise 0.
  4. Repeat every clock tick (0.977 µs). A 1 pushes the total down (−300 mV feedback); a 0 pushes it up (+300 mV). The total therefore stays near zero, and on average the feedback equals the input.

Feedback is the previous bit converted back to a voltage (1 → +300 mV, 0 → −300 mV) and subtracted from the input; it pulls the running total back toward zero. The previous bit only sets the feedback; the next bit depends on the running total, which carries the history of all earlier ticks.

Table: first 16 of the 256 ticks in one 0.25 ms slot (the loop runs continuously). Each tick uses one feedback value, set by the previous tick's bit: +300 mV after a 1, −300 mV after a 0.

Illustration uses a first-order loop with ±300 mV feedback (V channel full scale). Dolphin does not state the modulator order; a higher-order loop gives a different bit pattern but the same average.

Input level → number of 1s

Zoom: the 64 bits around the chosen moment (about 62 µs). A filled box is 1, an empty box is 0. Press the buttons above: at the voltage top nearly all V bits are 1; at zero they alternate 1, 0, 1, 0; at the bottom nearly all are 0.
VoltageCurrent50 % 1s = signal is zero
Details for engineers
ItemValueSource
Modulator clockMCLK/4 = 4.096 MHz/4 = 1.024 MHz§3.2.1, §5.3
Channels3 modulators (V, I, T), all synchronous to MCLK§1.1
See the raw bitsTR1_x.DIG_BYPASS_x = 1 → PDM on MFE_SDATA_x, 1.024 MHz§5.3
Modulator order, full-scale mappingnot given. Bits on this page come from a simple 1st-order model with ±100 % of range = all 1s / all 0snot in spec
SNR99 dB min / 103 dB typ at ×4, 1–60 Hz§3.3.2
STEP 4 · DECIMATION FILTER · BITS → 24-BIT NUMBERS

Filter each block of 256 bits into one 24-bit word

The 1-bit stream is not directly usable by a processor. The decimation filter divides time into 0.25 ms slots, each containing 256 bits (1,024,000 ÷ 4,000), and produces one 24-bit two's-complement word per slot. One 20 ms mains cycle therefore yields 80 words per channel.

Goes in

256 bits in this slot
➜

Comes out

one 24-bit number per channel per slot
FROM 256 BITS TO ONE 24-BIT WORD

Bits per word. The modulator produces 1,024,000 bits/s and the output rate is 4,000 words/s, so each word is built from 1,024,000 ÷ 4,000 = 256 bits. These 256 bits span 0.25 ms, so one 20 ms mains cycle yields 20 ÷ 0.25 = 80 words.

Bit count to signal level. Weight each 1 as +1 and each 0 as −1, sum, and divide by 256. With 220 ones and 36 zeros: (220 − 36) ÷ 256 = +71.9 % of full scale. An even split of 128/128 gives 0 %.

Signal level to output code. Multiply by the channel's full-scale code, 603,980 for V (1,006,633 × 0.3 V × 2, Dolphin Table 3.2). for the slot at 5 ms, +71.9 % × 603,980 ≈ +434,110 (603,980 is the fixed number for 300 mV, not the peak of the wave). The actual filter output is +436,232: a plain count has a resolution of only 2/256 = 0.78 %, whereas the decimation filter weights bits across adjacent slots and resolves the value to the LSB.

Worked calculation

All 256 bits of the slot at the cursor, in 8 rows of 32 (filled = 1). More 1s than 0s gives a positive number, more 0s gives a negative number, equal gives 0. Number ≈ (1s − 0s) ÷ 256 × full-scale number (603,980 for V, 2,214,593 for I). The chip output below it is the decimation filter's exact value, which is slightly more precise than this simple count.
V numbersI numbersEach flat step = one number, held for 0.25 ms
Details for engineers
ItemValueSource
Output rate FsMFE_FCR.FREQ: 010 4 k (reset) · 011 8 k · 100 16 k · 101 32 kSPS → 256 / 128 / 64 / 32 bits per number§7.6.5
Code ↔ voltsV: DO = 1006633 × Vin × 2 · I/T: DO = 1006633 × Vin × PGA. The ×2 on V is a fixed scaling of the output code; the V analog path itself is a ×1 buffer (§1.1)§3.6, §1.1
Full scaleV 300 mV → 603,980 · I 275 mV at ×8 → 2,214,592§3.6
Word24-bit two's complement, bits 2:0 tied to 0 (≈ 21 useful bits)§5.4.2
Passband at 4 kSPS0–1600 Hz, stopband 2400 Hz, ripple 0.001 dB up to 200 Hz§3.4
Filter delay, internal structurenot given. This page shows no delay and uses the simple count rulenot in spec
STEP 5 · HIGH-PASS FILTER (HPF) · DIGITAL

Remove the DC offset

Every analog circuit adds a small constant error called offset. It shifts the whole waveform up or down, so the middle of the wave is no longer at zero. The mains has no constant (DC) part, so any constant value in the samples is an error. The high-pass filter (HPF) removes it and puts the middle of the wave back on zero. It is on by default, and V, I and T all pass through the same filter.

WHY OFFSET MATTERS

RMS reads high. The meter would measure √(signal² + offset²) instead of the signal alone.

False energy. If both V and I carry an offset, their product adds a constant power that is billed even with no load.

HPF and the OFFSET register (Step 8) work together. The HPF is automatic and also follows offset that drifts with temperature. The OFFSET register is a fixed correction measured once at the factory.

Goes in

I number with an example offset of +60,000 (= 7.5 mV at the pin)
➜

Comes out

I number, centred on zero

Worked calculation

Before HPF (offset added)After HPFMiddle of the wave
Details for engineers
ItemValueSource
ControlMFE_FCR.HPF (bit 4): 1 on (reset), 0 off§7.6.5
Positionafter decimation; a second HPF follows calibrationFig 5.1
Offset before / after calibrationV 2 mV / <0.1 mV · I ×4 1 mV / <0.1 mV · I ×32 <0.1 mV / <0.01 mV (HPF off)§3.3.1 p.33
+60,000 offset used in the chartexample value (7.5 mV at the I pin), exaggerated for visibilityexample
Corner frequency, settling timenot givennot in spec
STEP 6 · RCC (ROGOWSKI COIL COMPENSATION) · DIGITAL

Rogowski coil compensation (disabled in this example)

This example uses a normal CT, so RCC is off (RCC_EN = 0, the reset value). The numbers pass through this block unchanged.

Some meters measure current with a Rogowski coil instead of a CT. Its output must be converted back into the current shape, and that is what this block does. V and T are delayed by the same amount as the integrator, so all channels stay aligned.

PRINCIPLE

What it is. A Rogowski coil is a coil placed around the wire, like a CT but without an iron core, so it keeps measuring correctly even at very high currents.

What it outputs. It does not tell how much current is flowing; it tells how fast the current is changing. Its output is largest when the current crosses zero (changing fastest) and zero when the current is at its top (momentarily not changing). That is why the coil signal is 5 ms ahead of the current in the chart below.

What the RCC does. It adds up those changes over time to rebuild the actual current, the same way adding up speed at every moment gives the distance travelled.

Rogowski coil output (rate of change)After RCC integrator = current
What the RCC would do if a Rogowski coil were fitted. In this example (CT sensor) the block is off and the numbers pass through unchanged.
Details for engineers
ItemValueSource
ControlMFE_FCR.RCC_EN (bit 5): 0 off (reset), 1 on§7.6.5
I channelInteg + HPF§5.1
V, T channelsDelay comp onlyFig 5.1
Integrator gain, delay valuenot givennot in spec
STEP 7 · PHASE SHIFT · DIGITAL

Remove the current sensor's timing error

The CT is not perfect: its copy of the current comes out slightly early, by 0.8° (44.4 µs). Left uncorrected, the meter would measure the wrong angle between voltage and current, and therefore the wrong power. The phase shifter fixes this by delaying the I channel by the same amount.

Goes in

CT copy, 44.4 µs ahead of the real current
➜

Comes out

after the 44.9 µs delay: each number now shows the wave 44.9 µs earlier, so it changes slightly
TWO DIFFERENT DELAYS

Load delay: real, kept. With a fan-type load the real current is 30° (1.67 ms) behind the voltage. The meter must measure this, because it decides how much of the power is useful.

Sensor delay: error, removed. The CT's copy is 0.8° (44.4 µs) ahead of the real current, so without correction the chip would see 29.2° instead of 30°.

The fix. Delay the I channel by 46 steps of 0.977 µs = 44.9 µs. The chip's copy then matches the real current, still 30° behind the voltage.

Worked calculation

Real currentCT copy, before phase shift (44.4 µs early)After phase shift
Zoom on a very short piece of time (400 µs) where the current crosses zero, so the 44.4 µs error can be seen. The red line (CT copy) crosses zero 44.4 µs too early. The orange line (after phase shift) crosses at the same time as the real current and lies on top of it. Voltage is not shown here: it crossed zero 1.67 ms earlier, at 0 ms, and that 30° gap stays.
Details for engineers
ItemValueSource
RegisterPSH_x_L/H (0x08/0x09), 10 bits used, 0–1023, reset 0§7.6.9
Step, range0.976563 µs (1/1.024 MHz), max 999.02 µs = +17.9° at 50 Hz§6.3.3
Directiondelay only; delay whichever channel is early. Here PSH_I = 46 (0x02E), PSH_V = 0§6.3.3
CT error 0.8°example valueexample
Error formulaΔP/P ≈ ε × tan φ = 0.014 rad × tan 30° ≈ 0.8 %
STEP 8 · CALIBRATION · DIGITAL

Correct chip-specific gain and offset errors

Component tolerances give every meter a slightly different gain and offset. During factory calibration a known voltage and current are applied, the error is measured, and two correction values are stored: an OFFSET that is subtracted and a GAIN factor that is multiplied. In this example the chip reads 0.5 % high with an offset of +1,536.

Goes in

I number with example chip errors: 0.5 % too high, plus an offset of +1,536
➜

Comes out

(in − 1,536) × 0.99512
HOW THE FACTORY FINDS THE TWO VALUES

1. Offset. Apply zero input (inputs shorted). Whatever the chip reads is its offset; it is stored in the OFFSET register.

2. Gain. Apply an exactly known current, for example 10.000 A from a reference source. The ratio of true value to reading gives the gain correction, stored in the GAIN_ERR register.

3. From then on, every sample is corrected automatically: out = (in − offset) × gain correction. V, I and T each get their own pair of values.

Worked calculation

True valueBefore calibrationAfter calibration
Zoom on 1.5 ms around the top of the current. Each flat step is one sample (0.25 ms). Before calibration the top is about 2,300 too high (gain error). After calibration it matches the true value.
Error before calibrationError after calibration
Error = chip number − true number, over one full cycle. Before calibration the error has two parts: a constant +1,536 (the offset, which moves the whole line up) and a swing of ±2,278 that follows the wave (the 0.5 % gain error, 0.5 % of 455,550). After calibration both are gone and the error is close to zero.
Details for engineers
ItemValueSource
Orderoffset subtracted first, then gain multiplied§6.3.2
OFFSET_x_L (0x0A)8-bit signed, 1 LSB ≈ 63.6 µV at the pin, ±8 mV range. Example 0x03 = 190.7 µV = 1,536 codes at ×8§6.3.2
GAIN_ERR_x (0x16/0x17)13 bits, 0x1000 = ×1.0 (reset), step 1/4096. Example 4076 (0xFEC) = ×0.99512§6.3.1
Factory orderTRIM (reference) → OFFSET → GAIN_ERR → PSH§6.3
+0.5 % and +1,536 errorsexample valuesexample
STEP 9 · DATA INTERFACE · NUMBERS LEAVE THE AFE

Serialise each word onto three wires

Each channel (V, I, T) has its own three-wire interface. SCLK is the bit clock. SSYNC is a one-clock pulse marking the start of a word. SDATA carries the 24 bits, one per clock, least significant bit (b0) first. A new word is sent every 0.25 ms, on all three channels at the same time.

Bit order: the §5.4.2 text says b0 first (drawn here); Fig 5.4 shows the opposite. To be confirmed with Dolphin; the capture block should make the order configurable.

Important: the AFE does not interrupt on every number. Its IRQ_V, IRQ_I and IRQ_T pins fire once, when each channel has finished starting up and its data is valid (up to 0.65 s after power-on). To know that each new number has arrived, our SoC's capture block watches SSYNC, collects the 24 bits, and then raises its own "sample ready" signal (an interrupt or a DMA request). That signal is drawn below as "Capture IRQ".
Show channel:

Goes in

final number for this slot
➜

Comes out

24 bits on MFE_SDATA

The number written in the usual order: b23 on the left, b0 on the right. On the wire the order is reversed: b0 is sent first (see the timing diagram). b23 is the sign bit (0 = positive, 1 = negative). The three red bits (b2, b1, b0) are always 0; the chip ties them to 0 to save power.

WHAT THE RECEIVER (OUR CAPTURE BLOCK) DOES

1. Wait for the SSYNC pulse: a new number is starting.

2. On each of the next 24 SCLK rising edges, read one SDATA bit (▲ in the diagram): high = 1, low = 0.

3. Put the bits back in place, b0 first up to b23, to rebuild the 24-bit number.

4. Raise its own "sample ready" signal (interrupt or DMA request) so the number is stored in memory.

Worked calculation

SCLK, SSYNC (from AFE) · Capture IRQ (from our SoC)SDATA (high = 1)▲ = the processor reads the bit on the rising clock edge
Details for engineers
ItemValueSource
EnableMFE_DCR.SERIAL = 1 (reset)§7.6.3
ProtocolDSP mode: SSYNC one SCLK high, data starts one SCLK later, 24 bits§5.4.2
Edgeschip changes SDATA on SCLK ↓, receiver samples on SCLK ↑§5.4.2
Bit ordertext says LSB first (drawn here); Fig 5.4 is labelled msb first. Confirm with Dolphinconflict
Timingsetup 10 ns, hold 7 ns, output delay 10 ns from MCLK ↑§5.4.3
SCLK speed, clocks per word, IRQ positionnot given; drawn as 28 clocks per 0.25 msnot in spec
AFE IRQIRQ_V/I/T = ACQ_x_READY, "channel reached acquisition mode": one event per channel after start-up (Tsbyu ≤ 0.65 s from power-down), not a per-sample strobe. Form MFE_ICR.INT_FORM, flag IFR_x (write 1 to clear), mask IMR_x§4.2 Fig 4.2, §7.6.6–8
Per-sample eventframe boundary = SSYNC. Our capture peripheral must generate the per-sample IRQ / DMA requestour SoC
SUMMARY · THE WHOLE AFE, TOGETHER

Trace one instant through the full chain

The table follows the selected instant through every stage, and ends with our firmware turning the number back into volts and amps. Move the cursor or press Animate to see all stages update together.

This path uses an ideal chip, so Steps 5 and 8 leave the numbers unchanged here; their effect was shown separately with example errors in those steps. Numbers are per 0.25 ms slot, so the final volts and amps match the mains values at the middle of the slot.

One full wave, all signals on one time line

Read it top to bottom. Rows 1–4 are smooth analog waves. Row 5 is the bit stream (as share of 1s). Row 6 is the numbers the AFE produces. Row 7 (SSYNC, from the AFE) shows one number leaving every 0.25 ms, 80 times per wave. Row 8 is the interrupt our SoC's capture block raises after receiving each number; the AFE itself does not interrupt per number.

Inside two slots (0.5 ms): how one number is made and sent

Left slot: 256 bits arrive and are counted, while the previous number is sent out. At the end of the slot the new number is ready. Right slot: the next 256 bits are counted while the finished number goes out on SDATA, and our capture block raises its interrupt once all 24 bits are in. This overlap repeats forever, for V, I and T in parallel.
After Step 9 the AFE's job is done. In our SoC a capture block receives the bits, DMA copies the numbers into memory, and the RISC-V firmware converts them back to volts and amps (last row of the table) and multiplies V × I to calculate power, energy, RMS and more.
REFERENCE

Numbers reference

Every value used on this page, its derivation, and its source: Dolphin spec section, calculation, or example board value.

NumberWhat it isHow it is calculatedSource
Mains, sensors and pins
325.3 Vtop of the 230 V mains wave230 × √2 = 230 × 1.414physics
1 : 1,500voltage dividerchosen so 325 V becomes 217 mV, below the 300 mV limitexample
216.8 mVtop of the V pin signal325.3 V ÷ 1,500calculated
14.14 Atop of the 10 A current wave10 × 1.414physics
2,500 : 1, 10 ΩCT ratio and burden resistorboard choiceexample
56.6 mVtop of the I pin signal14.14 A ÷ 2,500 × 10 Ωcalculated
30° / 1.67 mscurrent lag of the example load (fan type)30 ÷ 360 × 20 msexample
Amplifier and full scale
300 mVlargest V pin signal (100 % of range)given§3.2.2.1 p.28
275 mVlargest I pin signal at gain ×80.55 V at ×4 ÷ 2 (limit halves when gain doubles)§3.2.2.1, §3.6 p.42
2,200 mVI full scale after the PGA275 mV × 8calculated
72.3 % / 20.6 %how full V / I are at their top216.8 ÷ 300 · 56.6 ÷ 275calculated
Conversion and timing
4.096 MHzmaster clock MCLKgiven§3.2.1
1,024,000 / sbits per second from the converter4,096,000 ÷ 4§5.3 p.57
0.977 µstime of one bit (and one phase-shift step)1 ÷ 1,024,000 s§6.3.3
4,000 / snumbers per second (Fs)MFE_FCR.FREQ = 010 (reset value)§7.6.5 p.82
0.25 mstime for one number (one slot)1 ÷ 4,000 scalculated
256bits per number1,024,000 ÷ 4,000calculated
80numbers per mains wave20 ms ÷ 0.25 ms (= 4,000 ÷ 50)calculated
Output numbers
1,006,633"volts to number" constantgiven by Dolphin; equals 2²³ × 0.12 = 8,388,608 × 0.12 (derived, 0.12 set by the 1.25 V reference and internal scaling)§3.6 p.42–43 derived
603,980V number at 100 % (300 mV)1,006,633 × 0.3 × 2Table 3.2 p.43
2,214,593I number at 100 % (275 mV at ×8)1,006,633 × 0.275 × 8 (= 0.55 V × 4)Table 3.1 p.42
24 bits, last 3 = 0size of each numberrange −8,388,608 … +8,388,607 (2²³)§5.4.2 p.59
Corrections (Steps 5, 7, 8)
+60,000HPF example offset (7.5 mV at the I pin)60,000 ÷ (1,006,633 × 8) = 7.5 mVexample
2 mV / 1 mVreal offset before calibration, V / I (×4)given§3.3.1 p.33
55.6 µsone degree of the wave20 ms ÷ 360calculated
44.4 µsCT timing error (0.8°)0.8 × 55.6 µsexample
46phase-shift steps (PSH_I)44.4 ÷ 0.977 = 45.5 → 46§6.3.3
44.9 µsdelay actually applied46 × 0.977 µscalculated
63.6 µVone OFFSET register stepgiven§6.3.2 p.62
1,536example offset in number units3 × 63.6 µV × 1,006,633 × 8example
0.5 %example chip gain errorchip reads × 1.005example
4,076GAIN_ERR_I for a 0.5 % high chip4,096 ÷ 1.005§6.3.1
Output interface and firmware
96,000 bits / sdata on one SDATA wire24 bits × 4,000calculated
0.65 smax time after power-up before the AFE IRQ says a channel is readygiven (Tsbyu)§4.5
0.00003104 Afirmware constant: amps per I number2,500 ÷ (1,006,633 × 8 × 10 Ω)calculated
TERMS

Glossary

AFE / MFE
Analog front end. Dolphin calls its block the MFE (metrology front end). It measures V, I and T and outputs numbers.
Bit, 24-bit number
A bit is 0 or 1. A 24-bit number can hold values from −8,388,608 to +8,388,607.
Burden resistor
The resistor (10 Ω here) that turns the CT's small output current into a voltage for the chip pin.
Calibration
Factory step that measures each meter's gain and offset error and stores corrections in the chip.
CT (current transformer)
A ring around the wire that produces a small copy of the current (2,500 times smaller here), without electrical contact.
Decimation filter
Turns each block of 256 modulator bits into one 24-bit number.
DMA
Direct memory access: hardware that copies data into memory without the processor.
Full scale
The largest input a channel accepts: 300 mV for V, 275 mV for I at ×8. Equals 100 % of range.
Gain error
The chip reads everything slightly too big or too small (±1 % before calibration).
HPF (high-pass filter)
Digital filter that removes the constant (DC) part of the signal, i.e. the offset.
IRQ
Interrupt request: a signal that asks the processor for attention. The AFE's IRQ pins mean "channel ready after start-up"; the per-number interrupt comes from our capture block.
kSPS / Fs
Thousand samples per second. Fs = 4 kSPS means 4,000 numbers per second.
LSB / MSB
Least / most significant bit: b0 / b23.
mV, µs, ms
Millivolt = 1/1,000 volt. Microsecond = 1/1,000,000 second. Millisecond = 1/1,000 second.
Offset
A small constant error that shifts the whole waveform up or down.
OSR
Oversampling ratio: modulator bits per output number, 256 here.
PGA
Programmable gain amplifier. Makes a small signal bigger by a chosen factor (×4 to ×32).
Phase (°), phase shift
Position inside one wave: 360° = 20 ms, so 1° = 55.6 µs. The phase shifter delays a channel to remove a sensor's timing error.
Power factor
cos of the angle between voltage and current: 1 for a heater, 0.87 for the 30° example load.
PSH, OFFSET, GAIN_ERR, TRIM
Chip registers for phase delay, offset correction, gain correction and reference trim.
RCC / Rogowski coil
A Rogowski coil is an air-core current sensor that outputs the rate of change of current. The RCC integrator converts that back to current. Off in this example.
Register
A small setting stored inside the chip, written by the processor (e.g. PSH_I = 46).
RMS
The effective value of a wave. 230 V rms has a peak of 325 V.
SCLK / SSYNC / SDATA
The three output wires per channel: bit clock, start-of-word pulse, and data bits.
Σ-Δ modulator
A converter that outputs a fast stream of single bits; the share of 1s follows the signal.
Two's complement, hex
The usual way to store negative numbers in bits (top bit 1 = negative). Hex writes 4 bits as one character (0–9, A–F), so 24 bits = 6 hex characters.