Home Raspberry Pi Sensors onboard - DockerPi Sensor Hub

Sensors onboard – DockerPi Sensor Hub

This HAT has more sensors than sense

I found some time to play with the DockerPi Sensor Hub I got a couple of days ago. This Raspberry Pi HAT can be used as a standalone expansion and an add on to the DockerPi series. I talked about HATs from this series before, so if you follow me, DockerPi Sensor Hub should sound very familiar.

DockerPi Sensor Hub

The HAT will work with the standard 40-pin GPIO header for any Raspberry Pi boards. It’s designed as a HAT, so it would work best with Raspberry Pi 2/3 & 4, but it’s possible to use it with Zero series too.

DockerPi Sensor Hub comes with a 12V 4 pin header for the power transfer. If you already have a DockerPi Power Board (review), you will be able to transfer 12V DC to another tier. Don’t worry if you don’t have one, it’s optional.

All DockerPi HATs use I2C interface to talk to the microcomputer. This one is no different and it uses 0x17 register. The board is equipped with the following sensors:

  • External Temperature Sensor -30℃~127℃
  • OnBoard Temperature DHT11 -20℃~60℃
  • P. Temperature Sensor -40℃~80℃.
  • Humidity detection 20% Rh ~ 95% Rh
  • Light intensity detection 0Lux~1800Lux
  • Pressure detection 300 Pa ~ 1100 hPa
  • Presence detection 100 degrees, the maximum distance of 12m

The Wiki for DockerPi Sensor Hub is well composed and you get the sample script to work within Python, C and Java. I thought I would put my own spin, and as I mainly do NodeRED tutorials, I will show you how to use this board with NodeRED.

Buy DockerPi Sensor Board

Buy it using these links to support NotEnoughTech.

Flawed

Having an array of sensors like this is a great learning tool, but I have to question the placement of the sensors. All, but external temperature sensors, over-report the temperature due to heat coming out from Raspberry Pi 4 (in my case- take a look at the thermal benchmarks). Unfortunately, this heat will also influence the humidity sensor.

I will probably design a 3D printed case where I can mount the sensors and use a ribbon cable to separate the sensors from the board itself. If you already using DockerPi stacks, I would put the DockerPi Sensor Hub on top of the stack to limit the heat reaching the board.

DockerPi Sensor Hub in NodeRED

Since there is no designated node (that works) with I2C, I decided to “cheat” a little bit and use the exec node to communicate with the python3 script. If you never used the exec node, it will trigger a command in CLI and post the result of that command back as msg.payload.

The Python script isn’t suitable for NodeRED, so I spend extra time translating all values into a JSON formatted message (learn more about JSON). Once the response was formatted as JSON -I had no problem mapping the values to an interactive dashboard.

#enable I2C - navigare to interfacing
sudo raspi-config

#install the libraries
sudo pt-get install python3 python3-smbus

You can set the updates to 5 seconds, and all sensors will report the values. Of course, you can use these to trigger other flows and incorporate the values into your designs. The dashboard is purely for decorative purposes. You can download the whole flow from this link.

Buy DockerPi Sensor Board

Buy it using these links to support NotEnoughTech.

Conclusion

I would strongly advise you a ribbon cable (like this one) DockerPi Sensor Hub with a ribbon cable and think of a custom enclosure for this board unless you want to monitor thermals inside a bigger enclosure. The board isn’t expensive – $16.99 at Seeedstudio Store. I will update this article once I have a 3D design ready until then it’s all in your hands. If you have any questions about DockerPi Sensor Hub let me know in this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated in style with crypto-currency

SATA HAT

Add an SSD to Raspberry Pi 4 and turn it into a super-cooled NAS drive.

More HATs

Argon One

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO

More cases on

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Free wireless doorbell (Amazon Dash button hack)

0
The most terrifying situation I can imagine* is missing a parcel

Raspberry Pi NAS: (NAS-pi) Modding like a boss #part2

0
Plex and RAID1 NAS drive build log

MagPi – auto-downloader

0
Grab each edition of Mag Pi as soon as possible!

HOW TO...

How to boot Raspberry Pi 4 from USB

0
How to set up and boot Raspberry Pi 4 from USB drive - headless guide.

Raspberry Pi Zero, Raspberry Pi 3A+ WiFi without keyboard or cables

0
Getting Raspberry Pi boards connected in seconds

Everything you need to start using JSON

0
It's JSON not Jason, just saying!

How to use Join App in NodeRED

0
The day finally comes where Join app is almost everywhere!

Driving LCD with Arduino and Raspberry Pi

0
Displaying things on an LCD screen is as easy as going through a cup of jellybeans while writing this tutorial!