Dust sensor with grove pi plus

dust-sensor
#1

I followed all instructions provided here http://wiki.seeedstudio.com/Grove-Dust_Sensor/#play-with-raspberry-pi for dust sensor but unable to receive any data…although the code is running fine without any error…
Also my dust sensor is not PPD42NS instead I am using DSM501a(which is copy of the former). Is it ok to use this sensor or will I have to use PPD42NS only??

#2

Hi @yashwantptl7,

As long as the clone is outputting the same kind of digital signal, then it’s all going be fine. I don’t think the problem in this case comes from the clone, but from the instructions.

So, let’s see if there’s a problem with how the GrovePi got set up firstly.

We no longer install the GrovePi by asking the user to clone the repo and then just run the scripts without a prior setup of the GrovePi’s package. So, right now, you have to run:

curl -kL dexterindustries.com/update_grovepi | bash

Once you have successfully run this command, you will have the GrovePi’s library installed on the Raspberry Pi.
The next step that still needs to be done is update the GrovePi’s firmware.

cd /home/pi/Dexter/GrovePi/Firmware
bash update_firmware.sh

After this, go on and run this script (use the mentioned port for the dust sensor in the script):

If you still have issues, I might suggest you check if the GrovePi is detected at address 0x04 by running i2cdetect -y 1, by importing the grovepi module and seeing if there’s a works_with_firmware variable in the module’s global scope and in seeing what grovepi.version gives you back.

And finally, you can find out more by checking the GrovePi’s documentation here:
https://dexterind.github.io/GrovePi

Thank you!

#3

Hi Robert,

Thanks for the reply. I went through your suggestion but couldn’t succeed. The code runs till “Reading from the dust sensor” and hangs their…i guess their is some problem with line 51 grovepi.dust_sensor_en(), which is unable to execute. I have also checked for grovepi detection, it is fine…Are you sure their is no problem with sensor(DSM501a) ?..I also did troubleshooting which is hanging at checking for firmware version(I that helps).

Thanks