Air quality sensor for particle photon

Hi
I would like to install an air quality sensor, and I would like to know if there is any device compatible with particle photon. Has anybody done something like that?

Thanks

@javidr ,

Air quality is a broad topic. The short answer is, yes, there are a number of sensors that you can use.

At a basic level, the BME680 gives temperature, humidity and volatile organic compounds. I use this sensor in a local park’s parking lot to measure heat index and exhaust fumes.

There are other factors in air quality. The most popular would be the EPA’s Air Quality Index which includes:

  • ground-level ozone
  • particle pollution (also known as particulate matter, including PM2.5 and PM10)
  • carbon monoxide
  • sulfur dioxide
  • nitrogen dioxide

Perhaps a little more about how you define air quality would help . Chances are, there are sensors that will work with the Photon to measure these values. I think you will find a great deal of experience in this community with these measurements.

Chip

3 Likes

Hi,

there’s this work that @jaredwolff has done, not sure if currently working with the photon, but might be worth a look, as it could be perhaps a source of inspiration:

this:

and this:

Cheers,
Gustavo.

That’s amazing, thanks!

To the first question, not sure what I want to measure exactly, by now I’m researching about what can be done with a photon and then decide what to do

Thanks both!

@javidr ,

Always good to start by asking what is possible. Since you are in the early phases of your solution design, another way to help you evaluate what is possible would be to consider the following:

  1. Connectivity - The Photon (and all the Particle devices) can support a number of ways to connect to a sensor. It can connect directly to i2c, SPI, Analog, and Serial sensors. It would need an adapter to connect to sensors that use RS-485 or 4-20mA current loops.

  2. Voltage - While some of the pins on the Photon are 5V tolerant, you should look for 3.3V sensors

  3. Libraries - Particularly for devices that use i2c, SPI and serial, you will want to see if there is a library available for your prospective sensor. You can search the Particle libraries here. Note that these libraries will come in varying degrees of maturity. A good proxy for the quality of a library (IMHO) is the number of downloads.

Good luck with your research.

Thanks,

Chip

1 Like

Yep, the main area ti wanted to discover is compatibility and if the photon has enough power to work with the sensors needed

I looked at this, Build a cheap air quality sensor using ESPhome, Home Assistant and a particulate matter sensor - PieterBrinkman.com and looks like a good approach but don’t know if it would be supported

Thanks!

@javidr ,

Cool article and nice application of a solution that focuses on particulate matter.

The short answer is that you can build a system with the Photon that supports the sensors mentioned in this article. There is a community library for the PMS5003 sensor and support for the DHT-22.

The biggest different between the Photon and the ESP8266 will be in the platform. Particle has developed a robust set of services to support configuring, deploying and managing your device.

Thanks, Chip

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hi

I just bought and wired a PMS5003 sensor (particle matter sensor). Is there any library already built to read the data from the sensor? If not, any help or code sample on how i can read the data from the sensor?

Thanks

Have you tried searching the forum before posting a request that may already have been answered?

https://community.particle.io/t/welcome-using-particle-forums-and-forum-etiquette

yes, i found a similar topic but it was for 7003. In fact, this is the continuation of a thread i open last year but it is closed now (Air quality sensor for particle photon - #6 by javidr)

If there is any post that already covers this topic, apologies, but i have not seen it. Would you be able to tell me which one it is? :slight_smile:

Thanks

The post you linked was followed by this reply which suggested a library

Have you tried this?
I'll repoen the original thread and move this discussion over there.

Hi

I tried that, using the example in the doc, and wiring as it says (the txd pin is not wired, i dont know if this is correct)

It doesnt read any data, and from time to time the photon gets restarted. I dont know what might be the problem

Any help please?

@ScruffR ,

Sorry but I have slightly different dust sensor models.

Chip

then it would probably be good to know which PMS5003 sensor board @javidr uses exactly. The information about a lacking pin just doesn't suffice. It would be much more interesting which pins are available.

Also, since the post that suggested the library seems to predate the purchase of the sensor I'm not sure why this didn't impact the decision which sensor board to buy :thinking:

I did open a different topic and it was moved here, remember? :slight_smile: Im happy to open a new topic if it is easier

This is the sensor i bought - PMS5003 Particulate Matter Sensor with Cable– The Pi Hut
And i am wiring it using this breakout - Breakout for Particulate Matter Sensor (PMS5003)– The Pi Hut

The code says to wire only VCC, GND and RXD, dont know if TXD and SET should be wired too, in some other tutorials it is wired but it is for an ESP8266 (Build a cheap air quality sensor using ESPhome, Home Assistant and a particulate matter sensor - PieterBrinkman.com)

Thanks

I'd always connect both RX and TX. If the library is not using one of them it still won't harm either side of the setup.

However, I'd not think the TX pin of the sensor wouldn't be wired as this is the pin via which the sensor talks to the controllers RX pin. Without it the sensor would make little sense as it had no means to disclose its readings to anybody :wink:

It may well be that the RX pin on the sensor might not be wired when the sensor unconditionally keeps sending its data via TX right from startup. But with the RX pin wired to the TX pin on the controller the controller may send commands to the sensor (e.g. setup, calibration, ...) - providing the library supports it.

This won't be necessary as it appears that your initial request of this thread was not really solved, despite it being marked solved (which I have undone).

1 Like

as you can see im a total newbie on this…

I have added the wire for TX, but it doesnt make any impact at all

This is my wiring. Can you see any clear problem there?

Thanks

Since I cannot see the pin labels on the breakout, I cannot tell whether this is wired correctly.
But you need to wire

Photon  PMS5003
Vin   -->   Vcc
Gnd   -->   Gnd
TX    -->   RX
RX    -->   TX

When I look very closely at that image it appears you have it RX–>RX & TX–>TX which will not work.

T stands for Transmit
R stands for Receive

When one side transmits the other has to receive it.

1 Like