I just got some in, and when reading the Wiki it states:
“Plug the dust sensor into digital port D8 on the Grove - Base Shield. It can only be D8, because the operation of this sensor involves sampling, a function only can be achieved by D8, the capture input pin of Atmage328P, on Arduino/Seeeduino.”
Is this also consistent with the Grove Pi? Must it be D8?
Also … I’m beginning to look at how to port this code to Python … any suggestions?
Hey Humancell,
We just got the dust sensor to work with the GrovePi. Do let us know how the code works for you and also share your project with the community.
I just updated my second post … it’s not quite working …
I did update my firmware, and the code from Github. I also did run the: sudo python setup.py install
But then running the example is not working … I’m mostly just getting “Error” and the one time I got values, it was: 167772.15 which seems out of range?
Just another update … I rebooted and even am using a second dust sensor (I bought several for a project we are working on) and I’m getting almost identical results …
pi@raspberrypi ~/GrovePi/Software/Python $ sudo python grove_dust_sensor.py
Reading from the dust sensor
Error
Error
167772.15
Error
Error
167772.15
Error
Who can assist with debugging this sensor? I have tried two different dust sensors, and have the exact same results. I ran it all night long, and the only out I get is something like:
Hey,
I just tried using the sensor and it is giving good values. Can, you run the grove_firmware_version_check.py and make sure that you have version 1.2.4 and then run the code.
This is what I got:
root@raspberrypi:/home/pi/Desktop/GrovePi/Software/Python# python grove_firmware_version_check.py
('GrovePi has firmware version:', '1.2.4')
root@raspberrypi:/home/pi/Desktop/GrovePi/Software/Python# python grove_dust_sensor.py
Reading from the dust sensor
2626.57
Error
841.84
1044.35
No … where can I get v1.2.4? I have cloned Git, and run the update that that leaves me with 1.2.2, then I ran the other pinned post update and got to v1.2.3 … but where is v1.2.4 being distributed?
I ran this too, just now, using the latest GrovePi repository.
All I did was connect the sensor to D8, and then run:
cd ~/Desktop/GrovePi/Software/Python
sudo python grove_dust_sensor.py
I had pretty good results although they do go up and down, depending on how close my fingers are to the sensor. I think blocking light made the sensor value go up and down.
Looking at some of the sparse documentation on the Seeed site for the dust sensor here, even their example swings quite a bit (max being 650, min being 0.6).
So not sure what to say. THe documentation does say not to mess with the two screw adjusters on the side.
Per John’s comments, I did see that the values seem to vary, and I’ll do more testing. I’m curious if you know what causes the “Error” statements? I see in the code, it’s throwing an exception, but what is the root cause of that? Power issue? Or?
Also, it seems the low values can be thrown out … the 0.62 seems to be a warm-up or something?
The first reading might be an older reading from the buffer. You can just neglect it. The Raspberry Pi keeps polling GrovePi every .5s seconds asking for a value back and the GrovePi gives a new value back almost every 30 seconds and it sometimes fails to read the values which gives the “Error” message. It does not cause any harm and you can easily disable it by replacing line 56 here with a pass statement: https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_dust_sensor.py#L56 .
This is based on where the “heating” resistor is located, and how it causes the air to slightly draft upwards bringing dust into the chamber. I’ll be reorienting mine and checking the difference in values.
To remove the values < 1 I also changed line 51 to be: if new_val and conc > 1:
At my company - Wovyn (http://www.wovyn.com) - we’re building custom and turn-key sensor solutions for customers. We’ve built a variety of solutions in many markets, and now have several customers wanting to have “air quality” sensors created. We’ve collected an array of sensors - the Dust Sensor included - that talk I2C or Analog, and are building all of the early small volume prototypes on the RPi (looking at the NanoPi) and using the Grove Pi.
We actually do more than just the sensors, but also an entire middleware solution for easily connecting a wide range of sensors - 3rd party and our own - into enterprise and commercial applications. We also support a large list of IoT cloud platforms that we integrate into.
We’ve found the Grove Pi to be an excellent prototyping platform, and then as we solidify our designs and capabilities we evolve them into our own embedded ARM boards using C.