EcoRenovator  

Go Back   EcoRenovator > Improvements > Geothermal & Heat Pumps
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts


Reply
 
Thread Tools Display Modes
Old 02-18-15, 12:45 PM   #31
buffalobillpatrick
Master EcoRenovator
 
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
Default

I convert function input parameter "float PSI" into array index:

//convert PSI to array index
work = ((PSI - 30.0) / 10.0);

I = work; //drop decimals to get array index,
//I is an int (whole number) work is a float (decimals)



I use the decimal portion to interpolate between array elements:

decimals = work - I; //restore decimals for interpolation between array points

Val = R290_Saturation_Temp[I]; //get array value
Next_val = R290_Saturation_Temp[I+1]; //get Next array value

Span = Next_val - Val; //Calc Span

Saturation_Temp = Val + (Span * decimals);//interpolate between array points




Code:
float calc_R290_Saturated_Temp(float PSI, int Which_sensor)
{ 

//Array element [0]  contains Saturation_Temp *F for 30PSI,
//Array element [1]  contains Saturation_Temp *F for 40PSI,...................>
//Array element [27] contains Saturation_Temp *F for 300PSI,
//Array element [28] contains Saturation_Temp *F for 310PSI


float R290_Saturation_Temp[] = 
     {7.93, 18.80, 28.42, 36.91, 44.59, 51.63, 58.13, 64.21, 69.90, 75.27, 
      80.35, 85.18, 89.78, 94.19, 98.41, 102.50, 106.40, 110.20, 113.80, 
      117.30, 120.80, 124.10, 127.30, 130.40, 133.50, 136.50, 139.40, 142.20, 
      145.00};


float Val, Next_val, Span, Saturation_Temp, decimals, work, low, hi; 

int I;

  if (Which_sensor == Sensor_150){ low = 30.0; hi = 150.0; }
  else{ /*Sensor_300*/             low = 60.0; hi = 300.0; }
  
  if ((PSI >= low) && (PSI <= hi)) //Bounds check
  {
  // in bounds, continue
  
  //convert PSI to array index
  work = ((PSI - 30.0) / 10.0);
  
  I = work;          //drop decimals to get array index
                         //I is an int (whole number) work is a float (contains decimals)

  decimals = work - I; //restore decimals for interpolation between array points  
  
  Val = R290_Saturation_Temp[I];           //get array value
  Next_val = R290_Saturation_Temp[I+1];    //get Next array value
  
  Span = Next_val - Val;                   //Calc Span

  Saturation_Temp = Val + (Span * decimals);//interpolate between array points

  return (Saturation_Temp);        

  }  //end if in bounds
  
  else {return (-1);}       // error return, out of bounds 

}  // end calc_R290_Saturated_Temp

buffalobillpatrick is offline   Reply With Quote
Old 02-18-15, 01:00 PM   #32
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default PT Chart

BBP,

OK, it didn't take as long as I thought, I had saved data from before.

Here is the heart of the matter, if you need me to make it into a line of code, let me know.

Quote:
4th Degree Polynomial Fit: y=a+bx+cx^2+dx^3...
Coefficient Data:
a = -4.03085122205E+001
b = 1.81496452942E+000
c = -1.01201804003E-002
d = 3.05234258195E-005
e = -3.37963005786E-008
Right now, mandolin is calling me...

Best,

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
The Following User Says Thank You to AC_Hacker For This Useful Post:
buffalobillpatrick (02-18-15)
Old 02-18-15, 01:23 PM   #33
Mikesolar
Master EcoRenovator
 
Mikesolar's Avatar
 
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
Default

Quote:
Originally Posted by buffalobillpatrick View Post
"The Emerson EX2 pulse modulated electric valve is an electrically driven expansion valve that provides precise temperature control. It is designed for use with R-12, R-22,
R-134a, R-404A, R-407C and R-502 refrigerants. - See more at: http://www.emersonclimate.com/en-US/products/valves/expansion_valves/Pages/electronic_expansion_valve.aspx#sthash.AodE1Cgy.dp uf"

