arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.07k stars 4.78k forks source link

Support Dust Sensor PMS5003 #1516

Closed isvedic closed 6 years ago

isvedic commented 6 years ago

Hi,

It's becoming more and more useful to have some dust data for automating ventilation. Would it be possible to support this sensor in one of the next versions?

I know Sonoff SC have GP2Y10 but that only outputs voltage and can't get info on dust particles size

All info and some code examples can be found at: https://learn.adafruit.com/pm25-air-quality-sensor

I'm already using sensor SHT3x for ventilation logic when to power it and with this it would be more practical for workshops and living areas

Thanks for great work!

ghost commented 6 years ago

What's the raw output for that? You can probaly use the UART-Tx and UART-Rx pins to communicate with the device, but you still have to do something with that raw data.

isvedic commented 6 years ago

9600 baud data streams out once per second from sensor

Posting it to mqtt on topics for PM1.0, PM2.5 and PM10.0 concentration

arendst commented 6 years ago

Must be possible. Send me one and I will look into it ;-)

isvedic commented 6 years ago

Your shipping address?

arendst commented 6 years ago

Send me a pm via the github start page.

PEPZ commented 6 years ago

Hi, @isvedic , did you manage to arrange testing of the PMS5003? There is currently the PMS5003ST module, which adds temperature and humidity to the particle measurement. Would be great to have this supported as well.

catfish34 commented 5 years ago

Do somebody know how to connect PMS5003 to sonoff? As I understand PMS5003 need 5V power. But on sonoff has 3.3?

isvedic commented 5 years ago

@catfish34 mine PMS5003 sensors work on 3.3V just fine but I noticed 10-20% lower particles reported probably due to fan lower speed

catfish34 commented 5 years ago

@isvedic Thank you. But I still have no success to connect PMS5003. When I tried to configure I can see that I need to connect only one DATA pin PMS5003 to sonoff? I tyed but have nothing on main web page sonoff Tasmota.

isvedic commented 5 years ago

Yes, you need only DATA pin connected to sonoff, be sure you are using right pin, configure sonoff and restart

catfish34 commented 5 years ago

I found in Internet this screen: http://cs5-2.4pda.to/12384783.png

I tried to configure my sonoff basic but nothing changed on main page when I changed configuration. My video: http://recordit.co/UdfOJluMEs

Can it be problem with my PMS5003 sensor?

isvedic commented 5 years ago

Could be, so in your case you should connect DATA pin to TX pin on sonoff basic. Nothing shows up only when sonoff receive no data. You can try some other pin (RX would be my choice), or test DATA pin with multimeter if you have any voltage on it.

catfish34 commented 5 years ago

It is very strange... because if I configured this device to PZEM 004 or another sensor I can see values with 0. My video: http://recordit.co/kCeXxsws1S

Possible PMS5003 is special sensor. I will try to buy new one.

@isvedic Thank for your help.

isvedic commented 5 years ago

Try another pin on sonoff and be sure you use correct DATA pin on PMS sensor

dan-cristian commented 5 years ago

Works for me, I used Generic module type and Serial In (RX) gpio set as PMS5003(69). This must be connected to TX pin on PMS. I have tested PMS7003 version. I compiled the firmware with #define USE_PMS5003.

this is the reading I get: Analog0 7

PMS5003 PM 1 um 3 ug/m3 PMS5003 PM 1 um 5 ug/m3 PMS5003 PM 1 um 5 ug/m3 PMS5003 PM 1 um 795 ppd PMS5003 Particals 0.5 um 219 ppd PMS5003 Particals 1 um 28 ppd PMS5003 Particals 2.5 um 0 ppd PMS5003 Particals 5 um 0 ppd PMS5003 Particals 10 um 0 ppd