ANYONE who saw Claire Lomas complete this year's London marathon on May 7th cannot fail to have been impressed by her grit and determination. Ms Lomas, once a show jumper, was paralysed from the chest down by a riding accident in 2007, so finishing a marathon, albeit at walking pace, was a dramatic feat. Some of the adulation, however, should be reserved for the technology that helped her do so: a pair of bionic legs.

Ms Lomas's legs were designed by Amit Goffer, an Israeli engineer who is himself paralysed. They have various modes (“sit”, “stand” and “walk”, and “ascend” and “descend” for staircases) and are controlled by a keypad worn on the wrist. Walking also requires the assistance of a pair of crutches. But Dr Goffer's legs allowed Ms Lomas to travel the 42.195km (26 miles and 385 yards) of the marathon course in stages, over a period of 16 days.

That record may not last long, however. Another engineer, José Contreras-Vidal of the University of Houston, in Texas, has what may prove an even better design: a pair of bionic legs that respond directly to signals from the brain. (An early version is pictured above.)

The idea of controlling machines by thought is not new. Research both on people and on monkeys has shown it is possible for them to move mechanical limbs with great precision, using software which interprets signals collected by electrodes implanted in their brains. (The latest such experiment, allowing quadriplegic people to control robotic arms and hands, is described in this article.) The problem with this approach is that implanting electrodes into a brain is a dangerous procedure—and, even if it succeeds and does no damage, the wires leading out of the skull to the computer open a passage into the body which can lead to infection.

John 5:8

Dr Contreras-Vidal's approach gets round these difficulties by employing electroencephalography (EEG), which measures those electrical signals from the brain that reach the scalp. The recording electrodes can be carried by a skull cap, and nothing has to penetrate the skin. Such second-hand signals are not as precise as ones collected directly from the brain itself, and probably could not control the complex movements required of an arm and a hand. But experiments using EEG have allowed people to do simple things like pressing buttons on a computer screen by moving a cursor and clicking it, and operating the flippers on a pinball machine.

That got Dr Contreras-Vidal thinking. Despite appearances, walking is harder than playing pinball. But it is easier than picking something up. He therefore wondered if he could use EEG-based control to operate a set of mechanical legs. And, to cut a long story short, he probably can. Moreover, in the process he has reduced the number of electrodes in an EEG cap from the 30 required for pinball to a mere dozen. This means it will eventually be lighter, and easier to wear.

He and a group of colleagues at the University of Maryland were able to do this by analysing what goes on in the brain when someone moves his limbs. They used a system of cameras to record the movement patterns of a set of able-bodied volunteers who were walking on a treadmill, and then correlated the result with the electrical signals detected simultaneously at their scalps.

Even a simple task, like wiggling a toe, engages many parts of the brain. These include the frontal cortex (where decisions are made), the motor cortex (which controls muscle activity), the somatosensory cortex (where the sense of touch is located) and the part of the parietal cortex that regulates kinaesthesia (the sense of bodily motion, which is built up from signals from the muscles and the vestibular systems of the ears). By choosing sites carefully, the researchers were able to cover all these areas with as few as 12 electrodes.

The next step, which they are now working on, is to turn the result into reliable instructions that can operate a set of legs. These are made by Rex Bionics, a firm based in New Zealand. They are a partial exoskeleton that allows a user to stand and walk independently, without crutches, and are normally operated by hand controls. To adapt them to thought control, a group of able-bodied people will first don the cap and perambulate in the legs around a laboratory, to refine the process. Then—with luck, some time this summer—a full-scale trial in collaboration with a group of paralysed volunteers will start.

For someone who has been crippled in an accident of the sort suffered by Ms Lomas, Dr Contreras-Vidal thinks it will simply be a matter of remembering how you used to walk, and then doing it. The legs will respond appropriately. For those paralysed from birth that is not possible, of course. But even these unfortunates, he hopes, may be able to benefit. They will understand what walking means and, with a bit of practice, that might be enough to provide the necessary brain activity.

Nor is mere locomotion the only benefit. To be able to stand and walk restores a person's independence and dignity, and also helps improve his health. Which is why, during the trials, a group of doctors led by Robert Grossman of the Methodist Hospital, Houston, will monitor such things as the participants' bone density, respiratory function and cardiovascular systems, all of which are expected to improve when someone is no longer stuck in a wheelchair.

If the trial works, Dr Contreras-Vidal and his colleagues believe their technique will transform the lives of those with spinal injuries. It might also act as a form of physiotherapy, to help victims of strokes restore the use of their legs. And it will certainly save a lot of money. A set of bionic legs can cost as much as $150,000. But the lifetime cost of caring for a 25-year-old with severe spinal injury is around $3m. If he can get up, go shopping and even go to work wearing one of Dr Contreras-Vidal's caps, then both he and the taxpayers will be hugely better off.