Some apartment buildings use a single HVAC system routed to all the apartments. This method is more efficient but each apartment may not be able to control the temperature to the level they desire. This system will monitor different apartments (rooms) and provide data to make decisions to improve the climate in each one.
I do not live in an apartment of this style, but a friend does. My 3 story house experiences the same issues though so I can model the system on my house. Each room will have a Particle-powered climate-monitoring sensor which will log the temperature and other data points to a centralized location (I'm using Losant). I can use the data to decide to adjust the registers to change the airflow and regulate the temperate. In a true apartment system, the registers can be automated and Particle-controlled but that is too expensive for a house. I've seen many systems that monitor the temperature, but few act on the results. This should provide comfort to all rooms equally with only one main system and a bunch of mesh-connected sensors.Background
I've wanted to build a system of temperature sensors throughout my house for a long time. I originally bought a bunch of Wemos D1 Minis and sensors shields, but I never installed them because I didn't like the idea of adding a ton of high-activity WiFi sensors in my house and clogging up the airwaves. When the Particle Mesh devices were announced, I knew they were the perfect device for this project. I could put a bunch of the Xenon mesh-only devices everywhere that communicated to an Ethernet gateway so there's no WiFi at all in the system. I've experimented with Bluetooth Mesh before but gave up because it was too complicated. With my previous experience using Particle boards, I knew that their ease-of-use was top notch and after finishing this project, I'm amazed at how easy they make this complex system seem.Sensor Selection
With my decision to go to Particle locked down, my next step was finding the right sensors to use. At first, I asked around, but nobody made a FeatherWing that was designed for environmental monitoring. So I did a lot of research by looking for common sensors that were used by makers. I know I needed at least temperature and humidity, but I was also looking for any other sensors that provided interesting data. I narrowed the list down to Si7021, CCS811, BME680, MiCS5524, and SGP30. At this point, I looked around again and found that somebody had recently released a FeatherWing that had the Si7021, CCS811, and HPMA115S0 - what luck! That product is the Particle Squared Air Quality Sensor Board by Jared Wolff. I liked this design, but the cost was too much for me if I was going to add ten sensors throughout my house, so I went to work to redesign it. Jared released the hardware and software for the Particle^2 on his Bitbucket, so I was able to fork his design and make the changes I wanted.Hardware
I started with the hardware. I made the decision to remove the HPMA115S0 dust sensor. It's expensive by itself and also requires additional circuitry on the PCB to make it work. With that out of the way, I could shrink the board and still keep the Si7021 temperature and humidity sensor and the CCS811 Total Volatile Organic Compounds (TVOCs) and equivalent carbon dioxide (eCO2) sensor. I also cleaned up the board by completely rerouting it, improving the silkscreen, and moving the components to make them easier to solder.
I ordered the boards from JLCPCB with black silkscreen and a solder paste stencil. It was $34.95 for 20x PCBs and the stencil including shipping. Here is a shared project on Mouser for the BOM. It includes one of each sensor and the necessary discrete components (plus some extras for when an 0402 part goes flying across the room, never to be found again). I ordered enough parts for 10 boards with the Si7021 and only five of those boards have the CCS811. The cost for that purchase was $101.19 with shipping. I've done some reflow soldering and BGA work, but these parts were still the most intimidating parts I've worked with due to their small size. Due to this, I only purchased five of the air quality sensors because they are kinda expensive (~$11 each) and I wasn't sure if I could solder them or get useful information out of them. Luckily I had 100% yield with my boards, but I can't go back and add the missing sensors for a few reasons. I can't use the stencil now that some parts are already mounted to the board and it's not recommended to reflow the Si7021 sensors more than once. I suggest buying all the parts at once if you want to recreate this project. The soldering isn't as difficult as it seems.Soldering Tips
Speaking of soldering, I took some videos as I was assembling the boards because I always get questions on my setup and how the process works. I start by laying out a few extra PCBs to create a frame to hold the PCB I'm going to apply solder paste to. These are great because they're the same height. I tape them down and then move the stencil into place and tape one side down so I can lift it like a chest lid and put it down in place reliably. Next step is to apply a blob of solder paste to the stencil and use a credit card to swipe the paste into the holes. Next, lift the stencil off gently and check the paste. If it's not perfect, wipe it off and try again. I use tweezers to place the parts on the solder paste. You can gently press them down so they stick, but you don't need to crush them down. The molten solder will ease them into place. I made a hotplate that I use to reflow the boards. Once it's up to temperature, I place the board on top and hold the part down to ensure it's making perfect contact. Once I notice the solder melt and all of the flux evaporate, I take the board off and lay it on the hotplate's metal body as a heat sink to cool it down. Since these boards are double-sided (there are a few resistors on the bottom), I repeat the same steps as above to apply the paste and the parts, but I can't use my hotplate to reflow them now. I use a hot air gun to melt this solder paste and these boards are done! Plug them in and hope they work. I only had to rework a few of the resistors on the bottom because there either wasn't enough solder or the solder wasn't completely melted.Software
Now that I have my FeatherWings assembled (I also hand-soldered on female headers to all of them) and a bunch of Particle Mesh boards, it's time to get the code working. My fork of the software is on GitHub here. The repository is set up to use in Particle Workbench, but you can also add the files to the Particle Web IDE and use that instead. My fork is similar to Jared's original code, but there are some changes. First off, I removed all of the code for the sensors I'm not using. I also needed to make some minor changes to error codes to get it to compile. I found a bug related to using Particle.keepAlive(), but I think that's because I'm using a newer Device OS than Jared is (I use 1.3.0-rc.1). The last changes were related to the format of the data I send to the Particle Cloud. I changed the CO2 key from C02 (can you spot the difference?), converted the temperature to Fahrenheit before sending, and changed the default delay to 30 seconds. I'll explain the new delay below.Locations
At this point, I set up my Mesh network and decided on locations for all of the devices. I one Argon with the Particle Ethernet shield as the gateway for all of the Xenons. I also have one other Argon on a separate Mesh network that I plan on using for other home automation tasks. I decided to place the devices with the CCS811 air quality sensors in rooms where they would experience the most variance. They're in my workshop, electronics area, kitchen, bathroom, and bedroom. The remaining sensors with only temperature and humidity are in my wife's office (because this is where the router and gateway are), living room, the cat's room, the spare bedroom, and the finished part of the basement. Some of these places have an extra USB port available for powering the device, but for those that don't, I made something to power them.Enclosure
These devices need to look nice since I'm going to be placing them all over the house. I really wanted a self-contained device that I could plug in and forget about. It needed to look good so it doesn't stand out, so I went to work to design an enclosure for many of the devices. I went full-out custom on the power source because I couldn't find a short enough power cable. I bought a 6 pack of USB wall chargers to supply power. I made my own USB Type A to USB micro adapter by soldering the linked parts together. After that, I designed an enclosure in Fusion 360 that packages the adapter and Particle with FeatherWing inside. Now I have one solid piece that I can plug in anywhere and immediately gather some data.Dashboard
The final step is to get the data out of the Particle Cloud and display it to notice trends and make changes to my house to improve the air quality. I decided to use Losant for this task. I think Graphana is also a great solution, but I have more experience with Losant and could get it up and running faster. I'm not going to provide a complete step-by-step guide, but I will explain how to get data from a bunch of Mesh sensors into Losant. My code uses Particle.publish() to get the data into the Cloud (where you can view it on the Particle Console to verify that it is working). Losant has built-in integration with Particle, so all you have to do is provide your Particle Access Token and they will be connected. Start by creating a Device for each of your physical devices. They need a Device Attribute for each type of data you will send to Losant. I also set the Device Tag of coreid to the Particle Device ID as a way to easily connect the data to the device. The next thing is to set up a workflow that takes the Particle Trigger, runs the data from the device through the JSON decoder, then use a Switch Node to set the Device State based on the coreid in the message. The last step is to create a Dashboard (or two, or three..) to display the data from all of your sensors. As I mentioned earlier, I send the updated values every 30 seconds. This is because 10 devices communicating every 30 seconds over the course of a month is 876,000 messages. Losant has a limit on the free version of a million messages a month so I can send all of this data and still stay on the free plan.Results
If you remember from way up at the beginning of this post, I wanted to gather all of this data to make some changes in my house and improve the overall living situation. My house's central air conditioner is in the basement and our bedroom is on the second floor, so it gets very hot. I experimented and found that leaving the A/C fan on all the time helps to even out the temperature in all of the rooms. I also spent some time reducing the airflow in all of the other rooms of the house using the registers to push more air to the bedroom, but I was never able to get the bedroom cool enough, so we bought a small window air conditioner for that room. This way I can keep that room cool and push more air to the other rooms which makes the A/C run less overall. I also used the measurements to adjust the airflow so that all rooms that we typically go in are about the same temperature. I have a smart thermostat which is in the hallway by the kitchen. I found out that, while cooking, the thermostat's measured temperature would go up which would cause the A/C to kick on. I used a remote sensor for the thermostat to fix this problem. I also removed a register near the A/C in the basement and covered up the other registers in the basement because the cool air always falls to the basement so it does not need to be actively cooled. Each of these small things issimple (and may be common sense), but it was very powerful to notice temperature differences throughout the house, make a change, and notice if that improved the situation. The experimentation in my house definitely shows promise for implementing a system like this in a larger building like an apartment complex.Future
So far I've only focused on the temperature readings and the air conditioner. I'm excited to dig into the other air quality sensor and see if I can make changes based on those observations. I'd like to somehow check motion around the house and see how that relates to the sensor values. I have Insteon smart lights throughout the house so I think I can also combine that into this project somehow. One project, in particular, I have in mind is using the humidity reading from the bathroom to turn the exhaust fan on (and maybe use the TVOC sensor too 😉). There are a lot more projects on the horizon now that I have this data available to me. Thanks, Particle for making it so easy!