Being palmed off with a young whisky when expecting an 18-year-old single malt can be a glass-half-empty moment. But now scientists have developed an “artificial tongue” that might make such skulduggery a thing of the past.

The team, based in Scotland, say their device can be used to tell apart a host of single malts – a move they say might help in the fight against counterfeit products.

“You could train your particular ‘tongue’ to know what one of these whiskies ‘tasted’ like, so that when the fake stuff came along it could identify it and when the real stuff came along it could confirm that it was the real stuff,” said Dr Alasdair Clark, the lead author of the research from the University of Glasgow.

Clark said the technology could be incorporated into a small, portable device and have a wide range of applications, from identifying poisons to environmental monitoring of rivers.

“Initially we thought of it more for sort of production line, quality control maintenance, [for example] if you are an apple juice company and you want to make sure that the apple juice you make on Tuesday is the same as the one that you made last week,” said Clark.

Writing in the journal Nanoscale, the team describe how their artificial tongue is based on a glass wafer featuring three separate arrays, each composed of 2 million tiny “artificial taste buds” – squares about 500 times smaller than a human taste bud, with sides just 100nm long.

There are six different types of these squares in the device, three types made from gold and three from aluminium. While one type of gold and one of aluminium are essentially bare, the surface of the other types are coated in different chemical substances.

Each of the three arrays contain one type of gold and one type of aluminium square. When light is shone on an array, it interacts with the electrons at the surface of the squares, resulting in dips in the reflected light which can be measured. These dips appear at slightly different wavelengths depending on which type of square the light interacts with.

Crucially, these dips shift depending on the liquid surrounding the arrays. The upshot is that each liquid gives rise to its own “fingerprint” of measurements. That means the device can be used to tell apart different liquids – and even identify them if they have been recorded before – without revealing their makeup, rather like our own tongues do.

“Your tongue can’t tell you what is in black coffee, but it knows what black coffee tastes like,” said Clark.

While this “artificial tongue” is not the first to be made, the team say its arrangement of artificial tastebuds is a step up from previous approaches, making the device smaller and speeding up information gathering.

To test their device, the team covered their “artificial tongue” in seven different single malt whiskies in turn, as well as water, 40% vodka, and ethanol in water.

The team found that the device produced a different pattern, or fingerprint, of results for each of the whiskies, allowing them to tell apart a range of drams including 12- and 18-year-old samples of Glenfiddich, 10-year-old Laphroaig and Glen Marnoch’s single malt Rum Cask. The team suggest this is due to tiny differences in the presence of various components – aromatic chemicals produced plants such as vanillin and terpenes.

“Although [the whiskies’] chemical compositions are pretty similar, the way that we have designed the experiment means that we can still separate them out as separate entities,” said Clark.