Nature Nanotechnology, the team used genetic engineering to add four negatively charged molecules to one end of the corkscrew-shaped proteins that coat the M13 bacteriophage virus.
Scientists say the advantage of using viruses is their "self-assembly" ability which helps them arrange themselves into an orderly film that enables the generator to work.
They enhanced the system by stacking 20 single layers of the virus on top of each other.
Researchers claim their finding could help create tiny devices that harvest electrical energy from the vibrations of everyday tasks such as shutting a door or climbing stairs.
A team of US researchers in California have used viruses to build tiny devices that gather energy from mechanical forces and convert it into electricity.
"More research is needed, but our work is a promising first step toward the development of personal power generators, actuators for use in nano-devices, and other devices based on viral electronics," said Dr. Seung-Wuk Lee of the University of California, Berkeley.
Lee and his colleagues built a generator that works by tapping a finger on a postage stamp-sized electrode coated with specially engineered viruses.
According to the report published in the journal