Image copyright Other Image caption The devices represent a trade-off between power generating capacity, size and other factors

German researchers have built shoe-sized devices that harvest power from the act of walking.

The technology could be used to power wearable electronic sensors without the need for batteries.

There are two separate devices: a "shock harvester" that generates power when the heel strikes the ground and a "swing harvester" that produces power when the foot is swinging.

They could also form the basis of a self-lacing shoe for the elderly.

Details of the advance are outlined in the journal Smart Materials and Structures.

"We have tried to power a wireless transmitter and to power a simple sensor," said Klevis Ylli from HSG-IMIT, a research centre in Villingen-Schwenningen, Germany.

"One application we are working on is indoor navigation which means we have sensors within the shoe that measure the acceleration of the foot, the angular velocity - whether you're turning the foot or not - and the magnetic field.

"From the data from these sensors, you could calculate how far you have travelled and in which direction. So imagine a rescue unit walking into a building they don't know. They could then track which way they went on their handheld device."

Image copyright Other Image caption The shock harvester sits snugly in the sole of a training shoe

Image copyright Other Image caption The devices exploit the motion between magnets and coils to generate power

Both energy harvesting devices generate power by exploiting the motion between magnets and coils.

As the magnetic field of a moving magnet passes by a stationary coil, a voltage is induced and an electric current is generated.

The energy they generate is still relatively small - in the three to four milliWatt (mW) range at their peak.

That's not nearly enough to charge a smartphone, for example, which would typically require about 2,000 mW. But it is enough to power small sensors and transmitters, opening up a range of new applications.

The devices represent a trade-off between power generation, size and other limiting factors. And Mr Ylli says his team's approach offers certain key advantages.

"Some approaches of the past for example have tried to use a lever underneath the shoe to power a gear box and an electric generator as used in some electric torches. They could generate up to 250 mW, but were huge, heavy and had parts protruding from the shoe," Mr Ylli told BBC News.

"Generated power scales with size, but if you want to be able to reasonably integrate such a device within a shoe sole, you have to work with strict constraints, like a small height and limited length of the device.

"We believe we have built comparatively small devices, considering the power output."

He said the swing harvester was developed with the intention of making a self-lacing shoe for the elderly. The shoe would detect when a user stepped into it and lace itself up, as well as open up again when required. The harvesting device would generate the energy for the closing mechanism.

Follow Paul on Twitter.