But none of those methods are as efficient as an engine design invented in 1928. It's called a free-piston engine, and until now it's been less than ideal for transportation use but could prove to be 50% more efficient than fuel cells at generating electricity.
Basically the engine is two opposed pistons pushing each other back and forth. One past use of the design was as an air compressor where each piston was connected to a compressor cylinder.
But researchers at the Sandia National Laboratory have come up with a new use for this decades-old tech. They have attached magnets to the two opposing pistons that move back and forth past metal coils, thereby creating electricity. The researches claim the free-piston design can easily be modified to run on almost any liquid fuel including hydrogen, ethanol and diesel.
One major problem they'll need to tackle to make the design successful, though, is how very loud the engine operates. The engine also will require a computerized, active control system to keep the piston movement in check.
Trust us, it's explained much better and in much more detail here as well as in a PDF here.
[Source: Technology Review]