In electromechanical regulators, voltage regulation is easily accomplished by coiling the sensing wire to make an electromagnet. The magnetic field produced by the current attracts a moving ferrous core held back under spring tension or gravitational pull. As voltage increases, so does the current, strengthening the magnetic field produced by the coil and pulling the core towards the field. The magnet is physically connected to a mechanical power switch, which opens as the magnet moves into the field. As voltage decreases, so does the current, releasing spring tension or the weight of the core and causing it to retract. This closes the switch and allows the power to flow once more.
If the mechanical regulator design is sensitive to small voltage fluctuations, the motion of the solenoid core can be used to move a selector switch across a range of resistances or transformer windings to gradually step the output voltage up or down, or to rotate the position of a moving-coil AC regulator.
Early automobile generators and alternators had a mechanical voltage regulator using one, two, or three relays and various resistors to stabilize the generator's output at slightly more than 6 or 12 V, independent of the engine's rpm or the varying load on the vehicle's electrical system. Essentially, the relay(s) employed pulse width modulation to regulate the output of the generator, controlling the field current reaching the generator (or alternator) and in this way controlling the output voltage produced.
The regulators used for DC generators (but not alternators) also disconnect the generator when it was not producing electricity, thereby preventing the battery from discharging back into the generator and attempting to run it as a motor. The rectifier diodes in an alternator automatically perform this function so that a specific relay is not required; this appreciably simplified the regulator design.
More modern designs now use solid state technology (transistors) to perform the same function that the relays perform in electromechanical regulators.
Electromechanical regulators are used for mains voltage stabilisation — see AC voltage stabilizers below.