Propeller Smart Thermostat
RICoder
Posts: 91
Well folks, the proof-of concept is complete and the device is working flawlessly. Below is the project, what is complete and what I'm doing with it next. Bear in mind that this is my first project since starting with electronics in January and building a Boe-bot.
Goal:
Create a set of devices to replace common household electronics that could be controlled remotely by computer.
First step, a thermostat that could:
* Measure the temperature (duh!)
* Connect to standard thermostat wiring in a house and control the 24VAC switches
* Accept various commands remotely and adjust itself accordingly or report information back
Current state:
The device employs an XBee set up as an end-point on the thermostat. It measures temperature with a DS1620 chip and controls 2x 7 segment LEDs via 74HCT595 chips to display the temperature.
On the PC I've written an app in C# for control of various devices. It uses the simple breakout board from SparkFun to talk over USB to the XBee. That said, I use the X-CTU tool most often for testing.
The thermostat sends out the temperature over the XBee every 5 seconds.
Next steps:
I have the relays purchased and a new 5mhz crystal on the way. I'll be putting this whole thing on a perf-board this week sometime using a DIP version of the Prop.
I need to update the code for the device on the Prop chip to parse the various messages I can send. First being "send me the temp" and "set the low / high threshold". That's easy, it'll be done this week as well.
I need to run some tests with the relays on the 24VAC wires from the HVAC transformer. Not sure exactly when that will be done, but it will be done in small steps so I don't fry my chips (or myself).
Next next steps:
Print some boards and put this bad-boy together for real.
Pictures of the board, a schematic from Eagle and the prop code attached.
Goal:
Create a set of devices to replace common household electronics that could be controlled remotely by computer.
First step, a thermostat that could:
* Measure the temperature (duh!)
* Connect to standard thermostat wiring in a house and control the 24VAC switches
* Accept various commands remotely and adjust itself accordingly or report information back
Current state:
The device employs an XBee set up as an end-point on the thermostat. It measures temperature with a DS1620 chip and controls 2x 7 segment LEDs via 74HCT595 chips to display the temperature.
On the PC I've written an app in C# for control of various devices. It uses the simple breakout board from SparkFun to talk over USB to the XBee. That said, I use the X-CTU tool most often for testing.
The thermostat sends out the temperature over the XBee every 5 seconds.
Next steps:
I have the relays purchased and a new 5mhz crystal on the way. I'll be putting this whole thing on a perf-board this week sometime using a DIP version of the Prop.
I need to update the code for the device on the Prop chip to parse the various messages I can send. First being "send me the temp" and "set the low / high threshold". That's easy, it'll be done this week as well.
I need to run some tests with the relays on the 24VAC wires from the HVAC transformer. Not sure exactly when that will be done, but it will be done in small steps so I don't fry my chips (or myself).
Next next steps:
Print some boards and put this bad-boy together for real.
Pictures of the board, a schematic from Eagle and the prop code attached.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
So here's an idea that you may like and want to add to your project. How about adding an ethernet port to connect to the internet, allowing you to access the HVAC system from afar. You could monitor and adjust the temperature at home from work or vacation.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
The ethernet port is highly likely because of the overall plan, which is to have multiple devices around the house all connected to that one central computer that controls it all...like X10 only better [noparse]:)[/noparse]
There is obviously a large PC aspect to this, because that controller needs to be aware of devices whether they exist on ethernet or XBee, and they could be either.· I'm working out the "protocol" if you will, that lives on top of the device layer, so that a broadcast message can be sent from the computer for discovery, and the nodes can respond and be added to the list.
This particular thermostat is for the dining room, and there is no available ethernet line, however, there is an ethernet line in the office where the other thermostat will go.
Part II of this project will be a light switch that can be turned on and off both remotely and using the normal switch.
I have spent time today prettying up the PC interface, once done I'll post it here.
I used xbee radios that all talked back to 1 controller that had Ethernet and serial on it(to interface AMX/Crestron/Control4)
I also have a app i wrote in c#.net to do control over the PC. I really want to get an iPhone app for it so I am learning obj C right now (ugh) if you want I can send you the more pertinent parts of it(its almost ready for distribution, my boss might be angry if I gave it all away :P)
I used a poll time of 25 seconds and distributed time slots for unsolicited feedback to cut down on congestion, how many thermostats will you be controlling?
You may want to consider an LCD instead of segmented displays, a lot easier for readable feedback( also, what if its 100degrees + like here in Vegas?)
Dont forget status feedback for: fan status(on/auto) control mode(heat/cool/auto/off) setbacks, holds, vacation mode, and Connection status(connected/disconnected/weak)
and configurations for: Heat pump/Conventional, 1 stage/2 stage, peak mode(California energy code), Variable speed fan?,Damper control?
Jimmy
Remember he doesn't have his relays, or leds on there yet for control/feedback.
you need at the minimum fan/heat call/cool call and status feedback for fan mode and conditioning mode(heat/cool/auto/off)
The newer XBee's can create a mesh network also, which could help with range.
I only mention range as you may want outdoor sensors for access to weather conditions, control outdoor lighting, garage door status, garage lights, turn on your robo-mow, the list can go on and on
oh, and watch out for code bloat!
I'll hopefully be at Parallax at the end of June for the show
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
that's a really cool chip!
Something I wish I had done was to put the out to HVAC for the fan line through an inductive pickup, that way if you call the fan and you dont see current flowing you know that the hvac units breaker is popped or some similar problem and you can send an alert. Much better to know where the problem is if you have one!
Jimmy
Further, I got 2x16 LCD in the mail from Parallax today [noparse]:)[/noparse], so I'll be switching to that.
@dMajo: Someone already said it, but the thing is I could see no reason to waste all those pins knowing that I'd have other devices to hook up. That said, I'm switching to LCD.
@parts-man73: You're pushing me in the right direction I think. I have this vision in my head of a master-controller device that is Prop controlled and more or less autonomous. Currently, I have to control external devices through an XBee directly attached to my PC, and that won't be livable. Obviously I want to be able to control these things remotely, whether by iPhone or webpage, so I'm going to have to come up with a better solution. Most likely, it will be an ethernet AND XBee Prop device that knows how to communicate with the end-points (and manage them) as how to communicate with a server (i.e. the box that will make this info available over the 'net).