Pms5003

Hi guys

I have just read this amazing project about using the above and the enviro+ to monitor the quality of the air in the environment.
https://learn.pimoroni.com/tutorial/sandyj/enviro-plus-and-luftdaten-air-quality-station

It’s more or less just what I need, well I think…Thing is my daughter-in-law has respiratory issues and I’d like to know if there may be alternate with less pollution while driving. Anyhow, This is where my problem starts.

I’d like to monitor air quality while she’s driving and display this real time, and also store the data to then recover it later. My question is or are;

  1. Would this do what I want ( not sure if it needs a wireless connection all the time)”
  2. Because of budget issues and not knowing if I can get this working as I have very limited experience , can I just use a PMS5003 for starters ( cheapest option). If this works, build again from the ground upwards with the enviro+.
    Plus, I could use a mifi or even make her phone a hotspot for it, but not sure of the data usage, I’m a bit worried about that!
    I have looked for a project ( I can follow) which just uses the PMS5003 in this type of setup, but as yet not found it.

Maybe there is a much easier or alternative solution?

If anyone can please point me in the right direction it really would be very much appreciated. Thanks in advance…

If you do go with the Enviro + you should be able to just display it on the screen that comes built into it. Assuming its viewable in daylight etc. You might have to put it someplace the sun can’t shine directly on it.

There are other problems with putting it in a car to work out too.
Converting 12v to 5V for one, to power it.
Also, she will have to do a shutdown before turning the key off. Or the SD card will get corrupted and it will stop working.
Or wire it up so it stays on even if the engine is off, your still going to want a shutdown button though. And she will have to remember to push it if the car isn’t going to be used for any amount of time or its going to slowly drain the cars battery.

Welcome to the forum.

Your project sounds doable. Firstly, the PMS5003 needs to interface with the Enviro+. It’s merely a sensor, the Enviro does the work. But you should be able to assemble a unit with a Pi Zero (https://shop.pimoroni.com/products/raspberry-pi-zero-w) as the computer. You could do the whole thing for $100. The Zero could read and record the data for printout later.
How long a period would you want to record?

Hi thank you so much for your help. Right, all these things I have overlooked, but if I can circumvent them, or sort them. Would you know if indeed I can run this without WiFi/internet.

Plus, would the sensor have to be periodically cleaned, sorry just thought of this too after I posted my question. Thanks again guys, it’s appreciated.

If you only want to measure particulate levels you could use PMS5003 with an Arduino and a larger display instead of the Enviro+. The advantage being an Arduino doesn’t care about being shutdown.

The PMS5003 counts the particles itself and sends the results over a serial link.

You should be able to run it as a datalogger, which wouldn’t need the wifi while it’s working. You could take the SD card out at the end of the run and put it in a computer to read.

I was thinking that you could power it from an external battery. Something like this (https://www.amazon.com/Anker-PowerCore-Ultra-Compact-High-Speed-Technology/dp/B01B12PTOM/ref=sxin_2_ac_d_pm?ac_md=2-1-QmV0d2VlbiAkMjUgYW5kICQ0MA%3D%3D-ac_d_pm&cv_ct_cx=USB+battery&keywords=USB+battery&pd_rd_i=B01B12PTOM&pd_rd_r=fd5ffb15-9d0a-4404-ab1f-66bd7972751b&pd_rd_w=cIaZB&pd_rd_wg=RyeO9&pf_rd_p=709d2064-e546-4799-9e66-b352ea89951f&pf_rd_r=HDXQ79FZ791E4PCRV1FF&psc=1&qid=1577792260) would power it for about 8 hours at least.

I don’t know about cleaning the sensor but it could be an issue in very dirty environments.

An alternative, depending on exactly what you’re trying to measure, may be this. https://shop.pimoroni.com/products/sgp30-air-quality-sensor-breakout. It doesn’t do particulates but may be enough for your use.

The suggestion of using an Arduino is a good one. Once its programed there is no harm done when power is abruptly removed. You just need the skills to program it etc.
Other than the time being incorrect on a Pi, no WIFI shouldn’t be an issue. I have a couple of weather clocks built around Pi A+'s, which don’t have WIFI built in. I just added a Real Time Clock module to keep an accurate date and time, as I display the Day, date, time along with my weather info. If they weren’t also clocks, I wouldn’t have bothered with adding a RTC.

Once the Pi has synced (at home, say) how accurately does it keep the correct time? It should be fairly accurate.

Once it syncs it will keep good time until you shut down again. At that point it saves the current date and time. Then on boot up, if it can’t sync, it will use what it saved when you last shut it down. How long it was powered down will be how much your time is off. ;)

If your logging / saving data that could be an issue. Data may get the wrong time stamp when saved.

Utterly amazing, I’m very seriously grateful for everybody’s input in helping out as it is a real problem and your inputs I’m sure will help somehow.
The suggestion in using arduino wasn’t expected and that I can run the PMS5005 directly off the Arduino. If I can display this ( realtime) that could be the way to go.
Right, I need to now check out the links that you have posted, but things are certainly looking a lot brighter than they were this morning, it’s certainly gonna give me a “Happy New Year” and I hope you guys have one too. Thanks all.

There are plenty of data logging shields, and display shields out there for Arduino. If you go that route. Its its equivalent of a Hat. And with the right headers installed you can stack most of them.
If you have never used an Arduino or Microcontroller before you have a bit of learning to do though.
I have a couple Arduino’s kicking around but haven’t done much other than some easy stuff. I just have to go and find my round 2it. ;) And get at it.