Did anyone read the link in post #21 ?
Yup, and I know it is made for liquid injection purposes. I haven't seen any reference to it being used as a main EEV. It needs the solenoid to activate it and it is a normally closed valve like most solenoid. Without power to it, it will be closed. Not what you want from an EEV but fine for injection.
Mikesolar is offline   Reply With Quote
The Following User Says Thank You to Mikesolar For This Useful Post:
buffalobillpatrick (02-18-15)
Old 02-18-15, 01:32 PM   #34
Mikesolar
Master EcoRenovator
 
Mikesolar's Avatar
 
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
Default

Quote:
Originally Posted by AC_Hacker View Post
Yep, EEV for HVAC must be stepper (or servo, which would be too expensive, with no added benefit).

Tell me more about what you have in mind for the EEV?

-AC
There is a way to control a heat pump based solely on subcooled liquid temp. I would like to try to make the EEV measure the subcooled temp just before it goes to the evap. The control only has to look at one internal temp (liquid line) and try to compare it to the outdoor ambient (and I am not sure this is necessary) to adjust the valve.
It is called a flooded evaporator.
Mikesolar is offline   Reply With Quote
Old 02-18-15, 01:40 PM   #35
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

BBP,

I haven't read every post here, but I think that you need an incrementally-variable EEV.

The PWM thingy wants square-wave input with varying duty cycle, in order to 'mimic' analog control.

I think that an incrementally variable (analog) valve would be better.

The EEVs I've seen use a little teeny stepper motor that turns the adjustment screw.


-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-18-15, 01:42 PM   #36
Mikesolar
Master EcoRenovator
 
Mikesolar's Avatar
 
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
Default

Quote:
Originally Posted by AC_Hacker View Post
BBP,

I haven't read every post here, but I think that you need an incrementally-variable EEV.

The PWM thingy wants square-wave input with varying duty cycle, in order to 'mimic' analog control.

I think that an incrementally variable (analog) valve would be better.

The EEVs I've seen use a little teeny stepper motor that turns the adjustment screw.


-AC
Yes, I have one in my hands. A Sporlan SER-B
Mikesolar is offline   Reply With Quote
Old 02-18-15, 01:45 PM   #37
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

Quote:
Originally Posted by Mikesolar View Post
Yes, I have one in my hands. A Sporlan SER-B
Then on with the show...

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-18-15, 01:47 PM   #38
Mikesolar
Master EcoRenovator
 
Mikesolar's Avatar
 
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
Default

Now to just get a program that will monitor subcooling and adjust the valve accordingly. It also has to open it a bit at start up till the temps settles.
Mikesolar is offline   Reply With Quote
Old 02-18-15, 02:01 PM   #39
buffalobillpatrick
Master EcoRenovator
 
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
Default

A/C did I get this right?

How did you come up with such an accurate formula??


Code:
float calc_R290_Saturated_Temp(float x)
{ 

float a = -4.03085122205E+001;
float b = 1.81496452942E+000;
float c = -1.01201804003E-002;
float d = 3.05234258195E-005;
float e = -3.37963005786E-008;

 return (a + (b * x) + (c * x*x) + (d * x*x*x) + (e * x*x*x*x));
       
}  // end calc_R290_Saturated_Temp
If so, either the formula or the table are off by a little bit.

OR Arduino floating point math is a bit in-accurate.
I would bet on this option, as Arduino does floating point by actually doing integer add operations.

This one line of code: y = ( a + (b * x) + (c * x*x) + (d * x*x*x) + (e * x*x*x*x));
Produces 348 bytes of Arduino object code.

At 30PSI: formula = 5.83*F, table = 7.93*F, difference = -2.1*F
At 300PSI: formula = 143.75*F, table = 142.2*F, difference = +1.55*F

Last edited by buffalobillpatrick; 02-18-15 at 07:08 PM..
buffalobillpatrick is offline   Reply With Quote
Old 02-18-15, 06:05 PM   #40
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

Here is your datasheet for the ex2. It seems to be a damped solenoid valve with a period of about 15 seconds from full shut to full on. A 6 second period on a pwm would not make it walk around much between pulses.

http://www.emersonclimate.com/europe...EX2__35016.pdf

The EX3 and up to EX8 are true stepper motor driven designs. All these EX series valves seem to be PRICEY, if they can be found.

jeff5may is offline   Reply With Quote
The Following User Says Thank You to jeff5may For This Useful Post:
buffalobillpatrick (02-18-15)
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design