Temperature Equalisation System

I want to build a heat transfer system similar to the one listed on this site but with a few differences.

The System will be used to keep my garage cool during the hotter months of the year. Often during the day my garage stays cool until about 1pm when the heat of the sun hits the front of the house. About this time the garage is a lot hotter inside then the air outside so i wanted to set up a system that looks a bit like the one i have drawn in the attachment.

In terms of programming i was hoping to have the following:

a mode switch with three modes (Current mode would be displayed via an LED) Auto (heat system functions between 8 am and 6 pm - temperature dependant) manual (Heat system is fan on permanently) and off ( Heat system would not function at all)

temperature control would be based on a temperature differential. two temp sensors would be connected to the system. One outside near the air intake, and one inside. If the system was in auto mode the system would detect when he outside air was 3 degrees or more cooler than the inside air and run the fan until the temperature difference was less than 3 degrees. For example. Inside temperature is 32 degrees, outside temperature is 25. Fan would run until the inside air temp reached 28 degrees or lower.

I am pretty lost with the programming but i am happy to make a start if i can get some guidance from the community here.

I am also looking for some assistance with the components. I can source a relay and a fan that’s fine, i am keen to get some feed back on the type of temp sensors i should use bearing in mind there could be some long cable runs on the sensors themselves.

Looking forward to some feed back

Air blower.pdf (928 KB)

Make list of Digital Io ,And analog Io being used

This project might need

4 analog temperature sensor 1 DS1307 RTC 16 X2 LED it occupy 7 digital Ios simillry count no of input & output IOS.

Once Ios are decided Check for blower control perameters, Later we can talk about programming section & giving architecture.

What are you using for a fan? The only minor challenge will be getting the Arduino to control the fan - probably using a relay. Look at the example programs that come with the Arduino IDE. You find some that cover most, if not everything that you need.

The Thread planning and implementing a program may be useful.

There are lots of examples of electronic circuits here



Thanks for reply.

I don't (think i ) need any digital IO unless i decide to add a display

Analog I/O:

01 - Temp Sensor (Outdoor) 02 - Temp Sensor (Indoor) 03 - Momentary Push Switch (For mode change) 04 - Red (of RGB LED) 05 - Green (of RGB LED) 06 - Blue (of RGB LED) 07 - Relay Output (switch blower on and off) 08 - Possibly a Potentiometer to adjust the temperature offset required to trigger fan on and off

Does that look right?

I'm not 100% sure why you referred to 4 temp sensors?


Thanks for the links. i will check them out. For a fan i will use one of the many 150mm inline duct fans available on Ebay. Searching "inline fan" or "inline duct fan" usually brings up a few. Typically i would expect to use a 240VAC blower and trigger it with a relay.

Thanks all

When i see the image of Pdf file gives out some confusion. Usually the temperature inside blower chamber will not be constant. The air entering & leaving chamber differ a lot.

I dont How you planning to use temperature sensor ; Mean to say are you using temperature sensor throughout same , means 1 temperature sensor throughout or not.???

for choosing temperature sensor please check internal & external environmental condition on temperature sensor.

2) How you are planning to use RGB led here.

external temperature usually remain constant, only internal temperature region vary from one point to other.


Sorry for confusion.

Essentially “Outside” temp sensor would be mounted outside the garage to monitor the air temperature outside. “indoor” temp sensor would be mounted indoors to measure the internal temperature. I don’t need to monitor the actual Duct temperatures on either side of the blower.

So in summary, two temp sensors. on inside one outside. When temp sensor 1 (outdoor) is 3 degrees C or cooler then temp sensor 2 (indoor) blower starts and runs until the differential is less then 3 degrees C.

RGB LED is to show mode status. Auto (Temp controlled) Manual (blower fixed on) Stop (Blower fixed off) the momentary push would be used to switch modes. Does this make sense?


Now we have correct idea.

You can use https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor

