Friday, January 11, 2013

My Failed Fan Controller Design

I've spent all the time and resources I'm willing to on this project for now. I may complete it at a later date. It all works except the input voltage from the furnace transformer is too high after rectification (38-40v).  The 78M05 I'm using is 35v max and it doesn't tolerate any more. It doesn't seem to damage it, as even after testing as bad on the furnace it works fine on 18v (max on my lab PS) I tried to build a SMPS replacement based on Roman Black's design, that also worked fine on 18v and blew at least a zener diode when on the furnace. I used parts I had on hand, so sometime I will get precise values and try again. For now I'm ordering a snap-disk. Perhaps some of this design may be useful to someone for other purposes. It really sucks, as the controller works fine, I just can't get the voltage regulated to 5v. If you have any ideas feel free to comment. It's probably easy and I'm just not seeing it :)

My Dad's woodstove is ducted into his furnace. It works OK, but he has to manually turn the blower fan on to circulate the air through the house. This is OK when they're up and keep the fire going, but if they don't get up during the night the fire burns down and it circulates cold basement air. Brrrr



I realize I could just use a therm-o-disk, but what fun is that?

Plus I get a bit more practice making boards. NOTE: I bumped the zone fill clearance from .020 to .025, that definitely helped me not bridge pins to ground. It's a simple board and I used mostly .025 traces with a few .012 and .080 ones as needed. I can etch .012 very consistently, even .008 fairly well, but I keep tearing pads off drilling. The extra copper seems to help considerably. Extra copper around pad make things much easier drilling and mounting. Essential for wire connections. My first board's traces got torn up where wires mounted (all .012 traces). Notice the pads across the top of the following image compared with the bottom of the board above:



 Requirements:
  • Run off furnace power (28VAC)
  • Switch fan on at approx 120F, off at 90f
  • Make sure fan runs at least 10 minutes when turned on.
  • Cheap, hopefully less than a $15 T-O-D
Specs:
  • Controlled by a attiny85
  • PCB was done for a full-bridge rectifier, but we may use a half-bridge to keep the voltage under control. (use 2 diodes instead of 4) (Note: Didn't Work)
  • Used Salvaged Components where possible
Parts List:
  • Attiny85 ($1.30) 
  • lm335a Sensor ($1.00) (I had some of these, I would use a mcp9700-e/to($0.25) in the future. the board supports it, just omit the 2k resistor)
  • lm7805 Regulator ($0.50)
  • 2n7000 mosfet ($0.60)
  • 2x 1n4007 diodes ($0.50x2)
  • 330u 50v cap (salvage)
  • 10u cap(salvage)
  • 0.1u cap
  • 10K resistor
  • 2K Resistor (omit for mcp9700)
  • RY5W-K Relay (salvage)(you can get ones with ~30ma coils for less than $2.50 and drop the mosfet, though a mosfet does make it more robust IMO) You could also try a solid state relay
Schematic

The 7805 was a bit close to the cap, that will be fixed in the linked files. I intended to use a to-92 regulator, but the one I had was rated for 100MA. I thought my relay was 150MA. It was a last minute change. As it turns out it uses about 9MA idle and 54MA with relay powered. I could have used the to-92 after all.Total cost was under $5, though to buy all the parts would be more like $10, the cheapest T-O-D I found was $8. If I have the wrong temp with this I just reflash the chip, with a T-O-D I buy a different one.



Code is in Arduino, you will need the attiny85 hardware files, a programmer or an arduino, some wires and bits. See this guide for more information. I may redo it in AVR C sometime, I just wanted it up and running. I didn't need to do anything special.

 /*  
  Fan Controller intended for a attiny85, but takes ~3k, change pins below for arduino and uncomment the serial for debugging on the arduino.  
  it's intended for a furnace, so no fancy pwm or anything, thought it wouldn't be hard to add.  
  Stephen Evans - stevesfixitshop.blogspot.com  
  */  
    
 #define INPIN 3  
 #define OUTPIN 2  
 #define ONTEMP 48  
 #define OFFTEMP 32  
 #define DEL 600000  
   
 unsigned long wait = 0;  
 int avread = 0;  
 int ain[10];  
 int i = 0;  
 void setup() {  
 // Serial.begin(9600);  
  pinMode(OUTPIN, OUTPUT);  
 }  
   
 void loop() {  
  //make 10 readings  
  while(i<=9){  
   ain[i] = analogRead(INPIN);  
   delay(10); // wait for adc to stabilise  
   i++;  
  }  
  i=0;  
    
  //average the readings  
  avread = 0;  
  while(i<=9){  
   avread = avread + ain[i];  
   i++;  
  }  
  i=0;  
  avread = avread / 10;  
    
  //Convert reading to degrees C  
  float sensorValue = ((avread*4.8)/10)-284.15;  
 // Serial.println(sensorValue);  
    
  // turn fan on  
  if(sensorValue >= ONTEMP){  
   digitalWrite(OUTPIN, HIGH);  
   wait = millis() + DEL;  
  }  
    
  // turn fan off if below set temp and delay has passed.  
  else if (sensorValue <= OFFTEMP && millis() >= wait){  
   digitalWrite(OUTPIN,LOW);  
  }  
  // every 50 days millis rolls over to 0, this makes sure it doesn't mess things up  
  else if (millis() <= (wait-DEL-50)){  
   wait = millis();  
  }  
    
 }  

2 comments:

  1. Did you ever get this worked out? I'd like to replace a mechanical furnace fan limit switch, and this looks like just what I need!

    ReplyDelete
    Replies
    1. No I ended up going with a snap-disk.

      It worked fine if i powered it with an adapter, so I don't think it would be that hard to sort out.

      Delete