02-17-15, 07:55 PM | #21 |
Master EcoRenovator
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
|
Mike, Is this a good EEV?
http://www.emersonclimate.com/Docume...d-Electric.pdf PID with PWM for 6sec. for the above EEV looks pretty easy. Use a SSR that can withstand millions of cycles. I also stole this code: Code:
/******************************************************** * Arduino PID Relay Output Example * The output is going to digital pin 6 which is controlling * a relay. * The current temperature, PSI etc............ is read via pin A0 * * The pid Library is designed to only output an analog value, * but the relay can only be On/Off. * * To connect them together we use "time proportioning control" * It's a really a long duration version of Pulse Width Modulation (PWM). * First we decide on a window size (6000mS say.) 6 seconds * We then set the pid to adjust its output between 0 and that window size. * Lastly, we add some logic that translates the PID * output into "Relay On Time" with the remainder of the * window being "Relay Off Time" ********************************************************/ #include <PID_v1.h> #define RelayPin 6 //D6 #define T_pin A0 //A0 //Define Variables we'll be connecting to double Setpoint, Input, Output; //Define the Tuning Parameters double Kp=2, Ki=5, Kd=1; //Specify the PID links PID myPID(&Input, &Output, &Setpoint, Kp, Ki, Kd, DIRECT); int WindowSize = 6000; //6 sec unsigned long windowStartTime; void setup() { windowStartTime = millis(); //get current time Setpoint = 100; //Desired Temperature, PSI, etc................ //tell the PID to range between 0 and the full window size myPID.SetOutputLimits(0, WindowSize); //turn the PID on myPID.SetMode(AUTOMATIC); } void loop() { Input = analogRead(T_pin); //Pass current temperature as Input to PID myPID.Compute(); unsigned long now = millis(); //get now time if(now - windowStartTime > WindowSize) { //time to shift the Relay Window windowStartTime += WindowSize; } if(Output > now - windowStartTime) digitalWrite(RelayPin,HIGH); //ON else digitalWrite(RelayPin,LOW); //OFF } |
02-17-15, 08:24 PM | #22 |
Master EcoRenovator
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
|
This is the one I have with me now, the SER-B.
I was looking into using some chinese ones like BradC was but haven't gotten around to it yet. |
02-17-15, 08:29 PM | #23 | |
Master EcoRenovator
Join Date: Aug 2012
Location: Toronto
Posts: 958
Thanks: 40
Thanked 158 Times in 150 Posts
|
Quote:
|
|
02-18-15, 11:48 AM | #24 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Quote:
Tell me more about what you have in mind for the EEV? -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
|
02-18-15, 11:58 AM | #25 |
Master EcoRenovator
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
|
"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 ? |
02-18-15, 12:05 PM | #26 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Quote:
-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
|
The Following User Says Thank You to AC_Hacker For This Useful Post: | buffalobillpatrick (02-18-15) |
02-18-15, 12:25 PM | #27 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
BBP,
Thanks for the thanks, but I am asking you if you did a look-up table? Reason is that I crafted a single formula that will generate the R-290 P-T table, precisely, no need to interpolate. One line of code, no table. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
02-18-15, 12:28 PM | #28 |
Master EcoRenovator
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
|
Please share that line of code!
Yes Look-up table sort-of I looked at the table: HC-290 (PROPANE) PRESSURE - TEMPERATURE CHART and entered the table data into the array in function: float calc_R290_Saturated_Temp(float PSI, int Which_sensor) Code:
//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}; |
02-18-15, 12:32 PM | #29 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
OK, if you need to economize on code or get more precise, let me know.
In other words, what happens to 31psi, 32psi, 33psi, 34psi, 35psi, 36psi, (and all the fractional pressures in between), etc. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
02-18-15, 12:41 PM | #30 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
OK, I will.
It won't take too long, but I need to do some mandolin practice right now, got a gig coming up and I need to do some preparation. I'll have the formula for you sometime later in the day (I need to re-create it). Best, -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
The Following User Says Thank You to AC_Hacker For This Useful Post: | buffalobillpatrick (02-18-15) |
|
|