The house I live in was built in 1939. It's got a central heating system that's pretty much just as old. The old oil furnace was upgraded to electric, luckily. And it's got an electronic thermostat, but aside from that, the system remains unchanged from it's original design. There are more modern thermostats out there, that will run a preset program based on time of day/day of week. But I want something far more in depth.
This is where the "Pi Heater" project comes in. What I've found myself doing since moving into this house is going around in the evening, and closing the registers in the kitchen, dining room, and living room, so that the heat will be redirected to the three bedrooms. I also turn down the thermostat some, as I sleep best when I can snuggle up in the blankets. But that's just me. And in the morning, I generally reverse the process, though I don't usually bother closing the bedrooms off, it's just too much hassle.
As you can start to see already, what I wanted was an automated way to open and close the registers. I've had some very small and very cheap stepper motors hanging around for awhile. I picked them up off eBay from China for like $3 each awhile back, because I knew that if I had them, I'd come up with a good use for them. My plan is to attach about a foot of all-thread (threaded rod) to the output of the motors, put a nut on the door, and the spinning rod will slowly open/close the door based on which direction it's being turned. There'd be no need for position detection, the motors are weak enough that I can simply drive the door all the way shut (or open) at power on, keep trying to drive it that way for more than the maximum time it takes to get from fully open to fully closed, and then use that as my reference position for all movement after that.
This house has 7 registers, but the one in the bathroom just stays shut, so for all intents and purposes there are six zones. My initial thought, and definitely the easiest way to do this, was to use Arduino's. Sadly, the Arduino route is just too expensive. Each Arduino is $30, and then still needs an ethernet shield for another $40 or so. There's also the "Arduino Ethernet" which is the two combined, going for about $50-$60. I quickly (maybe too quickly, but the choice is now made) decided to go with the Raspberry Pi. It's $35 (well, $42 shipped in single quantities), and already has ethernet built in.
Arduino's have these great things called "shields". Adafruit suggested that they be called "Pi Plates" on the Raspberry Pi. I'm not sure if that's their personal trademark, or if it was meant to be in the public domain. Since then, some company decided to call their (patent pending, gag!) "enclosure" a Pi Plate as well. So whatever, I'll stick with calling it a shield. I'd never created a custom PCB before, beyond just using perfboard and jumpers. But I've really gotten tired of making those, so this time I decided to go with a full on custom PCB. Between a short class at my local robotics club, and a lot of YouTube videos, I managed to make one.
The Raspberry Pi has no onboard ADC's, so it can't monitor cheap and simple temperature sensors like the TMP36. In order to get around that, I used an ATTiny85. It's got 3 ADC's. To get the data from the ATTiny back into the Pi, I used the hardware UART (serial) pins available at the GPIO header. They're only 3.3v rated, so I simply made sure to run the ATTiny at 3.3v as well. I wanted a way to be able to plug the sensors into the Pi shield, as well as the stepper drivers. I decided to go with RJ45 for the steppers, as I needed at least 6 conductors, and RJ9 for the temp sensors, as I only needed 3 conductors for that. I will be able to use off the shelf telephone cord for the temp sensors, and CAT5 ethernet cable for the steppers.
This was a great first step into designing PCB's because it was very simple to design. I had the boards produced by OSHPark, a hobbyist oriented PCB fabrication facilitator (for lack of a better term). Next up was designing the boards that go at the other end of each cable. Those are still in production at the time of this writing, so I don't useful pictures of them yet. As soon as I get them and populate them, I'll get another post up. Check back often, I'll post more details when this project is getting closer to being implemented.