Sharp Dust Sensor GP2Y10------Domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
rajbadri
Normal user
Posts: 56
Joined: 21 Dec 2015, 21:38
Location: India

Sharp Dust Sensor GP2Y10------Domoticz

#1 Post by rajbadri » 09 Jan 2016, 05:48

hi
i am trying to use the sharp dust sensor GP2Y10 to send values to domoticz air quality.
i am getting values in the range of 500-550 but air quality in domoticz continuously shows 0. Do i have to give a formula in esp-easy so that values get reflected in Air-Quality.
Screen Shot 2016-01-09 at 10.10.24 AM.png
Screen Shot 2016-01-09 at 10.10.24 AM.png (72.06 KiB) Viewed 11175 times

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: Sharp Dust Sensor GP2Y10------Domoticz

#2 Post by Ger » 09 Jan 2016, 11:51

The Sharp Dust Sensor uses an analog voltage.
You can choose percentage or voltage in Domoticz

QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: Sharp Dust Sensor GP2Y10------Domoticz

#3 Post by QcVictor » 03 Jun 2016, 00:27

Hi Guys
One of you could share the wiring and setting with the esp
tks in advance,

hamster
Normal user
Posts: 62
Joined: 27 Sep 2015, 21:01
Location: UK

Re: Sharp Dust Sensor GP2Y10------Domoticz

#4 Post by hamster » 11 Feb 2017, 07:05

Ger wrote:The Sharp Dust Sensor uses an analog voltage.
You can choose percentage or voltage in Domoticz
I am using a custom dummy device where I have labelled the axis as microns.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Sharp Dust Sensor GP2Y10------Domoticz

#5 Post by Shardan » 11 Feb 2017, 17:19

Hello,

i can'*t say much to Domotics as i'm using FHEM.

The GP2Y10 gives an analog value that is converted into digital "ticks".
This "ticks" reading is somewhat senseles without a formula.
Aerosol (fine dust) is measured in "µg/m³".
The GP2Y10 gives typical 0,5V/100µg/m³
Your value of "537" definitely is not "µg/m3" - you would see nothing besides dust :-)

And here the problems start.
First, the ESP8266 itself converts a range from 0...1 Volt. So you need a voltage divider (4.7 KOhm / 2.2 KOhm works fine if GP2Y10 runs on 3,3V) at the analog input.
But be aware, some modules like the WeMos D1 already have this divider built in.
(Does anyone know if the NodeMCU's have it built in? I don't have one at hand so i can't check)

Second, zero is not zero.
The output voltage of the module at no dust can be 0.... 1,5 Volts according to the data sheet.
The output voltage can be 0,35...0.65 Volt per 100µg/m³.
So this sensor must be calibrated via a formula to give a meaningfull reading.

But that needs a calibrated dust meter to see where your sensor resides. Such dust meters are very expensive.

Even worse, the zero point is not fixed, it may move over time.
The Application note says:
・If monitor value Vo maintains a bigger value than the memorized Voc for a certain
period of time, this monitor value Vo should be stored in the memory of application as a new Voc.

As far as i can see the GP2Y10 sketch does not do this.

I've tried to mount the Sensor into an airtight case, letting air in through a "Hepa" filter and pulling air out with a fan.
I was hoping that would give a reliable "zero" value". It sadly does not work, it just showed that these "Hepa" Filters
do not keep off the fine dust the sensor registers.

ATM i use this formula: ((%value%-1800)*13.2)/512
The resulting value just feels not too bad. To be honest, this is very far away from a reliable calibration.
The "1800" Value gives the zero point correction, 13.2 gives the correction for the µg/m³-Value.
Be aware that these values are for my sensor - your sensor may (and will!) differ!

If someone has an idea how a reliable calibration could be done without using a 500€ Dust Meter, please mention here.

Datasheet
https://www.sparkfun.com/datasheets/Sen ... 10au_e.pdf
Application Note:
http://www.sharp-world.com/products/dev ... appl_e.pdf

I'll placea circuit diagram and some notes about connecting the GP2Y10 here later

Greetings
Shardan
Last edited by Shardan on 11 Feb 2017, 19:28, edited 1 time in total.
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Sharp Dust Sensor GP2Y10------Domoticz

#6 Post by Shardan » 11 Feb 2017, 17:57

QcVictor wrote:Hi Guys
One of you could share the wiring and setting with the esp
tks in advance,
Hello,

i've attached a schematic how to connect the GP2Y10 to an ESP-12E.
The connector "To GP2Y10" is just 1:1 to the connector on the sensor.

Some things you should be aware off:

1. The R1 / C1 must be placed there - it's necessary for the LED circuit inside the sensor.
2. This circuit is calculated for 3,3V for the sensor. Don't use 5V, it won't work.
3. Use pure sensor, not a breakout board with the sensor mounted.
Most of these Breakout boards have additional circuit on it including an additional transistor for the LED circuit.
This is not necessary as the ESP-output has this transistor built in.
If you use the breakout board, the LED inside the sensor is on when it should be off and vice versa.
For changing the source code to get such a breakout board running see this thread:
viewtopic.php?f=6&t=2607&p=12829&hilit=GP2Y10#p12829
4. Remember some Boards like the WeMos D1 have the voltage divider (R2/R3) already built in.
5. Setting: You may chose any free GPIO for the LED pulse driving, i used GPIO 16 in my circuit.
This GPIO is choosen in the device setting in ESPEasy. A formula for calculating.... see posting above about this.
Besides this the setting is just as shown in the first post of this thread, see above.

GP2Y10-Circuit.jpg
GP2Y10-Circuit.jpg (221.67 KiB) Viewed 9279 times

I made a PCB for this circuit including a sensor for humidity (SI7021) or air pressure and humidity (BME280).
An OLED display may be connected, a multicolour led can be set up giving a quick view to air quality (rule driven).
A fan may be connected if necessary for you and on/of/PWM driven by rules or http-command.

If anyone is interested let me know.
Regards
Shardan

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: Sharp Dust Sensor GP2Y10------Domoticz

#7 Post by vojtishek » 24 Feb 2017, 09:50

@rajbadri
Do you have any progress related to calculations in domoticz from dust sensor?
I'm in same situation, getting value around 220 in espeasy.

Thanks
Vojta

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 69 guests