Thanks for the encouragement, and help.
I just can’t get over how cheap this stuff is, amazing, thanks again 👍

Adafruit have a wide selection of Microcontrollers, some of those are dirt cheap. They also have thier version of an Arduino, that is as far as I know is 100% compatible with the real thing. I don’t usually like to recommend the competition but Pimoroni sells Adafruit as does Adafruit sell Pimoroni stuff.
The hard part is picking the right Microcontroller for the job. I played it safe and got an UNO as my starter Arduino. I also have a couple of Micro-Bits on the shelf. I did tinker with those a fair bit but they have been idle lately. My plan is to try and get one of my grand kids interested in them. This summer hopefully.

The Arduino like the Pi, has inexpensive models like the UNO, and feature packed models like the Mega. Lots of choice to fit your budget and or requirements.
Just keep in mind that its a Microcontroller not a Single Board Computer. It runs machine code, there is no OS running in the background. All the magic is done via the IDE, Integrated Design Environment. It changes / compiles your C or Python code to machine code and flashes it to the Arduino. It’s done the same way with a Microbit.
The plus is there is no OS to crash or get corrupted and fail. You can kill the power and nothing bad happens. Power it back up and it just starts over and does its thing, or things. No muss no fuss.

Interesting, very interesting, I’m just starting on this path so anything like this is so useful and saves time too. So thanks.

Depending on your interests
I’ve got a bit of experience and I mean a bit. I have a max2play set up, which is AMAZING in a technical sense, it’s a media player .But no programming needed 👍

I also have a Cayenne set up, that is a software on your pi, that builds up a dashboard which you can add sensors to it. I have a pond and this is monitoring temprature, water level and if it drops, I get an email and it then turns off various things. And free software and both done with no programming 👍.but I REALLY have to get into programming. And the environmental project I need to do I hope will not be too difficult as a starter, and it’s got a real use, so that a good driver.
Plus a few sonoff devices doing various things , I’m sure you’ll know about these, cheap and useful .

But thanks again , I’ll CERTAINLY check out the stuff you mentioned. It’s appreciated.

I had no programing skills before buying my first Pi. I like to think I’m average or maybe a little above average Python wise. All self taught. There has been some head banging but also some great satisfaction along the way. Especially when you build something nobody else has. Or just solving a glitch all on your own etc.

My Pi project build pictures are here if you want a look see.
It’s my free Microsoft Public OneDrive folder lol.
https://1drv.ms/u/s!AjOYwiwlwDtpgUN1cjVt4KIi3T7H?e=onqB4U
I’ve built a couple of rovers, a Pirate radio, a couple of weather stations / clocks. One is a portable setup I take to the dog park with me. Don’t want any of the dogs getting heat stroke etc, so it helps keep an eye on conditions. There are few works in progress there that I hope to expand on in the future.
So far I’ve only dabbled with Arduino’s.

If I have any advice regarding Python, it would be, use the tab key, don’t tap the space bar. One of the most frustrating things is the “indent where no indent was expected” etc error messages.

Little gems like this are worth their weight in gold , 👍👍

I use Idle as my IDE, it has a “check module” function that is great for finding typo’s etc. And sometimes the error message actually makes some sense, lol.
Even when it doesn’t make any sense (to me) its searchable via Google etc, that usually points you in the right direction to fix the error.
I have Idle3 installed on my main Windows PC. I do a lot of the preliminary coding on it. My first try code etc. It’s a multimonitor setup that makes clip and pasting easy and or looking at a how to etc. I can get most of the typo’s and wrong indents etc fixed on my PC. Then fix the real errors when I run it on the Pi. It’s what works for me.
I’m also just starting to embrace using Putty to log into a Pie remotely. I have several Motion Eye OS camera setups. They run headless. I have one that has a Pan Tilt setup that I’ve been playing with and setting up action buttons. I can do it all via Putty without having to touch it physically. As long as its turned on and booted up I’m good to go. I set them all up with static IP’s to make logging in easy. Camera 2, my Pan Tilt, is 192.168.0.102, camera 3 is 103, etc.

Well, that’s amazing. It’s great when you put all this stuff together and it works. It’s just that learning curve you have to go through, but that’s also part of the pleasure you get when you get there…

Thanks again for the nuggets of information, they are or will be very very useful in not the so distant future…
Good luck with your future projects , and HNY 👍