Docs / Charging / How Charging Works

How Charging Works

This page explains the technical architecture behind Thorium's charging system — from the electrical path that power takes to the software logic that governs every session. Understanding this will help operators troubleshoot issues and make informed decisions about their installations.

System Overview

Power flows through a linear chain of components, each serving a specific purpose:

Grid Supply → Distribution Board (MCB + RCD) → Thorium Controller → EV Charger → Vehicle

The distribution board provides overcurrent and earth-leakage protection. The Thorium controller sits between the protection devices and the charger, acting as a gatekeeper that only passes power through when a valid paid session is active. The EV charger handles the actual charge protocol negotiation with the vehicle (IEC 61851 for AC charging).

Contactor-Based Power Control

At the heart of each channel is a normally-open contactor. When no session is active, the contactor is open and the charger receives no power. When Thorium starts a session, it energizes the contactor coil, closing the contacts and completing the circuit to the charger.

This approach has several advantages:

  • Universal compatibility — works with any charger regardless of manufacturer, protocol, or firmware version.
  • Galvanic isolation — the controller's low-voltage logic is completely separated from the high-power circuit.
  • Fail-safe behavior — if the controller loses power or crashes, the contactor de-energizes and opens, cutting power to the charger.
  • Simple wiring — installation only requires interrupting the supply line to the charger. No communication cables between Thorium and the charger are needed.

Thorium uses industrial-grade contactors rated for a minimum of 100,000 switching cycles at full rated current. Each contactor also includes an auxiliary contact used by the controller to verify the actual state of the contactor (open/closed feedback).

Current Sensing and kWh Measurement

Each channel includes a split-core current transformer (CT) clamp that wraps around the live conductor. The CT produces a proportional low-voltage signal that the controller's ADC (analog-to-digital converter) samples at 1,000 times per second.

From this raw current waveform, Thorium calculates:

  • RMS current — the effective current draw, updated every second.
  • Power (watts) — derived from current multiplied by the nominal voltage (230V for single-phase).
  • Energy (kWh) — the integral of power over time, accumulated throughout the session with sub-second precision.
Accuracy note: Thorium's energy measurement is designed for billing purposes and is accurate to within ±2% under normal operating conditions. This is comparable to commercial revenue-grade metering. The system uses a fixed voltage assumption (230V) and measures current only, which is sufficient for AC resistive and near-unity power factor loads like EV chargers.

Session Lifecycle

Every charging session progresses through a defined set of states:

1. Detection

The operator or driver selects a channel on the touchscreen. At this point Thorium verifies that the channel is available, the contactor is open, and no residual current is flowing.

2. Authorization

A payment card is tapped on the NFC POS terminal. Thorium sends a preauthorization request to Viva Wallet. If approved, the session transitions to "starting." If declined, the driver is shown an error message and the channel returns to the available state.

3. Start

Thorium energizes the contactor, closing the power circuit. The charger receives mains voltage and begins its own EVSE protocol with the vehicle. Current typically begins flowing within 5–15 seconds depending on the charger and vehicle.

4. Monitoring

While the session is active, Thorium continuously measures current and accumulates energy. It monitors for several conditions: zero current for extended periods (vehicle full or unplugged), approaching preauth limit, and abnormal current readings (overcurrent or undercurrent).

5. End

The session ends when triggered by the driver (unplug), the system (preauth limit), or the operator (manual stop). Thorium opens the contactor, calculates the final energy total, and initiates the payment capture.

6. Settlement

The final kWh figure is multiplied by the configured price per kWh to determine the charge amount. A capture request is sent to Viva Wallet for this exact amount. The unused preauthorization balance is automatically released. The session record is stored locally and synced to Thorium Cloud.

Safety Mechanisms

Thorium implements multiple layers of protection:

  • Contactor feedback monitoring — if the auxiliary contact indicates the contactor is closed when it should be open (welded contacts), the system raises an alarm and disables the channel.
  • Overcurrent detection — if measured current exceeds the channel's configured maximum for more than 5 seconds, the contactor is opened immediately.
  • Watchdog timer — the controller board includes a hardware watchdog. If the main processor hangs, the watchdog resets it within 2 seconds. During reset, all contactors default to open.
  • Session timeout — sessions that exceed a configurable maximum duration (default: 12 hours) are automatically terminated.
  • Network loss handling — if the internet connection drops during a session, charging continues but the session will be terminated gracefully if the connection is not restored within a configurable period.
Thorium does not replace electrical protection devices. Always install appropriate MCBs and RCDs upstream of the Thorium unit as required by your local electrical codes. Thorium is a control and billing device, not a safety disconnect.
© 2026 Dark Matter Networks [email protected]