Scientists are set to trial a new ‘digital pill’ which can send a text to relatives and doctors from inside the body.

It is hoped the pills could be used to cut the number of drugs that are wasted each year as well as alert family members if medication isn’t being taken properly.

Each pill contains a sensor that transmits a signal to patch worn by the patient when the sensor hits the stomach acid. This patch then sends the data via text message, showing that the pill has been taken.

The sensor is the size of a grain of sand and is embedded into the pill alongside copper and magnesium which make an electrical circuit when they come into contact with stomach acid, much like a potato clock. This circuit powers the sensor.

The digital pill has been trialled as an extra dummy pill alongside normal high blood pressure medication by Lloyds Pharmacy but there are hopes it could be used in active drugs.  Andrew Thompson, CEO at US firm Proteus Digital Health said: “When you swallow one of our digital drugs it will say, ‘Hello I’m here, I’m Novartis, I’m Diovan, 1.2mg, I’m from plant number 76, I’m batch number 12 and I’m pill number two.’”

He claims the invention could save the NHS millions of pounds as well as ensure treatments are completed and help families monitor elderly relatives who may get confused taking multiple pills.

Oxford University has also been involved in the pilot of the drug. Professor Lionel Tarassenko, from the Institute of Biomedical Engineering at the university, said he thought the pills didn’t threaten security.

He said: “Elderly people sometimes have to take six, seven, or eight pills a day.

“But if someone doesn’t take their pills that can be a very, very serious thing. If you have an elderly parent who is not taking their pills, you might want to know.’ He is hoping to start a UK trial next year using the texting pills with heart failure patients.