Building a Sensor Hub based on Raspberry Pi

Charles Xie
DataSeries
Published in
7 min readMar 11, 2019

--

Scientists rely on sensors to probe things that are not directly perceivable by human senses and thereby advance science. If you are interested in doing some science experiments, you can now build your own sensor hub using the Raspberry Pi platform with a relatively small budget and effort — thanks to the versatility of the incredible platform and the maturity of the supporting community. In this article, I show how to build a sensor hub using a number of breakout boards and their open-source driver code that I found online. I also show the results of some simple but intriguing experiments that you can immediately do with some of these sensors. None of these experiments require complex setups or expensive materials, but they show the true power of science experimentation unleashed by sensors that extend our perception.

Fig. 1: A close-up of a sensor breakout board

Sensor breakout boards

Instead of building my own sensors from scratch, I used existing sensor breakout boards (Figure 1). There are dozens of them available online. Most of them provide a unique I²C address that allows the Raspberry Pi to communicate with them. The I²C interface is quite simple (Figure 2). For starters, it is sufficient to know that it has only four wires: SCL (serial clock), SDA (serial data), GND (ground), and VIN (voltage input). The I²C address of a sensor breakout is usually defined by the…

--

--

Charles Xie
DataSeries

Computational Scientist, Physicist, & Inventor at the Institute for Future Intelligence https://intofuture.org