You have planned to use any [particular temperature sensor or arduino board for development of this project

For this project Arduino Uno / arduino Mini is more than efficient based On IO.

have you thought of What kind of motor driver used run blower. ??

Have you done power calculation for blower like current rating , power consumed, size.

By seeing requirement coding will take hardly few minutes

/* program developed by Ajit Nayak*/


#include <math.h>
#include <Time.h>
#include <avr/wdt.h>

# define Mode_Selection 2
# define Mode_Choosen 3
float Inside_Temprature;
float Outside_Temprature;

float Resistance_Inner;
float Resistance_Outer;
int Thermistor_Value=3975;

int Sensor1_Reading;
int Sensor2_Reading;

int Sensor_Inside=0;// connected to analog port 0
int Sensor_Outside=1;//connected to analog port 1

float Inter_Temprature_Value;
float Outer_Temprature_Value;
float Difference_Temp_Zone;

int Blower_On=4;
static int Mode_flag=1;

float Inner_temp_measurement()

float Outter_temp_measurement()

int  Mode_Check()
   Serial.println("Mode is Manual"); 
   Serial.println("Mode is Automatic"); 

void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly: 
int Flag_Check= Mode_Check();

Serial.print("Inside temp of container:");Serial.println("Inter_Temprature_Value");
Serial.print("outside temp of container:");Serial.println("Outer_Temprature_Value");


Serial.print("Diff of temp Zone:");Serial.println("Difference_Temp_Zone");

// here i assumed you using relay; operating in auto mode.
if(Difference_Temp_Zone>=3.0 && Flag_check==1)
// here you put blower controller output when running in manual mode / Means you planning to controll via manually using potentiometer


you can try part of the code for initial testing

float Inner_temp_measurement()

float Outter_temp_measurement()

Why have you got two virtually identical functions that return global values?

Serial.print("Inside temp of container:");Serial.println("Inter_Temprature_Value");


@ AMPS-N Thanks so much for your code. I will read through it and do my best to figure it out

I will order some parts over Xmas and get on to testing. You mention UNO or Mini as being good options, do you think the Spark Core.IO might work as well?.

Meanwhile i will start work on a block diagram and schematic for my own reference.

I was hoping someone might be able to help me decipher the pin assignments in AMPS-N code from post #7 in this thread.

# define Mode_Selection 2
# define Mode_Choosen 3

means: Digital pin 2 is "Mode_Selection" and Digital pin 3 is "Mode_Choosen"

int Sensor_Inside=0;// connected to analogue port 0
int Sensor_Outside=1;//connected to analogue port 1

Quite clearly sets the two temp sensors on analogue pin 0 and 1

int Blower_On=4;
static int Mode_flag=1;

I assumed this meant analogue pins 1 an 4 but Blower_on later has a pinmode set to it so it must be digital?

As you can see i am very green at this. I would be glad of any pointers for determining pin assignments by simply reading the code.

Edit: i can see that this can not be analogue pins 1 & 4 because A1 is already used by a temp sensor. But even so i am still confused as to how you can tell an analogue assignment from a digital in the code.

Here goes first schematic. I have used a motor instead of a relay.And transistors instead of temp sensors

You might be surprised at how much air needs to be moved, in order to reduce the temperature to the desired level. I certainly was when I attempted a similar project, so my suggestion is to first make certain that the fan is capable of moving more air than needed.

Obviously, if you choose a fan that is too small, no control system will improve the situation.

Edit: I ended up abandoning that idea because the fan that did the job was too noisy. A shade structure is much better, takes no energy and makes no noise.


Thanks for the feedback on the idea and your experiences. At this stage the whole idea is to reduce the temperature at all. I’m more thinking long runs low flow rate. With my garage the temperature at midday is usually always hotter then outside due to the lack of airflow.

Unfortunately a shade structure is not really an option due to the following factors: a) cost of installation, b) effect on aesthetics of home, c) project feasibility

Are you able to provide more detail on your project? what methods you used to blow air and what temp changes if any that you saw,


So i got carried away…attached are two images of the end goal.

This time with a UI. (4 buttons and a screen)

My thought is that i may as well plan for the most features that i will need and slowly build on the code with what i learn and assistance from forums like these.

The purpose of the screen is to display information relating to Temperature
There would be three pages of information:
Page 1 (Home):

  • line 1 - Outside Temperature:
  • line 2 - Inside temperature

Page 2 (Info):

  • line 1 - Temp Differential Set: 3DegC
  • line 2 - Current Mode:

Page 3 (Edit):

  • line 1 - Use/Up down to change temp differential
  • line 2 - Set Temp Difference:

