This project started as a simple idea. My first inclination was to simply control a Nest thermostat remotely. However, after a little investigation and research, I realized the project was pointless and trivial given the inherent web-connectedness of the device. After thinking about this for a while, I realized I had an actual problem that needed solving.
At Tampa Hackerspace, we have a small machine shop that is in its own room. At first, we had a portable A/C unit but that didn't really cool enough and we constantly had to empty a five gallon bucket because it pulled so much moisture out of the air. We upgraded the shop by ducting a line from the main A/C unit to cool and dehumidify the shop. At this point, we had the opposite problem. The air blew too much and the shop would sometimes get down to around 60 degrees.
I decided we should build a poor man's zone A/C. Since the Nest thermostat is in the main workshop, I thought it would make sense to robotically control the ventilation with a stepper motor and a local thermostat. If the temperature got too low, we could simply close the vent and block airflow to the machine shop. When the temperature went above a particular level, we would open the vent and let the cool air flow.
To make this happen, we needed a reliable way to measure temperature, manipulate the vent, and log data.
The Cypress Development board we used includes a number of environmental sensors including a thermometer and a humidity. Periodically, it will check the ambient termperature and send this data through the i2c bus to the Raspberry Pi where it can be saved to the Samsung IoT Artik Cloud. The Raspberry Pi connects to the stepper which opens and closes the vents.
Programming is simple. The Cypress board comes with a demo that reads the on board thermister, calculates the ambient temperature, and reports it thru the i2c bus.
On the Raspberry Pi, you'll need to install node.js and a couple of packages using this excellent tutorial.
https://create.arduino.cc/projecthub/ithinkso/automating-a-nest-thermostat-cbf8b3
This also walks you through setting up The Samsung Artik Cloud to maintain project history for your separate room and main room.
The software flow is as follows:
The in range values provide some hysteresis so that the stepper is not constantly jogging the vent.
As of right now, the code to control the stepper is still a work in progress. I would like to use the Cypress board to do so but may decide to use a third party motor driver to get it working.
Comments