element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog Raspberry Pi and PifaceCad Board Thermostat Project
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 20 Jan 2014 10:26 PM Date Created
  • Views 1432 views
  • Likes 1 like
  • Comments 5 comments
  • raspberry
  • pifacecad
  • python
  • rpiintermediate
  • controller
  • EEPROM
  • rtc
  • thermostat
  • raspberry-pi
  • heating
  • raspberry_pi_projects
  • raspbian
Related
Recommended

Raspberry Pi and PifaceCad Board Thermostat Project

Former Member
Former Member
20 Jan 2014

Hi all,

 

Just thought I would share my Raspberry Pi Thermostat Project with the community. I have been working on this since catching the Raspberry Pi bug back in October 2013. I was feeling a little rusty in the software department and decided I needed the incentive to learn. The Raspberry Pi seemed an ideal starting point and as winter was approaching a WiFi enabled Thermostat seemed the ideal project. Nothing better than a real project to set your teeth into none of this "Hello World" boring stuff.

 

image

 

I decided the first thing I needed was make the Raspberry Pi able to retain the time so I added a real time clock module which conveniently had a temperature sensor and EEPROM built into the same addon.

 

http://docs.ciseco.co.uk/B025%20-%20POD%20RTC-EEPROM-TMP%20V1.0.pdf

 

This killed 3 birds with one stone giving me a Real Time Clock a Temperature Sensor and a data store for configuration data.

 

I initially bought a Piface I/O board and had dabbled with using its input and output functions. I soon learned the basics with this and then became aware of the PifaceCad board and decided this was the way to go due to the display and built in keys plus the bonus of the IR sensor. Soon after finding the PifaceCad I was pleased to see custom cases being sold for it. This cemented my choice and as you can see it makes a good looking package.

 

I soon realised during the development of the project that the Pi gets quite hot at approximately 55°C this would mean that the temperature sensor would need to be external to the case. I had also bought a PifaceCam board and case and could see that the RTC board would fit inside the camera case and the hole in the front would allow air to circulate. This bolts nicely on the side of the case and gives an element of isolation from the Pi. I also added a calibration offset value in the software to take care of any temperature rise in the sensor due to the self-heating effect of the Pi.

 

To keep the power consumption down I decided to add a PIR sensor to the design which you can see on the right hand side of the Pi. To mount this I removed the Ethernet port to accommodate the sensor which is connected to the 5V supply and ground and its 3.3V output connected to a spare GPIO line. The PIR sensor was then used to activate the back-light on approaching the Pi.

 

In order to drive the central heating you will need to know the type of interface used by your boiler in my case this was a 240V powered thermostat with switched live signal to the boiler. If this is the case please make sure that any interface used is adequately isolated from the Pi and is also fitted by a qualified person. The circuitry for the interface resides in the separate enclosure below which contains an encapsulated mains powered 5V supply to power the Pi and a 5V powered relay with mains rated contacts in excess of the current switching specification of the original thermostat. Ensure that the mains supplies for the relay feed to the boiler and the supply to the Pi are fused accordingly. The relay is driven by and open-collector transistor drive circuit mounted on a vero-board in the Pi driven by a GPIO line.

 

The main display shows the actual temperature on the top line with the time and thermostat set-point on the second line. The top navigation switch alters the set-point or allows the user to scroll through menu settings if the bottom right key is pressed. The left bottom key is currently programmed for a boost function which overrides the timer functions for two hours. The timer settings, set-point and calibration offset are stored in the EEPROM on the RTC module. These are read on power up to restore the thermostat when the power is interrupted.

 

The software is written in Python3 and the OS is Raspbian Wheezy. I am looking to learn how to add web functionality so that I can stream data from the thermostat and control it remotely

  • Sign in to reply
  • Problemchild
    Problemchild over 11 years ago in reply to Former Member

    Hi Max In many ways your project and this are the same.

    You will require higher power relays for the Heater switching maybe an high power relay or even an SSR or Thyristor  control might be of interest. Always keep the Mains control out the way of the Pi and Isolate it where ever possible. Also you will probably need to meet the building safety codes of your area.

     

    separate your project  work on reading the temperature first then switching on a LED from there a relay then from there your load then get both working together. Get the modules going first  don't try to get it all going at once .

     

    finally you will need to write some control software to make it all work together and drive a display  for the timer functions.

     

    Good luck .. John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Hi Kevin, I also have a themostat project in mind, unfortunately it's not central heating but baseboards.  I'm sure it can be done but not how or what components.  Am not a programmer nor an electronics person.  The base idea is a wifi enabled raspberry pi controller, remote wifi temperature sensors and wifi enabled 120V switches  Replace the variable heat control dial on the baseboards with the on/off wifi switch, should be able to handle 10 amps.  Put the temperature sensors across the room at sitting height.  Have the central control programmed to 1) sample the temp sensors sequentially perhaps 1x/min, 2) if temp below a given threshold turn on that room's heater above another threshold turn it off (ie if your temp setting is 20C turn on if <19C and off if >21C to prevent constant on/off cycles) 3) have time based settings for time of use electric rates which the current crop of programmable thermostats other than something like the uber expensive Nest can do 4) be able to program different temperatures for different rooms based on usage.  As you have already done some work on this can you suggest components.  I am a complete neophyte with this kind of thing.  Any direction would be most appreciated!  Nice project by the way!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Problemchild
    Problemchild over 11 years ago in reply to Former Member

    Yes I think those parts are particularly suited to this type of project in fact they also run a company  called IOT research

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Hi John

     

    Thanks for the comment I was considering the Ciseco Slice of Radio SC13019 but as the hardwired connection was already there to the boiler I went for that. I have two of the boards and will be thinking of a new project for them image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Problemchild
    Problemchild over 11 years ago

    Nice wee project, nice to see you are using a Ciseco product, they produce  some nice kit.

    You may want to look at their RF kit for the Pi/Arduino which all use the Chip Con C1100.for say a thermostat

    That's  now a TI part and very useful indeed, I'm trying to finish off some videos showing their worked examples

    for the RasWIK kit but so far only got the first one done ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube