Introduction
Sometimes it is great to be able to see if things are hot or cold with a thermometer or other device. Multiply it by 64 and it is possible to get a graphical image of hot spots or detect humans for instance.
A thermopile array can be used to measure temperature from a distance and a special part from Panasonic called Grid-EYE happens to have 64 of them : )
Since the Sense HAT has 64 LEDs, I wanted to try them together : )
This is what is implemented:
For more experiments with the Grid-EYE and a review, see here: Panasonic Grid-EYE RoadTest - Review
What can you do with it?
The Grid-EYE is designed for detecting humans or objects that come into its field of view. It could be used for automatically turning on the heating when a human is detected, or automatically opening doors for instance. It differs greatly from the usual passive infrared (PIR) sensors used in alarm systems; they require movement whereas thermopile sensors will continuously detect objects while they remain in the field of view. By processing the images over time it is possible to see which direction humans or objects are moving. This could be useful for more intelligent automated doors or barriers, or for innovative electronic advertising that is triggered by human presence and actions.
In the brief time that I explored, it was possible to see people from a distance of five metres, and a 10 ohm resistor connected to an AA battery from about an inch away. By experimenting with the software it is possible to choose the spectrum of color that is desired for the particular temperature range of interest.
Grid-EYE usefulness for people detection (occupancy sensor) was explored in the Grid-EYE Review blog post.
Build Steps
The project is straightforward and simple, so in the interests of efficiency this report won’t have a lot of text!
To build this project, a Pi 3 and a Sense HAT is needed, and the Grid-Eye evaluation kit. I already had the Pi 3 and Sense HAT (and the associated memory card and power supply) as part of the Pi 3 IBM IoT Learner KitPi 3 IBM IoT Learner Kit reviewed here. The Grid-EYE evaluation board is available separately. The one I had (model AMG8832) is not available any more but there is a better performance AMG8834 Grid-EYE Evaluation ModuleAMG8834 Grid-EYE Evaluation Module that can detect humans up to 7 metres away.
The evaluation board contains the Grid-EYE, a pre-programmed microcontroller and Bluetooth Smart capability. Basically nothing needs to be done with the eval board except plug it into a power supply! The supply can be a 5V mobile phone charger or a PC USB port. The photo here shows the Grid-EYE evaluation board. It is about the footprint of a playing card. The Grid-EYE module itself is very small, about 12mm on its longest dimension.
Since the Pi 3 also has Bluetooth Smart capability, the Grid-EYE board connects to the Pi using this. This is great because it means that the imaging can be performed remotely.
The Pi 3 is responsible for translating the 8x8 array of values into colours and sending them to the Sense HAT’s display. The Pi 3 also runs a little web server so any web browser (e.g. PC or mobile phone) can be used to connect to the Pi and view the images live.
Check out the short video (1.5 mins) for some example capture.
Here are the instructions to build it. First, as root user (or prepend sudo to these commands):
apt-get install libbluetooth-dev update-nodejs-and-nodered
Then, as normal user (e.g. pi or your username):
git clone https://github.com/shabaz123/grid-eye cd grid-eye npm install noble npm install sense-hat-led npm install rotate-matrix npm install ioctl npm install socket.io npm install imagejs
Change the index.js file at grid-eye/node_modules/sense-hat-led using the index.js_mine file (which has been through the babel transpiler) using this command:
cp index.js_mine node_modules/sense-hat-led/index.js
The grid-eye/index.js file will need a modification, search for the line with the text progpath and set it to point to the grid-eye folder. The slash at the end is important. For example for me it says:
var progpath='/home/shabaz/grid-eye/';
That’s it! To run it, as root user (or prepend with sudo) type:
node index.js
Use a browser to navigate to http://xx.xx.xx.xx:8081/index.html
The code works but is just prototype quality and there is lots of room for improvement. It seems to work reasonably well but would benefit from some configuration options (things like temperature range are hard-coded).
Top Comments