EcoRenovator  

Go Back   EcoRenovator > Improvements > Appliances & Gadgets
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Display Modes
Old 04-23-14, 07:54 AM   #31
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

Haha, thats very cool!

I tried out the new code last night. It worked better than the quick and dirty version, but there was still some switching on and off. So, I'm looking from suggestions from programmers with more experience than myself.

Right now, I'm taking 10 sensor readings at 100 millisecond intervals. After I take the 10 sensor readings I average them. I also threw some delays in there so if it turns on, its on for at least 30 seconds. Is there a better way? It seems like that should take out any spikes, but toward the evening, it was still turning on and off a little.

__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-23-14, 11:13 PM   #32
Piwoslaw
Super Moderator
 
Piwoslaw's Avatar
 
Join Date: May 2009
Location: Warsaw, Poland
Posts: 960
Thanks: 188
Thanked 110 Times in 86 Posts
Default

When averaging more than ~5 readings, first discard the highest and the lowest, then average the rest. This gets rid of any anomalies, making the average truer.

Have you tried logging the raw readings to see if there is a pattern?
__________________
Ecorenovation - the bottomless piggy bank that tries to tame the energy hog.
Piwoslaw is offline   Reply With Quote
The Following User Says Thank You to Piwoslaw For This Useful Post:
Daox (04-23-14)
Old 04-23-14, 11:26 PM   #33
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

That sounds like a good idea. I'll have to give it a try.

Sadly no. I don't have a laptop available to me anymore, and no USB cord is long enough to reach up into the attic. I'd like to though. Perhaps I'll borrow one.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-24-14, 03:52 PM   #34
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 Daox View Post
Right now, I'm taking 10 sensor readings at 100 millisecond intervals. After I take the 10 sensor readings I average them. I also threw some delays in there so if it turns on, its on for at least 30 seconds. Is there a better way? It seems like that should take out any spikes, but toward the evening, it was still turning on and off a little.
Since it all just numbers, why don't you try reading every 10 seconds, and average, and run for 10 minutes?

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 04-24-14, 06:03 PM   #35
stevehull
Steve Hull
 
Join Date: Dec 2012
Location: hilly, tree covered Arcadia, OK USA
Posts: 826
Thanks: 241
Thanked 165 Times in 123 Posts
Default

Daox,

You need to put in hysteresis. This is essentially a "dead zone" where the controller is off. No matter how precise the controller, without a dead zone, you will get cycling.

An alternative is to "forward load" the system to negate an immediate response and to wait for some period of time to check to see if an output is really needed. If in two minutes, the system still calls for blower, then it will cycle, but not on the first try.

Both are examples of hysteresis in a control system.

Does this make sense?

Steve
__________________
consulting on geothermal heating/cooling & rational energy use since 1990

Last edited by stevehull; 04-24-14 at 06:24 PM..
stevehull is offline   Reply With Quote
Old 04-24-14, 11:19 PM   #36
Piwoslaw
Super Moderator
 
Piwoslaw's Avatar
 
Join Date: May 2009
Location: Warsaw, Poland
Posts: 960
Thanks: 188
Thanked 110 Times in 86 Posts
Default

^^ They're right: Turn the fan on/off only when three consecutive readings (~every minute) call for it.

Quote:
Originally Posted by Daox View Post
Sadly no. I don't have a laptop available to me anymore, and no USB cord is long enough to reach up into the attic. I'd like to though. Perhaps I'll borrow one.
I thought you had an SD card logger add-on?
__________________
Ecorenovation - the bottomless piggy bank that tries to tame the energy hog.
Piwoslaw is offline   Reply With Quote
Old 04-25-14, 07:31 AM   #37
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

There is a hysteresis programmed in already. Right now I have it set to turn on at 4C degrees above kitchen temperature and turn off when it gets down to 2C above kitchen temperature. The noise in the lines must be fairly easily overriding this though. I also added additional on time delays to the latest version that I'm running. When it turns on, it turns on for 30 seconds no matter what. This can probably be extended so its a few minutes as AC Hacker suggested. I've kept the off time delay short in case a spike happens it can kick back on relatively quickly. I think its set to ~5 seconds right now.

I do not have an SD card logger. It would come in quite handy though! Right now I just have some serial printing in the code to show some things.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-25-14, 02:54 PM   #38
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 Daox View Post
...The noise in the lines must be fairly easily overriding this though.
One of the great things about 1-wire is that if a spike occurs during a packet transmission, instead of an erroneous data being acted upon, the affected packet is viewed as corrupt, so it is rejected.

Quote:
Originally Posted by Daox View Post
I also added additional on time delays to the latest version that I'm running. When it turns on, it turns on for 30 seconds no matter what. This can probably be extended so its a few minutes as AC Hacker suggested. I've kept the off time delay short in case a spike happens it can kick back on relatively quickly. I think its set to ~5 seconds right now.
By "spike" do you mean a thermal spike?

It occurs to me that your sensors might be mounted sub-optimally. If you have them exposed, the slightest stirring of the air would create erratic behavior.


When I mounted the outdoor sensor for my whole house temperature logging project, I knew that wind & rain would have a disturbing effect on my data, so I enclosed the sensor inside a plastic plumbing pipe assembly, with the sensor at the top, but held away from any plastic. The assembly has small holes that will allow air flow but not bug flow.

I had a similar problem with the sensor in my Freezerator. I had to shield it from the environment enough so that it was not affected by short term events (drips of condensation) but still able to detect changes of temperature.

So I guess that it is mechanical hysterisis, rather than software hysterisis.

Quote:
Originally Posted by Daox View Post
I do not have an SD card logger. It would come in quite handy though! Right now I just have some serial printing in the code to show some things.

This little jewel has an SD card ability, and also a serial port for remote logging, AND it is open source with source code (that will work in the Arduino IDE) available for customization.

(Did I mention it has a header ready to accept a string of 1-wire sensors (70 sensors have been tested to work, maybe more... Travis ran out of 1-wire sensors to test).

You could even build a small trickle-charged battery that would keep it going in case of a power loss.

-AC
Attached Thumbnails
Click image for larger version

Name:	1-wire.jpg
Views:	2332
Size:	21.0 KB
ID:	4345  
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...

Last edited by AC_Hacker; 04-25-14 at 02:58 PM..
AC_Hacker is offline   Reply With Quote
The Following 2 Users Say Thank You to AC_Hacker For This Useful Post:
Daox (04-25-14), Piwoslaw (04-25-14)
Old 04-25-14, 02:59 PM   #39
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I was talking about electrical spike. I wouldn't imagine that there is that much breeze up in the attic. I suppose putting the sensor in a blob of silicon or something would be a good idea though. That would give it some thermal mass to even anything out if there was. The one in the kitchen I don't think would have any real breeze on it at all, and that is the one I think is having issues with electrical spiking.

All good ideas, thanks guys!
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 04-25-14, 03:11 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

The easiest way to accomplish your goal is to just widen your window a bit. You stated you have a 2 degF window now. I would double or triple that 2 degree window. So instead of turning on at ambient + 4 degrees and off at ambient + 2 degrees, it would wait until ambient + 6 degrees or ambient + 8 degrees to turn on. This would definitely stop your short cycling.

jeff5may is offline   Reply With Quote
Reply


Tags
arduino, controller, differential, thermal

Thread Tools
Display Modes

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 12:41 AM.


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