BALTIMORE — When Gyorgy Levay lost parts of all four extremities, including most of his left arm, to meningitis in 2010, he resolved to make the best of a bad situation.

He mastered his state-of-the-art prosthetic replacements. He switched the focus of his graduate studies from electrical to biomedical engineering. The native Hungarian even found it interesting how he continued to feel sensations from the hand he no longer possessed.

But like most amputees, he felt something was missing. Because his prostheses had no sense of touch, they felt to him like alien attachments.

Thanks to a team of researchers at Johns Hopkins University, he has learned what they might feel like if they were part of him. Levay was the principal volunteer subject in a two-year study at the university that endowed an artificial limb with the capacity to feel pressure and pain.

Led by Luke Osborn and Nitish Thakor, a graduate student and professor in Johns Hopkins’ biomedical engineering department, the team developed a form of “electronic skin” that registers touch in much the same way the human body does.

Wearing that “skin,” a fabric-and-rubber sheath laced with sensors that the team called e-dermis, on the fingertips of his prosthetic left hand, Levay picked up several small, rounded objects, then did the same with a sharply pointed object.

When picking up the rounded objects, he felt various levels of physical pressure; when holding the pointed object, he felt pain.

To Levay, it felt as though a lifeless appendage — his left hand and arm — were being born again.

“Normally my ‘hand’ feels a bit like a hollow shell,” he said in a phone interview from his hometown of Budapest. “When these electronic stimulations started happening, it felt a bit like filling a glove with water, almost as though it were filling up with life.”

The experiment marked the first time an amputee could feel a range of benign physical pressures through a prosthetic device — and the first time any has felt pain.

“For the first time, a prosthesis can provide a range of perceptions, from fine touch to noxious touch, to an amputee, and this makes it much more like a human hand,” said Thakor, the co-founder of Infinite Biomedical Technologies, a small Baltimore-based company that supplied the prosthetic hardware for the study.

A paper on the study appeared in the journal Science Robotics in June.

The advances are the latest in an area of research that has expanded rapidly over the past decade and a half, thanks in no small part to work done at Johns Hopkins.

It wasn’t until about four years ago, though, that researchers at Case Western Reserve University in Cleveland and elsewhere began taking steps toward imbuing prosthetic devices with touch.

Those researchers achieved their results by affixing electronic sensors to prosthetic limbs. These tiny devices could register touch, translate it into electronic signals and send the signals across a set of wires to the appropriate locations in what remained of the users’ limbs.

Every pioneering experiment has its limitations, and these were no exception. The process required invasive surgery — electrodes had to be implanted in the residual limbs to receive the signals and transmit them across the nervous system — and the work provided only a narrow range of pressure sensations.

The Hopkins team set out to expand the menu of sensations provided, up to and including pain — a category of feeling that, while always unpleasant, serves a crucial survival function.

“Pain is a sensation we use to protect our bodies,” Osborn said. “We can take it for granted, and we certainly don’t always like it, but it serves as a warning system, helping us avoid harmful events.”

The team, which included members from the Johns Hopkins departments of electrical engineering, computer engineering and neurology, turned to biology for its model.

The sensory receptor cells in human skin, they observed, are actually situated at various levels, with those responsible for painful sensation (nociceptors) primarily near the surface of the skin and those responsible for sensing pressure (mechanoreceptors) set deeper.

To replicate this system, they designed e-dermis to have sensors arrayed in two layers, instead of one like earlier engineers.

Then the challenge was to “teach” the sensors in each layer to generate the sensations appropriate to that layer.

Again, they turned to biology.

The team studied the frequencies, amplitudes and wavelengths of the signals the body normally sends when generating sensations of pressure and pain. Then they calibrated the sensory apparatus to mimic those variables.

Osborn elaborated on this “neuromorphic” approach — that is, the creation of technology that mimics biological patterns.

“We knew what an electrical pulse for pain looks like, as well as pulses that convey information of pressure, texture and so forth,” he said. “We created similar pulses and matched them against what the subjects actually perceive.”

The next challenge was to ensure that the system was spatially accurate — that is, that if contact occurs on the prosthetic index finger, the brain perceives it as coming from that spot.

They achieved this through “sensory mapping” — probing every square centimeter of the subject’s residual limb and noting where the subject “felt” each of those touches on his “phantom” hand.

The process allowed Osborn and company to wire the sensor on the index finger, for example, directly to the nerve in the residual limb that ordinarily would connect to the real index finger.

Hopkins research offers Pa. woman new arm, 14 years after amputation

“Those nerves that used to go to your hand are still there, they’re just not connected to the hand anymore,” Osborn said. “By stimulating each of those nerves, we activate the location in the brain that says ‘pinky finger,’ or ‘index finger,’ or ‘thumb,’ and the sensation should ideally feel as it would have before the amputation.”

Having mapped the nerve patterns so precisely, the team was able to avoid requiring the invasive implantation of metal electrodes in the residual limb.

They did attach wires from the prosthesis to the appropriate locations on the limb, but they did so on the surface of the skin, a process that is far easier on the subject.

Levay said he appreciated that on many levels.

He happened to be studying biomedical engineering on a Fulbright scholarship at Johns Hopkins when Thakor and Osborn began their research in 2015.

Because he was interested on a personal and professional level, and physically nearby, he made the ideal volunteer subject for the study, which was funded by grants from the Johns Hopkins Applied Physics Laboratory and the National Institute of Biomedical Imaging and Engineering, a division of the National Institutes of Health, among other sources.

The group worked with a number of volunteer amputees during the study, but because he was consistently available over a course of months, Levay emerged as the central, unnamed subject of the paper, titled “Prosthesis with neuromorphic multilayered e-dermis perceives touch and pain.”

The experiments were painful at first, Levay said with a laugh, as Osborn sought to find the right match between the shocks he delivered and the sensations Levay felt.

The longer they worked together, though, the closer the correlation became, until the only pain he felt during the sessions came when he picked up the pointy object, signaling that the experiment had achieved its goal.

That, he said, was pain he was only too happy to feel.

“E-dermis doesn’t work perfectly yet,” Levay said, “but it’s definitely a step further in bringing sensations back to the hand.”