rc filter
rc_filterComputes the cutoff frequency, time constant, impedance, and phase shift of a first-order RC filter. Supports both lowpass and highpass topologies. The cutoff frequency is f = 1/(2piRC) where the signal is attenuated by 3 dB. The time constant tau = RC governs transient response — the capacitor reaches 63.2% of its final value after one tau. Use for anti-aliasing before ADCs, DC blocking, noise filtering, and signal conditioning. Chain from voltage_divider to design filtered bias networks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter_type | No | Filter topology: 'lowpass' (R then C to ground) or 'highpass' (C then R to ground). | lowpass |
| capacitance_f | Yes | Capacitance in farads (C). The capacitive element of the RC filter. | |
| resistance_ohm | Yes | Resistance in ohms (R). The resistive element of the RC filter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cutoff_freq_hz | Yes | Cutoff frequency (-3 dB point) in hertz. | |
| cutoff_freq_khz | Yes | Cutoff frequency in kilohertz for convenience. | |
| time_constant_s | Yes | RC time constant (tau) in seconds. | |
| time_constant_ms | Yes | RC time constant in milliseconds. | |
| phase_at_cutoff_deg | Yes | Phase shift at the cutoff frequency in degrees. -45 for lowpass, +45 for highpass. | |
| impedance_at_cutoff_ohm | Yes | Total impedance magnitude at the cutoff frequency in ohms. Equals R * sqrt(2) for a first-order RC filter. |