Home
Electronically Controlled Expansion Valve for Use in a
Contents
1. N disp change checks for DISPLAY button press JOS UMa GA At The below checks if MODE button is 61 257 258 259 260 261 262 263 264 265 266 AUTO MODE 267 void auto mode 268 269 while comp 1 270 Z1 272 comp chk checks to see if the compressor is on 273 time 0 274 275 PORTB amp 1 lt lt 5 Turn off the manual mode LED 276 PORTB amp BV 6 277 PORTA amp BV 1 278 PORTA amp _BV 2 279 PORTA 1 lt lt 3 make the AUTO MODE LED turn ON 280 281 while time lt 3 amp amp comp 1 checks if the MODE button is held for 2 sec 282 283 284 if bit_is_clear PINB 0 285 286 _delay_ms 2000 287 288 if bit is clear PINB 0 289 290 disp change 291 manual mode 292 293 294 295 if TCNT1 gt 15625 wait for 3 sec before entering the fuzzy algorithm 296 297 time time 1 298 TCNT1 0 Reset timer value 299 300 if time 3 301 302 fuzzy 303 304 TCNT1 0 305 time 0 306 comp chk 1 2 3 comp chk 4 5 6 GENE 318 void dec2bcd leds 319 320 PORTC amp _BV 7 Clears all of the BCD values 321 PORTC amp _BV 6 62 322 323 324 325 326 327 328 329 330 Sl 332 333 334 335 336 and 337 338 339 LA B e 34 34 34 34 34 34 34 34 o AJ On 01 5 GA P
2. message SA Find in Files Breakpoints and Tracepoints ATmegal E AVR Simulator Auto in 1 Colt CAP NUM SCRL EI Figure 19 AVR Studio development environment 26 Figure 20 Atmel STK500 development board used for interfacing with microcontroller The software was broken up into different functions that perform specific tasks This allowed for the code space to be optimized and for greater flexibility while editing the code The functions of the code along with their respective descriptions are listed in Table 7 while the entire source code can be found in Appendix A Table 7 List of major functions in the source code Function Name Description main Main body of program calibrate Motor calibration routine manual_mode Manual control mode auto mode Automatic control mode dec2bcd Decimal to BCD converter scan up Controls UP button function scan down Controls DOWN button function commutate Commutates the valve disp change Toggles three digit display press a2d Pressure sensor analog to digital function temp a2d Temperature sensor analog to digital function fuzzy Fuzzy control algorithm comp chk Determines if compressor is on or off night time Power saving mode 27 Description of Software Functions main Appendix A lines 155 200 This is the first executed function of the
3. 199 return 0 200 201 202 MANUAL MODE FUNCTION 203 void manual mode 204 205 while 1 causes the code to remain in Manual mode until interrupted 206 207 comp chk checks for the compressor signal 208 209 while comp 1 if the compressor is on executes the below time 0 fuzztime 0 RUNNING LED is still on PORTB 1 lt lt 5 make the MANUAL MODE LED turn ON PORTA 1 lt lt 2 make the VALVE POSITION LED turn o Us AA ta OH NONNNNNNNND z oo PORTA amp 1 lt lt 3 make the AUTO MODE LED turn OFF 9 PORTA amp 1 lt lt 1 220 221 while time 60 if no user input is received after 1 minute System goes to auto mode 222 223 comp chk 224 225 if TCNT1 gt 15625 TCNT1 is the timer of the micro 15625 clock cycles 1 sec 226 227 time time 1 adds 1 sec to the current counted time 228 TCNT1 0 Reset timer value 229 230 231 if time 60 232 233 time 0 234 TCNT1 0 235 auto mode system will enter auto mode after 1 min of no user input 236 237 238 239 240 scan down checks for DOWN button press 24 scan up checks for UP button press 24 24 24 24 24 24 pressd for 2 seconds 248 if bit is clear PINB 0 249 250 _delay_ms 2000 251 252 if bit_is_clear PINB 0 253 254 auto mode 255 256
4. hart_equation pdf gt Pressman Abraham I Switching Power Supply Design McGraw Hill Inc 1991 Prinz Peter and Tony Crawford C In a Nutshell First Sebayopol O Reilly Media Inc 2006 STMicroelectronics AN937 Application Note 2005 WaterFurnace Inc Temperature vs Resistance for 10Q NTC thermistor 55 Appendix Appendix A Software Source Code LINE 1 AX 2 Project Development Board for Electronic Expansion Valve Control 8 Sponsors WaterFurnace Intl amp IPFW School of Engineering 4 Authors David Clendenen Kurt Shively 5 Contributors Mark Adams Randon Ripley 6 Release Date 4 18 2008 Si 8 Revision History 9 0 Revision Date Modifier Description Lo OC 2 REV 0 4 18 2008 D Clendenen K Shively Released 3 Al semanas aha se SSeS CODE START 2 9 SS SSS SS SS 5 PORTA 6 7 AO RUNNING MODE LED ON means running BROWN 8 Al TEMP DISPALY LED ON means TEMP is being displayed GREY 9 A2 POSITION DISPLAY LED ON means valve POSITION being displayed RED 20 A3 AUTOMATIC MODE LED ON means in auto mode PURPLE 21 A4 Future ADC 22 A5 Future ADC 23 A6 Temp ADC 24 A7 Pressure ADC 25 26 PORTB 27 28 BO MODE PUSHBUTTON switches between MANUAL 1 and AUTO 0 mode 29 B1 DISPLAY MODE PUSHBUTTON switches DISPLAY mode ACTIVE LOW 30 B2 COMPRESSOR INPUT ON 1 determines wheter
5. 1 09724 ds ds 17 05530 ds 89 43916 if superheat gt SSet 6 amp amp superheat lt SSet 7 steps 0 02257 ds ds ds 0 99967 ds ds 15 71735 ds 86 11652 71 XO VO XO XO XO XO XO WO o IO UM GA ho S OOO NON FA Cy XD 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 94 94 94 94 94 94 94 94 94 94 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 e o JO Us C0 20 rS VO AX if superheat gt SSet 7 amp amp superheat lt SSet 8 steps 0 02199 ds ds ds 0 99841 ds ds if superheat gt SSet 8 amp amp superheat lt SSet 9 steps 0 02293 ds ds ds 1 04454 ds ds if superheat gt SSet 9 steps 0 01242 ds ds ds 0 55907 ds ds ds 0 amp amp ds 10 if superheat SSet steps 0 01259 ds ds ds 0 18896 ds ds if superheat gt SSet amp amp superheat lt SSet 1 steps 0 02252 ds ds ds 0 32376 ds ds if superheat gt SSet 1 amp amp superheat lt SSet 2 steps 0 02106 ds ds ds 0 30427 ds ds if superheat gt SSet 2 amp amp superheat lt SSet 3 steps 0 02106 ds ds ds 0 32749 ds ds if superheat gt SSet 3 amp amp superheat lt SSet 4 steps 0 02252 ds ds ds 0 35182 ds ds if superheat gt SSet 4 amp amp superheat lt SSet 5 steps 0 01251 ds ds ds 0 18754 ds ds if superheat gt
6. Dr Donald Mueller IPFW Mechanical engineering advisor Dr Hossein Oloomi IPFW Electrical engineering advisor Edward Uslar Tritech Manufacturing Inc Printed circuit board manufacturer Abstract WaterFurnace International of Fort Wayne Indiana wishes to control an electronic expansion valve EEV for use in a geothermal heating and cooling system Electronic expansion valves provide higher system efficiency can be used on different tonnage systems and can be controlled more precisely than other types of expansion valves WaterFurnace desires an electronic control board to be designed to interface with temperature and or pressure sensors located in the geothermal system and use the output of the sensors to aid in the control of the EEV The valve must control the temperature of the refrigerant to 10 F 2 F of superheat at the inlet of the compressor In order to begin the design process models of the system were constructed to better understand its functionality A system was tested at WaterFurnace The test results were then used as baseline for modeling and the development of the control With a model of the system a simulation was set up to test this method and compare its results to those from the testing using the same input data The simulation of the control method supported the initial testing results and the design selection process began The design selection process consisted of determining the best method to im
7. Figure 5 shows the tabulated data plotted along with the fitted third order polynomial Table 6 Pressure to Tsat relationship table and equation PRESSURE ISAT LOOKUP TSAT EQN ERROR 98 14 29 93 29 97 0 1190 99 02 30 37 30 39 0 0498 99 91 30 81 30 80 0 0222 100 79 31 25 31 22 0 0969 315 64 99 50 99 40 0 0980 316 52 99 70 99 59 0 1067 317 41 99 89 99 78 0 1058 318 29 100 10 99 97 0 1252 120 Tsat 2E 06psig 0 0016psig 0 7397psig 28 998 2 i 100 R 1 o 80 2 3 60 S 3 E 40 ke 20 0 0 50 100 150 200 250 300 350 Pressure psig Figure 5 Tsat by pressure for R410A polynomial curve fit 18 Electrical Hardware In order to control the system and the various inputs and outputs a microcontroller was selected The electrical system consists of the microcontroller the stepper motor driver circuit display circuit sensor circuits and the power supply Stepper Motor Figure 6 Stepper Motor and Valve The EEV changes the orifice opening by changing the position of the pin inside of the valve The pin is attached to a permanent magnet rotor that is rotated by applying a specific series of voltages to the coils of the stator ring on the exterior of the valve The valve and stepper motor that was used and supplied by WaterFurnace are shown in Figure 6 above The motor is rated at 12 Volts DC and 0 26 Amp
8. SLEEP_MODE_PWR_DOWN sei 69 778 sleep mode This is where the microcontroller goes into power save mode 779 780 781 782 783 784 785 786 787 788 void fuzzy while fuzztime lt 25 seconds 789 790 791 for 792 793 794 495 796 797 798 799 800 801 802 803 804 805 806 807 OO OO OO CO CO CO CO vo Oo JO OD 0 N20 2 CO 820 821 822 diy if bit is clear PINB 0 5s delay ms 1500 if bit is clear PINB fuzztime manual mode if TCNT1 gt 15625 fuzztime fuzztime 1 TCNT1 0 Reset timer fuzztime 0 temp a2d press a2d temp lookup dec2bcd valve pos superheat temperature Tsat superheat 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 sh new superheat ds sh new sh old ds ds 2 Variable sampling rate k 1 if superheat SSet gt 3 if ds gt 2 ds lt 2 k 2 fuzztime if DS is large 838 839 840 841 if superheat SSet gt 5 0 8 Delay between sensor sampling Checks if the MODE button is held value read temperature sensor read pressure sensor calculate Tsat calculate the latest calculate the change in superheat scaling factor for DS Gain for the steps Gain for the steps Decreases the next sampling period 70 84 84
9. set ADEN high 664 ADMUX 0x04 665 tem read_temp_adc calls the function to read the sensor 666 667 Rt 1024000 tem 1000 Calculates the thermistor resistance in kOhms 668 Rt Rt 3 3 Calculates the thermistor resistance in kOhms 669 670 The below is the conversion of the ADC integer into a temperature value 671 temperature bl log Rt 672 temperature log Rt log Rt log Rt b2 temperature 673 temperature temperature b0 10000 674 temperature 1 temperature 273 675 temperature 9 temperature 676 temperature temperature 5 677 temperature temperature 30 678 tempint temperature 679 680 681 682 683 ff mt SSSR SESE READ TEMP A2D DATA Reads the sensor output and returns the value to TEMP A2D 684 int read temp adc 685 686 ADCSRA ADCSRA 0x40 start conversion set ADSC high 687 while ADCSRA amp 0x40 wait for conversion ADSC to go low 688 689 ADCT ADCL 690 ADCT ADCT ADCH lt lt 8 Combines the ADCL and ADCH registers into one value 691 692 return ADCT return 10 bit data from ADCH 693 694 695 696 Jaume at SAT TEMP LOOK UP Calculates saturated temperature from the pressure 697 void temp lookup 698 699 700 701 Tsat 0 000001123579 pressure pressure pressure 0 001292926247 pressure pressure 702 Tsat Tsat 0 696670171744 pressure 27 015 703 70
10. 019 ds 6 338 superheat gt SSet 2 amp amp superheat lt SSet 3 steps 0 121 ds ds 0 409 ds 9 164 superheat gt SSet 3 amp amp superheat lt SSet 4 steps 0 128 ds ds 0 340 ds 11 4 superheat gt SSet 4 amp amp superheat lt SSet 5 steps 0 128 ds ds 0 382 ds 15 51 superheat gt SSet 5 amp amp superheat lt SSet 6 steps 0 128 ds ds 0 382 ds 15 51 superheat gt SSet 6 amp amp superheat lt SSet 7 steps 0 137 ds ds 0 652 ds 16 63 superheat gt SSet 7 amp amp superheat lt SSet 8 steps 0 142 ds ds 0 630 ds 17 7 superheat gt SSet 8 amp amp superheat lt SSet 9 steps 0 126 ds ds 0 683 ds 20 4 superheat gt SSet 9 steps 0 027 ds ds 0 277 ds 25 29 superheat SSet steps 0 137 ds ds 3 245 ds 34 51 superheat gt SSet amp amp superheat lt SSet 1 steps 0 137 ds ds 3 245 ds 34 51 73 053 054 055 if superheat gt SSet l amp amp superheat lt SSet 2 056 057 steps 0 158 ds ds 4 086 ds 42 41 058 059 060 if superheat gt SSet 2 amp amp superheat lt SSet 3 061 062 steps 0 027 ds ds ds 1 086 ds ds 14 063 064 065 if superheat gt SSet 3 amp amp superheat lt SSet 4 066 067 steps 0 026 ds ds ds 1 084 ds ds 14 068 069 070 if superheat gt SSet 4 O71 072 steps 25 073 074 075 076 sh old sh new 077 ds old ds 078 steps steps k 079 step
11. Operation with a change in coax inlet water temperature Disturbance 1 Figure 30 shows the inlet and outlet water lines for the coax heat exchanger Water is used in the coax to exchange heat from the refrigerant to the earth loop of a geothermal system In the normal condition stated above the inlet temperature of the coax water is 77 F In order to confirm that the control can handle a disturbance an increase in the inlet water temperature was created First the system was taken to steady state at normal operation as described in Table 11 Next the inlet water temperature was increased from 77 F to 90 F This rapid increase in temperature is the worst case disturbance that can only be realized in the lab Figure 32 shows that as the water temperature changed the level of the superheat changed When this occurred the fuzzy control algorithm began to adjust the valve in order to bring the level of superheat to the desired point The rate of change in the inlet water temperature was too great for the control to hold the superheat within the range initially Once the water temperature stabilized at 90 F the fuzzy control algorithm was able to bring the superheat back down to the desired point It should be noted that the inlet water temperature is typically 50 F to 77 F and this test was an exaggerated disturbance This proves the control s functionality during disturbances 45 Superheat F 0 100 200 300 400 500 6
12. a data acquisition system in 37 the testing lab must display a change in pressure and temperature in the system during the calibration procedure Proper functionality of the calibration procedure also requires that the three digit display shows the correct valve position at completion of the procedure After calibration the control enters manual mode In manual mode the controller only responds to user input from four pushbuttons valve up valve down mode switch and display switch pushbuttons To verify that the valve up and valve down pushbuttons function correctly each button is individually pressed and held for five seconds The voltage waveform at the motor inputs is observed on the oscilloscope The voltage waveform must correctly match the voltage waveform of Figure 23 depending on the direction of rotation and starting position 1 8 of the valve Figure 23 Proper commutation series for opening and closing EEV To test the sensor readings and their respective conversion algorithms the three digit display is used in conjunction with the display select pushbutton and the temperature pressure and position LEDs The display button is pressed so that the temperature LED is lit and a value is displayed on the three digit display The value is then compared to the reading on the data acquisition system in the lab The display button is pressed again so that the pressure LED is lit and a value is displayed on the three digit display T
13. code Inside this function the internal timer for the microcontroller is setup and all of the input and output ports are configured respectively Once the necessary hardware is configured this function calls the motor calibration function and then enters an infinite loop that keeps the control operating until it is shut down or reset calibration Lines 520 568 When the system is powered on reset or wakes up from the sleep mode it will perform a calibration of the valve to make sure that it is at the correct position before it resumes operation The calibration function has two parts calibrate up and calibrate down For the calibrate up portion of the calibration procedure the inequality i lt cali up must be satisfied The variable i is set to 1 at the initialization portion at the beginning of the program The variable cali_up is set to 70 at the initialization portion at the beginning of the program as well This loop opens the valve all of the way Since the valve has 480 positions by opening the valve by a number of steps greater than 480 in this case 560 8 70 560 the true position of the valve will be known This method is used instead of closing the valve all of the way because doing so could damage the pin inside the valve over time In this loop the microcontroller calls the commutation function until the variable i 71 The variable valve pos is used by the dec2bcd function to display the valve position on the seven segment
14. shown in Table 5 the readings from the pressure transducer in lab were the same as WaterFurnace s test results 350 Dead weight Calculated wo e CH N q o N e eo qa eo Pressure psig e eo q eo Volts V Figure 4 Dead weight tester data compared to Table 4 calculated values Table 5 WaterFurnace and EEV board displayed Pressure Display ed Pressure WaterFurnace psi Pressure psi Note Displayed pressure is rounded on EEV board display The pressure value is then used to calculate the saturated temperature Tsa The original method that the group decided to use for calculating Tsat was to incorporate a 17 table of the R410A saturated temperature versus pressure into the code for the microcontroller and find Tsat based on the pressure reading However this theory was based on using an 8 bit pressure reading of only 204 values Once 10 bit ADC was chosen a new method of calculating Tsat was required A new table designed for 10 bit resolution was generated for pressure and saturated temperature values The refrigerant will never be outside of the 30 F to 100 F range so the pressure and saturated temperature for this range were plotted and an equation was derived from the relationship by fitting a third order polynomial to the data The largest percentage error between the derived equation and the table is 0 8 Table 6 shows an example of the data
15. system Disturbance testing can be observed during testing by monitoring the data acquisition system s readings for temperature pressure and superheat Once the system reaches steady state a disturbance can be introduced into the system The most rapid and severe disturbance to the system is a rapid change in the water temperature flowing through the coax heat exchanger For example in cooling mode the inlet water temperature can be increased from 77 F to 90 F to simulate a very hot day Once the disturbance is introduced the control display and laboratory data acquisition system will display the control s reaction Component Testing Results Table 10 shows that all of the major components were individually tested and proven to work as designed This includes the LEDs pushbuttons microcontroller and sensors The components worked together properly and the logic of the control board interfaces with each component correctly Figures 24 27 show the motor commutation during automatic and manual modes The fuzzy control algorithm was verified with hand calculations This allows proper control of superheat using all of the components 3 LT Figure 24 Oscilloscope waveform of valve opening in calibration mode 39 Coupling DC A ZP A mit Figure 26 Oscilloscope waveform of valve closing in manual mode 40 Coupling DC Figure 27 Oscilloscope waveform of valve opening in manual mode 41 System Test
16. system is active or not ACTIVE LOW 31 B3 POSITION UP INCREMENTS the vale position ACTIVE LOW 32 B4 POSITION DOWN DECREMENTS the vale position ACTIVE LOW 33 B5 MANUAL MODE LED ON means in manual mode ORANGE 34 B6 PRESSURE DISPLAY LED ON means PRESSURE being displayed BLUE 35 B7 HEATING COOLING MODE select 36 Bd B7 B6 B5 B4 B3 B2 B1 BO 38 dardo Gl SML SX ads DX 39 40 PORTC 41 42 CO ORANGE ORANGE WIRE 43 C1 RED GREEN WIRE 44 C2 YELLOW BLUE WIRE 45 C3 BLACK BLACK WIRE 46 C4 DISP A RED ones place 47 C5 DISP B YELLOW 48 C6 DISP C BLACK 49 C7 DISP D BROWN 50 51 52 PORTD 53 DO DISP A Tenths place 54 D1 DISP B 529 D2 DISP C 56 D3 DISP D 57 DA DISP A Hundreds place 58 D5 DISP B 59 D6 DISP C 60 D7 DISP D 61 xy 62 63 Joy serere rere LIBRARY DEFINITIONS 64 finclude stdio h standard c io library 65 finclude avr io h the library for the avr i o 66 include lt avr interrupt h gt interrupt library 58 67 include lt math h gt 68 define F_CPU 1000000UL 69 include lt util delay h gt 70 include lt avr sleep h gt 71 V2 GLOBAL VARIABLES T3 74 inesi Es 75 int delay 25 76 int flash 100 77 int valve pos 78 int cali_up 70 79 int cali down 31 80 int debounce_time 200 81 int man_delay 150 82 int a 83 int b 84 int c 85 int state during commutation 86 int displ
17. 00 401 02 03 04 BS QR DD GPS GPS a ss ss ST ST e VO Es DD BR A BBB BAW 428 429 430 431 432 33 34 35 36 33 38 3 9 0 1 2 3 4 BO AR RRR RO aS aS RRR BRE ss uS aS aS vs 4 4 4 4 4 o 4 4 4 4 4 5 5 Howo Jo WH button to be pressed dec2bcd valve pos Displays the new valve position delay ms 15 TCNT1 0 resets TCNT1 and time time 0 Scan DOWN This function checks for the DOWN void scan down if bit is clear PINB 4 tate value delay ms man delay if bit is clear PINB 4 delay ms 15 state state 1 Changes the state value commutate commutates the motor to the new valve pos valve pos 1 Changes the valve position value dec2bcd valve pos Displays the new valve position _delay_ms 15 TCNT1 0 time 0 void commutate if state lt 1 loops the commutation state if it is less than 1 state 8 if state gt 8 loops the commutation state if it s greater than 8 switch state mmutation case 1 state 1 each case corresponds to a different pulse for PORTC amp BV 3 PORTC amp BV 2 PORTC amp BV 1 PORTC BV 0 64 E vs ss GPS GPS GPS RE SD SOR SR ED SD SRD SD SD SO O GPS GPS GPS ds O SRD SO RO SSD SOR OR OD SR ds KR DBD 4 5 5 5 5 5 5 5 5 pulses 5 5 Dm O
18. 00 Time sec Figure 32 Superheat vs time for normal operation parameters listen in Table 11 Test 3 Operation with a mode switch Disturbance 2 In order to further prove the control s ability to handle disturbance another disturbance was introduced again from normal operation The unit was again allowed to run in normal operation as described in Table 11 until steady state was achieved The unit was then changed from cooling mode to heating mode Figure 28 a and b shows how the refrigerant switches directions when the mode is switched When this happens the compressor turns off then the reversing valve is switched to a different position The compressor is then turned back on This mode switching is done automatically with the unit s main controller While the compressor is off the EEV begins to recalibrate When recalibrated the EEV returns to the mid way open point of 240 steps The control is then put back into automatic mode to control the superheat temperature Figure 33 shows the superheat with respect to time during the mode switching process 46 30 25 N eo Superheat F q 0 100 200 300 400 500 600 700 800 Time sec Figure 33 Superheat values with disturbance 2 introduced a sudden mode change Test 4 Change in superheat set point Test 4 is used to illustrate the fuzzy algorithm s ability to handle different set points of superheat It could be possible for WaterFurnac
19. 4 705 706 eege COMPRESSOR ON CHECK Function checks for compressor input 707 void comp chk 708 709 68 sleepy ee o IS UMBwNHO VO 720 721 722 sleep mode 723 724 725 726 et 728 729 730 dod 732 733 734 T39 736 0 if bit_is_clear PINB 2 delay ms 20 if bit is clear PINB 2 comp 0 PORTA amp _BV 0 return while sleepy lt 15 Delay between compressor off and if TCNT1 gt 15625 PORTB amp _BV 5 sleepy sleepy 1 TCNT1 0 Reset timer value if sleepy 15 PORTB amp _BV 5 PORTB _BV 6 _delay_ms 2000 night time Puts the control into a low power mode TIT 738 T39 74 74 74 74 74 74 74 74 74 74 750 251 752 453 754 755 756 757 758 759 760 761 762 763 764 e o AJ On UM C0 Pho S VO VEER if bit_is_set PINB 2 delay ms 20 if bit is set PINB 2 PORTA comp 1 return BV 0 _delay_ms 2000 comp 1 PORTA _BV 0 766 void night time 767 768 NEEDED 769 770 KSE KE 773 774 TIA 776 777 GICR amp 1 lt lt INT2 disable INT2 to prevent false triggers MCUCSR 1 lt lt ISC2 positive edge INT2 GIFR 1 lt lt INTF2 clear any pending interrupts GICR 1 lt lt INT2 enable INT2 interrupts PORTB amp _BV 6 set_sleep_mode
20. 84 84 84 On OI vs GA FA if DS is large 847 848 849 850 851 852 853 854 the 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 if ds gt 2 ds lt 2 k 3 Gain for the steps fuzztime 12 Decreases the next sampling period if superheat lt SSet k 1 if the superheat is too low this gain changes step direction if superheat SSet 10 superheat ds ds Lf ds gt 20 ds 20 if ds lt 20 ds 20 ds lt 10 if superheat SSet steps 0 123 ds ds 2 768 ds 30 62 if superheat gt SSet amp amp superheat lt SSet 1 steps 0 02416 ds ds ds 0 95688 ds ds 12 69588 ds 44 31142 if superheat gt SSet 1 amp amp superheat lt SSet 2 steps 0 01715 ds ds ds 0 64880 ds ds 8 39021 ds 27 61058 if superheat gt SSet 2 amp amp superheat lt SSet 3 steps 0 099 ds ds 2 002 ds 16 444 if superheat gt SSet 3 amp amp superheat lt SSet 4 steps 0 065 ds ds 0 773 ds 4 451 if superheat gt SSet 4 amp amp superheat lt SSet 5 steps 0 01315 ds ds ds 0 59145 ds ds 10 05298 ds 54 52301 if superheat gt SSet 5 amp amp superheat lt SSet 6 steps 0 02485 ds ds ds
21. Coil 3 se Reversing Valve Compressor Figure 28 a Geothermal heat pump schematic for heating mode 42 Air Coil Reversing Leaving Air SS 4 lt ind j Entering Air Figure 29 Connection of system to ductwork for airflow regulation 43 Figure 30 Connection of water into the coax heat exchanger Test 1 Normal Operation Normal operation parameters for cooling mode testing are listed in Table 11 The lab was set to these conditions until steady state was reached At the listed parameters the superheat temperature is approximately 25 F at the inlet of the compressor The valve must be capable of reducing the superheat to 10 F 2 F at these conditions Table 11 Normal operation testing parameters Entering Dry Bulb Temp PF 80 Entering Wet Bulb Temp F 66 Leaving Dry Bulb Temp F 66 Leaving Water Temp F 90 Figure 31 shows the change in superheat with respect to time in normal operation parameters listed in Table 11 The set point of 10 F 2 F superheat at the inlet 44 of the compressor is achieved in about 5 minutes This confirms that the valve is capable of operating at normal conditions 30 25 Superheat F q N eo 5 T T T T T T T T T 0 100 200 300 400 500 600 700 800 Time sec Figure 31 Superheat vs time for normal operation parameters listen in Table 11 Test 2
22. E 1 shit16 default PORTC 0x00 a rre PORTD DxC0 e lal Wr Ae COO RIE delay ns 750 leader S External Dependencies PORTC 0x50 i E Other Files PORTD 0xD5 PORTA 1 lt lt 0 make state 0 while i lt cali up cal H commutate delay ms delay state state 1 if state 9 7 isi i valve pos i 8 1 60 state B while cali_down lt i commutate delay ns delay state state 1 if state D 7 i i l valve possi 8 dec2bcd valve pos C Documents and Settings dcle7556 Desktop WF Testing WF ADC GOOD 4 5 3 9 TIMER Cou EI TIMER Cou QuEXTERNAL I B EEPROM tha PINNING TED turn NN secu STK500 m x S TIMER Cou Program Fuses LockBis Advanced Board Auto PEE 3 S2 USART r Device 3 82 TWI EweDeie Danis Dap CONVER r Programming mode EES Erase Device Before Programming E3B00T LOAD ISP mode En i T Verify Device After Programming il RS PORTA F PORTE p Flash x ES PORTE Use Curent Simulator Emulator FLASH Memory s S PORTO S Input HEX File C Documents and Settings dcle7S56 Deskto 3 S WATCHDOG Program Verify Read EEPROM Use Curent Simulator Emulator EEPROM Memory Input HEX File COM 1 Getting revisions HW 0x02 SW Major 0x02 SW Minor Ox0a OK e au
23. Indiana University Purdue University Fort Wayne Department of Engineering ENGR 410 ENGR 411 Capstone Senior Design Project Report 2 Project Title Electronically Controlled Expansion Valve for Use in a Geothermal Heating System Team Members Mark Adams ME David Clendenen EE Randon Ripley ME Kurt Shively EE Faculty Advisor Dr Hosni Abu Mulaweh ME Date Dr Hossein Oloomi EE 4 28 2008 Table of Contents Acknowledeemetit E 3 Design Abstract and Summary e D Section I Selected Conceptual Desgmn 0 cc cece creser Section II Description of the building process ssse 12 Section We Vestine catarse inss c a potes iex Eae impe RN 35 Section IV Evaluation and Recommendations 50 CONCIUSION EE 52 IRGICTCNCES M ELM 54 EELER o tua 56 Acknowledgement The group would like to send a special thank you to WaterFurnace International for giving the opportunity financial contribution and guidance for this project Some other contributors and specific WaterFurnace employees that deserve recognition are Dr Hosni Abu Mulaweh IPFW Mechanical engineering advisor Caleb Chichester WaterFurnace Electrical engineering consultant Nick Hartman and Michael Taylor WaterFurnace Test lab Technicians Bill Jeffries Geisting and Associates Electronic component sales representative Chris Manz WaterFurnace Project manager and mechanical engineering consultant
24. LED display Once the calibrate up portion of the calibration procedure has been completed and the valve is fully opened the valve needs to be closed to a desired position In this case the valve needs to be halfway open 240 steps The variable i is now set to 60 60 8 480 to represent the current position of the valve The state variable is set to 8 because the commutation procedure is now reversed The controller enters the while loop based on the inequality cali_down lt i The variable cali_down is set to 31 at the beginning of the program to represent the valve position of 240 The microcontroller commutates the motor down to position 240 similarly to the calibrate up method Voltage to the motor is removed by the kill function and the microcontroller then returns to the portion of the program that called the calibration function manual mode Lines 203 263 This is the user interactive function and is called from main immediately after the motor is done calibrating The purpose of this function is to give the user manual control over the system and is mainly included for engineering and debugging purposes 28 This function monitors all of the pushbuttons and waits for user input With this function each step of the valve can be manually controlled and temperature and pressure readings can be manually monitored auto mode Lines 266 315 This function is the high level control function for the automatic mode of con
25. RESET CO 9 AREF Vcc GND GND AVCC XTAL2 PC7 TOSC2 XTAL1 PC6 TOSC1 RXD PDO PCS TDI TXD PD1 PC4 TDO INTO PD2 PC3 TMS INT1 PD3 PC2 TCK OC1B PD4 PC1 SDA OC1A PDS PCO SCL ICP1 PD6 PD7 OC2 Figure 12 Connection of the Push Buttons to the Microcontroller The various light emitting diodes LEDs were connected to the microcontroller pins 0 1 2 and 3 of Port A and pins 5 and 6 of Port B Figure 13 The LEDs were used to display if the system was running which parameter the seven segment display was showing and which mode the controller was in Figure 14 shows the user interface panel that was used during development to house the pushbuttons and the LEDs 22 XCK TO PBO T1 PB1 INT2 AINO PB2 OCO AIN1 PB3 SS PB4 MOSI PE PAS ADC5 MISO PE PA6 ADC6 SCK PB7 PAT ADCT RESET AREF voc GND GND AVCC XTAL2 PC7 TOSC2 XTAL1 PC6 TOSC1 o ro CG INTO PD2 PC3 TMS INT1 PD3 PC2 TCK OC1B PD4 PC1 SDA OC1A PD5 PCO SCL ICP1 PD6 PD7 OC2 Figure 13 Connection of the State LEDs to the Microcontroller Figure 14 User Input and State LEDs Interface Three seven segment LED displays were used to display numeric values during development The end purpose of these displays is to display the valve position and temperature and pressure readings from the sensors The three seven segment displays were connected to three binary coded decimal BCD decoders The
26. SSet 5 amp amp superheat lt SSet 6 steps 0 062 ds ds 1 818 ds 15 22 if superheat gt SSet 6 amp amp superheat lt SSet 7 steps 0 097 ds ds 1 941 ds 16 00 if superheat gt SSet 7 amp amp superheat lt SSet 8 16 07877 ds 91 69972 16 79148 ds 97 65075 9 57142 ds 67 21499 2 12770 ds 0 01350 2 48397 ds 3 72657 2 44311 ds 6 31417 2 67528 ds 8 74842 2 76462 ds 11 25664 2 12069 ds 14 98441 steps 0 01598 ds ds ds 0 35913 ds ds 2 90559 ds 17 70294 if superheat gt SSet 8 amp amp superheat lt SSet 9 steps 0 02358 ds ds ds 0 48252 ds ds 3 36313 ds 20 09441 if superheat gt SSet 9 steps 0 01076 ds ds ds 0 28823 ds ds 2 82362 ds 25 08042 72 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 000 001 002 003 004 005 006 007 So C0 EE O o O OG O0 92 0 o IS UM CO Po S t3 Oo NON l5 KE us 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 04 04 04 04 04 04 04 04 04 04 050 051 052 e co IS 014 C0 N20 ES VO if ds gt 0 amp amp ds lt 10 if if ds gt 10 Lf superheat SSet steps 2 00001 ds ds 1 406 ds superheat gt SSet amp amp superheat lt SSet 1 steps 0 062 ds ds 0 570 ds 3 280 superheat gt SSet 1 amp amp superheat lt SSet 2 steps 0 099 ds ds 0
27. ad on the lab acquisition equipment was within 1 F of the values calculated with the NTC thermistor Figure 3 is a graphical representation of the experimental Table 3 temperatures The values from the beaker and heated water experiment are plotted as single data points The line in Figure 3 is generated using equation 3 The data points align closely to the generated line 14 300 Table 3 Experimental and calculated temperature values Equation 3 Actual F F Delta F 1012 1072 60 1058 1117 60 1098 1163 66 2132 2140 08 250 Calculated e Tested N e o 150 Temperature F 100 50 Figure 3 Temperature vs resistance for experimental points and datasheet curve fit 5000 10000 15000 20000 Resistance ohms 25000 30000 35000 15 Pressure Sensing A Saginomiya NSK BE050L 103 pressure transducer was provided by WaterFurnace The pressure transducer is used to relate the pressure at the inlet of the compressor to an output voltage The pressure transducer is an active sensor that requires a 5V supply voltage and outputs the pressure reading as a linear DC voltage in the range of 0 5VDC to 4 5VDC The voltage range can be found by subtracting the O psig voltage reading from the maximum output voltage 4 5V 0 5V 4V The pressure sensor used in this design has a pressure range of 0 to 725 psig E
28. arameters Table 10 depicts the testing parameters that the group defined in the design phase as a rubric for measuring the performance of the control prototype This table was used as a means of evaluating the prototype throughout the build and testing phases to validate functionality Testing was first performed in the IPFW lab on the individual components of the control and then system integrated tests were performed at WaterFurnace s test lab in a geothermal heat pump Table 10 is populated with the results from the latest tests Table 10 Test parameters for electronic expansion valve control Parameter Quantity Results Comments Power Suppl e BONNER E INAL Pa Ee GE a SSES into regulated 12VDC and 5VDC EU 9 switching regulator ee ee SS Display alll digits correctly Interface with push buttons EE ea ee ES Yes biasing resistor was changed Thermistor Accurate readings 2 C to a 1 from a 5 to increase accurac DO pidssum Yes Analog to digital conversion Accurate readings 2 psig was changed from 8 bits to 10 bits Transducer to increase accurac Elos ec Microcontroller Can it be programmed 1 A Do all devices interface correctly ES c eu S Manual Mode Respond correctly to user input ES assess Auto Mode Calculate Tsat correctly jEnterinto power save mode Whole System 1 1 Ultimately control superheat to Yes Set point can be changed in Superheat range ES o within spec
29. aya 2 87 int num 88 int tem 89 LL 90 int read press adc 91 int pressint 92 int tempint 93 int read_temp_adc 94 int fuzztime 95 int comp 1 96 int sleepy 97 int steps 98 int ds_gain 1 99 int ADCT 00 int ADCP 01 int ds old 02 03 04 int SSet 10 05 06 07 int Tsat 08 int time 0 09 int superheat 0 int ds 1 int sh_new 2 int sh_old 0 to 0 3 int steps_old 4 double samplerate 0 50 5 double k 6 double b0 11 30279 multiplied by 1000 7 double bl 2 33948 multiplied by 1000 8 double b2 0 000883065 multiplied by 1000 9 float tem_F 20 float Rt 2l float pressure 22 float temperature 23 24 25 void calibration 26 void manual_mode 2 void auto mode 28 void dec2bcd int leds 29 void scan_up 30 void scan down 31 void commutate 32 void disp change math library 1 MHz delay library sleep library calibration variable time delay for stepper motor valve position valve calibration up valve calibration down button debounce time temporary variable temporary variable temporary variable state of the stepper motor There are 8 states ADC for pressure sensor ADC for temperature sensor pressure sensor ADC function integer value of the pressure value integer value of the temperature value temperature sensor ADC
30. d instead of manually having to reset the board The temperature and pressure sensor allowed the controller to gather the data required in order to make the necessary calculations The motor then commutated the number of steps required to control the superheat A recommendation to improve the cost of the system is to change to a three temperature sensor design This was a design ruled out in the previous semester due to temperature to pressure correlations at the exit of the EEV Ifa method could be implemented to calculate pressure at the outlet of the EEV the three temperature design could be used to control the system This would cut the cost of the system due to the price of the pressure transducer 51 Conclusion The EEV control valve was developed for the growing industry of energy conservation The specific requirements of the board were given to the group by WaterFurnace a geothermal heating and cooling system manufacturer After the specifications were given the geothermal system was modeled with a variety of computer software programs Several conceptual designs were drafted and evaluated The design chosen was a microcontroller based system with a fuzzy control algorithm and a temperature and pressure sensor configuration at the inlet of the compressor A schematic was designed and analyzed Then a bread board prototype was constructed and tested The testing done at WaterFurnace proved the functionality of the control board It wa
31. e to want a different set point of superheat at the inlet of the compressor in the future to accommodate design requirements The set points of 5 F 10 F and 15 F of superheat were programmed note that only one set point can be programmed at a time into the fuzzy logic portion of the code while the system was operating under normal conditions described in Table 11 After each set point was loaded the superheat was collected until that point was met Figure 34 shows the control s ability to have a variety of set points programmed into it and function properly The 5 F set point was not able to be reach because the valve was all the way open It did however get in the 5 F 2 F range 47 30 eT SH 5 xT SH 10 4 T SH 15 25 N CH Superheat F a eo 0 100 200 300 400 500 600 700 800 900 Time sec Figure 34 Different superheat set points in fuzzy control Test 5 Comparison of EEV with TXV The final system test was to compare the results from a typical thermal expansion valve TXV to the EEV with the electronic control board The TXV results were obtained from WaterFurnace The data is from a previous test WaterFurnace conducted of a 3 ton system Figure 35 shows the TXV data compared to the data shown in Figure 31 from normal testing Both the TXV and EEV have the parameters described in Table 11 The EEV reaches the desired set point of 10 F 2 F within 5 minutes which is three min
32. eres per phase In order to commutate the motor a driving circuit must be used because the voltage and current requirements of the stepper motor exceed what the microcontroller can deliver A Darlington driver was selected to interface the stepper motor with the microcontroller The four inputs to the Darlington driver are delivered from the microcontroller and the corresponding outputs of the Darlington driver are connected to the stepper motor Figure 7 below shows the Darlington driver with the inputs and outputs 19 Darlingte Driver Outputs E 4 41 3 31 vA Figure 7 Darlington Driver Microcontroller All portions of the controller are connected to the microcontroller The inputs to the Darlington drivers are connected to the lower 4 bits of Port C of the microcontroller as shown in Figure 8 XCK TO PBO 1 PAO ADCO T1 PB1 g 2 PA1 ADC1 INT2 AINO PB2 CJ 3 PA2 ADC2 OCO AIN1 PB3 C 4 PA3 ADC3 88 PB4 5 PA4 ADC4 MOSI PBS O 6 PA5 ADC5 MISO PB6 C 7 PA6 ADC6 SCK PB7 O 8 PA7 ADC7 RESET AREF vec GND GND AVCC XTAL2 PC7 TOSC2 XTAL1 PC6 TOSC1 RXD PDO PCS TDI TXD PD1 PC4 TDO INTO PD2 INT1 PD3 OC1B PD4 OC1A PDS ICP1 PD6 21 EL PD7 0C2 Figure 8 Connection of the Darlington driver to the lower 4 bits of Port C The temperature sensor was connected to pin 6 of Port A and the pressure sensor was connected to pin 7 of Port A as shown in F
33. essure calculation 64 64 64 64 5 pressint returns the value 64 64 64 64 6 o CO N 650 int read press adc ADCSRA ADCSRA while ADCSRA amp 0x40 0x40 if displaya 2 dec2bcd valve pos Displays the valve PORTA BV 2 Turns on the POSITION LED PORTA amp BV 1 PORTB amp BV 6 delay ms 200 displaya 0 return if displaya 1 dec2bcd pressint Displays the new integer PORTB BV 6 Turns on the PRESSURE LED PORTA amp BV 1 PORTA amp BV 2 delay ms 200 displaya 2 return if displaya 0 dec2bcd tempint Displays the new integer PORTA BV 1 Turns on the TEMPERATURE PORTA amp BV 2 PORTB amp BV 6 delay ms 200 displaya 1 return PRESS A2D Sets up the ADC conversion and converts the Enable ADC set ADEN high 10 bit num 98 0 884146341463415 10 bit pressure pressure READ press A2D DATA Reads the sensor output and start conversion set ADSC high wait for conversion ADSC to go low 67 651 ADCP ADCL 652 ADCP ADCP ADCH lt lt 8 Combines the ADCL and ADCH registers into one value 653 654 return ADCP return 10 bit data from ADCH 655 656 657 eegen 658 659 660 TEMP A2D 661 void temp a2d 662 663 ADCSRA 0x80 Enable ADC
34. function delay between sensor readings in auto mode compressor on or off 0 off 1 on Gain for the derivative term ADC variable for temperature ADC variable for pressure previous value of the derivative of superheat Superheat value that the system should run at saturation temp from lookup time in seconds superheat variable change in superheat latest superheat value previous superheat value initially set number step GAIN thermistor temperature calculation coefficient thermistor temperature calculation coefficient thermistor temperature calculation coefficient variable for temperature calculation value of the thermistor resistance calculated value of pressure calculated value of temperature CALIBRATION function MANUAL MODE function AUTO MODE function decimal to bcd functtion UP BUTTON scan function DOWN BUTTON scan function commutation function display functtion initializes initializes initializes initializes initializes initializes initializes initializes 59 E C0 CO CO CO CO CO CO Q vw OO JO UD BW Os DRA DAA BR BRR CO vw OO JO UD GA h t oo C1 WN On OD OD OO OO CO vw 0 J1ov0 eA Ov On NR So BC 65 66 67 68 69 70 71 72 13 74 15 void press a2d initializes pressure a2d functtion void temp a2d initializes temp a2d functtion void temp lookup initializes temp calculation functtion void fuzzy initializes fuzzy control algorithm void k
35. h smaller steps By approaching the set point with an overdamped motion the system will not overshot the set point and will stabilize more quickly The fuzzy code for the board was generated by Matlab The code from Matlab was than edited to specific superheat ranges to conserve memory space on the board To validate the fuzzy code hand calculations were done to make sure that the board code matched up with the Matlab fuzzy values To do this a set of derivative of the superheat values were checked at every superheat value superheat was set to integers since the code is based on the superheat being an integer An example hand calculation would be to set the superheat to 15 F and the derivative ds to 6 The formula used in the hand calculation for this would be line 1014 of the code in appendix A which can be seen in equation 6 Note that the SSet for this calculation is at 10 degrees of superheat steps 0 128ds 382ds 415 51 6 Computing a solution for equation 6 with a ds of 6 gives the solution in equation 7 31 steps 0 128 6 382 6 15 51 17 82 7 The result of equation 7 is 17 82 steps which the board would round to 18 steps This result of 17 82 would then be checked with the Matlab fuzzy calculation to verify for correctness The Matlab fuzzy calculation is 17 8 steps and can be seen below in Figure 22 Since the code formulas gave approximately the same values as the Matlab fuzzy values the code was implemented i
36. his value is compared to the pressure reading on the data acquisition software as well The display pushbutton is pressed once more to show the valve position After completing the manual mode testing the next step is to test the auto mode functionality To set the system into auto mode the mode select pushbutton is held down for three seconds The auto mode LED should be lit and the control algorithm is initiated In auto mode the control reads the temperature and pressure calculates the saturated temperature from the pressure and calculates the current superheat value and the change in superheat from the previous reading After performing the appropriate measurements and calculations the control enters the data into the fuzzy control algorithm to determine the appropriate number of steps and the value of the proportional gain The control then 38 commutates the motor the calculated number of steps After commutating the control displays the temperature pressure saturation temperature superheat change in superheat the number of steps that the valve commutated and the valve position This display sequence is used to verify the fuzzy algorithm s functionality by comparing the displayed values to the values of temperature pressure and superheat of the system from the data acquisition system in the lab Auto mode will loop indefinitely keeping the system to a user specified superheat set point even with the addition of a disturbance to the
37. ified range code Est S ss o o o o Calculate correct response to Yes hand calculations were Fuzzy Control inputs performed to verif 36 Summary of the Testing Procedure Below is a summary of the testing procedure that was followed during the testing at WaterFurnace A detailed description of the testing procedure follows 1 Power on the switching power supply and the control board 2 Verify that all of the segments of the three digit display are activating during the reset process and that the valve is calibrating by checking the oscilloscope 3 Test the up and down pushbuttons and verify that the push buttons are commutating the valve by monitoring the oscilloscope 4 Test the display mode LEDs and the display push button by pressing it to scroll through the pressure valve position and temperature readings on the three digit display While doing this make sure that the temperature and pressure values are corresponding to those on the laboratory data acquisition system 5 Verify that the mode select pushbutton is operating properly by depressing it for 3 seconds to place the control in auto mode Note that the auto mode LED illuminates 6 Monitor the display to verify that the control algorithm is indeed functioning and verify this with the readings from the data acquisition system 7 Once the system has reached steady state at the desired set point introduce a severe disturbance into the system Monitor the di
38. igure 11 The circuits required to interface the pressure sensor and the temperature sensor to the ports of the microcontroller as well as protect against electrostatic discharge are shown in Figure 9 and Figure 10 respectively 20 VCC VCC PS1 PRESSURE 5VDC gt D12 SENSOR To Port A7 Figure 9 Pressure Sensor Schematic VCC To Port A6 THERMISTER 10K NTC Figure 10 Temperature Sensor Schematic 21 XCK TO PBO O 1 PAO ADCO T1 PB1 O 2 PA1 ADC1 INT2 AINO PB2 O 3 PA2 ADC2 OCO AIN1 PB3 C 4 PA3 ADC3 SS PB4 CS PA4 ADC4 MOSI PB5 O 6 PAS ADC5 MISO PB6 E 7 PAS ADC6 SCK PB7 O 8 PAT ADCT RESET AREF VCC GND GND AVCC XTAL2 PCT TOSC2 XTAL1 PC6 TOSC1 RXD PDO PC5 TDI TXD PD1 PC4 TDO INTO PD2 PC3 TMS INT1 PD3 PC2 TCK OC1B PD4 PC1 SDA OC1A PDS PCO SCL ICP1 PD6 PD7 OC2 Figure 11 Connection of the Thermistor and Pressure Sensor The push buttons were connected to pins 0 1 3 and 4 of Port B to allow the user to select the mode manually move the valve up or down and display either the valve position temperature or pressure Figure 12 below shows the connection of the pushbuttons to the microcontroller XCK TO PBO E 1 PAO ADCO T1 PB1 O 2 PA1 ADC1 INT2 AINO PB2 O 3 PA2 ADC2 OCO AIN1 PB3 E 4 PA3 ADC3 SS PB4 O 5 PA4 ADC4 MOSI PB5 O 6 PAS ADC5 MISO PB6 O 7 PA6 ADC6 SCK PB7 O 8 PA7 ADC7
39. ill stops the output voltage to the motor void comp chk initializes compressor check functtion void night time initializes sleep function ISR INT2 vect Interrupt service routine for INT2 comp 1 calibration auto mode int main TCCRIB 1 lt lt CS10 1 CS11 Set up timer at Fcpu 1024 PORT DEFINITIONS DDRA OxOF sets direction of PORTA pins 1 outputs 0 input DDRB OxE0 sets direction of PORTB pins 1 outputs 0 input DDRC OxFF sets direction of PORTC pins l outputs O input DDRD OxFF sets direction of PORTD pins l outputs O input PORTC 0x00 set the steppers outs low PORTB _BV 0 Enable pull up for pin 0 COMPRESSOR ON PORTB BV 1 Enable pull up for pin 1 DISPLAY button PORTB _BV 0 Enable pull up for pin 2 MODE button PORTB _BV 3 Enable pull up for pin 3 STEP UP button PORTB _BV 4 Enable pull up for pin 4 STEP DOWN button PORTB _BV 7 Enable pull up for pin 4 STEP DOWN button AM Add aa a a c eo PORTA 0x01 make all pins HIGH PORTA 11111111 make all pins LOW PORTA 00000000 delay ms flash 1 second delay calibration calls calibrate function for the EEV disp change 60 194 while 1 195 196 manual mode enters MANUAL MODE function 197 auto mode entera auto mode function 198
40. ing Results The control was tested with a 3 ton geothermal heat pump system to ensure all of the design requirements were being met This was done by interfacing the temperature and pressure sensors at state point 4 Figure 28 Using the control board in auto mode the EEV will commutate as an attempt to regulate superheat The readings of temperature pressure and superheat are displayed on the 7 segment LEDs on the board These readings are then compared to values on WaterFurnace s lab equipment The superheat values as well as the time it take to reach 10 F 2 F are recorded and evaluated This was done for a variety of testing Test 1 Normal operation Test 2 Operation with a change in coax inlet water temperature Disturbance 1 Test 3 Operation with a mode switch Disturbance 2 Test 4 Change in superheat set point Test 5 Comparison of EEV with TXV Each of the system tests were done at WaterFurnace s development lab using a variety of equipment The temperature and pressure was monitored at state points 1 through 4 Figure 28 and displayed using data acquisition software The unit shown in Figure 29 was connected to an airflow chamber using ductwork The development laboratory allows an implementation of real world conditions to be simulated such as air temperature humidity static pressure and water flow rate and temperature at the inlet of the coax Entering and leaving water to the coax is shown in Figure 30 Air
41. m D D D co U U UI N e 99 00 01 02 03 04 05 06 07 08 09 ES vo Oo JO OD Air case 2 case 3 case 4 case 5 case 6 case 7 PORTC case 8 PORTC delay ms 15 break PORTC amp _BV 3 PORTC amp _BV 2 PORTC _BV 1 PORTC BV 0 break PORTC amp BV 3 PORTC BV 1 PORTC amp BV 2 PORTC amp BV 0 break PORTC amp _BV 3 PORTC BV 1 PORTC _BV 2 PORTC amp _BV 0 break PORTC amp BV 3 PORTC BV 2 PORTC amp _BV 1 PORTC amp _BV 0 break PORTC _BV 3 PORTC _BV 2 PORTC amp _BV 1 PORTC amp _BV 0 break _BV 3 PORTC amp _BV 2 PORTC amp _BV 1 PORTC amp _BV 0 break _BV 3 PORTC amp BV 2 PORTC amp BV 1 PORTC BV 0 break Can be changed void kill PORTC amp 0xF0 routine for the valve This delay MUST be here It provides the delay between Kills all output to the motor This function provides the calibration 65 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 54 54 54 54 54 54 54 54 54 54 550 251 552 553 554 555 556 597 558 559 560 561 562 563 564 565 566 567 568 569 570 53 e o JOS 01 5 Q0 Po S VO void calibration PORTC OxEO0 shows on the 3 digit display PORTD OxEE shows
42. m the sensors Once the values have been returned to the disp change function the value of variable displaya determines which value is displayed on the three digit display The value of displaya is incremented for the next time that disp change is called and the function returns to where it was called from press a2d amp read press adc Lines 634 655 The press a2d andthe read press adc functions are also vital to the functionality of the controller These functions read and calculate the pressure of the refrigerant which then results in the value of the saturated temperature of the refrigerant When the press a2d function is called the microcontroller first writes the values needed to the ADCSRA register and the ADMUX register to enable the analog to digital conversion The read press adc function is then called The value to start the analog to digital conversion is written to the ADCSRA register and the conversion 30 begins The while ADCSRA amp 0x40 waits for the conversion to complete and then combines the resulting values from the conversion and returns to the press a2d function The press a2d function then converts the value from the analog to digital conversion represented by the variable num to a pressure which is represented by the variable pressint This value is then later used in the fuzzy control algorithm in the temp lookup function to calculate the temperature of the superheat temp a2d amp read
43. nto the board Rule Viewer EEVControl SEE File Edit view Options Superheat 15 Int superheat 0 Step 17 8 WOON MH EM d CO 3 E LLI LLLI a LLL ENO E E eech Lg Kegel A Le tege a LS LS Leg ieren Esses Opened system pe cure air EE 25 rules Core JL cs Figure 22 Matlab fuzzy step calculator To see if the board would make the correct step adjustments to the valve two tests were set up to be run in the IPFW lab A voltage was supplied to simulate a set temperature and another voltage was adjusted to simulate different pressures The two tests can be seen in Table 8 and 9 The hand calculated values were done in the same manner as described above for example line 1 in Table 8 would fall under line 1039 of the code in appendix A 32 Table 8 Fuzzy calculation test 1 Hand Picked and Calculated Values Board Response Superheat dt 2 steps Steps 30 0 25 14 12 10 4 0 QN nN A JU IN Hand Picked and Calculated Values Board Response Superheat dt 2 steps Steps 4 0 7 Sn HR JW IN The set temperatures and pressures in these two tests were based on common operating tests done at WaterFurnace Since the board s step response matched the calculated step values the test was consider successful Note that the negative step
44. o S Co ne VO 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 Lire PORT PORT PORT PORT PORT PORT PORT PORT PORT PORT ele Ms Bes Ms Ms ec ere ll if leds gt 0 leds 100 b leds 100 10 c leds 100 10 if leds lt 0 leds leds a 14 b 1eds 100 10 c leds 100 10 PORTD a lt lt 4 PORTD b PORTC c lt lt 4 return PORTD a lt lt 4 PORTD b PORTC c lt lt 4 button to be pressed 368 369 370 3 41 372 void scan up if bit is clear PINB delay ms man delay avoid artificial presses 373 374 375 376 377 378 379 if bit_is_clear PINB 3 breaks the integer value into 100 s 10 s converts a negative number into a positive sets the 100 s digit to a negative sign outputs the values to the displays outputs the values to the displays This function checks for the UP This is the debouncing time to 3 _delay_ms 15 state state value 380 381 382 383 384 385 386 387 valve_pos state 1 commutate valve_pos 1 Changes the state value commutates the motor to the new Changes the valve position value if valve_pos gt 480 valve_pos 480 limits the display to 480 63 388 389 390 391 392 393 394 395 396 397 398 399 4
45. on sheet that states resistances with corresponding temperatures Table 2 shows the three temperatures and resistances that were taken from the NTC thermistor datasheet to calculate C1 C2 and C3 Table 2 Resistance values for corresponding TNTC temperature according to the data sheet 32 F 326500 Using these three resistance and temperature values equation 3 has three equations and three unknowns The results are the following coefficients C1 8 83065 x 10 C2 0 000233949 C3 0 001130279 A laboratory experiment was used to validate equation 3 with the above coefficients This experiment was performed using a T type thermocouple and reader to measure temperature and an Ohmmeter to measure resistance A beaker was placed on a hot plate with the NTC thermistor and thermocouple in a water bath The temperature was incremented until a rolling boil was achieved Resistance readings were taken as the water was heated Table 3 shows the temperature readings from the thermocouple Actual column and the readings achieved from using equation 3 The equation 3 resistance values were obtained by using resistance values from the ohmmeter The delta column is the difference between the actual thermocouple readings and the NTC readings The deltas were small enough to validate equation 3 for use in the control algorithm The temperature readings were also validated with WaterFurnace s lab equipment during testing The data re
46. on the 3 digit display PORTA 1 lt lt 0 make the RUNNING LED turn ON state 0 while i lt cali_up loop opens the valve past 480 commutate _delay_ms delay state state 1 if state 9 i itl valve_pos i 8 1 60 state 8 while cali down lt i calibrate down to valve position 240 commutate _delay_ms delay state state 1 if state 0 was 0 i i 1 valve pos i 8 dec2bcd valve pos This function changes the display between valve position temperature and pressure 572 213 574 5 25 void disp change if bit is clear PINB 1 Checks for the DISPLAY button to be pressed 576 SEL 578 579 580 581 582 583 584 585 586 587 588 delay ms man delay if bit is clear PINB 1 time 0 temp_a2d Obtains a new temperature value press_a2d Obtains a new pressure value temp lookup Calculates a new saturated temperature from the pressure 66 589 590 591 592 position 593 594 595 596 597 598 599 600 601 602 603 604 pressure value 605 606 607 608 609 OCT o OO OO Oh On On 0 JOS OG Air 8 e D w On 9 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 ADC to an integer 635 636 637 638 639 64 64 0 1 void press_a2d emperature value ADCSRA 0x80 ADMUX num read_press_adc pr
47. one pressure transducer and one temperature sensor at state point 4 Figure 1 This allows for a superheat calculation to be performed at state point 4 in both heating and cooling mode The superheat can be calculated by using the saturated temperature that corresponds to the pressure at state point 4 Tsat and subtracting it from the actual temperature negative temperature coefficient Thermistor reading at state point 4 Twrc As the superheat temperature going into the compressor changes the control system will be able to adjust the expansion valve so that the superheat stays in the 10 F 2 F range Air Coil Reversing Valve Compressor Figure 1 a Geothermal Heat Pump Schematic in Heating Mode Air Coil Reversing Valve Compressor Figure 1 b Geothermal Heat Pump Schematic in Cooling Mode Modifications to Selected Design At the end of the design phase and during the building phase it was realized that the original design required some modifications Many of these modifications were discovered during the laboratory testing phase and included both hardware and software changes These changes were necessary for the following reasons Ability to have better control of the system Limited memory space on microcontroller System response and settling time More accurate calculations of temperature pressure and superheat Time constraints Cost considerations Sponsor demands One of the original main goals of thi
48. only called out an automatic mode Table 1 Variable gains and sample time parameters 11 Section II Description of the Build Process Mechanical Build The two main mechanical components are the pressure transducer and the negative temperature coefficient NTC thermistor The pressure transducer and NTC thermistor are used to calculate the pressure and temperature at the inlet of the compressor respectfully The NTC thermistor is a temperature dependent resistive element that can be used to measure temperature via its resistance Figure 2 shows the exact location of these devices in the heat pump system As stated above the pressure at the inlet of the compressor is used to calculate the saturation pressure of the refrigerant That temperature is then subtracted from the NTC calculated temperature to yield the superheat temperature This can be written as Tou Type T 2 Compressor Figure 2 Location of pressure and temperature sensor 13 Temperature Sensing The NTC temperature sensor used was a 10KO type The resistance of the Thermistor is related to the temperature According to ILX Lightwave the relationship of the temperature to the resistance can be expressed as por cie c2m 8 c3 amp 27345 3 Equation 3 has three coefficients of C1 C2 and C3 These coefficients can be calculated if three resistances R are known for three different temperatures WaterFurnace provided the specificati
49. plement the controller by use of a decision matrix with weighted values After the design selection procedure was completed a final design and a backup design were selected The final design that was constructed consisted of a microcontroller based board loaded with a control algorithm and interfaced with one pressure sensor and one temperature sensor The control algorithm then took the information that the microcontroller obtained from the pressure and temperature sensor and adjusted the valve accordingly to control the amount of superheat To show that the final design operated as specified a final stage of testing was planned The final design was taken to WaterFurnace and was tested The control board was connected to the same unit from the initial testing and data was collected Two types of tests were used to show that the controller worked One that demonstrated that the controller could bring the superheat to the desired point and maintain it and the other demonstrated that the controller could maintain the desired superheat when the system was introduced to disturbances The results of this testing showed that the control board was able to control the valve and bring down the superheat or bring up to the desired level and maintain it there Section I Selected Conceptual Design Selected Design The selected conceptual design chosen has a two sensor layout with a microcontroller and algorithm to control the system This design utilizes
50. quation 4 shows the relationship between voltage and psig The pressure sensor outputs a voltage between 0 5 and 4 5VDC but the ADC port on the microcontroller uses 5V as a reference voltage so the valid ADC range is 102 to 922 Table 4 shows a sample of the ADC psig voltage relationship d ae NV 4 725 psig psig Table 4 Pressure ADC psig voltage relationship 10 bit ADC ADC PSIG VOLTAGE 102 0 000 0 498 103 0 884 0 503 104 1 768 0 508 919 722 348 4 487 920 723 232 4 492 921 724 116 4 497 922 725 000 4 502 From the table the equation for the pressure was constructed P 0 885 ADC 102 5 where ADC is the value the microcontroller reads and P is gage pressure at state point 4 A dead weight tester is then used to validate equation 5 calculated from the manufactures given parameters This was done by mounting the pressure transducer to the dead weight tester Weight plates are then placed on a known area to apply a known pressure to the transducer Figure 4 shows the results of the dead weight tester experiment plotted with values the manufacture provided The experimental values appeared to deviate from the line shown in Figure 4 This occurred by applying too much voltage to the transducer while testing with the dead weight tester It was later determined at WaterFurnace s lab that equation 5 was sufficient for calculating pressure 16 from output voltage As
51. re of the refrigerant It was later discovered that since the pressure range of the transducer was so large 725 psi that a very large table was needed to retain an accurate resolution This table put the software at 20 over the available memory A third order polynomial was fit to the data table in Excel The polynomial fit was accurate to better than 1 error between the tabulated value This reduced the size of the data partition of the code greatly One of the major hardware changes from the original design is the power supply on the EEV control board The power input from the main system controller is 24 VAC which is too high for the EEV control board A stable12 VDC needs to be supplied in order for it to function properly The original design for the power supply consisted of two linear voltage regulators one for the 12VDC for the motor and three digit display and one for the 5VDC for the microcontroller sensors and other peripherals The power dissipated in the two voltage regulators was too high and resulted in wasted power A more efficient switching power supply was designed to provide the 12 VDC A switching power supply is based around an integrated circuit that switches the input voltage on and off at a high frequency to an output pin where an inductor is connected Using the relationship of the voltage across an inductor Equation 1 as the current is switched on and off the inductor holds the voltage at a constant level SE ind
52. s determined that one temperature sensor and one pressure sensor can be used to determine the superheat at the inlet of the compressor It was also determined that fuzzy control is a valid method for maintaining a superheat in a geothermal system The design change to a development board will help WaterFurnace with future endeavors The EEV control board is virtually plug and play meaning many different combinations of sensors can be interface with the microcontroller The board is stand alone meaning it can be easily added to a current geothermal system to implement an EEV Maintaining the design superheat range allows for more efficient compressors to be used further increasing a geothermal systems payback period The result to the end user is lower energy bills and an increase in the amount of comfort This is the only know EEV control board in the industry which could mean a large earning potential for WaterFurnace The company would have an edge on the market for higher efficiency units and could even market and sell the EEV controller to other companies in non competing heating and air conditioning areas Both WaterFurnace and the group were impressed with the end result of this project 53 References Gookin Dan C All In One Desk Reference For Dummies Indianapolis Wiley Publishing Inc 2004 ILX Lightwave Corporation NTC Thermistor Calibration 2003 lt http www ilxlightwave com appnotes thermistor_calibration_steinhart
53. s less than one then it is set to 8 in order to decrement the value over for the next cycle through the states If state is greater than 8 then the value of state is set to 1 in order to increment the value over the next cycle The microcontroller then enters the switch routine of the commutate function The value of the state variable determines what case is called for the commutation of the motor Each of the cases in the switch routine of the code corresponds to a portion of the commutation waveform shown in Figure 21 When one of these states is called the values for the pins of PortC are changed accordingly to output the voltage waveform to the motor As the 29 valve is opened or closed the value for the variable state will change each time and thus calling a different case and commutating the motor accordingly Once the commutation for the present state has been executed the microcontroller returns to the portion of the program that called the commutate function Figure 21 Required voltage pulse series for EEV stepper motor disp change Lines 570 631 The purpose of this function is to switch the values displayed on the three digit display between valve position pressure and temperature readings The function is executed during the manual mode loop The function monitors the DISPLAY pushbutton and if it detects a press the function calls temp a2d and press a2d to read the temperature and pressure values fro
54. s old steps 080 081 082 while steps gt 0 Commutates calculated number of steps 083 084 commutate 085 steps steps 1 086 valve pos valve pos 1 This needs previous line 087 dec2bcd valve pos 088 089 state state 1 090 091 092 while steps lt 0 Commutates calculated number of steps 093 094 commutate 095 steps steps 1 096 valve pos valve pos 1 This needs previous line 097 dec2bcd valve pos 098 099 state state 1 00 01 02 kill 03 04 05 dec2bcd tempint Displays debugging purposes 06 delay ms 5000 07 08 dec2bcd pressint Displays debugging purposes 09 delay ms 5000 10 11 dec2bcd Tsat Displays purposes 12 delay ms 5000 13 14 dec2bcd superheat Displays debugging purposes T5 delay ms 5000 32 ds 44 48 24 ds c AQ ID the motor the to be opposite sign as the motor the to be opposite sign as the temperature for the pressure for Tsat for debugging the superheat for 74 16 17 dec2bcd ds 18 _delay_ms 5000 19 20 dec2bcd steps_old debugging purposes 21 _delay_ms 5000 22 23 dec2bcd valve pos debugging purposes 24 25 26 Displays DS for debugging purposes Displays the number of steps for Displays the valve position for 75
55. s project was to provide WaterFurnace with a working prototype similar to what would be produced in production It was later decided by WaterFurnace to shift priorities They decided a development board would better suit their needs until they were ready for production A development board has features that make future design changes easier to implement Some of these features include e A socket design for a removable microcontroller e An increase in analog to digital ports for future sensor design layouts e Readable display that outputs pressure temperature superheat and other calculations it is programmed to display The addition of more analog to digital ports allows more methods of control in the future or to be used to improve the overall performance of the system The socket for the microcontroller is useful because it allows the microcontroller to be removed from the development board be programmed on the Atmel programming board and then placed back on the development board quickly The display offers the user the benefit of displaying three digit integer values such as temperature and pressure that can be used for debugging purposes This allows one to see if there are any issues with calculations or sensors Another change was using a curve fit equation to calculate saturation temperature at the inlet of the compressor It was originally thought that a look up table could be used in the control algorithm to find the saturation temperatu
56. se decoders required only four outputs from the microcontroller to drive the seven segments of a display reducing the microcontroller ports required from 21 to 12 The BCD decoders were connected to pins 4 5 6 and 7 on Port C and pins 0 through 7 on Port D to display the various numeric data from the microcontroller Figure 15 shows the connections to the microcontroller and Figure 16 shows the connections to the BCD decoders 23 XCK TO PBO O 1 PAO ADCO T1 PB1 O 2 PA1 ADC1 INT2 AINO PB2 O 3 PA2 ADC2 OCO AIN1 PB3 O 4 PA3 ADC3 SS PB4 r1 5 PA4 ADC4 MOSI PB5 O 6 PA5 ADC5 MISO PB6 E 7 PA6 ADC6 SCK PB7 O 8 PA7 ADC7 RESET O 9 AREF VCC GND GND AVCC XTAL2 PC7 TOSC2 XTAL1 PC6 TOSC1 RXD PDO PCS TDI TXD PD1 PC4 TDO INTO PD2 PC3 TMS INT1 PD3 PC2 TCK OC1B PD4 PC1 SDA OC1A PDS PCO SCL ICP1 PD6 C PD7 OC2 Figure 16 Seven Segment Displays Connected to the BCD Decoders 24 Power The power supplied by WaterFurnace s current control board is 24VAC This voltage is much too high for any of the circuitry to operate from In order to effectively convert the 24V AC to a stable 12VDC a rectifier and switching power supply was designed A switching power supply is an efficient means of performing step down DC to DC conversion The 24V AC is rectified to 34VDC using a bridge rectifier and an energy storing capacitor The switching power supply was designed to conver
57. splay and the data acquisition system to verify the control is responding to the disturbance Detailed Testing Procedure Description In order to obtain accurate and valid test results the heat pump system needs to be setup by WaterFurnace to their specified test parameters The room must be allowed to stabilize for a minimum of 15 minutes prior to testing to obtain initial readings of the system Before the testing begins 24V AC must be applied to the input of the switching power supply and the development board should then be turned on The first test is to download the code to the microcontroller through the programming interface software AVR Studio to make sure that the microcontroller is functioning properly Once the functionality of the microcontroller is verified the other components of the controller can be tested At the startup of the controller all of the LEDs and the three digit display are tested to verify proper connectivity in the circuit The second procedure that the controller executes is the calibration of the stepper motor The controller commands the stepper motor to move past its maximum opening position 480 to verify that the valve is completely open before commanding the motor to close to its mid point 240 An oscilloscope voltage probe is attached to the input of each motor inputs and the voltage waveform is monitored to verify that the motor is commutating To ensure that the calibration routine behaves as expected
58. t the rectified 24V AC into 12VDC and be able to deliver up to 1 5A of current continuously A 5VDC linear voltage regulator was connected to the 12VDC bus to provide stable 5VDC that the microcontroller and pressure sensor require The 12VDC switching power supply is used to supply the voltage to the BCD decoders the Darlington drivers and the stepper motor The circuit in Figure 17 shows the schematic of the 12VDC switching power supply Input Output Figure 17 5VDC Voltage Regulator Vi 8V to 55V o C 7 2 L1 220uF 220nF S 126uH GON Es 77120 Ra De7IN749A Figure 18 12VDC Switching Supply Electrical Software The other facet of the electrical design is the software The software is downloaded into the microcontroller and controls the functionality of the entire control The software was written in the C programming language and compiled and developed in Atmel s software development environment AVR Studio A screenshot of this program can be seen in Figure 19 AVR Studio connects to the Atmel STK500 development 25 board Figure 20 through an RS232 serial cable AVR Studio checks the code for errors compiles the code and then communicates with the microcontroller to download the machine code to it ings dcde7556 top WF Testing Wil B Ele Project Build Edt view Tools Debug Window Help iD gd o x Sm CEIA A _G00D_4 5 c SETIEN S632 E SS E Trace Disabled SS o de TO ia
59. temp adc Lines 660 693 The temp a2d and the read temp adc functions are vital to the operation of the controller These two functions read and calculate the temperature of the refrigerant When the temp a2d function is called the microcontroller first writes the values needed to the ADCSRA register and the ADMUX register to enable the analog to digital conversion The read temp adc function is then called The value to start the analog to digital conversion is written to the ADCSRA register and the conversion begins The while ADCSRA amp 0x40 loop waits for the conversion to complete and then combines the resulting values from the conversion and returns to the temp a2d function The temp a2d function converts the value from the analog to digital conversion to the corresponding resistance of the thermistor represented by the variable Rt This value of Rt is then passed through a series of calculations that convert the final temperature to degrees Fahrenheit and store it as variable tempint The microcontroller then returns to the portion of the program that called this function with the temperature of the conversion stored as tempint fuzzy Lines 783 1186 The main objective of the fuzzy code is to calculate the valve steps in such a way that will allow the valve to open very quickly if the set point is really far from the current superheat As the current superheat approaches the set point the fuzzy code will calculate muc
60. trol This function is executed when the MODE button is pressed from manual mode This function checks for the compressor signal and if the compressor signal is not present the compressor check function comp chk is executed If the compressor signal is present the control waits three seconds before calling the fuzzy algorithm control function fuzzy to execute the necessary functions this process repeats until the compressor turns off or the user causes it to enter manual mode dec2bcd Lines 316 399 This function controls the output to the three digit seven segment LED display The main purpose of this function is to convert an integer value into three individual digits that can be displayed on each of the seven segment LEDs This function uses division and modulus mathematics to separate the hundreds tens and ones values of the integer and then displays each of them on the appropriate digit on the display scan_up amp scan_down Lines 367 425 The purpose of these functions is to monitor the UP and DOWN pushbuttons commutate the motor and update the valve position on the display one step up or down when pressed These functions also make use of software debouncing to prevent false readings from the buttons commutate Lines 427 509 This function is called whenever the motor is required to move When this function is called the first thing that the microcontroller checks is the present value of the variable state If state i
61. uctor dt 1 Another major hardware change is the conversion to an Atmel microcontroller The original microcontroller chosen was a Silicon Labs 8051 based microcontroller However WaterFurnace expressed a desire to use an Atmel microcontroller After investigating several different Atmel microcontrollers the ATMegal6 was chosen This microcontroller was chosen due to its peripheral set and flash memory space The main software change was the implementation of a variable step gain and a variable time delay These parameters work simultaneously to decrease the amount of time the system takes to get to the design superheat temperature The number of motor commutations or steps is changed and the time between temperature and pressure acquisitions is altered depending on the change in superheat Table 1 highlights the variable gain and acquisition delay The value signifies the time between temperature and pressure acquisitions for superheat calculation The symbol A signifies 10 the magnitude of the design set point of superheat subtracted from the calculated superheat The letter k symbolizes the step gain For example if the fuzzy algorithm was to return a step value of 20 and the k value was 2 the motor would commutate 40 20 2 40 steps It should also be noted that a manual mode interface was included in the software and used to operate the valve using push buttons This was also a change from the original design which
62. utes faster than the TXV 48 Superheat deg F 30 25 20 15 10 t Be e B Be Ea Tum 7 O EEV m e Ug e BTXV a E a Eu gy Es no ag nuno geet Em 0 100 200 300 400 500 600 700 800 Time sec Figure 35 TXV vs EEV comparison 49 Section IV Evaluation and Recommendations Evaluation and Recommendations After completing the testing and reviewing the data from the testing the project can be considered a success The Controller was able to bring the superheat to the desired set point of 10 F 2 F and maintain it there A recommendation to further improve the performance of the controller is to implement another variable gain in the fuzzy control algorithm to improve the controller when the superheat is at or near the desired set point This would lower the settling time of the controller when it is near the set point The user input and display interface operated according to the design specifications allowing the user to select the display mode move the valve position up or down in manual mode and switch between manual and automatic mode The pushbuttons provided an easy way for the user to control the position of the valve and gather the temperature pressure and position data A recommendation to provide the user with more control of the board in manual mode is to implement a method of allowing the user to calibrate the valve when desire
63. values mean that the valve was closing and positives values correspond to the valve opening Also a stepper motor with an exposed gear was used so that the movement could be observed The fuzzy control algorithm was tuned after each round of testing at WaterFurnace The latest embodiment of the algorithm boasts an adaptive gain feature that provides a quick transition to the set point free of oscillation or overshoot overshoot of the set point was discouraged by WaterFurnace These variable gain values were described in Table 1 comp_chk Lines 706 764 The purpose of this function is to check for a signal from the compressor If the compressor is not sending a signal to the control board the control will enter a power saving mode Otherwise the function will set the variable comp to 1 and the return to the location where the function was called 33 night time Lines 765 782 This function is used in the controller to save power when the compressor has been off for a period of time and is called from the comp chk function This function enables power saving mode and enables external interrupts before entering a low power state This particular mode shuts down the microcontroller to the minimal power consumption until the compressor comes back on executing an external interrupt to the sleep mode Once this external interrupt has been received the system enters main and resumes operation 34 Section III Testing Testing P
Download Pdf Manuals
Related Search
Related Contents
Jensen JE2608 User's Manual Copyright © All rights reserved.
Failed to retrieve file