










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: Fall 2004;
Typology: Study Guides, Projects, Research
1 / 18
This page cannot be seen from the preview
Don't miss anything!











By Tze Ming Low Ungku Fazri Ungku Farid ECE 445, SENIOR DESIGN PROJECT FALL 2004 TA: Jing Tang 7th December 2004 Project No 2.
The main purpose of our project is to help handicapped people improve their living conditions by reducing the need for physical movements. We intend to achieve this by designing an electronic device that can control household appliances (such as lights and fans) from far via remote control. This device consists of two parts, which are the transmitter and the receiver. The transmitter will be a small and portable device where the user enters the instruction for the state of the appliances. The receiver will act as an interface that implements the instruction (by controlling the household devices) sent by the transmitter. This paper will discuss the design, implementation and testing of our project in detail, and will conclude with a discussion on the accomplishments of this device, and possible future expansions. ii
1.1 Use and Practical Applications The main motivation behind this project is to create something that can significantly reduce the burden of physical movements among the handicapped or the elderly in their homes. Normally, someone who wants to switch on a lamp would have to get up, walk to the lamp switch, switch on the lamp and then go back to his/her seat. Our device will significantly minimize the need for strenuous physical movements by allowing the user to switch the lamp on or off from far away by remote control. Using our device, the user only needs to key in a set of simple instruction into the keypad. The transmitter part of the device would then process this set of instruction and then send the required data wirelessly to the receiver part. The receiver will then perform the necessary steps to control the selected household appliance. Our device is not only limited to simply switch devices on or off, but it could also be used to perform a total of 16 different states for each household device, for example multiple levels of brightness for a lamp, and also multiple levels of speed for a ceiling fan. Due to the fact that our receiver part is very dynamic, it could practically be used to interface with a range of household appliances, from lamps to fans and even an electronic door opener. Another advantage of our device is that it can practically control an unlimited number of household appliances that can be divided into units, sub-units and rooms. However for demonstration purposes, we will only control 4 different devices, which are divided to 2 devices per unit. Each unit will consists of a device that only has an on or off state, and a device with 4 different states. 1.2 Performance Specifications All of the specifications listed below are needed to produce a fully working device:
As with other engineering projects, we employed a modular design approach for our device. Our device consists of two main parts, the transmitter part and the receiver part. Figure 1.1 below shows the block diagram for our device. Figure 1.1 - Device Block Diagram Receiver Part Power Supply RF Receiver Decoder and Logic Multiple Appliances Transmitter Part Control Unit (FPGA) RF Transmitter Keyboard Portable power supply (battery)
2.1.6 Fluorescent/Incandescent Bulb Module This module basically reads the decoded data from the Receiver-Decoder Module and based on the data turn the appliance on or off. Typical appliances that could be attached this module are florescent bulbs, incandescent bulbs and other low power household appliances. To interface our 5V DC circuitry with the 120V AC line, we used a relay to open or close the 120V AC line. In particular, we needed a single pole single terminal normally open (SPST-NO) relay. An alternative to this design is to use triacs to control the 120V AC line. We decided to not use this approach because it is harder to interface logic circuitry with the triac switching circuit. Furthermore, the fact that we are unfamiliar with this device would make it difficult and dangerous since we are connecting to a 120V AC line. Hence, we chose the relay switching approach. 2.1.7 Dimmable Light Module This module serves to take the input data and turn the incandescent bulb on or off. On top of that it has the added ability to change its intensity based on the data input. We chose to use the similar approach as the previously discussed module due to the same reasons. The design would be spiritually the same except that we have three 120V AC lines with different resistance connected in parallel to the light bulb and power supply. Each line would have its own relay to switch it on or off based on the input data. Extra logic circuitry such as a demultiplexor (DMUX) is needed to choose the correct line to switch on based on the data input, which chooses the intensity of the light. 2.2 Tools Used 2.2.1 Oscilloscope The oscilloscope was used for testing to monitor and compare the output waveforms from the RF receiver and RF transmitter. 2.2.2 Voltmeters, Ammeters and Ohmmeters. The voltmeter was used to measure the voltage output of logic devices during debugging. The ammeter was used to measure the current output from the logic device, and also the RMS current in the multi brightness lamps for verification purposes. The ohmmeter was used to measure and confirm various resistor values that were used. 2.2.3 Power Supply A power supply with +5V and +4.5V DC output was used to power the transmitter and receiver part during testing. 2.2.4 Function Generator The function generator was used to produce a 4.5V TTL output (square wave) for testing the RF receiver-transmitter. 2.2.5 Xilinx ISE 6 Project Navigator and GXS Load The Project Navigator software is used to program and compile the Xilinx Spartan XSA- FPGA, while the GXS Load is used to upload the program from the computer to the Xilinx Spartan XSA-100 FPGA. 2.2.6 ModelSim This software is used to simulate the programming code to check for errors.
3 Design Details 3.1 Components 3.1.1 Xilinx Spartan XSA-100 FPGA microcontroller This is a powerful microcontroller that operates at a maximum frequency of 100MHz with a logic density of 100,000 gates. This FPGA is also combined with a 16 MByte synchronous DRAM and 256 KByte Flash (not used in this project). In addition this microcontroller has a PS/2 port (for connection to a keyboard), a VGA port (not used for this project), and 53 general-purpose I/O pins. For this project, this microcontroller is used to interface the keyboard and also to implement a state diagram. The keyboard outputs data serially to the FPGA. The FPGA will take in the serial data, performs the state diagram as programmed, and then outputs parallel data to the encoder. For this project, only 5 output pins were used; 2 for determining the address and 2 for determining the state of the appliance at the receiver part, and 1 for instructing the encoder when to send the data. 3.1.2 Keyboard A normal computer keyboard with a PS/2 output connection was used. 3.1.3 Transmitter-Encoder Module The MC145026 encoder chip is designed to work at a frequency of 21.5 KHz. From the specification sheet of the encoder, the value for RTC is 10kΩ, the value for CTC is 2000pF and the value for RS is 20kΩ. The encoder chip will have a total of 9 input pins, however only 5 will be used. The remaining 4 input pins will be tied to ground. 2 pins are used to determine the address of the decoder, 2 will be used to specify the data received by the decoder (where the decoder through various logic gates will determine the state of the appliance) and 1 pin will be used to enable the decoder to transmit its data and address. The LINX TX-900-HP3-PPC transmitter chip is used to send the data from the encoder to the receiver part. For this project, only the digital mode of the chip will be used. This RF transmitter chip also could operate on one of eight channels ranging from 900MHz to 966MHz. For this project, we will be using channel 0 (900MHZ) 3.1.4 Receiver-Decoder Module The LINX RX-900-HP3-PPC receiver chip will demodulate whatever signal was sent from the transmitting side and have it sent to the decoders. The input to the decoders would be a 9-bit data in which four are data bits and the other five address bits. If the address bit matches, the four data bits would be sent to the decoder’s corresponding appliance. See Figure 3.2 for schematic. Following the specification sheets, the values for R 1 , R 2 , C 1 , C 2 are calculated: R 1 C 1 3. 95 RTCC TC 3. 95 10 k 2000 pF 7. 9 10 ^5 F To fulfill this equation we chose R 1 =10k and C 1 = 8200pF which yields 0.82 F. Similarly, R 2 C 2 = 77RTCCTC = 77(10k)(2000pF) = 1.54kF We chose R 2 = 100k and C 2 =0.015F which yields 1.5kF With these values for R 1 , R 2 , C 1 , C 2 , our operating frequency for the decoder would be 21.5 kHz. The MC145027 decoder would produce four data bits in which only the two least significant bits would be used die to the small scale of our project.
B 2 B B (^2) R R R 120 P i R B B s R R R R
i
The power of the bulb, (6) Solving for the resistor value, P P P R P R R B^ B (^120 144) ( 10 ) Table 3.1 below lists the R values for three values of P that we intend to use. Table 3.1 Resistor Values P = 100 W P = 50 W P = 25 W R R 1 = 0 R 2 = 59.6468 = 60 R 3 = 144 3.2 Diagrams Figure 3.1 Circuit Schematic for Receiver Part
Figure 3.2 Receiver-Decoder Schematic Figure 3.3 Fluorescent/Incandescent Bulb Schematic
To test the LINX chips, we fed a square wave into the transmitter and verify that the output at the receiver side is a 5Vpp square wave. 4.1.3 Operation Range Testing We have the transmitting part moved incrementally further away from the receiver to test the transmitting range. The circuit functions correctly up to the west stairway, which is more than 10m. We also verified that the circuit would cease to function outside the building. 4.1.4 Current Measurements Using a multimeter, we measured the currents in the 120V AC lines of the Dimmable Light Module and the transistor currents. From Table 4.2 , we can observe that the current in the 120V AC lines matches our calculations pretty well. Table 4.2 120V AC Lines Current Measurements Resistor Bulb Power Line Current Error Measured Calculated R 1 = 0 100 W 0.8377A 0.8333A 0.528% R 2 = 60 50 W 0.6699A 0.5882A 13.876% R 3 = 144 25 W 0.5400A 0.4167A 29.599% From our measurements, the collector current of the transistor, IC = 81.42mA and the base current, IB = 4.953mA. From these two values the gain of the transistor would be approximately 20, which is smaller than the specifications of the transistor (hFE = 50). This is most likely due to the fact that the transistors are operation in the linear region, hence a lower gain. 4.2 Conclusions We tested each component individually and after making sure that they worked, we combined all of them together to see if it works properly. Initially we had some problems with some of the logic gates because their output voltage is too low to be considered as a logic level high. We decided to use new logic gates to replace the, and they worked as expected. Apart from that we had some problems integrating the FPGA output with the encoder. Our simulation results from ModelSim showed that we had the correct state to state transitions, however this simulation did no translate into a functioning device. After much debugging, we changed the coding for the PS2 interface module in the FPGA. The correction that we made was to store only the first 11 bits (the make code) of the 33 bits serial output from the keypad. After doing this, we connected LEDs to the FPGA output to check our state to state transitions. Surely enough, the FPGA worked correctly. After integrating all the other components, we tested every possible combination, and surely enough, everything worked fine. Overall, the test and verification results were good. Everything worked as we planned. All of the performance requirements were achieved. 5 Costs
Table 5.1 lists the cost of the parts we used for our project. Table 5.1 Parts Cost Part Unit Cost Number Used Total Cost TXM-900-HP3-PPS $ 29.45 1 $ 29. RXM-900-HP3-PPS $ 30.33 1 $ 30. Light Bulb $ 0.20 2 $ 0. Fluorescent Tube $ 10.00 1 $ 10. XSA-Spartan FPGA $ 240.00 1 $ 240. MC145026 - Encoder $ 2.19 1 $ 2. MC145027 - Decoder $ 2.60 4 $ 10. Miscellaneous Capacitors $ 0.32 12 $ 3. Miscellaneous Resistors $ 0.32 10 $ 3. MC74HC139A - DMUX $ 0.58 1 $ 0. SN74ALS04 - Inverters $ 0.48 4 $ 1. 74ALS32 - OR Gates $ 0.48 3 $ 1. Generic Transistor $ 0.30 8 $ 2. T77S1D10-05 - Reed Relay $ 2.00 8 $ 16. AA Battery $ 0.38 3 $ 1. Battery Holder $ 0.30 1 $ 0. Keyboard $ 10.00 1 $ 10. Total Parts Cost $ 363. The following is the formula we use to calculate our salary: Ideal Salary (hourly rate) x Actual Hours Spent x 2. Using this formula our salary comes up to $20/hour x 128 x 2.5 = $ Summing the parts cost and labor cost, we obtain the total cost of our project $352.15 + $6400 = $ $6,763.
6. Conclusions
Appendix B - Software State Diagram REFERENCES