07-09-14, 03:53 PM | #1 |
Helper EcoRenovator
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
|
Takyka's home made heatpump discussion
As the title says...
|
07-09-14, 07:37 PM | #2 |
Supreme EcoRenovator
|
Hello and thanks for opening this thread!
A recap: Dear All, This is my first post here. I follow the heatpump section of EcoRenovator forum with great interest. I have built an ASHP and I made an arduino based controller to it. Why I turn myself to be an active member is because I think, my experience and work on controlling a HP with arduino can be beneficial to you too. My heatpump is planned to be ground surce (Well2well), but because a HX failure and lack of funds to replace it I finish it as Air source. The compressor is a single phase rotary one. Evaporator flooding is controlled by EEV. I use R407C as refrigerant. Attached you can see my HP as water to water ready for pressure test. On second image the first test run (without the controller) as ASHP and on the 3rd picture you can see the controller circuit I designed. The contoller is based on Arduino mega, as the smaller boards has very limited resources for the features I'm planned to implement (pincount and memory). The concept for the electronics, to have all the low power things placed to the shield, power devices and special purpose electronics relegated off. Design goal was to made future expansion possible. Functions are the next: - 8ch 24V 350mA output ( UDN2987 for relays, valves etc.) - ethernet interface (ENC28J60) - bluetooth interface - serial interface - LCD interface (HMI) - 3 button input (HMI) capable to handle incremental encoder - 4 general purpose inputs for remote control (heating, cooling, DHV etc.) - 3 pulse counter inputs (waterflow1,2, power consumption) - 3 1wire bus (1 onboard, 2 external) - 2 3phase pwm control output / 6general purpose I/O (for AC motor direct or inverter control) - 1 stepper motor control output/ 4general purpose I/O (for EEV control) - 2 4-20mA input (pressure sensors) - 2 0-5V input (sw. differencial capable pressure sensor) - 2 LED outputs Not all functions are implemented in SW and I'm sure not all will ever be. :-) Currently the sw has the next functionalities: - WEB interface for diagnostics and status. - Bluetoot, USB, UDP(network) interface for setup and remote control - condenser and evaporator pressure measurement - heating water flow measurement - electric power consumption measurement - temperature measurement (1wire) for Evap air in/out, Evap refrigerant out, Condenser refrigerant in/out, Heating water in/out, compressor, suction port, high pressure port, electric cabinet. From the above data the sw calculates : - superheat, subcool, output power, and COP. - Starting, stopping procedure is controlled by configured timing and criterias. The sw. has built in error handling, for most measureable cases and recovers from error if possible. Configuration can be done via BT,USB,UDP from a terminal. The configuration is stored in eeprom. All timing and limit parameters are configurable. 1W devices can be added, removed and assigned to functions free via the user interface. Currently the EEV is controlled by a Dixell XEV22 controller, but I plan to get rid of it and implement the control in the Arduino later on. If you are interested, I'm open to make the design (HW & SW) available for non professional/ non commercial use to everybody. Sorry if it become too long, but I couldn't describe it shorter. :-) Br. Takyka. p.s. Also, sorry for my poor English, I hope, it's still understandable. The source code is available here. Last edited by jeff5may; 07-09-14 at 07:50 PM.. |
The Following 3 Users Say Thank You to jeff5may For This Useful Post: |
07-09-14, 08:25 PM | #3 |
Supreme EcoRenovator
|
Nice job! That system looks marvelous. How long did it take to get it up and running? It should have taken a long time.
Looking through the code and pictures, it looks as if most of the low-level functionality is handled by a handful of separate modules. The controller passes around variables and handles interrupts and what else? I'm very interested in how you sorted out what goes where. But first, a description of items in the pics is what the people want. I see you have 3 heat exchangers. Which one does what? Is that 80/20 channel you used for your frame? If so, I believe it's the first time I've seen it used on this forum. I wish they sold it at Home Despot, but it never will be: it was invented to save time and works like it should. Plus, it's just too expensive for Jack Leg Joe. You have obviously moved past the erector set level of thought. Last edited by jeff5may; 07-10-14 at 03:58 AM.. |
07-10-14, 04:20 AM | #4 |
Helper EcoRenovator
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
|
Hi,
I try to share all information you are asking for, but please be patient as I have limited time to spend here. I'm DIY addict, lot's of projects running at home paralel + family + my Job. Currently I implement passive cooling capability to the heatpump... Attached you can see sketch of my heatpump. The drawing mimics the real life layout. Difference currently I run with Air evaporator. For this I relocated the expansion valve to the outdoor unit. (it was a split AC) About the design, There is nothing special in my heat pump other than the internal BPHX to recover heat from condensed refigerant. The goal is to push the efficiency higher by rising evaporator work pressure with the stolen energy. The other attachment is a screenshoot of the status web page generated by my controller during a test run (I took the screenshoot from another forum, I posted it formerly.). I'm sorry, it's in hungarian, but here is some comment to it. 1st row is the status of control inputs. It shows, heating is on 2nd row is the (relay) outputs. Currently circulation pump, compressor, evaporator fan and EEV control is active. 3rd row about evap. pressure, superheat, cond. pressure, subcool. The values are marked green if value is in tolerance turns red if out of limit. 4-7 rows are the measured temperatures at different locations. (-99.00 means no sensor assigned) 8th row are mass flow(s) left value is the heating water flow rate. right one is the well water (not in use) 9th row is power. Elelctric consumption, actual heating power, well power, and COP. the last row is the error status. Well flow rate, heating flow rate, well water temperature, condenser pressure, superheat, compressor temperature, starting pressure difference, EEV error, output stage short circuit. The program masking out the unnecessary errors for the actual workstate, so the red signs here didn't stop operation. It is a future task to mask out meaningless errors on status page too. To be continued... T. Last edited by takyka; 07-10-14 at 12:39 PM.. |
07-10-14, 12:30 PM | #5 |
Helper EcoRenovator
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
|
menu and settings
The settings menu looks like here below. The commands I type is in red, the responses are black, comments are blue
? help "c <password>" enter config mode. "c <anything>" leave config mode "l 1w" list 1W devices "l input" list input states "l output" list output states "l settings" list operating settings "l net" list networking settings "l on" Display log messages "l off" Stop display log messages "a <bus nr.> <1W nr.> <function nr.>" assign 1W device to function "d <function nr.>" unlink 1w device from function "n <IP setting nr.>" <setting> set IP parameters "s <setting nr.> <value>" set parameters "r udn" reset UDN2987 output driver "reset!" do a sowtware reset l 1w List of 1W devices: Bus:0 1W bus number 00;28B0BFA704000088 20.44C 0; (0) Air in device number, serial, measuret temperature (if device support it) assigned function number, assigned function description 01;28328EA704000045 20.81C 2; (0) Air evap. gas 02;286AC6A70400001D 20.13C 7; (0) Condenser gas 03;282EC6A7040000B4 20.44C unassigned device 04;28AED4A7040000A1 20.75C 05;28055CA80400006A 20.81C 1; (0) Air out 06;284382A7040000CB 20.06C 13; (0) Suction temp 07;2857FEA704000000 19.25C 8; (0) Condenser liquid 08;285F8DA704000082 20.06C 09;28FFBDA70400005A 19.31C 9; (0) Heating water in Bus:1 no device on bus Bus:2 00;281239BB030000BD 24.63C 11; (2) Electric box Functions: 00; * Air in * means device assigned to function 01; * Air out 02; * Air evap. gas 03; Water evap. liquid 04; Water evap. gas 05; Well water in 06; Well water out 07; * Condenser gas 08; * Condenser liquid 09; * Heating water in 10; Heating Water out 11; * Electric box 12; Compressor 13; * Suction temp 14; Discharge temp a 0 3 10 assign command, bus number, device number, function number see above a 0 4 06 like above l1w list new 1w config List of 1W devices: Bus:0 00;28B0BFA704000088 20.44C 0; (0) Air in 01;28328EA704000045 20.81C 2; (0) Air evap. gas 02;286AC6A70400001D 20.13C 7; (0) Condenser gas 03;282EC6A7040000B4 20.38C 10; (0) Heating Water out this... 04;28AED4A7040000A1 20.75C 6; (0) Well water out and this added 05;28055CA80400006A 20.75C 1; (0) Air out 06;284382A7040000CB 20.06C 13; (0) Suction temp 07;2857FEA704000000 19.25C 8; (0) Condenser liquid 08;285F8DA704000082 20.06C 09;28FFBDA70400005A 19.31C 9; (0) Heating water in Bus:1 Bus:2 00;281239BB030000BD 24.69C 11; (2) Electric box Functions: 00; * Air in 01; * Air out 02; * Air evap. gas 03; Water evap. liquid 04; Water evap. gas 05; Well water in 06; * Well water out 07; * Condenser gas 08; * Condenser liquid 09; * Heating water in 10; * Heating Water out 11; * Electric box 12; Compressor 13; * Suction temp 14; Discharge temp li list inputs List inputs: Energy: 0 Heating: 0 DHV: 0 Cooling: 0 EEV Error: 0 Well flow: 0 Heat flow: 1 Condenser pressure A/D: 274 raw AD value Evaporator pressure1 A/D: 151 Evaporator pressure2 A/D: 587 4-20mA A/D: 0 UDN2987 driver fault: 0 lo list outputs List outputs: Well pump pwm: 0 Well pump run: 0 Battery on: 0 Heating circulation pump: 0 Compressor: 0 Air evaporator fan: 0 EEV: 0 OUT7: 0 OUT8: 1 UDN2987 driver enable: 1 lsettings Operating settings: 0; Maximum compressor restart rate (1/hour): 6 1; Compressor Start delay (s): 100 2; Error recovery delay (s): 300 3; Battery switch off delay (s): 300 4; Post heating circulation duration (s): 30 5; Pre heating circulation duration (s): 5 6; EEV error ignore time (s): 40 7; Well water flowrate heating(L/h): 500 8; Well water flowrate cooling(L/h): 300 9; Minimum well flowrate (L/h): 200 10; Minimum heating water flowrate (L/h): 300 11; Minimum well water discharge temperature (C): 4.0 12; Maximum condenser pressure (Bar): 24.0 13; Minimum superheat temperature (C): -4.0 14; Maximum superheat temperature (C): 30.0 15; Maximum compressor temperature (C): 100.0 16; Maximum starting pressure difference (Bar) 2.0 error: 13 this is the status word value errors are bitmapped lnet Networking settings: 00;IP address: 192.168.1.3 01;netmask: 255.255.255.0 02;gateway: 192.168.1.1 03;DNS server: 8.8.8.8 04;log server IP address: 192.168.1.1 05;UI port (UDP): 124 06;WEB port (TCP): 80 07;log server port: 2080 09; reset! ? "c <password>" enter config mode. "c <anything>" leave config mode "l 1w" list 1W devices "l input" list input states "l output" list output states "l settings" list operating settings "l net" list networking settings "l on" Display log messages "l off" Stop display log messages "a <bus nr.> <1W nr.> <function nr.>" assign 1W device to function "d <function nr.>" unlink 1w device from function "n <IP setting nr.>" <setting> set IP parameters "s <setting nr.> <value>" set parameters "r udn" reset UDN2987 output driver "reset!" do a sowtware reset lon Display log messages enabled. if event occures (error, command etc.)it is logged to screen with timestamp loff Display log messages disabled. ls Operating settings: 0; Maximum compressor restart rate (1/hour): 6 1; Compressor Start delay (s): 100 2; Error recovery delay (s): 300 3; Battery switch off delay (s): 300 4; Post heating circulation duration (s): 30 5; Pre heating circulation duration (s): 5 6; EEV error ignore time (s): 40 7; Well water flowrate heating(L/h): 500 8; Well water flowrate cooling(L/h): 300 9; Minimum well flowrate (L/h): 200 10; Minimum heating water flowrate (L/h): 300 11; Minimum well water discharge temperature (C): 4.0 12; Maximum condenser pressure (Bar): 24.0 13; Minimum superheat temperature (C): -4.0 14; Maximum superheat temperature (C): 30.0 15; Maximum compressor temperature (C): 100.0 16; Maximum starting pressure difference (Bar) 2.0 error: 13 s0 10 set option 0 to 10 (see above) Not in config mode! upsss, settings are password protected Prior to modify any settings please use "c <password>" to enter config mode. c 2135 the magic code Config mode ON s0 10 let's try again ls Operating settings: 0; Maximum compressor restart rate (1/hour): 10 1; Compressor Start delay (s): 100 2; Error recovery delay (s): 300 3; Battery switch off delay (s): 300 4; Post heating circulation duration (s): 30 5; Pre heating circulation duration (s): 5 6; EEV error ignore time (s): 40 7; Well water flowrate heating(L/h): 500 8; Well water flowrate cooling(L/h): 300 9; Minimum well flowrate (L/h): 200 10; Minimum heating water flowrate (L/h): 300 11; Minimum well water discharge temperature (C): 4.0 12; Maximum condenser pressure (Bar): 24.0 13; Minimum superheat temperature (C): -4.0 14; Maximum superheat temperature (C): 30.0 15; Maximum compressor temperature (C): 100.0 16; Maximum starting pressure difference (Bar) 2.0 error: 13 That's it. |
07-10-14, 08:36 PM | #6 |
Supreme EcoRenovator
|
Good lawwwwd, miss daisy! Now that's a menu. You definitely have all the bases covered in there. It makes me just want to jump in and swim around.
Seriously, this is an exhausting and thorough list some others will want to look at, and pick what parameters we should use for this little bitty uno stamp project. I may end up printing out this post as a quick reference as to what variables and states I need to keep track of. |
07-10-14, 09:40 PM | #7 |
Supreme EcoRenovator
|
I have another question I'm just dying to ask. How did you work out the menu to assign 1-wire devices to actual values in the controller?
|
07-11-14, 05:57 AM | #8 | |
Helper EcoRenovator
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
|
Quote:
What it does, - it searches for next 1w device in the given bus. - Prints to buffer the number & serial number - If no CRC error, it tries to read the temperature - prints the result to the buffer - It looks for matching serial number in eeprom repeatedly (eeprom address deterines the function the sensor assigned to. one sensor can be assigned to more functions) - If succes, it writes eeprom address to buffer, than digs out function name from array of function names - The resulting string is added to the buffer - the buffer is sent to the output Next functions are related too to 1W device management all in HMI.ino: (if you need detailed explanation on these too just let me know) listOwFunctions() unlinkOwFunctions() assignOwToFunction() 1w related commands are handled by commandInterpreter() function look down to line "case l:" for listing, "case a:" for assigning. When the process want to get a temperature for a given function, it looks for 1w device address (serial number) at a given eeprom location. locations are defined in globalvar.h currently at line 100-121 #define EEOWBUSADDR(a) #define EEOWADDR(b) ... #define AINADDR 0 #define AOUTADDR 1 #define AEVAPADDR 2 #define WEVAPLADDR 3 ... The function updateTemperatures() in basicfunctions.ino fills up a global array variable of temperatures. The indexes are the same like for the eeprom. I know, some has concerns with global variables, but it soooo effective. The updateTemperatures() is called every 300ms from loop() in heatpump.ino We need this buffering, because to get fresh temperature value from 1w devices takes ~700ms even if we want to read out the result of the last measurement takes significant time. So better is to do it once then use the buffered datas as frequently as convenient. T. |
|
07-12-14, 04:02 AM | #9 |
Supreme EcoRenovator
|
Brilliant! I have been considering different approaches in setting up a robust tracking and control structure, and I believe I will be doing what you are. With a global reference frame to read from and write to, the static size of the program becomes much smaller. Like a PLC, these AVR controllers are very good at fetching and delivering data, not so good at constructing complex data structures. Since speed and memory are limited, too much calculating and waiting for devices to respond can really slow them down.
Thank you so much for your insight into your system! I am working on developing a sketch this weekend, but not right now. I have to work half a day today (saturday). |
07-12-14, 08:18 AM | #10 |
Helper EcoRenovator
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
|
You are welcome,
Feel free to use any code or ideas from my code to your system. T. |
|
|