# 555 Timer Calculator API
> 555-timer (NE555) astable and monostable design as an API, computed locally and deterministically. The astable endpoint designs the classic oscillator: from the two timing resistors R1 and R2 and the capacitor it returns the output frequency f = 1/(ln2·(R1+2R2)·C), the high and low times (T_high = ln2·(R1+R2)·C, T_low = ln2·R2·C), the period and the duty cycle (R1+R2)/(R1+2R2), or solves the capacitor for a target frequency. The monostable endpoint designs the one-shot timer, T = 1.1·R·C — the pulse width of a single output pulse — and solves for whichever of the resistance, capacitance or pulse width you leave out. The design endpoint works backwards: from a target frequency, a chosen capacitor and a duty cycle it computes the resistor values R1 and R2 you need (a standard 555 needs a duty above 50 %). Capacitors may be entered in farads, microfarads, nanofarads or picofarads. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics-hobbyist and maker tools, oscillator, blinker, PWM and timing-circuit design, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is 555-timer design; 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/timer555-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 25,000 calls/Mo, 5 req/s
- **Pro** ($22/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($69/Mo) — 768,000 calls/Mo, 40 req/s

## Endpoints

### 555 Timer

#### `GET /v1/astable` — Astable oscillator

**Parameters:**
- `r1` (query, optional, string) — Resistor R1 (Ω) Example: `1000`
- `r2` (query, optional, string) — Resistor R2 (Ω) Example: `10000`
- `capacitance_uf` (query, optional, string) — Capacitor (µF) Example: `10`
- `capacitance_nf` (query, optional, string) — Or capacitor (nF)
- `frequency` (query, optional, string) — Or target frequency (Hz) to solve C

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timer555-api/v1/astable?r1=1000&r2=10000&capacitance_uf=10"
```

**Response:**
```json
{
    "data": {
        "r1_ohm": 1000,
        "r2_ohm": 10000,
        "formula": "f = 1/(ln2·(R1+2R2)·C); duty = (R1+R2)/(R1+2R2).",
        "period_s": 0.1455609079,
        "duty_cycle": 0.52380952,
        "time_low_s": 0.0693147181,
        "time_high_s": 0.0762461899,
        "frequency_hz": 6.869976,
        "capacitance_f": 1.0e-5,
        "duty_cycle_percent": 52.380952
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:37.996Z",
        "request_id": "96985952-37ff-4f62-a8a9-366aa22b11d0"
    },
    "status": "ok",
    "message": "Astable oscillator",
    "success": true
}
```

#### `GET /v1/design` — Astable resistor design

**Parameters:**
- `frequency` (query, required, string) — Target frequency (Hz) Example: `1000`
- `capacitance_nf` (query, optional, string) — Chosen capacitor (nF) Example: `10`
- `capacitance_uf` (query, optional, string) — Or capacitor (µF)
- `duty_cycle` (query, optional, string) — Duty cycle 0.5–1 (default 0.6) Example: `0.6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timer555-api/v1/design?frequency=1000&capacitance_nf=10&duty_cycle=0.6"
```

**Response:**
```json
{
    "data": {
        "r1_ohm": 28853.9008,
        "r2_ohm": 57707.8016,
        "formula": "R1+2R2 = 1/(f·ln2·C); R1 = (2d−1)·S; R2 = (1−d)·S.",
        "period_s": 0.001,
        "duty_cycle": 0.6,
        "capacitance_f": 1.0e-8,
        "target_frequency_hz": 1000
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:38.099Z",
        "request_id": "fc3d8467-83db-42f7-8ab2-ee6799b8f7f8"
    },
    "status": "ok",
    "message": "Astable resistor design",
    "success": true
}
```

#### `GET /v1/monostable` — Monostable one-shot

**Parameters:**
- `resistance` (query, optional, string) — Resistor R (Ω) Example: `10000`
- `capacitance_uf` (query, optional, string) — Capacitor (µF) Example: `100`
- `pulse_width` (query, optional, string) — Or pulse width (s) to solve R/C

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/timer555-api/v1/monostable?resistance=10000&capacitance_uf=100"
```

**Response:**
```json
{
    "data": {
        "formula": "T = 1.1·R·C (one-shot pulse width).",
        "capacitance_f": 0.0001,
        "pulse_width_s": 1.1,
        "capacitance_uf": 100,
        "pulse_width_ms": 1100,
        "resistance_ohm": 10000
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:38.201Z",
        "request_id": "b5c145b6-07c0-4db6-b0db-807ea5030789"
    },
    "status": "ok",
    "message": "Monostable one-shot",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "timer555",
        "note": "555-timer astable & monostable design — computed locally and deterministically, no key, no third-party service.",
        "endpoints": [
            "/v1/astable",
            "/v1/monostable",
            "/v1/design",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:38.308Z",
        "request_id": "ad74d552-9500-4bae-b0da-4e271360acb1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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