Monday, August 16, 2010

Solar heat flow system - proposal

Description:
Simple control unit that monitors a temperature difference and controls speed and direction of a fan

Usage scenarios:
1. Measuring temperatures in two rooms and switching fan to push air from warmer to cooler room (or vice versa). Temperature history is recorded for analysis. Status can be monitored at any time (Paul, Peter, ?)

2. Controlling fan in passive solar air heater to switch on when manifold temperature exceeds indoor temperature. Temperature history is recorded for analysis. (Paul, ?)

Specifications
Temperature sensors:
2, type?
Distance from unit?

Fan:
240V, DC?
Variable speed?
Direction control?
Flow rate, wattage

Data buffer:
reading format: T1, T2, Timestamp, Fan_state
number of readings?
reading rate(s)

Status indicators on unit
LEDs, LCD?


Data interface:
USB:
Output as spreadsheet file?
Optional Wireless? Web server for data output, status and control


Please use the comments to suggest possible features or ideas for this design.

4 comments:

  1. Count me in! I have started researching types of temperature sensor available and will report back ASAP. My preference is for a 240V single phase AC motor, simply because I need to figure a way of doing this in another project. (My middle name is Selfish ;-) ) Problem is from what I have seen making a single phase AC motor reverse direction is tricky. I have a number of Application Notes from various semiconductor manufacturers. Maybe there's something in the Great Arduino Project Library.

    ReplyDelete
  2. Hmmm!! Time flies.... In response to Paul's email message yesterday I can't make it this coming Saturday (30th) but should be able to make it on the 6th.
    I have finally got round to playing with the two temperature measurement methods at
    http://www.instructables.com/id/Temperature-Sensor-Tutorial/step4/Simple-thermometer/

    and at
    http://www.instructables.com/id/Temperature-Sensor-Tutorial/step5/Auto-calibrating-supply-independent-thermometer/

    I'm currently using a pot across the 5V supply to simulate a real LM35 or TMP36 temperature sensor IC. The first program works fine; the second supposedly more accurate one reads abouyt 10 degC low!

    Once this anomaly is resolved and accuracy is proven it should be possible to add one or more additional sensors and then do things with the result rather than just print the result to the serial port.

    I've changed the code I'm using myself in a cosmetic sense -- it now prints once every 10 sec instead of every second. And each set of results is separated with a couple of line feeds.

    ReplyDelete
  3. Pls note: I hit the 4096 character limit to message size, so this is in two parts. This has the preamble and comment about driving LEDs. The real stuff will be (I hope)in the next message.

    OK Guys -- sorry for cluttering your email earlier today -- this is where I should have put the info. A quick followup on what I've been playing with since sending the email message (the relevant code is at the end of this missive) along with a warning about driving LEDs directly from the digital output of the Arduino board:

    LED WARNING....
    While driving an LED from the digital output (between digital port 13 set as an output and the adjacent GND pin (per the examplke "Blink" program) is sort of OK, it over-drives the LED -- especially red, amber and green ones that are best operated at about 2 volts. Blue or white isn't so bad since they like 3.5V to 4V. The digital output is 5V.

    Red, amber or green LEDs should preferably be connected with a series 150 or 180 ohm resistor (not critical) and blue or white LEDs with a series 82 ohm resistor. Alternatively connect 2 red, amber or green LEDs in series. (This doesn't work for blue or white with a supply voltage below about 7V -- the Arduino board works at 5V)

    ReplyDelete
  4. Code changes:

    1. Serial printout of the value of "reading" added so it's easy to see where the operating point is/needs to be.

    2. Blink added at the beginning of the loop; an indicator that something is about to happen.

    3. Two IF statements added that cause one of three reactions depending on the "result" (i.e. the DAC output that results from measuring the sensor output):
    a) if "result" is equal to or less than 142 (about 19 degC) the LED outputs 3 short blinks.
    b) if "result" is greater than 145 (about 21 degC) the LED outputs 3 long blinks.
    c) in the dead zone between 143 and 145 there are no blinks at nthe end of the temperature measurement cycle.

    The above values work well in the cool climate of Inverloch; you might need to up the values a bit in warmer environments!

    The code:

    /*This example code for Arduino shows a quick way to create a
    temperature sensor, it simply prints to the serial port what
    */the current temperature is in both Celsius and Fahrenheit

    //TMP36 Pin Variables
    int sensorPin = 0; //the analog pin the TMP36's Vout (sense) pin
    //is connected to Analogue Input 0.
    //The resolution is 10 mV / degree centigrade with a
    //500 mV offset to allow for negative temperatures
    int ledPin = 13; // LED connected to digital pin 13

    /* setup() - this function runs once when you turn your Arduino on. We initialize the serial connection with the computer
    */
    void setup()
    {
    // initialize the digital pin as an output:
    pinMode(ledPin, OUTPUT);

    Serial.begin(9600); //Start the serial connection with the computer
    //to view the result open the serial monitor
    }

    void loop() // run over and over again
    {
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(1000); // wait for a second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(500); //waiting 0.5 sec

    //getting the voltage reading from the temperature sensor
    int reading = analogRead(sensorPin);
    Serial.print("DAC result for reading = "); Serial.println(reading); //print out reading

    // converting that reading to voltage, for 3.3v arduino use 3.3
    float voltage = reading * 5.0 / 1024;
    // print out the voltage
    Serial.print(voltage); Serial.println(" volts");

    // now print out the temperature
    float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree with 500 mV offset
    //to degrees ((volatge - 500mV) times 100)
    Serial.print(temperatureC); Serial.println(" degress C");

    // now convert to Fahrenheight
    float temperatureF = (temperatureC * 9 / 5) + 32;
    Serial.print(temperatureF); Serial.print(" degress C"); Serial.println(0x0A, BYTE); //Serial.println(32, BYTE); Serial.println(32, BYTE);
    delay(1000);
    if (reading <= 142) {
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(100); // wait for 0.1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(100); // wait for 0.1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(100); // wait for 0.1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    }
    if (reading > 145) {
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(1000); // wait for 1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(1000); // wait for 1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    digitalWrite(ledPin, HIGH); // set the LED on
    delay(1000); // wait for 1 second
    digitalWrite(ledPin, LOW); // set the LED off
    delay(200); //waiting 0.2 sec
    }

    delay(3000); //waiting 3 seconds
    }

    ReplyDelete