IBM’s Andy Stanford-Clark shares his learnings from an exploratory project at Marwell Zoo that brought together IoT, the Cloud and AI to tackle the high environmental – and financial – cost of heating the animal enclosures.

The high cost of comfort

Located in the south of England, Marwell Zoo is home to animal species from all over the world. Many, such as the nyala antelope from southern Africa, require additional heating in their sleeping areas during the winter months.

But the animals tend to get up and move about, not spending the whole night in any one area. This meant that the zoo was heating spaces even when they weren’t being used.

The zoo came up with the idea of automating the heating in the animals’ sleeping enclosures, so that the heater would be triggered to turn on only when animals were present. Their first test was with passive sensors, like the ones used in burglar alarms, that ‘see’ things when they move. But they found that when the animals lay down, the heating turned off. The zoo realised it needed a better solution.

Using active sensors

Meanwhile, IBM UK’s CTO Andy Stanford-Clark had been working on a very different kind of project. At the IBM Internet of Things headquarters in Germany, he had developed a new way to show staff and visitors how busy the on-site coffee bar was, without them having to go and look.

To achieve this, Andy installed two Omron thermal imaging sensors that covered the length of the serving area and connected them to an Arduino single board computer (SBC). The sensors collect temperature readings every second, which the SBC sends up to the IBM Cloud over WiFi.

Here a type of machine-learning algorithm, called a neural network, has been trained by Andy to identify the presence of heat-emitting bodies from the readings, and infer the length of the queue accordingly. The neural network then instructs another SBC, which drives an animated LED display in the upstairs office area.

Duncan East, Marwell Zoo’s Head of Sustainability, approached Andy after hearing him speak at an event on IoT. Duncan saw the potential in using active sensors, since the neural network would actually gain confidence in its decision-making when the animals are motionless. Andy was delighted to take on a new exploratory project: “This excited me personally because it brought together energy-saving, IoT and furry animals which are three of my favourite things,” he says.

Adapting the solution

Unlike the coffee bar, the zoo’s solution would not need to gauge how many bodies were present, simply if there were animals in the sleeping area or not. Instead of a line of sensor elements, Andy chose a sensor with a 4×4 grid arrangement that he placed above the sleeping area. Every second it captures 16 temperature readings to create a thermal map of the space.

The sensor is connected to an SBC that sends the temperature readings up to the IBM Cloud over WiFi. Here, a trained neural network analyses them to decide whether there are any warm bodies in the sleeping area. If it decides that animals are present, it sends a command to another SBC back in the zoo, which controls a mains relay to turn on the heater.

The sensor continues to send the temperature readings once a second. When the neural network in the Cloud decides that the animals have left the area, it sends a command to turn the heater off.

Training the neural network

“We wanted to make sure the neural network was working well before we started controlling the heater,” explains Andy. Since the heater provides comfort for the animals at night, it was important that the solution work effectively.

The IBM team required about two months of data to train the machine learning algorithm. At the beginning, the system did not affect the heating – instead, the IBM team used an Infra-red camera on a Raspberry Pi SBC to record the ‘ground truth’ each time the neural network made a decision.

When the system decided there were animals in the sleeping area, it sent a message to the SBC which triggered the camera to take a picture. The SBC then sent the picture back to the Cloud for storage. When the system decided the animals had gone away, it took another picture.

Andy could then access the images in the Cloud and compare them with the system’s decisions. He tagged the instances where a wrong decision had been made and used these to re-train the neural network. The team also built fail-safes into the solution: for example, if the WiFi connection is lost then the heater will default to being on.

“When we got to about 96% accuracy, the zoo gave the go-ahead for us to start controlling the heaters,” says Andy. “That was in December 2017, after three months of testing.”

An affordable solution

In terms of savings, Duncan estimates that once the solution is fully implemented, Marwell could be using up to 20% less energy for heating. Across the whole zoo, that’s a significant amount of money.

Combining IoT, AI and the Cloud has also been cost-effective because of the affordability of the equipment. Andy used Arduino SBCs to connect the sensors and heaters to the Cloud, and sensors by Omron. The camera was a bit more expensive he says, as was the more powerful Raspberry Pi SBC that was needed for taking photographs and sending them back to the Cloud. But as these components are only used for the initial training period, one set can be moved between the enclosures as the roll-out proceeds.

Further applications

The solution at Marwell Zoo has now been running successfully for two winters. Apart from animal houses and coffee bars, where else could this technology prove effective? Andy points to places such as bus shelters and train platforms, which could be heated only when people are waiting. Instead of relying on a passive sensor that triggers a timer, the active sensor could ensure that not only does the heating come on when people arrive – it also turns off as soon as they leave. There are also applications at home: for example, Andy uses an active sensor to manage the lights in his study.

A key benefit of these technologies is that they are highly accessible, to makers at every level. OKdo can help you with your project, whatever its scale. Get in touch with us and get started.

Like what you read? Why not show your appreciation by giving some love.

From a quick tap to smashing that love button and show how much you enjoyed this project.


Our website uses cookies and similar technologies to provide you with a better service while searching or placing an order, for analytical purposes and to personalise our advertising. You can change your cookie settings by reading our cookie policy. Otherwise, we’ll assume you’re OK with our use of cookies.