390 likes | 856 Views
Smart Window. By Josh Karr & Greg Kupiec ECE 445 Senior Design November 30, 2005. About Smart Window. Smart Window is designed to control the position of the window for temperature control
E N D
Smart Window By Josh Karr & Greg Kupiec ECE 445 Senior Design November 30, 2005
About Smart Window • Smart Window is designed to control the position of the window for temperature control • Temperature sensors provide information so that a window can be positioned in order to adjust the indoor temperature closer to a target temperature
Features • The remote temperature sensor is battery powered and uses RF signals so that it may be placed in various places outside of the house. • Manual control allows you to override the automated controls • Multiple target temperatures may be selected
Control Unit • Local temperature sensor • Target temperature setting • RF receiver • Manual override • Motor control
Remote Unit • Remote temperature sensor • RF transmitter • Battery powered
Hardware Overview • PIC 16F877A • Receive, process and send data • Respond to user input • Control motor • Temperature sensor (TC74) • Measures temperature in degrees Celsius and transmit this data to the PIC
Setting up the PIC • Enabled the PIC to create a clock signal from an RC oscillator We chose the value of the resistance and capacitance based on the RC time-constant that gave us our desired clock frequency Fosc = 1/ τ = 1/(R*C) = 1MHz We aimed for a clock frequency of 1MHz and also knew from reading the data sheet that R must be at least 100kΩ We then chose R = 100kΩ and found that a value of C = 10pF would give us the desired clock frequency
Setting up the PIC (cont.) • The I²C bus pins, SDA and SCL, both required pull up resistors in order to function properly • After researching different values for the resistors we found that others had the most success using R ~ 2kΩ • A pull up resistor of 1kΩ was also needed on the MCLR’ pin
I²C Communication • I²C communication is a two-way serial communication system that we used to obtain temperature data from our temperature sensors • I²C has the ability to either send or receive information in 8-bit increments • I²C uses start, stop and acknowledge sequences to ensure successful transmission of data between devices
Problems With The PIC’s • I²C Communication (unfamiliar with the process and built in functions within the compiler) • Correctly setting fuses (NOLVP) • Correctly using certain ports (Port C)
Temperature Sensors (TC74) • Outputs temperature as an 8-bit digital word in 2’s complement form • Temperature given in degrees Celsius and accurate to within +/- 2ºC • Uses I²C communication to transmit data • Low power consumption (200μA)
Software int read_temp() { int ret; i2c_start(); i2c_write(0x90); i2c_write(0x00); i2c_start(); i2c_write(0x91); ret = i2c_read(1); i2c_stop(); return ret; } main() { init_pic(); while(1==1) { delay_ms(150); update(); check_disp(); control_motor(); } }
Hardware (cont.) • RWS-434 & TWS-434A • Transmits signals via RF • Uses a binary encoder and decoder • Motor Controller • Bidirectional controls using a H • Power and direction defined by the control unit PIC
RF (TWS-434A) • The PIC of the remote node sets the 8 bit input into the HT-640 encoder • The information is then sent to the transmitter • The signal is transmitted at 433MHz
RF (RWS-434) • Signal is received at 433MHz • The signal is then sent to the HT-648L Decoder • The binary output of the decoder is then sent to the control unit PIC
RF Functionality • Tested the ability to send through multiple walls and over moderate distances(<50ft) • There was a slight lag which is acceptable • Transmitter strength can be increased if needed (up to +12V)
Motor Controller • Bidirectional DC controller using an H driver • Originally built with transistors • Caused unusable voltage drop • Very noising signal • Later built with reed relays • Solved voltage drop problems • Much cleaner signal
Controller using transistors Transistor H with no load Motor turned on Motor turned on Transistor H with load
Controller using relays Motor turned on Relay H with no load Motor turned on Relay H with load
Motor Selection • We picked multiple motors to test and use • The first motor was from a cordless drill • The second motor was a hobby size motor • The third motor was similar to those used in printers
Motor Problems • The motor from the drill drew too much current (2-3A) • Was also very noisy • The small hobby motor caused a large voltage drop • The final motor was the one we selected • Caused the least voltage noise • Seemed to have the least current spike
Controller problems • The transistor circuit had some problems • Voltage drop across transistors • The relays seemed to burn up because of a possible current spike • They are specified to handle 500mA
Recommendations • Find different relays that would be better suited for our motor controller • Possibly use a stepper motor for increased flexibility • Use a potentiometer and the internal A/D converter to set the target temperature
Thank You Greg Kupiec & Josh Karr November 30, 2005 ECE 445, Senior Design