# Rectifier Ripple API
> Rectifier ripple and smoothing-capacitor maths as an API, computed locally and deterministically. The ripple endpoint computes the peak-to-peak ripple voltage left on a reservoir (smoothing) capacitor after a rectifier, Vr = I_load/(f_ripple·C), where the ripple frequency is the line frequency for a half-wave rectifier and twice it for a full-wave or bridge rectifier — and it solves for whichever of the load current, the capacitance or the ripple you leave out, also giving the RMS ripple. The capacitor endpoint sizes the smoothing capacitor for a target ripple, C = I_load/(f_ripple·Vr), and the energy it stores. The output endpoint gives the DC output of the rectifier from the transformer RMS voltage: the peak Vrms·√2, minus the diode drops in the conduction path (one for half-wave and centre-tapped, two for a bridge), the average DC voltage and, given the ripple, the ripple factor. Everything is computed locally and deterministically, so it is instant and private. Ideal for power-supply and electronics-design tools, linear PSU, charger and audio-amplifier design, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is rectifier ripple and filtering; for Ohm's law, reactance and RC time constants use an Ohm's-law API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/rectifier-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 25,000 calls/Mo, 5 req/s
- **Pro** ($24/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($74/Mo) — 793,000 calls/Mo, 40 req/s

## Endpoints

### Rectifier

#### `GET /v1/capacitor` — Smoothing-capacitor sizing

**Parameters:**
- `type` (query, optional, string) — half | full | bridge (default full) Example: `full`
- `line_frequency` (query, optional, string) — Mains frequency (Hz, default 50) Example: `50`
- `load_current` (query, required, string) — Load current (A) Example: `1`
- `target_ripple` (query, required, string) — Target ripple voltage (V) Example: `1`
- `voltage` (query, optional, string) — DC voltage for stored energy

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rectifier-api/v1/capacitor?type=full&line_frequency=50&load_current=1&target_ripple=1"
```

**Response:**
```json
{
    "data": {
        "formula": "C = I/(f_ripple·Vr).",
        "rectifier": "full-wave (centre-tapped)",
        "load_current_a": 1,
        "target_ripple_v": 1,
        "line_frequency_hz": 50,
        "ripple_frequency_hz": 100,
        "required_capacitance_f": 0.01,
        "required_capacitance_uf": 10000
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:38.965Z",
        "request_id": "c2ecb1a5-e53c-451b-8a5b-8301f8167d93"
    },
    "status": "ok",
    "message": "Smoothing-capacitor sizing",
    "success": true
}
```

#### `GET /v1/output` — DC output & ripple factor

**Parameters:**
- `type` (query, optional, string) — half | full | bridge (default full) Example: `bridge`
- `rms_voltage` (query, required, string) — Transformer RMS voltage (V) Example: `12`
- `diode_drop` (query, optional, string) — Diode forward drop (V, default 0.7) Example: `0.7`
- `ripple_voltage` (query, optional, string) — Ripple voltage (V) for ripple factor

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rectifier-api/v1/output?type=bridge&rms_voltage=12&diode_drop=0.7"
```

**Response:**
```json
{
    "data": {
        "formula": "Vpeak = Vrms·√2; Vdc ≈ Vpeak − n_diodes·Vdrop − Vr/2.",
        "rectifier": "bridge (full-wave)",
        "diode_drop_v": 0.7,
        "rms_voltage_v": 12,
        "diodes_in_path": 2,
        "peak_voltage_v": 16.970563,
        "dc_output_voltage_v": 15.570563,
        "peak_output_voltage_v": 15.570563
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:39.070Z",
        "request_id": "6a03bafa-b8a8-4794-bf93-443ee1e7d283"
    },
    "status": "ok",
    "message": "DC output & ripple factor",
    "success": true
}
```

#### `GET /v1/ripple` — Ripple voltage

**Parameters:**
- `type` (query, optional, string) — half | full | bridge (default full) Example: `full`
- `line_frequency` (query, optional, string) — Mains frequency (Hz, default 50) Example: `50`
- `load_current` (query, optional, string) — Load current (A) Example: `1`
- `capacitance_uf` (query, optional, string) — Capacitance (µF) Example: `4700`
- `ripple_voltage` (query, optional, string) — Or ripple voltage (V) to solve another

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rectifier-api/v1/ripple?type=full&line_frequency=50&load_current=1&capacitance_uf=4700"
```

**Response:**
```json
{
    "data": {
        "formula": "Vr = I/(f_ripple·C); f_ripple = (1 half-wave, 2 full-wave)·f_line.",
        "rectifier": "full-wave (centre-tapped)",
        "capacitance_f": 0.0047,
        "capacitance_uf": 4700,
        "load_current_a": 1,
        "ripple_voltage_v": 2.12765957,
        "line_frequency_hz": 50,
        "ripple_frequency_hz": 100,
        "ripple_voltage_rms_v": 0.61420241
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:39.173Z",
        "request_id": "ddb83fea-7916-4bf3-bfab-dddcea0f44ed"
    },
    "status": "ok",
    "message": "Ripple voltage",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rectifier-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "api": "rectifier",
        "note": "Rectifier ripple & smoothing-capacitor maths — computed locally and deterministically, no key, no third-party service.",
        "endpoints": [
            "/v1/ripple",
            "/v1/capacitor",
            "/v1/output",
            "/v1/meta"
        ],
        "rectifier_types": [
            "half",
            "full",
            "bridge"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:39.275Z",
        "request_id": "8de31f68-9757-49fd-af14-c3f2a8c1a1a5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/rectifier-api
OpenAPI spec: https://www.oanor.com/api/rectifier-api/openapi.json
