The Core Equation of AC Voltage and Symbol Definitions
The fundamental equation of AC voltage describes the instantaneous potential difference in a sinusoidal alternating current system as a function of time. Whether you are analyzing grid power, designing a transformer, or writing firmware for a microcontroller sampling mains voltage, this single mathematical model dictates the behavior of the waveform.
The standard time-domain formula is:
v(t) = Vp sin(2πft + φ)
Alternatively, using angular frequency (ω), the formula is written as v(t) = Vp sin(ωt + φ). Below is the strict definition of every symbol, including the mandatory SI units required to make the math resolve correctly.
| Symbol | Parameter | SI Unit | Practical Notes & Assumptions |
|---|---|---|---|
| v(t) | Instantaneous voltage | Volts [V] | The exact voltage at a specific microsecond. Can be negative. |
| Vp | Peak voltage amplitude | Volts [V] | Maximum positive excursion. Not RMS. Vp = VRMS × √2 for pure sine waves. |
| f | Frequency | Hertz [Hz] | Cycles per second. 60 Hz in North America, 50 Hz in EU/UK/AU. |
| ω | Angular frequency | Radians/second [rad/s] | ω = 2πf. Represents the rate of phase change. |
| t | Time | Seconds [s] | Elapsed time from the zero-crossing reference point. |
| φ | Phase angle | Radians [rad] | Initial offset at t=0. Critical for grid-tied inverter synchronization. |
Rearranged Forms: Solving for Any Variable
On the bench, you rarely just calculate v(t). You usually know the voltage threshold and need to find the exact time it occurs, or you are measuring a phase shift. Here are the algebraically rearranged forms. Note: Because the sine function is periodic, solving for t or φ yields infinite solutions; these forms calculate the principal (first positive) value.
- Solving for Peak Voltage (Vp):
Vp = v(t) / sin(2πft + φ) - Solving for Time (t):
t = [arcsin(v(t) / Vp) - φ] / (2πf) - Solving for Frequency (f):
f = [arcsin(v(t) / Vp) - φ] / (2πt) - Solving for Phase Angle (φ):
φ = arcsin(v(t) / Vp) - 2πft
Worked Examples with Strict Unit Tracking
Abstract formulas cause wiring mistakes. Let us run two real-world scenarios with explicit unit tracking to prove the math. For both examples, we assume a pure sine wave with a phase angle φ = 0 rad.
Problem 1: Finding Instantaneous Voltage on US Mains
Scenario: You are probing a standard US 120V RMS, 60 Hz wall outlet. What is the exact instantaneous voltage v(t) at t = 2.5 milliseconds after a positive zero-crossing?
- Convert RMS to Peak: The formula requires Vp.
Vp = 120 [VRMS] × √2 = 169.7 [V]. - Convert time to base SI units:
t = 2.5 [ms] = 0.0025 [s]. - Calculate the angular argument (must be in radians):
Argument = 2 × π [rad] × 60 [Hz] × 0.0025 [s] = 0.9424 [rad]. - Evaluate the sine function:
sin(0.9424 [rad]) = 0.809 [dimensionless]. - Multiply by Peak Voltage:
v(t) = 169.7 [V] × 0.809 = 137.3 [V].
Reality Check: A full 60Hz cycle takes 16.67 ms. The peak occurs at a quarter-cycle (4.16 ms). At 2.5 ms, we are past the midpoint but before the peak, so 137.3V is a highly realistic magnitude.
Problem 2: Finding the Time Threshold on EU Mains
Scenario: You are designing a crowbar overvoltage protection circuit for a 230V RMS, 50 Hz European supply. The TRIAC triggers when the instantaneous voltage hits 200V. How many milliseconds after the zero-crossing does this trigger occur?
- Calculate Peak Voltage:
Vp = 230 [VRMS] × √2 = 325.3 [V]. - Set up the rearranged time equation:
t = arcsin(v(t) / Vp) / (2πf) - Divide instantaneous by peak:
200 [V] / 325.3 [V] = 0.6148 [dimensionless]. - Take the inverse sine (Ensure calculator is in RADIANS):
arcsin(0.6148) = 0.662 [rad]. - Divide by angular frequency:
t = 0.662 [rad] / (2 × π [rad] × 50 [Hz]) = 0.662 / 314.16 = 0.0021 [s]. - Convert to milliseconds:
t = 2.1 [ms].
When This Formula Applies (and When It Fails)
The equation of AC voltage is a steady-state, pure sinusoidal model. It assumes the generator is producing a mathematically perfect sine wave and the load is linear.
- Calculating zero-crossing timings for dimmer microcontroller interrupts.
- Sizing peak-inverse-voltage (PIV) ratings for rectifier diodes.
- Synchronizing the phase angle (φ) of a grid-tied solar inverter to the utility grid.
Where it fails: If you are measuring the output of a cheap modified sine wave inverter, a variable frequency drive (VFD), or a circuit with heavy switching loads (like server power supplies), the waveform is distorted. The Total Harmonic Distortion (THD) introduces higher-order frequencies. In those cases, this single-term equation is invalid, and you must use a Fourier series or rely on True-RMS measurements. According to Fluke's guidelines on True-RMS measurement, standard averaging meters using simple sine assumptions will read up to 40% low on distorted waveforms.
Common Unit Mistakes That Break the Math
I have seen junior engineers fry thousands of dollars in test equipment because of two specific unit errors when applying this formula.
The argument inside the sine function must be in radians. If your calculator or C-code math library is set to degrees, sin(0.9424°) yields 0.016, not 0.809. In firmware, always use sin() with radian inputs. If you only have degrees, convert first: radians = degrees × (π / 180).
Multimeters read RMS. The formula demands Peak. If you are building a resistive voltage divider to step down 120V AC for an ESP32 ADC, and you size the resistors to output 3.3V based on 120V, your peak voltage (170V) will push 4.6V into the ESP32's 3.3V GPIO pin. The ESP32 will instantly latch up and die. Always calculate component ratings using Vp, not VRMS.
Decision Tree: Sizing an ESP32 ADC Circuit for AC Mains
Let us terminate this theory in a concrete hardware decision. You need to measure AC mains voltage using the ADC on an ESP32-WROOM-32. The ADC maxes out at 3.3V, but the linear range is practically 3.1V. Because AC swings bipolar, we must bias the signal at 1.65V, giving us a maximum allowable peak swing of ±1.5V.
Use this decision matrix to pick your exact voltage divider resistors based on the peak voltage derived from our formula. Assume 1% tolerance metal film resistors.
| Grid Type | Nominal RMS | Calculated Peak (Vp) | Required Divider Ratio (Vp to 1.5V) | Concrete Resistor Pick (RHigh / RLow) |
|---|---|---|---|---|
| US / CA (60Hz) | 120V | 169.7V | 113.1 : 1 | Use 330kΩ / 3.0kΩ (Yields 1.52V peak) |
| EU (50Hz) | 230V | 325.3V | 216.8 : 1 | Use 680kΩ / 3.3kΩ (Yields 1.48V peak) |
| UK / AU (50Hz) | 240V | 339.4V | 226.2 : 1 | Use 680kΩ / 3.0kΩ (Yields 1.49V peak) |
Final Hardware Directive: For North American 120V mains, buy 330kΩ and 3.0kΩ 1% metal film resistors. Wire the 330kΩ in series with the hot line, and the 3.0kΩ to the neutral/ground reference. Add a 100nF ceramic capacitor in parallel with the 3.0kΩ resistor to filter high-frequency switching noise before it hits the ESP32 ADC pin. For deeper theory on AC waveform distortion and how it affects these measurements, refer to the AC Waveform tutorials at Electronics-Tutorials.
By strictly adhering to the equation of AC voltage, tracking your units from RMS to Peak, and keeping your calculator in radians, you bridge the gap between abstract textbook theory and reliable, smoke-free bench prototypes.






