Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Smart Thermostat — Parallax Forums

Propeller Smart Thermostat

RICoderRICoder Posts: 91
edited 2009-02-18 22:41 in Propeller 1
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.
2128 x 1163 - 43K
1157 x 771 - 145K

Comments

  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-18 16:02
    Admirably done, RICoder. Admirably and articulately described, too. Bravo!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-18 16:07
    Very nice. Having built my own ‘digital thermostats’ in the past I know how much fun it can be. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • parts-man73parts-man73 Posts: 830
    edited 2009-02-18 17:50
    I had thought about a similar project, but I have too many projects going on already.

    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-18 18:28
    Sounds like an application for the PINK Module.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • parts-man73parts-man73 Posts: 830
    edited 2009-02-18 18:58
    well....I'd personally use a PropNIC smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-18 19:04
    I will have to checkk it out some time. I said the first thing that came to mind. =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • RICoderRICoder Posts: 91
    edited 2009-02-18 19:11
    Thanks guys, appreciate the feedback, and PLEASE make more suggestions as this is an ongoing project.· Also thanks to so many people at Parallax and on the forums for being so damned helpful all the time.

    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.
  • Jimmy W.Jimmy W. Posts: 112
    edited 2009-02-18 19:54
    RICoder, if you are interested I did a very similar project, mine was a humidistat/thermostat.
    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
  • dMajodMajo Posts: 855
    edited 2009-02-18 19:54
    Just a question: why, with so many free IOs, you have not multiplexed the 7-segment displays directly on propeller
  • Jimmy W.Jimmy W. Posts: 112
    edited 2009-02-18 19:58
    dMajo said...
    Just a question: why, with so many free IOs, you have not multiplexed the 7-segment displays directly on propeller

    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)
  • parts-man73parts-man73 Posts: 830
    edited 2009-02-18 20:08
    RICoder said...
    and PLEASE make more suggestions as this is an ongoing project.
    How about 1 "Master" that's ethernet connected, then "nodes" that are connected via XBee

    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!



    Chris said...
    I will have to checkk it out some time.

    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
  • dMajodMajo Posts: 855
    edited 2009-02-18 20:20
    Maybe one of this can help here
  • Jimmy W.Jimmy W. Posts: 112
    edited 2009-02-18 20:40
    dMajo said...
    Maybe one of this can help here

    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
  • Cole LoganCole Logan Posts: 196
    edited 2009-02-18 21:53
    dMajo said...
    Maybe one of this can help here
    Thats definitly a cool chip and It look like digikey has them for $3.57
  • RICoderRICoder Posts: 91
    edited 2009-02-18 22:41
    @Jimmy W.: I'd be interested in seeing what you've done, so if you want to post it or PM me that'd be great. I haven't decided exactly what I want to be able to poll from the device, though your ideas are certainly worth putting into my design. Ultimately, it would be good if I could do everything from send code updates to the Prop to flashing the XBee over the air.
    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).
Sign In or Register to comment.