Image copyright American Chemical Society Image caption A button mushroom coated in bugs and nanowires can produce electricity from light

US researchers have successfully tested the rather whacky idea of producing electricity from a mushroom covered in bacteria.

The scientists used 3D printing to attach clusters of energy-producing bugs to the cap of a button mushroom.

The fungus provided the ideal environment to allow the cyanobacteria to generate a small amount of power.

The authors say their fossil-free "bionic mushroom" could have great potential.

As researchers the world over search for alternative energy sources, there has been a sharp rise in interest in cyanobacteria.

These organisms, widely found in the oceans and on land, are being investigated for their abilities to turn sunlight into electrical current.

One big problem is that they do not survive long enough on artificial surfaces to be able to deliver on their power potential.

That's where the humble button mushroom comes in.

Image copyright Sudeep Joshi Image caption Cyanobacteria show great potential in turning light into energy

This fertile fungus is already home to many other forms of bacterial life, providing an attractive array of nutrients, moisture and temperature.

So the scientists from the Stevens Institute of Technology in the US developed a clever method of marrying the mushroom to the sparky bugs.

Appropriately enough, they came up with the idea while having lunch!

"One day my friends and I went to lunch together and we ordered some mushrooms," said Sudeep Joshi, a postdoctoral researcher and author of the study.

"As we discussed them we realised they have a rich microbiota of their own, so we thought why not use the mushrooms as a support for the cynaobacteria. We thought let's merge them and see what happens."

Using a special bio-ink, the team printed the bacteria on the cap of the mushroom in a spiral pattern. They had previously used an electronic ink to embed graphene nano-ribbons on to the surface of the fungus to collect the current.

When they shone a light on this magical mushroom, it caused the cyanobacteria to generate a small amount of electricity.

Not quite a lightbulb moment but proof that the idea works. The researchers say that several mushrooms wired up together could light a small lamp.

"We are looking to connect all the mushrooms in series, in an array, and we are also looking to pack more bacteria together," said Sudeep Joshi.

"These are the next steps, to optimise the bio-currents, to generate more electricity, to power a small LED."

A big plus for the experiment was the fact that the bugs on the fungus lasted several days longer compared with cyanobacteria placed on other surfaces.

The researchers believe that the idea could have potential as a renewable energy source.

"Right now we are using cyanobacteria from the pond, but you can genetically engineer them and you can change their molecules to produce higher photo currents, via photosynthesis," said Sudeep Joshi.

"It's a new start; we call it engineered symbiosis. If we do more research in this we can really push this field forward to have some type of effective green technology."

The leap from fossil fuel to fungus fuel may not be that far away.

The study has been published in the journal Nano Letters.

Follow Matt on Twitter @mattmcgrathbbc.