Bob Computeers
Published © GPL3+

Multi Stage Ventilation

Automatic fans act in stages depending on atmospheric conditions with an alert at full capacity.

BeginnerWork in progress2 hours4,126
Multi Stage Ventilation

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
IRF520 mosfet module (cheap chinese)
×3
FC22 / MQ2 sensor
×1
Buzzer (generic)
×1
Fan (salvaged from old computers)
×3
12 volt 3 amp external power supply from an old laptop.
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Arduino Web Editor
Arduino Web Editor

Story

Read more

Custom parts and enclosures

First duct section ready for fans.

First section of 3" duct. Boxes were made from scrap thin plywood except the end which is MDF. The wiring will be INSIDE the duct and run back to an end cap that will be the mount for the Arduino, MOFSET board and PSU

Schematics

Starting assembly of the duct

Fan boxes attached.
Paint applied.
Wire loom installed in duct
Fans hooked up to loom and mounted.

Test fit final board to end cap

Final version will use a Chinese Micro.
The Micro has female headers and the board below has male pins to allow disassembly. Right side of board will take the sensor and power from a voltage dropper and the left side will accept the outputs from the MOSFETS and the higher power needed for the fans.

Test fit the voltage regulator below the MINI

The Voltage regulator fits nicely over the resistors using male header pins.
and by using the female headers on the MINI there is enough room to prevent touching the MINI as well.

Code

Three Part Fan Extractor

Arduino
Three Stage fan extractors for soldering or other small hobby fumes.
  // Three stage small extractor fan
  // GAS sensor output pin to Arduino analog A0 pin
  // PWM pins used to drive fans to allow tickover speeds and prevent back flow
  
  
  #define F1 5        // Define DIGITAL pin for Fan 1
  #define F2 6        // Define DIGITAL pin for Fan 2
  #define F3 9        // Define DIGITAL pin for Fan 3
  #define MQ2 A0      // Define ANALOG pin for MQ sensor
  #define gasadj A1   // Define trim pot
  #define Alarm 4     // Define DIGITAL pin for buzzer
  
  int lgl1 = 17;      // lower gas level for Fan 1
  int lgl2 = 19;      // upper gas level for fan 1
  int mgl1 = lgl2;    // lower gas level for fan 2
  int mgl2 = 28;      // upper gas level for fan 2
  int hgl1 = mgl2;    // lower gas level for fan 3
  int hgl2 = 254;     // upper gas level for fan 3
  int gaslevel;       // blank holder
  int settle = 3000;  // Allow settle time to be set here
  int gaschange;      // will be used as a trim adjustment factor
  int tick = 100;     // set tickover speed
  
  void setup()
  {
    
  Serial.begin(9600);   // Initialize serial port - 9600 bps
  pinMode(MQ2,INPUT);   // MQ pin set
  pinMode(F1,OUTPUT);   // Fan 1 pin set
  pinMode(F2,OUTPUT);   // Fan 2 pin set
  pinMode(F3,OUTPUT);   // Fan 3 pin set
  pinMode(Alarm,INPUT); // Alarm pin set
  _delay_ms (10000);    // MQ Heater warm up can be changed to suit.

TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00); // Used to reduce motor harmonics
TCCR0B = _BV(CS01); // Used to reduce motor harmonics from PWM
OCR0A = 180;        // Used to reduce motor harmonics from PWM
OCR0B = 180;        // Used to reduce motor harmonics from PWM

    //set up for spreadsheet output
    Serial.println("ClearRange,A,2,d,5000"); // Used to set up PLX-DAQ v2.1
    Serial.println("ROW,SET,2");            //
    Serial.println("LABEL,Date.,Time.,GAS,Trim%");
    
  }
  
  void loop()
  
  {
    
     //gaschange = (analogRead (gasadj));         // read pot to adjust levels
     //gaschange = map(gasadj,0,1023,-20,20);     // mappedValue = +-20
     //lgl1=lgl1+gaschange;lgl2=lgl2+gaschange;   // add to levels
     //mgl1=mgl1+gaschange;mgl2=mgl2+gaschange;   //
     //hgl1=hgl1+gaschange;                       // Move this to its own routine
    
    gaslevel = (analogRead(MQ2));           // Get Gass level
    gaslevel = map(gaslevel,0,1023,0,255);  // Map gas range

             Serial.println((String) "DATA,DATE,TIME," + (gaslevel));//+","+(gaschange)); 
        
    _delay_ms(settle);
   if ( gaslevel > lgl1 && gaslevel <= lgl2 ) 
   {                          // If gaslevel is greater than 20 and less than 30 turn on Fan 1
      analogWrite (F1,tick);  // Fan 1 TICK
      digitalWrite (F2,LOW);  // FAN 2 OFF
      _delay_ms (settle*2);   // Fan settle time extended
      digitalWrite (F3,HIGH); // Fan 3 ON
      _delay_ms (settle);
      
    }
    
    else if ( gaslevel > mgl1 && gaslevel <= mgl2 ) 
    {                             // If gaslevel is greater than 30 and less than 60 Turn on Fan 1 and 2
          analogWrite (F1,tick);  // Fan 1 TICK
          _delay_ms (settle*3);   // Fan settle time extended
          digitalWrite (F2,HIGH); // Fan 2 ON
          digitalWrite (F3,HIGH); // Fan 3 ON
      
        }
        
         else if (gaslevel > hgl1  && gaslevel <= hgl2 ) 
         {                         // IF gaslevel is greater than 60 and less than 90 turn all fans on   && gaslevel <= hgl2
          digitalWrite (F1,HIGH);  // Fan 3 ON
          digitalWrite (F2,HIGH);  // Fan 2 ON
          digitalWrite (F3,HIGH);  // Fan 1 ON
          _delay_ms (settle * 4);  // Fan settle time extended
         if (gaslevel>=100)  {tone (9,900,1000) ;} // Alarm on 
         if (F3==LOW) {noTone(9);}
        }
        
        else
        
        {
           analogWrite (F1,tick);   // Fan 1 TICK
           digitalWrite (F2,LOW);   // Fan 2 OFF
           digitalWrite (F3,LOW);   // Fan 3 OFF
           _delay_ms (settle);      // Fan settle time
        }
  }

Three Stage Fan system

Three stage van ventilation system

Credits

Bob Computeers

Bob Computeers

2 projects • 3 followers
Older geek with limited access to maker sheds apart from what I can scrounge from older electronics

Comments