(Additional project photos appear after written story)
This project re-purposes a hi-power 3-speed floor fan for its new role as a whole house attic fan. Fan power is provided by constructing an active mode PNP circuit connected to a relay switch, powered by an Argon Micro-controller. The fan circulates air throughout the house, concentrating into a custom-built ceiling compartment that houses the fan, which fans air out into the attic space, which then exits via open garage windows.
The Argon is programmed for manual and automatic fan control operation. Manual mode operates just like an on-off switch. Automatic mode continuously checks for interior temperature or humidity exceeding their programmed thresholds before powering on the fan. Separate OLED screens show programmed menu button options to navigate and select the desired mode.
PROJECT DEVELOPMENT & TIMELINE
Development actually began prior to the start of the boot camp on July 6. The project's first step involved constructing a plywood compartment to house the fan inside the existing swamp cooler air duct chamber. Compartment construction started in late May, finishing in late September, where the fan was successfully installed into the finished compartment. Having finished the compartment, fan cooling testing began for confirming that the house could be comfortably cooled down in the evenings, overnight and through morning. Fan testing extended from Sep 24-27. Results were successful, often reducing the temperature 9-10 degrees overnight through approx 10-11A next morning, when windows were shut and regular A/C was turned on.
Next, circuit design and circuit programming began the last week of September, starting with lab book circuit diagram, finishing with first draft Fritzing circuit diagram, and followed by initial lab book OLED display layouts. Breadboard circuit wiring began at the end of September after completing the first draft Fritzing diagram. During the first week of October, more hands on construction and testing took place for building the 15 ft long extension cord providing power from the nearby furnace closet outlet to the fan compartment, located nearby on the hallway ceiling. During the second week, first-configuration breadboard circuit was completed, followed by first draft programming logic revisions. C++ program logic revisions, debugging, testing and documentation continued through weeks three and four (see above, section "Modifications") to ensure the circuit and button programming worked according to specs. During week three, I created the Github repository (AT-AtticFanController) to push completed separate versions of the driver program, AtticFanController.
Once completing a working breadboard circuit, I began related work to complete the final portion of the circuit: splicing the extension cord and soldering the spliced ends into the extended 14 ga wires connected to the COM ans NO connections on the relay switch (connected to the breadboard circuit). After connecting the breadboard to the A/C circuit, I confirmed the fully completed circuit worked for manual and auto modes by Nov 6. This required plugging in a phone cord adapter cable from the furnace closet power strip outlet to the micro-controller for supplying power to the Argon, as well as connecting the fan's newly constructed power cord into the power strip to supply power to the fan, thus completing the entire circuit. The final phase of the project, for constructing and installing PVC sheathing for the 13 ft of exposed power cord, was completed Nov. 11.
ATTIC FAN COMPARTMENT CONSTRUCTION
Fan compartment construction, the first step of the project, first began by initially designing nearly identical two-piece cardboard pieces to construct a cardboard compartment mock-up. This method proved ideal for efficiently correcting and completing the final dimensions to enclose the fan in as snug a fit as possible to minimize fan vibration, while also minimizing stress on fan and compartment hardware parts. The mock-up design also included finalizing dimensions for centering the compartment over the existing swamp cooler access chamber. This chamber was cut and fitted under the side draft cooled-air exit conduit sheet metal, which is attached to the removed swamp cooler main housing compartment, which in turn is installed within the attic space. On the other side of the still-intact swamp cooler's galvanized housing is another galvanized 9-6 inch tapered round pipe for venting the fan-propelled air through the cooler housing and into the attic space.
The finished compartment dimensions are approximately 2 ft L x 2 ft W. Its height varies from 4 inches along the compartment perimeter, to 8 inches at the compartment's rectangular interface with the access chamber. The four compartment side pieces and two angled top pieces (extending from the compartment's east and west side pieces to the corresponding access chamber long-dimension sides) were constructed from 1/2"W composite Luan Pine board. Each of the compartment sides are attached together with 2-inch angle (corner) braces, and also reinforced with 1-1/4 inch steel wood screws. The interior of the fan is lined with galvanized sheet metal, a key structural reinforcing material, to minimize fan vibration while making an airtight seal to maximize the forced air through the compartment. Interior compartment supports holding the fan in place from dropping out are three 4-inch angle braces attached adjacently at the bottom of the the hinged compartment side, with a perforated 3/4-inch galvanized flat tie strap laid across the three braces (see Project intro photo). There is another tie strap extending to the opposite side's single 2 inch angle brace. This tie strap piece is constructed into two segments, allowing removal of the fan for maintenance and cleaning, and can be removed by releasing the wing nut attached to the smaller angle brace that secures this segmented strap tie in place.
The ceiling access chamber is also reinforced to support the fan compartment by first attaching 8-inch wide lengths of 3/4-inch primed pine with lag screws onto the existing access chamber galvanized sheeting. These pine lengths are then secured together with 3-inch angle braces. The fan compartment then attaches to these reinforced access chamber supporting pine pieces by sliding the portion of sheet metal protruding 6-10 inches above the wooden fan compartment pieces, and securing the exposed sheet metal from the compartment into the access chamber using 3/4-inch steel wood screws. The 2 ft square access door is made from 3/4-inch particle board, secured to the fan compartment with a pair of 4-inch long gate hinges, allowing for a wide swing. The access door is secured closed using both a safety hasp and a u-bolt. The door is secured open using an eyelet L-hook. See referenced items labeled "Attic Fan Compartment Hardware" in HARDWARE COMPONENTS section for further detail, along with the first two photos following the OLED DISPLAY SCREENS section below.
ESSENTIAL PROJECT CIRCUIT COMPONENTS
These are the components for the programmed circuit:
1) Particle Argon Micro-controller
This is the processing unit controlling all its connected devices listed below that construct the project circuit. The 32-bit main processor runs at 64 MHz, offering WI-FI, Bluetooth & cellular network connections. Has its own OS, is used world-wide, and allows easy prototype-to-production source code options. Also has an expansive pin configuration for communicating with other devices, including up to 20 digital pins, 6 analog-to-digital conversion pins, and up to 13 analog pins. It's powered on 3.3 volts, with optional 5 volt capacity (a feature critical to this project).
2) Yellow & Red buttons
When pressed, these buttons complete a digital input circuit with the Argon to communicate the user's selected operation mode, and when it's currently activated and deactivated. The yellow button operates the manual mode, while the red button controls the auto mode.
3) SSD 1306 OLED display (Adafruit)
This interface device, complete with its own library of programmable subroutines, communicates all essential information to users. It features menu-driven screens for selecting the operating mode (manual or auto), current BME sensor readings for temperature and humidity (and their programmed thresholds automatically triggering fan operation), and error button press messages during operation. This display screen, approximately 3/4"x1", uses an I2C serial communication protocol (being slaved off of the BME sensor). In this project, the display is programmed in portrait mode with a maximum 16 lines, at 10 characters per line, totaling 160 displayable characters.
4) BME 280 sensor (Adafruit)
This tiny device (approx 1/2" square) also features a complete library of programmable routines, has sensing capabilities for temperature (in C), humidity and air pressure. For this project, its I2C serial communication data and clock pins are slaved directly from the Argon's corresponding SDA (data) and SCL (clock) pins. It features rapid, reliable sensing capability.
5) Relay Switch (Songle)
This switch is used to safely control an electrical device, such as the attic fan requiring higher current or higher voltage, from a micro-controller. The switch contains an electro-magnetic control coil, coming in contact with a switch powered from a digital pin on the Argon, that closes the circuit from the Argon.
6) PNP Transistor 2N3906
This bipolar junction transistor consists of a single N-type semi-conductor material (having surplus negative-charged carrier electrons) sandwiched in between two P-type semiconductor material (having surplus positive-charged particles), with leads (legs) attached to each section. The middle lead is the base, with outer leads known as collector and emitter. This transistor has two PN junctions: base-collector, and base-emitter. Transistors often function as switches for integrated circuits, but this project circuit uses it as a current amplifier to supply current to the relay switch.
HOW THE PROJECT CIRCUIT WORKS
Activating the attic fan is largely dependent on the current generated within the input circuit through the transistor and through the output circuit and on to the relay switch. The circuit's base-emitter junction is critical for generating the current. In this project circuit, a manual button press or automated activation sends output current from digital pin (D7). This current is pushed by a smaller amount of voltage (metered just under 3V) along its circuit to the transistor's base lead, at which point this very small current then combines with higher current pushed from by the Argon's VUSB pin(metered at 5V) along the transistor's base-emitter junction, to the emitter lead, and finally to the IN connector at the relay switch.
From there, the circuit joins up with the furnace closet extension cord that provides A/C power to the attic fan. The relay switch is wired into the extension cord's hot (black) wire from the opposite side of the relay switch, into the COM (Common ground) and NO (Normally Open) connectors. When the Argon circuit is switched on, current travels from the relay switch and through these connectors to the two spliced ends of the hot wire, traveling to the fan motor along this wire, then exiting through the cord's white (return) wire back to the outlet, to fully complete the circuit and power the fan. Then a reversal takes place: Current flows through the white wire into the fan, then exits out through the black wire (via the relay switch connection) as it exits back to the outlet. This A/C cycle is repeated 60 times per second.
The project's circuit operates in ACTIVE mode, where the transistor acts to amplify the current at the base-emitter junction through to the relay switch. Active mode can occur when voltage at the base-emitter junction reaches 0.7V (metered as 0.749V), and with only a very small base current combining with the emitter current (metered at 180 mV at the base-emitter junction). The relationship between emitter versus base current is known as DC current gain. Typical ratios can vary between 50-200, where the project circuit is calculated at 138 mA.
BASIC BUTTON OPERATION
The major programming focus is simple, consistent operation, where the two major modes, manual and auto, work identically. Manual mode simply means pressing the yellow button to instantly switch ON the fan; pressing the same button again switches OFF the fan. Auto mode means pressing the red button to instantly activate continuous threshold level checks for temperature and humidity. At anytime when the sensor detects either temperature OR humidity readings at/above threshold, the fan is switched ON. At anytime when readings fall below both thresholds, the fan is switched OFF. Pressing the red button again instantly deactivates threshold checks. Threshold checks are presently set within the driver program (an advanced revision would allow threshold adjustments by button press, like on a thermostat).
OLED DISPLAY SCREENS
There are three separate OLED display screens, and are programmed for activation based on user button presses. A pair of YELLOW button presses (for switching on and off the fan) displays the same "Manual" OLED screen. A pair of RED button presses displays the "Auto" OLED screen. Either mode screens allows simple navigation to the alternate mode. However, a second button press for the button opposite from the first button press displays the Error press OLED screen.
The layout for each operation mode screen is described below:
I) MANUAL mode OLED screen
This screen appears when the driver program starts. From top to bottom lines, it consists of three major components:
- Operation mode ID line,
- Mode navigation header lines,
- Mode navigation option selection lines (with manual mode selections appearing first).
Here is a detailed breakdown for each line of the three components:
1) Header screen ID line, appearing as:
" * MANUAL * "
2) Button color (left-justified) and operation mode header labels (right-justified):
" <BUTTON>
MODE "
This layout style employs placing headers, normally adjacent on a single line, to be staggered over two lines, compensating for the OLED display's space restrictions. The button color header is delimited by angle brackets, <>, visually distinguishing it from the op mode header label.
3) Button color name and operation mode switch names associated for MANUAL mode:
" <YELLOW>
OFF
MANUAL "
This layout inherits multiple features from the staggered header lines, including labels justified and lining up under their associated headers, angle brackets for the button color name, and both switch names right-justified on separate lines for clear association. Valid selections are "OFF" or "MANUAL", while highlighting the active selection "MANUAL" upon button press.
4) Button color name and operation mode switch names associated for AUTO mode:
" <RED> AUTO "
Layout features here also inherit those from the header line. These are also both valid selections, one of which to be activated by pressing the RED button.
II) AUTOMATIC mode OLED screen
This mode uses the entire 16 lines to display mode-related info. From top to bottom lines, it consists of five major components:
- Operation mode ID line,
- Mode navigation header lines,
- Mode navigation option selection lines (with auto mode selections appearing first)
- BME temperature & humidity sensor data: separate lines for the two threshold settings, followed by the two sensor readings
- Prep-related reminder instructions for opening the attic access door & house windows for proper air circulation
1) Header screen ID line, appearing as:
" * AUTO * "
2) Button color (left-justified) and operation mode header labels (right-justified):
" <BUTTON>
MODE "
3) Button color name and the opposing operation mode switch associated for AUTO mode:
" <RED> OFF "
The active, highlighted selection upon button press is <RED>.
4) Button color name and operation mode switch names associated for MANUAL mode:
" <YELLOW> "
5) Two lines for header labels displaying programmed temperature & humidity settings, followed by a third line displaying their values:
" TEMP HUM "
" SETTINGS "
" 99 99 "
6) One line for a summary header label for displaying sensor readings of temperature & humidity settings, followed by a second line displaying actual readings:
" SENSOR "
" 99 99 "
7) Four lines for drawing attention to and displaying reminder instructions for necessary prep-related duties:
" ! ! ! ! ! ! ! ! ! ! "
" OPEN WIDE "
" ATTIC DOOR "
" & WINDOWS "
These essential prep steps can be overlooked in auto mode because the fan may not be immediately activated (and which serves as the definitive reminder).
III) ERROR Press OLED screen
This screen appears when the button colors from the two consecutive button presses do not match; in effect, the user does not correctly toggle OFF the initial operating mode after toggling it ON. One of two separate error screens appear, depending on the press sequence:
1) If the YELLOW button is first pressed 2) If the RED button is first pressed
initiating MANUAL mode, followed by a initiating AUTO mode, followed by a
RED button press (AUTO mode), this YELLOW button press (MANUAL
screen appears: mode), this screen appears:
" PRESS " " PRESS "
" YELLOW " " RED "
" BUTTON " " BUTTON "
" TO " " TO "
" RETURN " " RETURN "
" TO " " TO "
" MANUAL " " AUTO "
" MODE " " MODE "
In either case, following the instruction returns the user back to the previous op mode and switch position.
FAN COMPARTMENT:
OLED SCREEN DISPLAYS:
Comments