ESP8266 Inclinometer – Spookie action at a distance.

The ESP8266 Inclinometer is deployed.

Spookie is a feral cat.

Spooky action at a distance”, is a quote attributed to Albert Einstein

Physics puns aside, cats are understandably nervous creatures when it comes to the subject of physics. After all, there is that whole business of Schrodinger’s cats  that didn’t fare all that well. (This was a thought experiment,no actual cats were harmed.)  So, the big question about the ESP8266 Inclinometer project is: “Would Spookie, as his name suggests, be “spooked” by the sudden appearance of a device in his shelter and would it actually detect him in the shelter when he does arrive?”

The sensor has been deployed for two days and we have a clear answer to the question above. Yes, it works!

You can read the article for all the details, but in brief, the sensor measures changes in orientation of the device inside the cat’s shelter. The weight of the arriving cat will deform the soft bedding and cause the sensor to tilt which will be detected by the device. The device reports the orientation data every two minutes and this data is logged to a database on a server computer.

Plotting the X & Y orientation for 24 hours we can see near the end of the time series there is a dramatic shift in the data.  For most of the day and the night, the data was relatively stable. There is some slow drift in the data, that I do not yet have an explanation for (temperature effects?), but there are no sudden changes until around 4:58 AM when both the X & Y axis shifted a lot.  This indicates the arrival of Spookie into the shelter.

The outdoor cats are fed at 6:50AM when an automatic food dispenser dispenses food for the cats. The dispenser also has a camera that clearly showed Spookie leaving his shelter at this time. This corresponds to a sudden shift in the data back towards the overnight values when the shelter was empty. I find it interesting that the upshift started right at 6:50AM but took about 20 minutes to flatten out to a base line level again. Perhaps the cold foam bedding is slow to respond back to its normal flatness.

Last night, it appears that Spookie slept somewhere else, but he knows that feeding time is associated with the morning dawn. So, he arrived at his warm shelter at dawn and waited until feeding time to leave. Will this be a trend?


The sensor is doing what it was designed to do. More testing will continue, but I am very encouraged by this result. Spookie remains blissfully ignorant of his contributions to science.

Next steps:

To examine the data from the sensor, I had to query the data from the database, copy it into an Excel file and make the graphs of the data. This is tedious and so I will next work on a web display of the data that will be available to all.

Stay tuned!

Please follow and like us:


Leave a Reply

Your email address will not be published.