
Open and Close a Greenhouse Window Automatically
The above circuit was developed 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.
Parts list:
Q1, Q2, P-channel MOSFET IRF9630
Q3, Q4, N-channel MOSFET IRF630
D1, D2, 6 amp silicon diode.
How it works
The Lm311 voltage comparator' output is +12 volts when the voltage at the junction 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.

- Comparator Circuits:
- Comparator Theory Circuits Tutorial
- Comparator Hysteresis and Schmitt Triggers
- Voltage Comparator Information And Circuits
- Looking at Window Comparator Circuits
- Analog Battery Charger Uses Comparators
- YouTube:
- Comparator Circuits Introduction
- Photo Detector Devices:
- LM334 CCS Circuits with Thermistors, Photocells
- Photodiode Circuits Operation and Uses
- Photodiode Op-Amp Circuits Tutorial
- Photo Voltaic Tutorial MOSFET Output Solid State Relays
- YouTube:
- Photodiodes and How they Work
- Photodiode Op-Amp Circuits
- Using Photovoltaic MOSFET Drivers
Most Popular videos and Webpages
- Hall Effect Magnetic Switches and Sensors
- Basic Hall Effect Sensors YouTube
- Opto-Isolated Transistor Drivers for Micro-Controllers
- Opto-Couplers Theory and Circuits YouTube
- H-Bridge Motor Control with Power MOSFETS Updated
- Build Power MOSFET H-Bridge for Arduino YouTube
- LM317 High Power Constant Current Source Circuit
- Adjustable LM317 High Power Current Source
- ULN2003A Darlington Transistor Array with Circuit Examples
- ULN2003A Transistor Array with Arduino
- Constant Current Circuits with the LM334, LM317
- Constant Current Source Tutorial YouTube
- N-Channel Power MOSFET Switching Tutorial
- P-Channel Power MOSFET Switch Tutorial
- Using Power MOSFETs with Arduino YouTube
- Zero-Crossing Detectors Circuits and Applications
- Zero-Crossing Circuits for AC Power Control
- In Depth Look at AC Power Control with Arduino
- Micro-controller AC Power Control Using Interrupts
- YouTube Video for Arduino AC Power Control
- All NPN Transistor H-Bridge Motor Control
- All NPN Transistor H-Bridge Motor Control YouTube
Other Circuits
- Hall Effect Magnetic Switches and Sensors
- Transistor-Zener Diode Regulator Circuits
- Build an Adjustable 0-34 volt power supply with the LM317
- Coils for Highly Selective Crystal Radio
- Neon (NE-2) Circuits You Can Build
- Understanding Xenon Flashtubes and Circuits