Open and Close a Greenhouse Window Automatically
by Lewis Loflin
The above circuit was developed to to open/close a greenhouse window when the temperature exceeded 120 degrees F. This used a 12-volt window motor from an automobile door window. I wanted to avoid the hassle and cost of using a micro-controller and use inexpensive common parts. The power source was a 12-volt solar panel system charging a battery. This is presented to demonstrate simple, but useful circuits.
How it works
The LM311 voltage comparator' output is +12 volts when the voltage at the junction the the thermistor and R4 is below that of the trip point adjustment R3. At this point MOSFET Q3 is turned on, MOSFET Q1 is turned off, while the 0 volt output of the Cd4011 turns on MOSFET Q2 and MOSFET Q4 off. This provides a complete current path from MOSFET Q3, though the motor, and through MOSFET Q2. The motor will run until limit switch SW1 opens. Diode D1 blocks any further current flow shutting the motor off. I assume the window is closed at this point.
Note the direction of rotation in a DC motor is controlled by the battery polarity. Note the direction of the diodes and motor polarity! The CD4011 acts as an inverter and can be replaced by other CMOS ICs. The LM311 can be replaced with a LM339 etc. Don't use 5-volt logic or exceed 15 volts. See Voltage Comparator Information And Circuits for more on voltage comparators.
As the greenhouse heats up the resistance of the thermistor drops and the voltage at the thermistor/R4 junction increases. When this voltage reaches the voltage set by R3, the LM311 comparator will turn on and the output will go to 0 volts. This will turn on MOSFET Q1 and MOSFET Q2 off, and through the CD4011 turns Q4 on and Q3 off. This created a reversed polarity current path through Q1, the motor, diode D1, and Q4. The motor will run until limit switch SW2 opens and D2 blocks any further current flow. I assume the window is now open to allow ventilation.
This was tested on a satellite dish positioner jack with built in limit switches. While designed for 36 volts it operated fine at 12 volts with no load.
Added October 22, 2011
You Tube Videos
If using this material on another site, please provide a link back to my site.