the four buttons would be used as follows:

When in view mode:
Button 1(mode switch): Pressing mode button would switch between 3 modes
Button 2 (set switch): Pressing for 3 seconds enters edit mode. Pressing momentarily does nothing
Button 3 (up/next switch): pressing momentarily scrolls from page 1 to page 2. Pressing again scrolls from page 2 to page 1.
Button 4 (down/prev switch): Same as button 3 but in reverse

When in edit mode
(Enter edit mode by pressing and holding set switch for 3 or more seconds)
Button 1 (mode switch): acts as exit or esc button. pressing it will exit without changes
Button 2 (Set switch): acts as enter or confirm button pressing this will save changes and exit to view mode page 2
Button 3 (up/next switch): will increase the value of the temperature differential by one degree C increments
Button 4 (down/prev switch): will decrease the value of the temperature differential by one degree C increments

So there it is. Please don’t take this as an unrealistic demand for assistance, im just noting this here for my own reference more then anything

Are you able to provide more detail on your project?

In my case it was also a garage, with uninsulated walls, about 44 sq m floor space, with a west wall and south attic roof. I used the fan to exhaust air from the attic space above the garage, with ceiling openings for airflow from below.

After a couple of failed trials I ended up using a fan from a home improvement center, about 0.5 m in diameter, and this reduced the inside garage temperature to a reasonable value (not much above the outside). The attic remained pretty hot, 40-45 C, but without the fan it was sometimes well over 65 C.

I’ve lost the specs on the volume of air per minute the fan moves, but for it to be effective, it must on all summer afternoon and well into the evening. Most of the fan noise is outside but it is quite unpleasant.

Since then I’ve put solar water heaters on the attic roof, which shade it effectively and provide lots of hot water, too!

IMHO, why are all those complications, like LCD and programmings temperature? If this is for personal home use, just keep it simple.

  • Arduino Nano - Take the smallest and cheapest available micro-controller board. Chinese made Nano is just 3 USD or around it. Buy 2 to replace if it will fry.

  • Single 10A relay to control ANY fun, or even 2-3 at once.

  • 3-way switch (Auto - Off - Manual) and 2 LEDs to show current status

  • Temperature sensors

  • RTC board if you'd like to keep time (e.g. from 8 am to 6 pm). It is also very cheap. About 1 USD.

That's it. If you'd like to change the temperature settings (once a year), you can simply upload a new sketch.

Make this work and upgrade it later if you'd like.

PS: Contact me when you are ready to write a program. I can help you.

ghen: Make this work and upgrade it later if you'd like.

Excellent advice - and just use an Uno during the design/development phase



Thanks so much for the insight. Certainly very helpful. The water heaters turned out to be an excellent solution!!!


You make a valid point. I guess the problem is me really. I love technology and know enough about electronics to know what its capable of. But not enough about it to know my own limitations. In my eyes this is not a project as a means to an end but more of a practical application of a lesson. Like many here im sure, you see a project that could be accomplished with arduino and you begin to plot it out and very quickly it escalates and thats where i am now. I am not using arduino to get the job done cheaply, but rather to learn. If i wanted to get it done hassle free and with no fuss i would buy a heat transfer kit and install an off the shelf thermostat.

Surely i am not alone in getting over enthusiastic?

I do agree though that it makes sense to start small, but im not very sensible at the best of times and from what i can see why build something and then have to rebuild it if you can learn it all from the outset....? (Admittedly its going to be a longer/harder journey...but does that really matter?)

I'm going to get the parts together over the holidays and keep an eye out here for any additional hints and tips.

I will keep you all posted!

for any noticable effect, you should be looking at about 4 air changes per hour. also, the outside air will be warmer at some point so the access to cold air will be limited.

insulation would be the first best step. zero energy.

another method would be to install plastic sheeting on the framing of the roof. create a common plenum at one end and another at the other end. blow outside air into that. the air will move from one side to the other and exit the space.

since you only have to move the hot air and not the entire room, this is considerably more efficient than trying to blend the hot air with the colder room and then move that cold/mixed air out and replace it with warmer air.

also, a fan works better with colder air. as the air heats, the molecules move further apart and there is less for a fan blade to push on.