Back to Parent

Outcome


Intention

With a window facing south and a height adjustable table in the living room, me and my roommates always work on the table. Light is always mild during daytime, making it an ideal workplace.

But the thing is, as it is still in an apartment, the environment is far from a passive cooling and heating place. The indoor environment is something that we should pay attention to.

Livingroom.thumb
Show Advanced Options

Context

Because the window can't be opened, sometimes it may help to stop the heating when it's too hot during day time. We all need to pause from the heat, even when winter comes. We found that 25.5 Celsius is a comfortable temperature but your palm would kind of start sweeting because of the heat coming out. Which means we might want to turn the heat off when it is hotter than 25.5 Celsius.

At night, one of my roommates suffered from rhinitis and may be hard to fall asleep. Which means he will be really sensitive to the indoor humidity. According some researchers, a humidity of around 60% is more comfortable for people suffering from it. You might want to turn on the humidifier when humidity is below that value.

Process

First I built the test version to try on the DHT 22 sensor using the library example. The example in Adafruit_DHT failed to work on Argon but the one  by Piettetech_DHT worked. I doubted that it might be caused by different configuration and uses of the pins and asked Zhenfang about this question. 

He told me that he looked into the header files and main classes of Adafruit_DHT and Adafruit_DHT_Partice, and found that they should be used for different boards, the class member functions initialize the pin differently. (Thanks for the help by Zhenfang)

Next, I use the test to figure out the existing conditions of the workplace and using particle serial monitor to check the status. As can be seen in the CLI, indoor temperature is roughly 25 Celsius and humidity is around 45%. While the light reading is not using a standard unit of measurement, I tested the reading with the light and curtain off to simulate the conditions in which we are not working. It is a reading of photoresistor around 1250. Later I tested with them on and the reading is around or larger than 2500.

1.thumb
Show Advanced Options

So I design a circuit that blink quickly when the humidity is low and light is dim, to inform us to adjust the humidity indoor for a better sleep. And blink slowly when temperature is higher than 25.5 and light is bright. To tell us when to stop the hear during day time, instead of using a timer.

Product

Blink quickly for 10 times when humidity is below 60% and light is dim. (See Pt.1) Blink slowly for 5 times when temperature is above 25.5 Celsius and light is bright.  (See Pt.2)  

The presumption here is that light is dim when we are not working and about to sleep and light is bright when we are working.

Show Advanced Options
Sensor.thumb
Show Advanced Options
Show Advanced Options
Show Advanced Options

Reflection

In the coding it took me some time to realize that I initially misplaced one or two semicolons in wrong places. In coding with a for loop in an if command, it is really helpful to use indent and always checking by clicking on braces to see its boundary.

Another take away is that the library may not suit into every device so test and check it before. Trying out with examples in the library is always helpful.

The way of configuring pins in the piettetech_DHT library is also pretty amazing. It let me know that GPIO pins could also serve as a VCC or GND to power the sensors.

Drop files here or click to select

You can upload files of up to 20MB using this form.