Linear alternators are a popular source of emergency power generation. The simplest example of a linear alternator is probably the Faraday flashlight, also known as a shaking flashlight. Linear alternators are really just a linear motor, a motor with a single piston in a linear configuration, used to generate electricity. They have the advantage of being more compact and having less moving parts which make them more reliable than conventional rotary engines. However, because linear alternators operate at a lower frequency than rotary engines they are less efficient and produce a lower power-to-volume ratio.
Fix a coil of wire to the centre of the flashlight body. The more windings your coil has the more power the alternator will generate. The coil must be flush with the inside of the flashlight's body, so the alternator's magnet can slide through it.
Connect the coil to a capacitor. A capacitor is a made of two conductors of equal but opposite charge separated by an insulator, which works as a battery for the alternator.
Wire the capacitor to a light-emitting diode, or LED, bulb. LED bulbs require much less energy than conventional filament based bulbs.
Shake the body of the flashlight so the magnet slides back and forth through the coil. Every time the magnets passes through the coil it will generate a current which is stored in the capacitor. In this example the alternator powers a LED bulb, but larger linear alternators can run more power-thirsty devices.
Linear alternators have been designed to run hybrid cars by harvesting the electric current produced by a piston passing through the centre part of an engine where a coil has been fixed.