EcoRenovator  

Go Back   EcoRenovator > Improvements > Appliances & Gadgets
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts


Reply
 
Thread Tools Display Modes
Old 12-14-11, 01:59 PM   #21
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default

As soon as I get some script working, I'll post it with some comment lines.
As of now, I haven't saved any of the testing stuff and over-wrote it with more of the same.
You can type in the lines of code, click the load button to run it, then edit it, right in the CAI User interface.
(Which is Non-volatile). But, if you short the reset jumper, then it's all gone..


The 'incessant polling' is good when you are trying out new code. It instantly shows
your results, with having to hit the Refresh button.
I turned polling on and off and tried to see if it caused any slow down on my fast Fios router, and didn't notice any affect at all.

I did put a big cap across the +5 terminals and it did not help with the LSB Dithering.
I'm not sure that more load on the PS will help or not. We'll see.

I was doing that 'binning' thing in PLC and it seemed to work okay. But since it uses delays, it eats up time.
I think reading those 8 temperature sensors is going hog the most time,
and that will be a factor in deciding the number of time delays I'll be using in the code.

I'm not very interested in floating point. My needs can be fulfilled by the crude whole numbers. 20 C, 21 C and so on..
If the LSB dithering is < 1.0, then I'm golden..

Goal:
I want to display everything useful gathered from the sensors,
any resultant calculations/statuses & etc on the stock CAI status page.
I don't think I'll want to gather data over the long term.
At the most, I can just set the email function to send me the status page

http://i46.photobucket.com/albums/f1...slot/temps.jpg
Once every half hour for a day or two.. Then mine the data from the email.

If the 8 displayed 32 bit signed vars isn't enough, I can rotate in more
data, 7 words at a time, by using an ID flag in bin 1.
Hopefully I won't have to do that. I want to keep it simple as possible.
Don't want my wife to consult a real big chart to interpret the page..

__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..

Last edited by Xringer; 12-14-11 at 02:02 PM..
Xringer is offline   Reply With Quote
Old 12-17-11, 02:05 PM   #22
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default Sample code

This is to show some of the syntax of the PLC code.




START
SET VAR1 T1 'sets var1 to temp seen by sensor 1
SET VAR2 T2 'sets var2 to temp seen by sensor 2
SET VAR3[30] H1 'sets var3 to humidity
SET VAR4 CYEAR 'sets var4 to Current Year
SET VAR5 CH 'sets var5 to Current Hour (from RTC)
SET VAR6 CM 'sets var6 to Current Min
SET VAR7 CS 'sets var7 to Current Sec
END


The "VAR3[30] " is an attempt to smooth the Humidity LSBs dithering effects..
Didn't really see anything encouraging, watching in polling mode.
But, the delays will likely work fine when being run in a real program,
where decision jumps are made based on sensor values detected..

The wait number in brackets [msec of wait] is going to force the fetch,
of the highest number that pops out of the sensor, During the wait time period.

Looking at the neat way the RTC (time & date) bytes can be used individually,
I think it's going to be super easy to set up timed functions, like once-a-day, once-an-hour & etc.



CD Current date mm/dd/yyyy format
CT Current time hh:mm:ss format
CDW Current day of week
CH Current hour of day
CM Current minute of hour
CS Current second of minute
CDAY Current day of month
CMONTH Current month of year
CYEAR Current year
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 01-08-12, 08:47 AM   #23
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default Rough Dew Point


Dew point - Wikipedia, the free encyclopedia


START
SUB 100 H1 VAR5 ' subtract humidity(from sensor) from 100 & save in VAR5
DIV VAR5 5 VAR6 ' Divide VAR5 by 5 & save in VAR6
DIV T2 10 VAR2 'convert temp (from sensor) into two digits & save in VAR2
SUB VAR2 VAR6 VAR7 ' Put Td into VAR7 for display
END


At 40% & 14C, it looks like my basement's Dew Point is roughly 2 deg C..
But, not quite..
"This approach will be accurate to within about ±1 °C as long as the relative humidity is above 50%."
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 03-05-12, 10:43 AM   #24
gmacie
Lurking Renovator
 
Join Date: Feb 2012
Location: Atlanta
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would like to be able to monitor relative humidity in more than 1 place. Has anyone seen a project using a different sensor than the HIH-4000. Probably using digital inputs. I have been looking at sensors on ebay such as DHT11, DHT22. Just wondering if this can be done with the cai board or if I need to use an arduino.

Gordon

