Giter VIP home page Giter VIP logo

sps30_on_raspberry's Introduction

Sensirion SPS30 connected to Raspberry Pi

===========================================================

Software to connect an SPS30 with a Raspberry Pi running I2C. It is able to instruct, read and display data from an SPS30. The monitor can optionally be extended to include a DYLOS DC1700 and /or SDS011 monitor and provide common output.


A detailed description of the options and findings are in SPS30_on_raspberry.odt

Getting Started

This project is part of a number of projects to measure the air quality. I bought a new sensor : SPS30 from Sensirion. Having worked on another sensor from them (SCD30) before the quality is normally good. The aim is to compare the output with other sensors and provide the learning.

The board is relative new at the time of writing this documentation and as such a lot of preliminary documents from supplier.

I have already written a real working driver for Arduino/ESP32, but wanted to connect to a Raspberry PI over I2C.

The monitor can optionally be extended to include a DYLOS DC1700 and /or SDS011 monitor and provide common output.

Prerequisites

BCM2835 library (http://www.airspayce.com/mikem/bcm2835/)

Software installation

Install latest from BCM2835 from : http://www.airspayce.com/mikem/bcm2835/

  1. wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.56.tar.gz
  2. tar -zxf bcm2835-1.56.tar.gz // 1.56 was version number at the time of writing
  3. cd bcm2835-1.56
  4. ./configure
  5. sudo make check
  6. sudo make install

To compile the program, go in the directory and type make

To create a build the SPS30 with Dylos monitor (in case you have one): make BUILD=DYLOS

To create a build the SPS30 with SDS011 monitor (in case you have one): make BUILD=SDS011

To create a build the SPS30 with BOTH SDS011 & Dylos monitor: make BUILD=BOTH

Program usage

Program options

type ./sds330 -h or see the detailed document

Versioning

version 1.0 / May 2019

  • Initial version for Raspberry Pi

version 1.4 / April 2020

  • Based on the new SPS30 datasheet (March 2020) a number of functions are added or updated. Some are depending on the new firmware.
  • Added sleep() and wakeup(). Requires firmware 2.0
  • Added GetVersion() to obtain the current firmware / hardware info
  • Added GetStatusReg() to obtain SPS30 status information. Requires firmware 2.2
  • Added structure SPS30_version for GetVersion
  • Added FWcheck function to check on correct firmware level
  • Added INCLUDE_FWCHECK in SPS30lib.h to enable /disable check.
  • Changed probe() to obtain firmware levels instead of serial number.
  • Changed on how to obtaining product-type
  • Depreciated GetArticleCode() Still supporting backward compatibility
  • Update to documentation

Version 1.4.4 / July 2020

  • Validated against an SPS30 with firmware 2.2 (thank you Sensirion)
  • Update to documentation

Author

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE 3.0

Acknowledgements

Make sure to read the datasheet from Sensirion. The latest version is March 2020 it does provide good starting point.

June 2021, Input from CCDZAPPER:

This is not an issue - just a note to help others that may have damaged or lost the flimsy cable with the ZHR-5 connector. It is available inexpensively on eBay: https://www.ebay.com/itm/114551266422 Make sure you pick the correct type, which is 1.25mm 5 Pin. (10 Sets JST SH 1.0 ZH 1.5 PH 2.0 XH 2.5 Housing Connector Female Male Wire)

sps30_on_raspberry's People

Contributors

paulvha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sps30_on_raspberry's Issues

SPS30: Could Not Get Auto-Clean Interval

I am an absolute beginner using the sps30 with the raspberry pi zero 2w.

The sensor is connected over i2c with GPIO pins 2 and 3 (i2c1) without external resistors. The 5v power comes straight from the pi using pin 2.

I have been using this program successfully for a few weeks but now I get the error message: Could not get Auto-Clean Interval whenever I run the program, no matter what settings I use.

I have never changed the autoclean interval and I do not know why I get this error.
Any help is appreciated and more details can be provided upon request.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.