Go Back   EcoRenovator > Improvements > Appliances & Gadgets
Advanced Search

Blog 60+ Home Energy Saving Tips Recent Posts Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-29-11, 09:54 PM   #1
Daox's Avatar
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default Daox's diy arduino thermal differential controller

We have a great thread that contains lots of info on thermal differential controllers here. However, I wanted to start a thread dedicated to my own development of a thermal differential controller that I'll be using for my attic heat reclamation project.

Tonight I setup a simple circuit that tested the operation of the differential controller and it worked great. Its very simple and adding features later on won't be a big deal at all. I am using the arduino since I know how to use it, its cheap, and it can do everything I'd ever want to be able to do with a thermal differential controller. The temperature sensors are LM35 sensors. They cost a bit more than the thermistors ($1.70 vs $.20) I had planned on using on the controller before, but they are much easier to use while programming and will probably give a better signal over long wire runs. The 120V relay I'm planning on using is a solid state relay (SSR) that the arduino can power directly. The 5V power supply is an old cell phone charger.

As for the operation of the controller, for now its a very simple setup. When the temperature of the attic gets 3C/5.4F higher than the house, the relay kicks on whatever is connected to it. In my case right now, that is two bathroom vent fans. Once the temperature of the attic drops down below the temperature of the house, the relay powers down the fans. There is also a 30 second minimum on time just in case to prevent any odd start/stop situations.

I'm also thinking about adding a LED that indicates that the fans are on, but I'm not sure if that'll be needed as you'll probably hear the air rushing out of the vent.



Parts List:

Here is a parts list of what you'll need. I've linked to a few places where I've bought things from before.

The total for these items comes to ~$40 plus shipping which shouldn't be too bad. It can definitely be done cheaper if you go with a cheaper arduino or find parts to use.

Arduino program code

/* Thermal Differential Controller

  The program monitors two temperature sensors and
  activates a relay when one sensor is warmer than
  the other.

int SsensorPin = 4;  // the pin to input attic temperature
int TsensorPin = 5;  // the pin to input kitchen temperature
int RelayPin = 2;  // the pin to operate the relay
int ledPin = 13;  // led pin (verify fan on condition)

int Ssensor = 0;  // variable to store the value of the attic temperature
int SensorDiff = 0;  // variable to store the Ssensor value plus differential (Diff)
int Tsensor = 0;  // variable to store the value of the kitchen temperature
int Diff = 3.0;  // temperature difference that must exist between attic and kitchen before relay enables (degrees C)

void setup() {
  pinMode(SsensorPin, INPUT);
  pinMode(TsensorPin, INPUT);
  pinMode(RelayPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  // Serial.begin(9600);
  digitalWrite(RelayPin, LOW);

void loop() {
  // read sensor inputs and assign to variables
  Ssensor = analogRead(SsensorPin) / 2;
  Tsensor = analogRead(TsensorPin) / 2;
  // add temperature difference to Ssensor value
  SensorDiff = Ssensor - Diff;

  // send temperature signals back to computer
  Serial.print(", ");
  Serial.print(", ");

  // if attic is warmer than kitchen sensor, enable relay
  if (SensorDiff > Tsensor  && Tsensor < 27) {
      digitalWrite(RelayPin, HIGH);
      digitalWrite(ledPin, HIGH);
  // if attic sensor is cooler than kitchen sensor, disable relay
  if (Ssensor < Tsensor || Tsensor > 27 ) {
    digitalWrite(RelayPin, LOW);
    digitalWrite(ledPin, LOW);

Attached Thumbnails
Click image for larger version

Name:	schematic.jpg
Views:	5624
Size:	21.3 KB
ID:	1384  
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Daox; 04-23-14 at 02:08 PM..
Daox is offline   Reply With Quote
The Following User Says Thank You to Daox For This Useful Post:
jeff5may (03-11-21)

arduino, controller, differential, thermal

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 08:58 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design