Last edited by gmacie; 03-05-12 at 12:15 PM..
gmacie is offline   Reply With Quote
Old 03-05-12, 06:15 PM   #25
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default

The CAI board has a built-in routine for the Honeywell HIH-4000-001 sensor that I obtained off Ebay.

So, the CAI is basically configured for a single RH sensor.
However, I'm not real sure about the accuracy of this type of sensor, used with the CAI board,
since they tell you it might have to be calibrated by adding a pot to the sensor output.

I think any calibration that I want to do will be done within my own programming.

Anyways, the CAI board has three other analog inputs,
that could easily be used with an analog sensor like the Honeywell HIH-4000 type..

The output of these Honeywell sensors seems to be very linear.

From: Weather Station - Temperature & Humidity

After trying to calibrate my new weather station's RH a few times,
I'm starting to feel it's pretty much a lost cause for me..
Just a general indication of the RH is going to have to work for me..
I don't have the time (or interest) to keep tweaking the settings when it drifts off a bit..
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 03-28-13, 11:08 AM   #26
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default

Heard about this app last year, before I got my iPhone 4..

WC8RC Remote Control - YouTube

Not sure if I would like to use it, since I've got a lot of PCs around here...
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 09-28-13, 03:49 PM   #27
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default Fan control program

Using this program to control a fresh-air fan, installed in June 2013.

http://ecorenovator.org/forum/30357-post44.html

Replaced the timer with an X10 appliance switch.

The program checks the outdoor humidity and if it's not too high,
a command will be sent to the X10 module, to turn on the fan.



START
SET OP2 1
DELAY 6000
SET OP2 0
SET VAR1 T1[300]
SET VAR2 T2[300]
SET VAR3 T3[200]
SET VAR4 H1[200]
SET RAM7 0
SET VAR7 0
MUL CH 60 RAM8
ADD RAM8 CM VAR8
CALLSUB CALLER
END

CALLER:
TSTLE CH 8
END

TSTGT H1[200] 79
CALLSUB FAN_OFF
TSTLE H1[200] 76
CALLSUB FAN_ON
RET

FAN_ON:
X10 2 7 ON
SET OP1 1
SET RAM7 900
CALLSUB TIME10
SET RAM7 0
RET

FAN_OFF:
X10 2 7 OFF
SET OP1 0
SET RAM7 900
CALLSUB TIME10
SET RAM7 0
RET

TIME10:
SET VAR7 0
MIDEE:
DELAY 1000
TSTEQ VAR7 RAM7
RET

INC VAR7
GOTO MIDEE
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 10-16-13, 02:00 PM   #28
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default Heat sensor in attic!



It's a long cable run, so I'm not sure how well it's going to work..
So far it's looking good..

The other sensors are close to the CAI board in a small three leg star config.
But the cable run to the attic looks like about 60 feet long!
It's exactly the kind of configuration they advise you not to use..
__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
Old 10-16-13, 05:49 PM   #29
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 Xringer View Post
...The other sensors are close to the CAI board in a small three leg star config.
But the cable run to the attic looks like about 60 feet long!
It's exactly the kind of configuration they advise you not...
The 1-Wire configuration advisories are all good advice. But if you are using the data wire as your power wire (I'm pretty sure you aren't) then the advisories are pretty much mandatory.

I deviated from the advisories in my setup, and I have had no problem. However, when I did the first power up, my sensors were scrambled and some didn't register, so I think I was nearing the point of bad functionality. Second powerup, everything fell into line.

I'd say just hook it up and try it, if it works you're in luck. If it doesn't work, it's not too hard to change a star setup to a serial set up.

If it still doesn't work, your 1-wire documentation specifies a resistor that should be used on the last (most distant) sensor node.

Good Luck!

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 01-25-14, 08:05 PM   #30
Xringer
Lex Parsimoniae
 
Xringer's Avatar
 
Join Date: Feb 2009
Location: Woburn, MA
Posts: 4,918
Thanks: 114
Thanked 250 Times in 230 Posts
Default Code check

URLs for fetching temps & RH

Five temp sensors
192.168.1.15/gett1.cgi
192.168.1.15/gett2.cgi
192.168.1.15/gett3.cgi
192.168.1.15/gett4.cgi
192.168.1.15/gett5.cgi

RH sensor
192.168.1.15/geth1.cgi

__________________
My hobby is installing & trying to repair mini-splits
EPA 608 Type 1 Technician Certification ~ 5 lbs or less..
Xringer is offline   Reply With Quote
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 10:19 AM.


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