A headteacher says sensors have reduced the number of students vaping.
Matthew Carpenter, from Baxter College, Kidderminster, had the sensors and also CCTV installed to tackle the use of e-cigarettes.
It comes as a group of students there admitted addiction to vaping.
The tech, Mr Carpenter said, had been used to “pinpoint” when and where the activity was happening to help lessen impacts on both students and the school environment.
The school had spent £4,000 installing CCTV outside plus sensors in toilet blocks, having seen an increase, it said, in the number of students asking to go to the toilet during lessons.
“We’ve got a CCTV camera outside so we can just use the timestamps to work out when it was happening,” Mr Carpenter explained.
“What the sensors allow us to do is really accurately pinpoint when students have been vaping.”
E-cigarettes have helped many thousands of people stop smoking by removing the dangerous and toxic tobacco smoke from their habit, giving a huge health boost.
But the e-cigarette vapour which is inhaled can still contain small amounts of chemicals, including nicotine.
Mr Carpenter said students who had not smoked previously had taken up vaping as a “lifestyle choice” and he was concerned it would lead them to smoke traditional cigarettes and a nicotine addiction.
Trading Standards says one in three vaping products may fall short of regulations monitoring nicotine limits.
It is illegal to sell e-cigarettes and liquid to under-18s.