My neighbor's smoking habits negatively impacted my indoor air quality and comfort. To tackle this problem, I developed an Arduino-based solution using the PPD42NS sensor for smoke detection. Beyond smoke, the system also measures temperature, humidity, and other environmental data. All this information is sent to a Raspberry Pi server, where it's displayed on a Grafana dashboard. Additionally, to ensure I can take immediate action, notifications are sent to my smart watch when smoke levels become unacceptable or other environmental parameters reach critical levels.
An Arduino is connected to a Grove Base Shield, which is connected to several Grove sensors from Seeed Studio. Specifically, we have the Grove Gas Sensor MQ5, Grove Dust Sensor, and Grove UV Sensor. Grove Dust Sensor is a PPD42NS sensor that is used to detect cigarette smoke. An Ethernet Shield W5100 is also connected to the Arduino, enabling communication with the server. Finally, a DHT11 sensor is connected to the Arduino, allowing for outdoor temperature and humidity monitoring.
The PPD42NS sensor can measure particle concentrations in the air, with its smallest detectable particles being PM2.5 particles, which have an average size of over 1µm. Various sources confirm that PM2.5 particles are present in most tobacco smoke.
The idea is to monitor particle concentrations in the air and trigger smoke detection when concentrations rise. This approach proved effective by monitoring the number of particles in 0.01 cubic feet (pcs/0.01cf). Under normal conditions, values range from 0 to low thousands, but during a "smoking break," they can easily reach tens of thousands. Because the sensor is enclosed, smoke doesn't immediately dissipate in the wind, giving the sensor a chance to detect it. Particle monitoring and calculations follow Seeed Studio's official wiki guidelines.
The server has four main components - Mosquitto, Node-RED, InfluxDB, and Grafana. All these components were installed using Docker, with the help of the IOTStack project, which greatly simplifies the entire installation and management process. The resulting YAML file can be found in the source code.
All monitored data is clearly displayed on the Grafana dashboard, which can be customized as needed. I can access Grafana from any local device, such as a mobile phone or smart TV, allowing me to monitor even on the go.
Smoke detection works reliably unless extremely strong wind outside could scatter particles. However, thanks to the protective plastic enclosure, such scattering doesn't occur even in windy conditions. With the connection to the smart wristband, I receive priority notifications on my wrist, making it highly unlikely for me to miss any alerts (the wristband also vibrates).
The graph displays anomalies, during which I verified that my neighbor was indeed smoking. The anomalies around 22:30 may seem unusually significant, but I can attest that during that time, an extremely strong and unfamiliar odor was present in the vicinity, further confirming the smoking activity.