The electrically driven type usually involves some kind of small generator as a sensor, which provides its own electric current to power the indicator in the cockpit, in the event of an aircraft electrical system failure the RPM indicator will continue to function.
One notable exception to this trend is the Robinson series of helicopters which have electrically driven indicators which derive their power from the aircraft electrical systen (Battery & Alternator), pilots sometimes think they are self generating because if the Master switch is turned off the ERRPM gauge still works, this is due to the way the gauge is wired. If the electrical system fails the gauge will no longer work!
Example Content