Software apps and online services
Hand tools and fabrication machines
I was always fascinated by all the small sized things around us, that we are not able to see nor are we aware of.
Always wondered how much microscopic dust is actually floating around my room, in how many organic volatile compounds I am bathing each day. Does it correlate to headaches or a feeling of stale air? If so, wound’t be cool to have something that reminds me I need to refresh the air more often ? After using this device for a while, I discovered that an air purifier is actually useful, keeping humidity under control can help some symptoms of nasal congestion and a reminder to open the windows more often to refresh the indoor air, helps to improve my quality of life.
• Measures Total Volatile Organic Compounds (TVOCs), provides 1 minute average of equivalent carbon dioxide (eCO2)
• Measures dust level from large house dust to microscopic particles of 0.5 microns like bacteria, polen, mold and cigar smoke. Provides 1 minute average dust density.
• Measures Temperature in Celsius and Relative Humidity
• Shows information on the 128x32 pixels monochrome OLED display
• Connects to internet by WiFI and sends real-time data to the cloud using Blynk. The Blynk mobile app project shows a dashboard with nice history graphs
• Big multi-function push button (control display, switch lights using a relay, etc).
• Red status led alerting different abnormal conditions
• Two 3.3V logical outputs on the back which can be used to control anything from lights to air conditioning or fans using relays, transistors, mosfets or IR leds.
VOCs are often categorized as pollutants and/or sensory irritants and can come from a variety of sources like construction materials (paint, carpet, etc.), machines (copiers, processors, etc.) and even people (breathing, smoking, etc.).
The term "volatile organic compound" or "VOC" refers to any of thousands of organic (carbon-containing) chemicals that are present mostly as gases at room temperature. Inorganic carbon-containing gases such as carbon dioxide and carbon monoxide are excluded from this definition. VOCs can be man-made or naturally occurring chemical compounds.
An important subgroup of VOCs is semi-volatile organic compounds or SVOCs which tend to have a higher molecular weight and higher boiling point temperature than other VOCs. Examples include plasticizers, flame retardants, and pesticides. All indoor VOCs are present partly as gaseous airborne chemicals and partly as chemicals adsorbed on indoor surfaces and onto microscopic airborne and settled particles. SVOCs are often present largely on surfaces and particles, with only a small fraction in the air unattached to particles.
The amount, or concentration, of VOC present in the indoor air is expressed in a variety of units. Commonly used units are parts per billion (ppb), parts per million (ppm), and micrograms per cubic meter (µg/m3). A microgram is one one-millionth of a gram. If the concentration is 1 ppb (or 1 ppm), for every billion (or million) molecules of air there is one molecule of the VOC.
A large number of VOCs are emitted into indoor air from building materials, furnishings, cleaning compounds, office equipment, personal care products, air fresheners, pesticides, occupant activities, and unvented combustion processes such as tobacco smoking, burning of wood or kerosene, or cooking with gas stoves. Some of the key indoor sources of SVOCs are pesticides, building or decorating materials made of or containing flexible plastics such as vinyl wallpaper or vinyl flooring, and building materials and furniture containing flame retardants.
The term TVOC refers to the total concentration of multiple airborne VOCs present simultaneously in the air. TVOC methods do not measure all VOCs in the air, but a subset of VOCs that are expected to be present. Measuring TVOC concentrations is less expensive than measuring the concentrations of many individual VOCs. However, there are two main limitations to TVOC measurements. First, different TVOC measurement methods can yield substantially different TVOC concentrations and the differences between measurement methods will depend on the mixture of VOCs present. Secondly, the toxicity and the odor thresholds of individual VOCs within the VOC mixture may differ by orders of magnitude; therefore, the total concentration is not likely to provide a useful measure of total toxicity or total odor level. In general, TVOC measurements in buildings have not been useful in predicting health effects,
Some VOCs and SVOCs are odorous and some are suspected causes of adverse health effects. The suspected health effects cover a broad range including, but not limited to, sensory irritation symptoms, allergies and asthma, neurological and liver toxicity, and cancer. While multiple VOCs present together may have effects greater (or less) than the sum of their individual effects, little information is now available on such combined effects. The following text briefly summarizes the current knowledge about the linkages of indoor VOCs with sensory irritation, allergies, asthma, and related respiratory effects, and cancer. Additional sections briefly summarize knowledge about potential health effects of VOCs in cleaning products, SVOCs, and VOCs produced indoors from chemical reactions.
One common VOC, formaldehyde, is widely used in the manufacture of building materials and numerous household products, and is also a by-product of combustion and other natural processes. Formaldehyde may be present in substantial concentrations both indoors and outdoors. Due to its ubiquitous nature and significant health effects, this website's section on "Indoor Volatile Organic Compounds and Health" often provides discussions focused specifically on formaldehyde.
Various organizations have established guidelines or recommendations (none are legally enforceable limits) for maximum formaldehyde concentrations, based on examinations of the scientific literature. It is evident in this table that, despite differences in guidelines from different organizations, the longer exposure periods (longer than 8 hours) consistently specify lower guideline concentrations of formaldehyde (7-40 ppb) relative to the guidelines for periods of 8 hours or less (44-750 ppb). An exception is the relatively high chronic guideline of 100 ppb from the World Health Organization (WHO).
I am using CCS811 from Sparkfun as VOC Sensor. The CCS811 is an ultra-low power digital gas sensor solution which integrates a metal oxide (MOX) gas sensor to detect a wide range of Volatile Organic Compounds (VOCs) for indoor air quality monitoring with a micro controller unit (MCU), which includes an Analog-to-Digital converter (ADC), and an I2C interface.
Go provide accurate results, a temperature and humidity compensation is required. You can either add a 10K NTC thermistor, which can be soldered on the breakout, but you will only get temperature compensation or you can use an external temperature/humidity sensor like I did (I used DHT22) and feed this data to the sensor regularily.
The functionality of a MOX gas sensor is based on the conductivity-change of the gas-sensitive MOX semi-conductor layer/s at gas exposure, which can be externally measured and analysed.
The CCS811 has 5 modes of operation as follows
- Mode 0: Idle, low current mode
- Mode 1: Constant power mode, IAQ measurement every second
- Mode 2: Pulse heating mode IAQ measurement every 10 seconds
- Mode 3: Low power pulse heating mode IAQ measurement every 60 seconds
- Mode 4: Constant power mode, sensor measurement every 250ms
In Modes 1, 2, 3, the equivalent CO 2 concentration (ppm) and
eTVOC concentration (ppb) are calculated for every sample.
- Mode 1 reacts fastest to gas presence, but has a higher operating current
- Mode 3 reacts more slowly to gas presence but has the lowest average operating current.
I am using Mode 2 (measure every 10 seconds). I don’t need more precision and this way I am avoiding I2C bus sharing issues.
The chip will save a baseline every 24 hours. This baseline represents the lowest read raw value, corresponding to the clean air threshold. It is a good idea to refresh the air every day in the room running the sensor to not have a drift.
Sparkfun mentions the average power consumption in mode 1 is 12 mA, but the datasheet of CCS811 mentions 30mA. I did not measured it, but I guess is something in between.
- Ambient Temperature for Operation -40 – 85 C
- Storage Temperature -40 125 C
- Relative Humidity (non-condensing) 10 – 95%
See hookup guide from SparkFun.
Note: Please be aware that the CCS811 datasheet recommends a burn-in of 48 hours and a run-in of 20 minutes (you must allow 20 minutes for the sensor to warm up and output valid data). The 20 minutes initialization time is already taken care of in the sketch.
There is no data on accuracy for this sensor. Saw some comparison with different sensors and it seems to react more slowly to VOCs than the ones tested, but it correlates well.
In my experiments, I found that it has a very good sensitivity to odors as it reacts pretty quickly. By leaving the sensor in stale air, you can see VOCs accumulating over time with sudden peaks which don’t always correlate to smells, so can’t always tell if these peaks are VOCs or not, but I can tell you that if you do the imprudence of farting next to it, you will be surprised to see quickly rising levels. By opening up a window you can instantly see the VOC level decreasing. that’s a sign it works property, but does not say much about the accuracy. I guess that it is a good reference for how clean is the air, even if I am not sure about how those random peaks happen, cause I can’t smell anything different while they appear, and I don’t know if they are valid reading or errors, but levels do go down if you open the window.
So, I am not really sure how accurate it is to measure air quality but it is surely a fine fart detector :). Maybe it detects phantom farts too, and that explains it.
VOC Sensor Placement
I did not found any information about how the manufacturer recommends this to be placed, so I used my common sense: there is a hot place detecting organic compounds, so I positioned the VOC sensor horizontally, on the top wall of the enclosure, with the hot place oriented to the outside of the box. Made a ~1 cm round hole on the top wall, right on top of the black hot plate and placed a coarse mesh to prevent too much dust entering. I do plan to use a vacuum cleaner to cleanup the sensor from time to time, with the hope that dust accumulation won’t influence the sensor too much in years of exploitation.
For mounting I used two Phillips screws keeping the sensor attached with nuts.
Compared to measuring VOCs or CO2, where we can say that levels below 1000 ppm are fine, sadly for Dust this is not the case. World Health Organization advises that in fact there are no safe levels, and even at dust concentrations around 10 μg/m3, g/m3, increased mortality is reported.
While it is obvious that breathing in any particles in the air is going to aggravate your airways, experts are particularly worried about the extremely small particles such as PM2.5 as they not only penetrate deep into our lungs but are also so minute that they can even pass into our bloodstream.
The size of the particle is a main determinant of wherein the respiratory tract the particle will come to rest when inhaled.Larger particles are generally filtered in the nose and throat via cilia and mucus, but particulate matter smaller than about 10 micrometers, can settle in the bronchi and lungs and cause health problems. The 10-micrometer size does not represent a strict boundary between respirable and non-respirable particles, but has been agreed upon for monitoring of airborne particulate matter by most regulatory agencies. Because of their small size, particles on the order of 10 micrometers or less (coarse particulate matter, PM10) can penetrate the deepest part of the lungs such as the bronchioles or alveoli;when asthmatics are exposed to these conditions it can trigger bronchoconstrictio.Similarly, so called fine particulate matter (PM2.5), tend to penetrate into the gas exchange regions of the lung(alveolus), and very small particles (ultrafine particulate matter, PM0.1) may pass through the lungs to affect other organs. Penetration of particles is not wholly dependent on their size; shape and chemical composition also play a part.Source:Wikipedia
What are the negative effects of exposure to PM2.5?
Depending on how healthy you are in general, PM2.5 will have different long and short term negative health effects. When exposed to levels of PM2.5 between to moderate – hazardous range, one may experience the following effects:
- shortness of breath
- eye, nose and throat irritation
- excessive coughing and wheezing
- diminished lung function and lung disease
- diminished heart function, sometimes resulting in heart attack
- asthma attacks
In 2013, the ESCAPE study involving 312, 944 people in nine European countries revealed that there was no safe level of particulates and that for every increase of 10 μg/m3 in PM10, the lung cancer rate rose 22%. For PM2.5 there was a 36% increase in lung cancer per 10 μg/m3. In a 2014 meta-analysis of 18 studies globally including the ESCAPE data, for every increase of 10μg/m3 in PM2.5, the lung cancer rate rose 9%Source: Wikipedia
PM2.5 also damages the environment by increasing acidity in the soil and water bodies. Which in turn affects their ability to produce food and support life.
What is considered a safe level of PM and how is it measured?
Pollution levels are generally measured on a scale of 0-500 called an Air Quality Index, or AQI:
Note: The AQI is totally different than the dust density provided by the device. You can have different AQI levels for the same dust density depending on the particle size. Smaller particles like PM2.5 are considered to pollute more on same density than larger one like PM10.
I am using Sharp GP2Y1014AU0F as dust/particle sensor. Designedtobeusedin commercial air purifiers orair conditioners, GP2Y1014AU0F is an analogoutput dust sensor which is similar to the popular GP2Y1010AU0F model but with improved accuracy. In terms of Arduino circuit and application source code, these two analog dust sensors are more or less interchangeable.
Sharp dust sensors operate on the principle of lightscattering.A photo-detector and LED emitter oppose each other at an angle within the rectangular package of the sensor which has a dustthrough hole on either side. Air containing dust particles flows into the sensor chamber and causes the light from the LED emitter to be scattered towards the photo-detector. The more dust there is in the air within the sensor chamber, the greater the intensity of the scattered light.The dust sensor outputs a voltage value which varies according to the intensity of the scattered light which in turn corresponds to the level of dust in the air. The actual dustdensity (or dust or mass concentration) can then be calculated from the output voltage value using a linear relation.
Both dust sensor models measure the totaldust density.This total includes the concentrations of 1 micron particles, 2.5 micron particles, 10 micron particles, etc. In practice though, when the total dust density/concentration reads very high, such as in the presence of cigarette smoke, most of the detected concentration is due to PM2.5 particles anyways. In addition, with these analog output models, there is the further possibility to analyze the output signals in order to distinguish between smoke particles and house dust.
You can find the detailed specifications for both dust sensor models here.
Airflow Design Considerations
The GP2Y1014AU0F dust sensor does not include any built-in fan or internal resistor heating element to supply airflow to the sensor (and note that the specification does not indicate any airflow is required). This can be advantageous in terms of providing flexibility in sensor orientation and positioning. But still, it is a good idea to think about whether you need to design in at least some airflow into your application. Providing some airflow (from a fan, natural convection, or wind) will allow the sensor to react quicker to changes in dust concentration. Options such as including adding a mini 20x20mm or 25x25mm external fan will introduce additional design considerations such as fan reliability, noise, and cost. To summarize, while airflow is not strictly required, it can help the GP2Y1014AU0F sensor to react quicker to changes in dust concentration.
Dust Sensor Placement
I found a datasheet from Sharp mentioning how the dust sensor should be positioned.
The sensor has two sides: one is metallic and the other is made out of plastic and has a printing on it. There is a through hole between these sides, where the IR LEDs are located and where the dust is going to be detected. The metallic part should be oriented towards the outside of the box and the smaller holes should be on the right side. Also, the wires attached to the pin socket should point downwards.
The orientation seems important, to minimize light entering from the back side of the sensor, which can negatively influence the readings.
They also suggest adding a coarse mesh, to stop big house dust from entering the enclosure and remain there trapped, which I made out of a piece of mosquito net, and glued it using double-sided tape. You can regularity use a vacuum cleaner to keep the enclosure free of dust.
I positioned the sensor on the back side of my enclosure. My main focus is on small particles not on house dust, so this should also avoid dust accumulation since the hole is on a side, not on top, to collect everything falling there.
The Sharp sensor does not have any holes for mounting with screws and has some weird margins that can pose you some issues. I just use neutral Silicone to glue it to the inside of the enclosure. I guess I could have used double-sided tape as well, but I was worried about any persistent smells affecting the VOC sensor. I really wasn’t happy with hot glue last time I used it (does not stick or hold good), but I might had better experience with my newer and better hot glue gun, so if you trust hot glue, go for it.
The datasheet mentions a 15% accuracy which is pretty good for a cheap sensor. All technical papers I read about this sensor conclude that it has a good linearity and can be calibrated against a precise instrument to give much more accurate readings. There are some effects by temperature, humidity, particle size, particle composition, even random drift, which are hard or impossible to mitigate, but it seems usable enough for non-critical measurements.
GP2Y1014AU0F connector cable
Sharp GP2Y1014AU0F uses the same type of 6-pinconnector as the GP2Y1010AU0F model. Earlier iterations of the GP2Y1010AU0F sensor used the JST (Japan Solder-less Terminal) connector S6B-ZR-SM4A.But all newer production versions of both sensors now use JCT Connector 11501W90-6P-S-HF which should be compatible with the old JST connector. What this all means is if you have an old cable harness for GP2Y1010AU0F, the cable should work just fine with GP2Y1014AU0F as well. The following table and figure shows the pin assignments for GP2Y1014AU0F.
Below is a picture of GP2Y1014AU0F with its connector cable attached.
Usingthe dust sensor
The specification for GP2Y1014AU0F isn't very clear about how to hook up the sensor. A better example can be found in the Application Note fort he GP2Y1010AU0F model. Both GP2Y1010AU0F and GP2Y1014AU0F require the same circuit consisting of a resistor (150 ohms) and a capacitor(220 uF) designed to pulse the sensor LED on and off instead of running it continuously. The LED degrades in intensity over time and pulsing the LED helps to extend its lifetime.The figure below from Sharp's application note (section 6-1) shows an example circuit.
The application note further indicates (see below figure) that the LED should be pulsed on once every 10ms, using a pulse duration or width of 0.32ms. Once the LED is turned on, the application note says to sample the resulting analog output voltage after 0.28ms (or 280 microseconds) have elapsed from the moment the LED is switched on. All this is done inside the library I created, which also takes care of offset correction and reducing noise by averaging.
The key connections to note are:
- The dust sensor LED terminal is connected to a digital (pin14inmy case), which will be used to pulse the sensor LED on or off.
- The dust sensor Vo terminal is connected to the analog input pinA0 which will be used to read the output voltage from the sensor.
The GP2Y1014AU0F sensor outputs a voltage reading which varies linearly with PM/dust density. It is necessary to apply a bit of calibration to convert these output voltages to the desired PM/dust density values in units of ug/m3. There are two aspects to this calibration as described below.
Even in a perfectly clean, zero dust environment, the GP2Y1014AU0F sensor will output a non-zero voltage value which is called Voc. This behavior is actually useful because you can easily tell whether the sensor is working or not. The GP2Y1014AU0F specification states that the typical value of Voc is 0.6Volts. You can see this offset from a graph of Output voltage (V) versus Dust density (mg/m3) for this sensor (see Y-intercept).
To complicate things further, the sensor has a random drift. This baseline is constantly changing during run-time, usually increasing.
To correct this, the library gets you a new baseline candidate given enough readings. The sketch sets this new baseline at 1 min intervals. With this technique, I managed to eliminate the drift.
I wasn’t very impressed by this sensor. At low dust levels which you typically get in a normal indoor environment I usually get between 5 – 25 ug/m3. I can’t really tell if the sensor is providing accurate results, since my Tefal Air Purifier does not seem to reduce these values much. At 15% stated precision I don’t expect really accurate data, and I don’t even know to what that 15% applies (lower values, higher values?). I would have expected an accuracy statement like ±25 ug/m3 or something, to have a better idea rather than 15% precision without any other info. If I insert an object in the sensor’s hole, the readings get to maximum (~500). Also tried with cigarette smoke, and I do get constant values like (50 – 200 ug/m3). So it does seem to detect particles, but I can’t really say anything about the accuracy. Either my air purifier does a very poor job at removing particles, even it has 4 filters (a plastic mesh filter, a carbon filter, a HEPA filter and a NanoCaptur filter for Formaldehyde) or the sensor is only accurate enough to say either the air is clean enough or polluted (detect smoke or really polluted conditions). I will update this once I have new data.
- Sharp GP2Y1014AU0F Specification
- Sharp GP2Y1014AU0F Application Note
- Sharp GP2Y1010AU0F - Dust Density Conversion
- Sharp Dust Sensors Lineup
- PM2.5 Monitor with Portable Battery (search for PM2.5)
- Investigating the Use of Commodity Dust Sensors for the Embedded Measurement of Particulate Matter
- Comparative Experimental Evaluation of Dust Sensors for Environmental Monitoring on Construction Sites
- Measurement of PM2.5 Concentrations in Indoor Air Using Low-Cost Sensors and Arduino Platforms
- Laboratory Evaluation and Calibration of Three Low-Cost Particle Sensors for Particulate Matter Measurement
I am using DHT22 as temperature and humidity sensor. It uses a one wire custom interface for data and can be powered from 3.3V.
I used the DHTesp library, which is very easy to use.
It is a slow sensor, so as long as you don’t read more often than at 2s, you are ok.
- Low cost
- 3 to 5V power and I/O
- 2.5mA max current use during conversion (while requesting data)
- Good for 0-100% humidity readings with 2-5% accuracy
- Good for -40 to 80°C temperature readings ±0.5°C accuracy
- No more than 0.5 Hz sampling rate (once every 2 seconds)
- Body size 27mm x 59mm x 13.5mm (1.05" x 2.32" x 0.53")
- 4 pins, 0.1" spacing
A pull up resistor of 1 – 10k is normally required between the data line and VCC, depending on the wire length (typically 4.7k) to avoid communication issues like timeouts or freezes. There are some DHT22 variants mounted on a module with a resistor included. I must admit I didn’t used a pull up with any of my DTH22’s (used them with ESP8266 and with ESP32), since it worked perfectly without it and not even enabled internal pull ups, but you should probably add an external resistor. I might had some luck because the used GPIO pins might have been pulled up by default.
Temperature and humidity sensor placement
I did not found any information about how the manufacturer recommends this to be placed I guess it does not matter much. I didn’t had that many placement options, since I was constrained by the other two sensor placement. So decided to use the top wall, with the sensor positioned horizontally, cutting a rectangular hole using a wood chisel and attaching the sensor from the top wall using a Phillips screw and a nut, so that half of it is inside, and half is outside. DHT22 has a plastic mesh-like protection attached, and that should help with dust accumulation, but I expect it to get dusty in time and affect the readings in a small degree, even if I plan to use a vacuum cleaner as maintenance. Ideally, you should get a bigger box for your project and place the temperature sensor far away from the heat sources such as ESP8266 or the VOC Sensor. Also add many vent holes on the side that gets heated.
I used a smaller box, and decided to place the temperature sensor on the top wall, on the opposite direction of ESP8266 and the Voc Sensor. Even if I did thermally insulated the temperature sensor in the bottom side which takes heat from the box, there is still a noticeable heat influence (0.7 – 1.2 Celsius degrees). The voltage stabilizer from NodeMCU is releasing the extra difference from ~5v from source to 3.3v required to operate the chip as heat, resulting in 0.1 – 0.35 Watts dissipated. Also the ESP8266 is generating heat, especially while WiFi is used. The VOC Sensor’s hot plate is surely generating heat as well, but the effects are minimal, because it was placed right on the top wall and convection should take the heat to the outside.
The best thing to completely get rid of the heat influence is by placing the temperature sensor outside of the box, but I didn't wanted a wire hanging out and probably another box for the sensor, and thought it was ugly. My design is clearly not ideal, but like I said, with a bigger box, enough distance from heat sources, more vent holes, creating a convection effect, and maybe an improved thermal insulation, these effects can be mitigated.
Nevertheless, the heat influence I am getting is quite constant and can be easily corrected using a linear calibration factor., so I am not that disappointed by the result.
According to the specs, the accuracy should be really good: ±0.5° C for temperature and ±2-5% for humidity. Many people mentioned they had poor accuracy using these sensors and readings vary from sensor to sensor. Can’t say I confirm this. This is the second DHT22 sensor I am using, and I don’t see any accuracy issues so far. Readings are pretty consistent with other sensors, well within the spec’ed error. I have bought two more and I will update this if I see inconsistencies with these when used in different projects.
I compared my heat compensated results with an accurate sensor like Sparkfun Si7021 (accuracy ±0.4° C) and found them to match perfectly by using 0.982 as calibration factor, which reduce the readings with about 0.6° C at 25° C.
Only using a single GPIO pin, cheap, good accuracy, so pretty happy with this sensor.
This project doesn’t really need a display, since it sends data to Blynk and I built a nice mobile UI for it, but it is very nice to some basic data on a physical screen as well.
I chosen a 128x32 pixels OLED display, based on the SSD1306 chipset.
These cheap monochrome displays are very bright, so you can easily use them in the dark as well. You can use it to render every pixel individually, so you can show text with different fonts and sizes, shapes or even do cool non-flickering animation.
To control this display, I used the Adafruit_SSD1306 and Adafruit_GFX libraries.
On average the display uses about 20mA from the 3.3V supply.
To connect the display I used the I2C bus, so the display is sharing this bus with the VOC Sensor. I am relying on the internal pull ups from the VOC Sensor. I don’t know if I needed to add extra pull up resistors on the data lines, but I do have issues wih these two devices on the same bus. I managed to solve them by:
- reducing the VOC sensor reading frequency from every second to every 10 seconds, by setting it in mode 2. I2C freezes a lot less frequently this way (a few times a day vs hundreds of times a day in mode 1)
- detecting the bus freeze and doing a recovery sequence to clear the bus, which makes the VOC sensor and OLED work again.
If connecting them separately, they work without any issues.
This might get solved by adding extra pull up resistors, or it might just be an hardware or a library incompatibility. I glued the box and I don’t have any issues with how the software fix works, so I don’t have real reasons to dig deeper, but I recommend you to investigate the pull up thing more or finding different libraries, if you decide to use these two components with the VOC Sensor working in mode 1.
The display offers basic information for each type of sensor, which are rendered one after another at 10 s intervals. You can use the push button to navigate to the next info section.
There is a sample config called
Config.h.sample which you should use as a config template. Just save this file as
Config.h and adjust the settings like Blynk token, WiFI settings, GPIO pins, timeouts and more.
I am using an ESP8266-based NodeMCU board, but you can use a different board and different pins with this code. It should work with any Arduino compatible board. Here are the default pins:
const uint8_t DHT_PIN = 10; // DHT22 temperature sensor Data pin const uint8_t INDICATOR_LED_PIN = 15; // Led indicator output pin const uint8_t SHARP_LED_PIN = 14; // Sharp Dust/particle sensor Led Pin const uint8_t SHARP_VO_PIN = A0; // Sharp Dust/particle analog out pin used for reading const uint8_t BUTTON_PIN = 12; // front button input pin const uint8_t DOUT1_PIN = 13; // digital output 1 (ex: lights relay, mosfet, transistor) const uint8_t DOUT2_PIN = 16; // digital output 2 (ex: Air conditioning remote control IR led)