NAME
RPi::PIGPIO::Device::DSM501A - Read dust particle concentraction from a DSM501A sensor
DESCRIPTION
Uses the pigpiod to read dust particle concentraction from a DSM501A sensor
The minimum recomended sampling time is 30 seconds.
Dust particles concentration is extrapolated for a cubic meter of air.
Sensor specs can be found here : https://www.elektronik.ropla.eu/pdf/stock/smy/dsm501.pdf
Acceptable room air concentration for particles ≥1 µm is 8,320,000 / cubic meter. More info on dust levels for different environments here : https://en.wikipedia.org/wiki/Cleanroom#ISO_14644-1_and_ISO_14698
SYNOPSIS
use RPi::PIGPIO;
use RPi::PIGPIO::Device::DSM501A;
my $pi = RPi::PIGPIO->connect('192.168.1.10');
my $dust_sensor = RPi::PIGPIO::Device::DSM501A->new($pi,4);
my $pcs = $dust_sensor->sample(30); # Sample the air for 30 seconds and report
NOTES
Please be aware that c<sample()> method will block until the sample time expires.
METHODS
new
Create a new object
Usage:
my $dust_sensor = RPi::PIGPIO::Device::DSM501A->new($pi,$gpio);
Arguments:
$pi - an instance of RPi::PIGPIO
$gpio - GPIO number to which the sensor is connected
sample
Sample the sensor for the given time and return the measured average concentration
Arguments:
$sample_time - time in seconds for which to sample the device