08-14-14, 05:42 PM | #191 | |
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... |
|
08-14-14, 05:48 PM | #192 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Arduino Simulator??
BTW,
What Arduino Simulator are you using?? Best, -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
08-14-14, 06:42 PM | #193 |
Master EcoRenovator
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
|
This works fine:
Code:
int Read_10K_NTC (int which_sensor) { #define sample_cnt 30 float alpha = 0.9; // factor to tune float average = 0.0; float steinhart; int I; // resistance at 25 degrees C #define THERMISTORNOMINAL 10000 // TEMP. for nominal resistance (almost always 25 C) #define TEMPERATURENOMINAL 25 // The beta coefficient of the thermistor (usually 3000-4000) #define BCOEFFICIENT 3892 // the value of the series resistor #define SERIESRESISTOR 10000 for (I=0; I< sample_cnt; I++) { average = alpha * analogRead(which_sensor) + (1-alpha) * average; delay(10); } // convert the value to resistance average = 1023 / average - 1; average = SERIESRESISTOR / average; steinhart = average / THERMISTORNOMINAL; // (R/Ro) steinhart = log(steinhart); // ln(R/Ro) steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro) steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To) steinhart = 1.0 / steinhart; // Invert steinhart -= 273.15; // convert to C return (round(steinhart * 1.8) + 32); // round to whole number // & convert to F } // end of Read_10K_NTC |
08-14-14, 08:07 PM | #194 |
Master EcoRenovator
Join Date: Mar 2014
Location: Florissant, Colorado
Posts: 599
Thanks: 814
Thanked 59 Times in 55 Posts
|
A/C is this code doing what you think needs done?
Why do anything in main void loop() if there is not a heat demand? Reading flows before pumps are started? I'm not a fan of "blocking delays" without checking for error conditions during custom delay. Lots of comments need to be added to explain: what is being done & why. I added this in code. //Got tired of counting zeros #define One_Sec 1000 #define Half_Min 30000 #define One_Min 60000 #define Two_Min 120000 #define Five_Min 300000 #define Ten_Min 600000 #define Thirty_Min 1800000 Last edited by buffalobillpatrick; 08-14-14 at 08:19 PM.. |
08-15-14, 12:20 AM | #195 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
I haven't tried the program with your new Thermistor routine yet.
What I'm interested in is simple reliable code for this version of the controller. First software versions are almost never perfect... We're all on the same team here. A robust controller will surely evolve. And, since we have chosen the most popular hardware platform on the planet, and are going Open Source with the software, even the best that we can possibly do will not be the last word... * * * BBP, I agree with the need for comments in the software, it'll help us with debugging. I'm really stoked about this project, I've waited years. I have searched the Internet and I have not found an Open Source Heat Pump Controller. As far as I can tell, we're breaking new ground. BTW, I really was interested in the idea of an Arduino Simulator, so I want ahead and bought THIS_ONE. It was only $13.98 US... Such a deal!! Review in a few days. Best, -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... Last edited by AC_Hacker; 08-15-14 at 12:36 AM.. |
08-15-14, 01:40 AM | #196 | |
Apprentice EcoRenovator
Join Date: Mar 2013
Location: UK
Posts: 131
Thanks: 13
Thanked 35 Times in 32 Posts
|
Quote:
Any #include files need to be located in the same folder as the sketch. |
|
08-15-14, 02:14 AM | #197 | |
Apprentice EcoRenovator
Join Date: Mar 2013
Location: UK
Posts: 131
Thanks: 13
Thanked 35 Times in 32 Posts
|
Quote:
Flows don't need to be read when pumps are not running and I have an idea to bake reading flow sensor reading non blocking. The reason it uses blocking code whilst reading flow sensors is that it uses interrupts and if the processor was doing something very time sensetive , the timing would be screwed up by an interrupt.(software serial, i2, etc) By the time we get to GPHPC V1 most if not all of this code will be improved or replaced. Unless the controller is developed in public with input from many members, we will simply end up with many different controllers all with as completely different feature sets and different core code. If you have a sketch you feel would be a better starting point for the project then please post it so we can use that instead. Steve |
|
The Following User Says Thank You to Ormston For This Useful Post: | buffalobillpatrick (08-15-14) |
08-15-14, 05:08 AM | #198 | ||
Banned
Join Date: Aug 2014
Location: US
Posts: 150
Thanks: 7
Thanked 5 Times in 5 Posts
|
Quote:
Someone proposed such an attack as a copyright protection scheme... Quote:
|
||
08-15-14, 08:27 AM | #199 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Quote:
Your post is not germane to our efforts here. Please help someone else. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... Last edited by AC_Hacker; 08-15-14 at 08:49 AM.. |
|
The Following User Says Thank You to AC_Hacker For This Useful Post: | buffalobillpatrick (08-15-14) |
08-15-14, 08:48 AM | #200 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Quote:
Questions about methods and approaches are necessary in this process. We are all on the same team, and are ultimately interested in the same outcome. Thus the need to tread lightly, and respectfully as we proceed. * * * Lastly, and I was hoping that it would not be necessary to say this, but we must be on guard against attempts by others, to deflect this project. Sincerely, -AC_Hacker
__________________
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 (08-15-14) |
|
|