






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: Senior Design Project Lab; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Spring 2007;
Typology: Study Guides, Projects, Research
1 / 46
This page cannot be seen from the preview
Don't miss anything!







































By Arjun Sen Gary Milam Muaaz Elhag ECE 445, SENIOR DESIGN PROJECT SPRING 2007 TA: Austin Kirchoff April 30, 2007 Project No. 27
We designed and built a snow/ice detection system for heated driveways. The main purpose of this project is to provide the convenience of an automatic heated driveway system which would eliminate the chore of driveway shoveling and the surprise of waking up to a snowed in driveway. This is made possible by having accumulation melted well in advance. The system is able to be installed in all driveways that have a heating system. The system consists of two temperature sensors, two infrared LEDs and two photosensors (one infrared and the other ultraviolet). A voltage regulator will allow the system to be powered by an AC ground line. Signals from all four sensors will be sent to the microcontroller which will then send the data through a transmitter to the receiver where it will be interpreted by another microcontroller. This microcontroller will then send a signal to the relay to turn on the heated driveway system. A switch is installed on the receiver end to allow user override and to turn off the system. Though the system was not installed in a heated driveway, it was simulated by powering the system with a 12V power supply and using two additional power supplies as inputs to the temperature sensors to simulate weather conditions. ii
Households worldwide located in harsh winter climates face severe heavy snowfalls and the task of removing accumulation from driveways in order to go about their daily lives. A heated driveway system that would turn on at the first sign of accumulation would provide convenience and prevent the shock of accumulation accompanying an overnight snow storm. A clear problem exists, as well as an extensive target market. The system consists of two temperature sensors, two infrared LEDs and two photosensors (one infrared and the other ultraviolet). A voltage regulator will allow the system to be powered by an AC ground line. Signals from all four sensors will be sent to the microcontroller which will then send the data through a transmitter to the receiver where it will be interpreted by another microcontroller. This microcontroller will then send a signal to the relay to turn on the heated driveway system. A switch is installed on the receiver end to allow user override and to turn off the system. 1.1 Purpose The main purpose of this project is to provide the convenience of an automatic heated driveway and eliminate the need for shoveling or plowing. Conventional heated driveway systems are effective when snow accumulation is anticipated. This system eliminates the need to worry about the uncertainty of weather prediction. It also prevents power waste since the system does not need to be turned on long before a snow storm is anticipated. Power waste is also prevented when a storm is anticipated but never occurs, whereas a conventional heated driveway system may have been switched on in advance. The system is designed to shut off once shut off conditions are met, also contributing to power conservation. The sensors are connected to a microcontroller that communicates wirelessly with the main system which allows for the convenience of using the system with larger driveways where more sensors may be necessary and where the sensors may need to be placed at greater distances. Thus, this system can also be used in other implementations, such as in parking lots where most winter accidents occur. The system is also useful on highways, especially near tollbooths where power is easily accessible and traffic conditions demand clean roadways for safety. Hence, this system also facilitates safety by preventing ice formation and car accidents common during the winter months. 1.2 Specifications Because the sensors will be placed outdoors, they must be able to withstand and operate in extreme temperatures and weather conditions. It is necessary for all units that will be placed outdoors to be able to withstand temperatures between -20 degrees F and 100 degrees F. The glass pane and unit cover that protect the instruments must be able to withstand temperatures between -35 degrees F and 230 degrees F in order to withstand ambient temperatures and potential motor oil drippage which may be at boiling temperatures. It is necessary for the system to be operational between temperatures of -15 degrees F and 110 degrees F. The transmitter-receiver pair needs to be able to transmit for distances of at least 20 feet and upwards of 50 feet. The LED/phototransistor sensor must be able to detect snow or ice accumulation of at least .25 inches. In addition, the LED/phototransistor sensor must be calibrated so that it is able to distinguish between reflections from snow and ice, and reject reflections from rainwater.
If the ground temperature sensor detects temperatures below 32 degrees F, air temperature above 37 degrees F and the LED/phototransistor sensor detects presence of snow or ice, the controller sends the signal to the transmitter to activate the heated driveway system until the shut off case is reached in which the LED/phototransistor sensor no longer detects snow or ice. This last case is to ensure that the formation of black ice is prevented. If any of the previous cases are met, but the UV photodiode detects UV radiation, the system will recognize the case in which the sun is shining and prevent the system from turning on, or turn the system off if it was previously on. This will prevent the false positive that would occur if the infrared phototransistor received infrared radiation from the sun. The UV photodiode allows for the system to shut off in the case where the system had previously been on, but any remaining ice or snow can be melted using the sun’s energy in order to conserve power. The transmission of UV radiation to the UV photodiode is made possible by the use of UV transmitting plexiglass as the interface between the sensor unit and the driveway. 1.3.4 RF Transmitter/Receiver The implementation of an RF link to our system is to avoid the use of wires, such that the sensor system can be used on a much larger scale (e.g. parking lots). For the purposes of our design, we used a simple RF transmitter with a range of about 1000 feet (TXM 900-HP3-PPS). Having the microcontroller compute the logic of the readings of the sensors before transmission allows us to transmit a binary value. Binary values will be transmitted for the on/off value, a value which will determine if snow or ice is present, and the air temperature value. Additionally, the receiver/transmitter pair has eight available channels. We have also programmed the receiver end microcontroller to recognize location data such that it is able distinguish the location of different transmitter units dependent upon which channel information is received on and subsequently activate the heated driveway only on the portion that it is necessary to do so. After the receiver detects the signal from the transmitter, it will send a signal to the relay to either send or block power to the heated driveway system in order to turn it on or off. 1.3.5 Power Supply A voltage regulator limits the 120Vac input from a standard power socket to 5V as per the specifications for the microcontroller and most of the components used in the circuit. 1.3.6 LCD The LCD is implemented on the receiver end and displays the air temperature, location bit which alerts the receiver as to which transmitter it is accepting data from, and a status message explaining whether the system is “Initialized,” “N/A” meaning that no accumulation is present, and “Ice” or “Snow” depending on which type of accumulation is present. 1.3.7 Relay The relay was used as the switch to turn the heated driveway on or off.
2.1 Ice/Snow Sensor In designing the Ice/Snow sensor, we considered many alternatives. We concentrated mainly on searching for materials that would conduct when wet by ice and snow. We considered sponges, cloths, and briefly researched other types of moisture sensors. We decided on using reflection through the use of an LED/phototransistor combination which we discovered through a current product which uses similar methods for monitoring road conditions [1]. We decided on using infrared LEDs and phototransistors. Infrared was chosen over the visible spectrum, because the emission of visible light from the sensor is undesirable. Also, there are many false positives for visible light sources. The UV photodiode was added in order to account for the false positive that could occur from the infrared phototransistor detecting infrared radiation from the sun. 2.1.1 LED/Phototransistor Sensor The design of the LED/phototransistor sensor was complicated by optical phenomenon. When we initially set up the infrared LED and infrared phototransistor on the bread board, we received a low voltage, between 700mV and 850mV, indicating good reflection both with and without the presence of ice or water or even a glass covering. Further calibration of the design was a painstaking process covering the course of weeks. We finally realized that the reason for the continuously low voltage indicating a high presence of infrared radiation stemmed from the fluorescent ceiling lights in the lab, causing a false positive. We continued with calibration, but now in a dark or half dark room where infrared radiation would not be a problem. We succeeded in escaping the infrared radiation as the voltage readings now stabilized between 4.7 V and 4.9 V. We again began calibrating with the UV transmitting glass, necessary for the UV photodiode to be able to sense UV radiation. When the glass covered the enclosure, we again received a low voltage, between 700mV and 850mV indicating good reflection, now in the dark. The glass was completely reflecting the infrared radiation from the infrared LEDs into the infrared phototransistor, preventing our ability to sense extra reflections from any objects placed on top of the glass. From this consequence, we gathered a hypothesis that when the infrared waves were incident on the glass, internal reflection may have been occurring, and we may have been receiving more infrared radiation than just from planar reflection. We attempted to account for this phenomenon by using two separate panes of glass; one to cover the phototransistor and one to cover the LEDs. This experiment led to the same result. We continued calibrating by lining the interface of the two panes of glass with aluminum foil in an attempt to intercept and reflect what we thought had been infrared waves propagating between one pane of glass to another. This also led to the same result. Finally, we realized that the reflection of the infrared waves would have to be taken into account and that the placement and orientation of the LEDs and phototransistor would need to be altered in order for a successful outcome to result. We decided to return to the use of a single pane of glass since using two panes had made no difference. We also hypothesized that the area from which the phototransistor received reflections would need to be reduced in order for the amount of reflection received to be controlled. We created a foil cone that surrounded the phototransistor with an aperture at the top which could easily be manipulated in order to control how much and from which direction reflection was received. We also spray painted the outside of the foil cone flat black such that it would absorb ricocheting waves to prevent radical waves from reaching the phototransistor. The foil cone could also be moved contributing to our ability to control the sensor. In addition, the aperture size gave us added flexibility in calibrating the sensor. We learned that a larger aperture gave us less control over the
2.4 RF Transmitter/Receiver We chose to use an RF transmitter and receiver to avoid the use of wires, therefore allowing the system to be implemented on a larger scale. For the transmitter we used the TXM 900-HP3-PPS and for the receiver we used the RXM 900-HP3-PPS. This RF pair has the option of using a parallel channel selection giving 8 different channels or using a serial channel selection giving 100 different channels which will help in the implementation of the system on a larger scale. The RF pair also allows the data line to be directly connected to UARTs which work perfectly with the PIC’s USART input and output line. 2.5 Power Supply At the beginning of our project we had decided to use a 9V battery to power all our components on the transmitter end of the system. This idea was later rejected as we observed that the PIC and the transmitter required continuous power and therefore required the user to replace the battery too often. In fact, to replace the battery it would be necessary to take the system out of the ground, creating a great inconvenience for the user. Because of this reason, we chose to power the components from a ground AC line. Since the ground line would be 120V and several of our system components require a 5V power supply or less, we decided to add a voltage regulator both on the transmitting and receiving sides of the system. The voltage regulator we used was the MC805. This was used to step down the voltage to the required 5V. 2.6 LCD The LCD was chosen to give the user the convenience of knowing the lowest sensed temperature, the location that it is receiving the data from, and the type of accumulation present. We chose to use the PC1602Q LCD module interfacing with the BPI-216 LCD module. By using the BPI-216 we were allowed to interface serially with the microcontroller through its USART line, simplifying the code that was needed. 2.7 Relay The relay to be used would depend on the heated driveway system. For the purposes of our project, we used the T77S1D10 relay, due to its contact rating of 10A at 120Vac. This relay uses 5Vdc as its coil voltage.
3.1 Ice/Snow Sensor The Ice/Snow sensor is comprised of the LED/phototransistor sensor and the UV photodiode sensor. 3.1.1 LED/Phototransistor Sensor The infrared LED is connected by a 66Ω resistor between the 5V power source and the anode and another 66Ω resistor between the cathode and the connection to the microcontroller. The collector of the phototransistor, L14G2 is connected to the microcontroller. The emitter is connected to a 10kΩ resistor which is connected to a 5V power source. In this setup, the base is left floating. The L14G2 is a lateral bipolar phototransistor with a floating, photosensitive base region in which the amount of infrared radiation detected by the phototransistor controls the amount of current to flow. The voltage reading is taken from the collector. 3.1.2 UV Photodiode Sensor The cathode of the UV Photodiode is connected to the 5V power supply. The anode is connected to a 66Ω resistor which is connected to the microcontroller. The UV photodiode complements the LED/phototransistor sensor and contributes to a more intelligent Ice/Snow sensor. 3.2 Temperature Sensor The temperature sensor is powered by the 5V power supply. The ground pin is connected to the microcontroller such that it can be switched on and off; off when the ground pin is supplied with a high voltage, and on when the ground pin is supplied with a low voltage. The output pin of the temperature sensor is connected to the microcontroller to supply it with data. 3.3 Microcontroller Because we were using two microcontrollers (one on the transmitter side, one on the receiver side), two designs were necessary. For the transmitting side, all the sensor outputs were connected to the microcontroller’s analog inputs. The data line between the transmitter and the microcontroller was used through the USART output pin to simplify the communication between the units. The rest of the connections for the PIC were completed as in the schematic to keep the wiring as simple as possible. Figure B.1 shows the schematic for the microcontroller of the transmitter side. For the receiver side, the LCD display and the microcontroller are connected by the USART output pin, and the receiver and microcontroller are connected by the USART input pin. The rest of the connections were completed as in the schematic to keep the wiring as simple as possible. Figure B.2 shows the schematic for the microcontroller of the receiver side. The flowchart for the software for the transmitter and receiver sides can be seen in Figures C.1 and C.2, respectively. The software for the transmitter is implemented such that it cycles every minute through the readings of the sensors; first starting with the air temperature, next the ground temperature sensor, then both the infrared phototransistor and the UV photodiode. In a real application, it would cycle every ten minutes, since it would be unnecessary to check every minute. The software for the receiver side is also implemented to check the receiver’s data every minute. Again this would be changed to ten minutes in a real application.
The project was built in modules to be able to test them separately and then as a whole. In addition, we tested the individual parts of each module to facilitate in the debugging process. The PIC is used as the microcontroller for the system. It receives data from the temperature sensors, the infrared phototransistor, and the UV photodiode, and determines what components should be on or off. For testing purposes we used forced inputs to the microcontroller and visible LEDs to monitor outputs. 4.1 Testing Before we tested each module separately, we tested each component that made up that module to ensure that all parts were working according to specifications. We then followed with module testing and finally system testing. The following are the tests that were carried out. 4.1.1 Ice/Snow Sensor We used two infrared LEDs and an infrared phototransistor to create the snow sensor. To calibrate the sensor, three stages of testing were carried out. First, we calibrated the sensor in a dark room to eliminate infrared radiation without a glass cover or ice such that the collector voltage of the phototransistor would register a logic hi (Figure D.6). We then measured the collector voltage of the phototransistor with a pane of UV plexiglass on top of the sensor enclosure (Figure D.7). Finally, we measured the collector voltage with ice placed upon the pane of UV plexiglass (Figure D.8). In this case, the output should have been logic lo, and the collector voltage should have been below 900mV, but the sensor was calibrated improperly and the correct value could not be achieved. Figures D.3 through D.5 describe a case in which the sensor was calibrated properly in the lab with infrared radiation present from the ceiling lights. Figure D.3 shows the waveform of the collector voltage with no glass or ice present. Figure D.4 shows the waveform of the collector voltage with a pane of UV transmitting plexiglass placed upon the enclosure showing an intermediate voltage value. Figure D.5 shows the waveform of the collector voltage with a pane of UV transmitting plexiglass placed upon the enclosure with ice placed upon the glass showing the correct low voltage value. Figures D.9 and D.10 display the effects of water on the sensor. Figure D.9 exhibits that with the presence of water on the glass, the collector voltage remains stable at an intermediate voltage value. Figure D.10 exhibits the effect of infrared pollution from the ceiling lights as the same setup in Figure D.9 is used, except that the lights are now on. The sensor was calibrated precisely such that the infrared pollution was not able to register a logic lo. 4.1.1.1 Infrared LED/Phototransistor The infrared LED and infrared phototransistor were tested as a pair. The infrared LED was positioned facing into the infrared phototransistor and a waveform displaying the wavelength of the infrared LED was displayed on an oscilloscope. The displayed wavelength was 940.1nm. The data sheet describes this LED as emitting wavelengths at 940nm. Thus both the LED and the phototransistor are operating according to specifications. 4.1.1.2 UV Photodiode The cathode of the UV photodiode was connected to the 5V power supply and the anode was connected to a 66Ω resistor; the other side of which was connected to the microcontroller. The photodiode was probed at the anode with sunlight aimed towards the photodiode. In the shade, the anode had potential
readings between 1.8V and 1.96V. When the UV photodiode was placed in direct sunlight, the potential at the anode reached 4.42V. 4.1.2 Temperature Sensors The temperature sensors used are the LM60CIZ from National Instruments. It has a gain of 6.25mV/degrees C with a threshold voltage of 424mV. It accepts input voltages in the range of 2.7V to 10V and gives readings between -40 degrees C and 125 degrees C. To test the temperature sensors, we attempted to test them in three different temperature environments; at room temperature, in the fridge, and in the freezer. Testing in the fridge and the freezer was flawed. The temperatures could not be verified because the control in the experiment, a thermometer, began increasing in temperature as soon as it was removed from the cold temperature in order to take a reading, as did the temperature sensor. It was impossible to tell whether or not the temperature sensor and the thermometer were changing at the same, or at different rates. Thus, the experiment could not be used to verify whether or not the temperature sensor was behaving appropriately. Five readings were taken at room temperature. The output voltage of the temperature sensor was substituted into the following equation and the temperature in degrees C was deduced. Vo = 424 +((6.25/deg C) * Temp (deg C) (4.1) Figure D.1 displays the graph that describes the behavior of the temperature sensor. The five readings taken at room temperature are also shown. Although the graph looks kinked, it is perfectly linear. The graph without the five readings would exhibit 165 data points in a perfectly linear curve. The additional five readings were within such close proximity, they caused a visual shift in the graph in order to represent the data accurately, and to provide enough resolution to distinguish the individual points. All the tests performed at room temperature were within 0.9% accuracy. This inaccuracy is attributed to the thermometer’s precision, 5 degrees F. Figure D.2 displays a waveform exhibiting the output voltage of the temperature sensor in 246 EL. The output voltage, 587.65mV, corresponds to 26.18 degrees C, or 79.13 degrees F. A digital clock/thermometer we brought into the lab showed a reading of 78.5 degrees F. 4.1.3 Microcontroller Testing the microcontroller had to be done in steps. Since there was a corresponding microcontroller for the transmitter side and one for the receiver side, the two had to first be completed separately, and then as a whole. For the PIC on the transmitting side, we first had used power supplies to simulate temperature and photosensor input data to the PIC. To test whether or not the PIC was choosing the correct corresponding cases according to the inputs and turning the correct components on or off, we utilized visible LEDs to monitor the results. Once this was achieved, we tested the PIC with the temperature sensors. Since we were unable to create an environment cold enough to test the temperature sensors, we simulated cold temperatures with the help of power supplies using forced inputs for two cases; when the air temperature was above 46 degrees F, and when the air temperature was above 37 but below 46 degrees F considering that the ground temperature was above 36 degrees F. For the first case, we connected the air temperature sensor to the PIC and made sure that all components were being turned off (visible LEDs were off). For the second case, we used a power supply to simulate the input of the air
test the printed circuit board since the board had not been soldered properly, but we are satisfied with the results we have achieved from our bread board circuits.
5.1 Parts The total cost of the parts comes out to $294.96. This cost was determined without taking into consideration tax and shipping. All the parts that are listed from the ECE Part Shop and Senior Design Lab were available to us at no cost. Table 5.1 Cost Analysis 5.2 Labor Using the formula below, we determined that the total cost of the labor is $22,500. Assuming that each of us will be paid $30 hourly and each one of us spent approximately 100 hours. Total Cost = Parts + (Hourly Salary (Hours Spent) 2.5) Labor: ` $30/hrs *2.5 * (100 hrs per person) * (3 people) = $22, TOTAL : Total Parts: $294. Total Labor: $22, Total: $22,794. Item Manufacturer/ Retailer Part # Price Qty Total Infrared LED ECE Store OED-EL-1L1 $0.84 3 $2. Infrared Photo detector ECE Store L14G2 $1.62 2 $3. Voltage Regulator ECE Store MC7805CTG $0.28 3 $0. SPDT Slide Switch ECE Store MHS-123 $1.46 1 $1. PIC (16F877) Senior Design lab 16F877 $5.76 2 11. RF Transmitter Senior Design lab TXM 900- HP3-PPS
RF Receiver Senior Design lab
Temperature Sensor (LM35) National Semiconductor LM60CIZ $3.02 5 $15. UV photodiode Advanced Photonix PDU-G102B $16.22 2 $32. UV Transmitting Plexiglass ILLINI Glass - $6.33 4ft $25. Flat Black Spray Lowe’s - $3.12 1 $3. Project Enclosure Radio Shack - $5.99 1 $5. Relay ECE Part Shop T77S1D10 $1.55 1 $1. Clock ECE Part Shop F1100e $1.71 2 $3. Printed Circuit Board ECE Part Shop - ~$13.00 2 $26. 9 Volt Battery ECE Store - $1.28 1 $1. 9 Volt Battery clip ECE Store - $0.16 1 $0. Breadboard ECE Store - $5.20 2 $10. Total $294.
Diagrams A.1 and A.2 show block diagrams of the transmitter side of the system and the receiver side of system respectively. RF Transmitter Ice/ Snow Sensor Ground Temp Sensor MIcrocontroller Air Temp Sensor Voltage Regulator Power Supply Diagram A.1 Block Diagram of Transmitter Side of System LCD Microntroller Relay RF Receiver Voltage Regulator Power Supply Heating System 120 Vac Diagram A.2 Block Diagram of Receiver Side of System