The Squirrel Cafe
By Rob Zwetsloot. Posted
Predict the weather with… squirrels and nuts!? We lift the lid on an ingenious project
Advertisement
Head to head: Raspberry Pi + Raspberry Pi Zero + Raspberry Pi Pico.
Back in 2012, Carsten Dannat was at a science summit in London, during which a lecture inspired him to come up with a way of finding correlations between nature and climate. “Some people say it’s possible to predict changes in weather by looking at the way certain animals behave,” he tells us. “Perhaps you can predict how cold it’ll be next winter by analysing the eating habits of animals? Do animals eat more to get additional fat and excess weight to be prepared for the upcoming winter?”
An interesting idea, and one that Germany-based Carsten was determined to investigate further. “On returning home, I got the sudden inspiration to measure the nut consumption of squirrels at our squirrel feeder”, he says. Four years later and his first prototype of the ‘The Squirrel Cafe’ was built, incorporating a first-generation Raspberry Pi.

A tough nut to crack
A switch in the feeder’s lid is triggered every time a squirrel opens it. To give visual feedback on how often the lid has been opened, a seven-segment LED display shows the number of openings per meal break. A USB webcam is also used to capture images of the squirrels, which are tweeted automatically, along with stats on the nuts eaten and time taken. Unsurprisingly perhaps, Carsten says that the squirrels are “focussed on nuts and are not showing interest at all in the electronics!”
So, how do you know how many nuts have actually been eaten by the squirrels? Carsten explains that “the number of nuts eaten per visit is calculated by counting lid openings. This part of the source code had been reworked a couple of times to get adjusted to the squirrel’s behaviour while grabbing a nut out of the feeder. Not always has a nut been taken out of the feeder, even if the lid has been opened.” Carsten makes an assumption that if the lid hasn’t been opened for at least 90 seconds, the squirrel went away. “I’m planning to improve the current design by implementing a scale to weigh the nuts themselves to get a more accurate measurement of nut consumption,” he says.

Just nuts about the weather!
The big question of course is what does this all tell us about the weather? Well, this is a complicated area too, as Carsten illustrates: “There are a lot of factors to consider if you want to find a correlation between eating habits and the prediction of the upcoming winter weather. One of them is that I cannot differentiate between individual squirrels currently [in order to calculate overall nut consumption per squirrel].”
He suggests that one way around this might be to weigh the individual squirrels in order to know exactly who is visiting the Cafe, with what he intriguingly calls “individual squirrel recognition” – a planned improvement for a future incarnation of The Squirrel Cafe.
Fine-tuning of the system aside, Carsten’s forecast for the winter of 2017/18 was spot-on when he predicted, via Twitter, a very cold winter compared to the previous year. He was proven right, as Germany experienced its coldest winter since 2012. Go squirrels!
Rob is amazing. He’s also the Features Editor of Raspberry Pi Official Magazine, a hobbyist maker, cosplayer, comic book writer, and extremely modest.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Pironman 5 Mini review
Compact and bijou, this Raspberry Pi 5 case looks cool
Read more →
E-ink shipping monitor
The display comprises a Raspberry Pi Zero 2 W, a Pimoroni Inky Impression 7.3-inch display, and a Wegmatt dAISy Mini AIS receiver. AIS stands for ‘Automatic Identification System’, and it’s this device that picks up the signals coming from the ships themselves, which goes to the display via the Raspberry Pi Zero 2 W. There’s probably a […]
Read more →
NTRON gaming and synth console
The NTRON is compatible with original NES controllers, and there are custom models built on perfboard
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.