Among the many difficulties associated with treating mental illnesses is the fact that people who suffer from such conditions are often unable to predict when their symptoms will flare up, and therefore can’t pre-emptively take their medications in order to avoid complications. Fortunately, a science fiction-esque solution to this problem is now becoming a reality, after researchers developed mind-controlled nanorobots that can be injected into a person’s brain and release medication when they detect abnormalities in neural activity.

Describing their work in the journal PLOS One, the study authors explain how they built tiny shells out of strands of DNA – a technique known as DNA origami – which could be opened and closed using miniature gates made out of iron oxide nanoparticles. Within the shells they placed fluorescent antibody fragments, before injecting billions of these microscopic structures into the brains of cockroaches.

The iron oxide gates can be opened and closed by controlling their temperature using electromagnetic energy, thereby regulating the release of the shells’ contents. To manipulate this, the researchers placed the cockroaches inside an induction coil, which was connected up to a series of electrodes that were placed on a man’s head in order to record his brain activity.

An algorithm was then designed in order to switch the coil on whenever certain patterns of brain activity were detected. In this case, the team gave the man a mental arithmetic puzzle to solve, and programmed the coil to become activated when neural patterns related to arithmetic were picked up.

So far the technique has only been tested on cockroaches. chaipanya/Shutterstock

This then caused the iron oxide gates to open, resulting in the fluorescent particles being released from the shells into the cockroaches’ brains. The researchers were able to observe the spread of the fluorescent glow, proving that the technique had been successful.

Study co-author Sachar Arnon told New Scientist that this method could be used to deliver drugs into the brains of people with mental disorders at vital moments. For example, by releasing their contents in response to neural activity associated with the early stages of a schizophrenic episode, these nanorobots could nip such situations in the bud.

However, because people can’t spend their lives inside electromagnetic coils, the technology will have to be refined before it can be deployed on humans. Arnon says his team is toying with the idea of using a smart watch to create an electromagnetic field in lieu of the coil.

He also says that the technique could be used for more than just medication, and may have some fun applications as well. “Imagine if you could deliver the exact amount of alcohol that you wanted to keep you in a happy state but not drunk,” he told New Scientist. “Kind of stupid, but this could happen.”