A crucial event in beekeeping is 'swarming'. Swarming can be bad news for beekeepers. When a queen bee departs, she takes half the hive with her, leaving a weaker hive behind. With advance warning, it's possible to set up a "bait" hive, to lure in the departing bees, but if the events are not managed properly, swarming can mean half the hive is lost entirely.

But there is relief in the form of a specially developed accelerometer that detects motion in smartphones and has been turned into listening devices for predicting "swarming".

The procedure and device developed by Martin Bencsik's team at Nottingham Trent University, UK, involves embedding accelerometers into the back wall of two hives to detect the motion caused by the buzzing insects. They hooked their sensors up to a computer to monitor changes in the hives' vibrations over five months.

"The method relies on the computer learning the language of the buzzing hives," says Bencsik. The team found several signals in the vibrations – for instance, vibrations peak at sunrise – which could be used to monitor the health of a colony. Crucially, about 10 days before swarming, the hives produced a distinct vibration.

Others have tried to monitor hives using microphones without much success, but Bencsik's device would be useful if he can prove it works on a large scale, says Tim Lovett of the British Beekeepers' Association, which has considered developing a similar one that would automatically deliver an alert – by phone or email for instance; before a hive swarms.

Bencsik and his team now intend to expand the study. "We want to see if each hive has its own language," he says, created by different hive structures, or bee species. The clincher would then be whether his computer program can learn each of these languages and deliver reliable alerts.

The research is published in the journal Computers and Electronics in Agriculture.