When you step on your car’s gas pedal, you’re taking chemical energy stored in gasoline molecules and turning it into the kinetic energy of a moving car. It’s not the most efficient process in the world, but much of the energy content of the gas ends up as useful motion. Yet when you step on the brakes, you’re just throwing it all away—the kinetic energy is wasted as heat in the brake pads and rotors.
Electric cars can recover that energy by taking advantage of a wonderful property of electric motors: They also work as generators.
When you’re accelerating in an electric car, the battery forces electrons through wire coils in the motor. That generates magnetic fields, which push against permanent magnets in the motor, creating a force on the motor shaft that turns the wheels.
This chain is reversed when you brake. Forcing a magnetic field through a wire produces a flow of electrons. When you cut the power to a spinning motor, the coils are still moving through the magnetic field of the permanent magnets, so the coils immediately start generating a current, which you can use to charge the battery. Drawing energy out of the motor causes a drag on the shaft, which creates a braking force on the wheels.
The perfect device to demonstrate this is a 12-volt car winch with a manual crank handle. After removing the tow cable, you can spin the motor by cranking the handle, easily building up enough power to operate a 120-volt AC power inverter. Hooked up to an exercise bicycle, a winch would make a great emergency generator in case of a zombie apocalypse.