Fridge Fan

Our refrigerator is backed into a cul-de-sac without optimal air circulation. It is always a few degrees warmer behind the fridge, and I’d like to see if a simple temperature activated PC fan could cut our electricity use.

I found a basic tutorial at arduinogetstarted.com that set me off in the right direction.

Four pin fan control:

The wires and functions of a 4-pin fan are:
Pin #1 (Black) Ground
Pin #2 (Yellow) +12 VDC fixed
Pin #3 (Green) Speed Pulse Signal
Pin #4 (Blue) PWM Signal

Also an Arduino sketch that reports results from a DHT11 temperature and humidity sensor to our temperature/humidity reporting site (see Home Monitoring) so we can watch the thermal effects of the fan. Note the code contains a way to identify the sensor sending signal. This way I can re-use the same code across multiple devices.

#include <dht.h>
#include <OneWire.h> 
#include <DallasTemperature.h>

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

//#define SENSOR 1 // not made yet
// #define SENSOR 2  // nano every
#define SENSOR 3   // Make arduino uno

dht DHT;

#define DHT11_PIN 7

int sensorPin = A0;  // potentiometer input signal
int intensity = 0; // incoming potentiometer value
int dt,dh;

void setup(){
  Serial.begin(9600);

  if (SENSOR == 3) {
    dt = -1.0;
    dh = 1;
  } else if (SENSOR == 2) {
    dt = 99999;
    dh = 99999;
  } else if (SENSOR == 1) {
    dt = 99999;
    dh = 99999;
  }
  
  // Transmitter is connected to Arduino Pin #10  
  mySwitch.enableTransmit(10);

  // Optional set protocol (default is 1, will work for most outlets)
  mySwitch.setProtocol(1);
  // mySwitch.setRepeatTransmit(120);
  // mySwitch.setPulseLength(350);  // was 330

}

void loop(){
 
  int chk = DHT.read11(DHT11_PIN);
  unsigned long int temperature, humidity, intensity;
  unsigned long int hash;
  int nbits = 32;

  temperature = round((DHT.temperature) * 9.0 / 5.0 + 32 + dt);
  Serial.print("DHT11 Temperature: ");
  Serial.println(temperature);
  
  humidity = DHT.humidity + dh;
  Serial.print("DHT11 Humidity: ");
  Serial.println(humidity);

  intensity = analogRead(sensorPin);
  intensity = 1024 - intensity;
  // intensity = 50;

  // Serial.print("Intensity: ");
  // Serial.println(long (intensity)*10000);

  hash = long (SENSOR) * 100000000 + (intensity)*10000 + 100 * humidity + temperature; 

  Serial.println(hash);
  
  mySwitch.send(1010101, nbits);
  mySwitch.send(hash, nbits);
  // mySwitch.send(1010101, nbits);
    
  delay(300000);  // Send a transmission every five minutes
  //delay(1000);
  
  // Serial.println(sizeof(nbits));
}

Two items remaining… I need to locate/purchase a relay, and note that the fans we need to use are 12 volt. I’ll need to figure out a way to power both the fan and the Arduino from the same 12V power source. That should be easy to look up.

This thinking all fades away when faced with this:

Remote thermal sensor with integrated relay.

$7 on Amazon with free shipping. Can’t control fan speed, but runs at 12V, same as a fan. 🙂 Order placed.

Wired for fan control.

At 12 volts the fan was too loud for the family, so I cannibalized a 12V to 6V converter from a cigarette lighter plug-in, and it’s running now.

Next step is to figure out how to tell if it’s actually doing any good.