Wednesday, October 28, 2009

Thermostat wiring

Ok, last night I had a couple hour obsession with thermostats. A bit of research has revealed that the HVAC industry really isn't standardized all that much (de facto standards, sure... but not industry standards for thermostat wiring). So, here's what I learned.

First, if you didn't know, a "typical" thermostat system uses 24 volts AC. Although, be aware that there are others - for example, 120/220AC (usually electric baseboards) and "millivolt" (usually compressed gas with no electrical). I'm focusing on the "standard" 24VAC systems.

Codes used in thermostat and thermostat connections
R/V/VR (usually Red) - your 24VAC lead
W/W1/W2*/Aux (usually White) - Heat**
G/F (usually Green) - Fan/Blower
Y/Y1/Y2* (usually Yellow) - AC
C/B/X (usually Black) - Common voltage (used for powered thermostats, lights, etc)

If you have a heat pump heating system, you may also have:
O (usually Orange) - Compressor reverser**
B/H (usually Brown) - Compressor reverser (rare)***
E/X/X2* (unknown) - Emergency heat


In a "regular" single-stage (non-heatpump) system, function is as follows:
HEAT ON - R to W
AC ON - R to Y
FAN ON - R to G
* There is conflicting information whether Heat and AC also turn the fan on. I believe most systems will turn this on automatically, but I do not know whether most thermostats do or do not still turn it on.

In some systems, the HEAT and AC are isolated (IE separate transformers or even separate units). You will have an R1 or Rh, as well as an R2 or Rc. This would look like:
HEAT ON - R1/Rh to W
AC ON - R2/Rc to Y
FAN ON - R2/Rc to G (assuming the AC blower is used - as may be the case in hot water or steam heat)

*x2 indicates a second stage heat/AC. For example, a second mode in the device or even a second device (for example, an AC with a 2-stage compressor or hot water baseboard heat as primary with electric forced air as secondary). Usually, stage 1 will be used alone to adjust temperature by a couple of degrees; however, when there is more than a few degrees variance (Ex: a heat thermostat is set to 72 but it's 65), it will use stage 2 to "help".

**In the south, heat pumps are common. This throws a curve ball into things. It looks like this:
HEAT: R to Y*** (R to Y and Aux for a 2-stage system and aux heat needed)
AC: R to Y and O***
FAN ON: R to G
EMER HEAT: R to E
Most heat pump systems will also have an electric backup. If your geothermal system is malfunctioning (Ex: iced over), Emer heat will use the electric heat instead of the heat pump. In single-stage systems, the electric heat can be wired as a second stage/aux by means of jumpering E and Aux together (IE: if there's a fairly large difference between set temp and actual temp, it will use both to get the temp to goal faster). Emer heat is intended for emergency situations only, and should normally not be used...

*** The most common heat pump set up is the outside unit acts as evaporator and inside unit acts as condenser (IE: an air conditioner in reverse). By applying 24V to O, this operation is reversed so your heat pump runs backwards and as an air conditioner.
There are a couple systems, however, that are air conditioners that can be reversed to act as heat pumps. Instead of AC putting 24VAC on O, the heat will put 24VAC on B.


A tip on wiring thermostats... Similar to structured communications/network cabling, it's easier (and taking labor costs into account, cheaper) to "plan ahead". What I mean here is, it'd be advised to pull 7-conductor thermostat cable between your air handler and your thermostat location. Even if you use just standard heat (Ex: Red and White), you may add central air down the road. SURPRISE- you saved $100 because the wire's already there! Then you add a central humidifier - the wire's there! (although it's likely a separate humidistat, the majority of the wire run is already there so you just need to patch in a short piece at either end). So, plan ahead, save some dough! ;)

Tuesday, October 27, 2009

More on SuperoDoctor

With 'snmpwalk -v1 -c public localhost .1.3.6.1.4.1.10876', I get a ginormous list of the SuperoDoctor stuff. Documenting here from the MIB and from "hacking":

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.2.x == Textual description of x

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.3.x == Sensor type of x
- 0 = Fan
- 1 = Voltage
- 2 = Temperature
- 3 = boolean sensor (IE: open/close)

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.4.x == Sensor value of x (RPMs, mV, degC)

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.5.x == acceptable upper limit of x in RPM or mV (only for sensor types 1 and 2)

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.6.x == acceptable lower limit of x in RPM, mV, or degC

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.7,x == Maximum value of sensor serving x

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.8.x == Minimum value of sensor serving x

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.9.x == "Indicates the value for the Divisor for the Fan device that are currently in use on the managed device." - sensor type 0 only

SNMPv2-SMI::enterprises.10876.2.1.1.1.1.10.x == Monitoring status


For example:
# Name of device
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.2.4 = STRING: "Fan4/CPU1 Fan Speed"

#Device type (fan)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.3.4 = INTEGER: 0

# Current reading (5037 RPMs)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.4.4 = INTEGER: 5037

# There is no maximum upper limit on this... hence, no "SNMPv2-SMI::enterprises.10876.2.1.1.1.1.5.4"

# Lowest acceptable reading (712 RPMs)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.6.4 = INTEGER: 712

# Maximum possible reading of this sensor (1,350,000 RPMs)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.7.4 = INTEGER: 1350000

# Minimum possible reading for this sensor (329 RPMs)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.8.4 = INTEGER: 329

# Divisor
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.9.4 = INTEGER: 1

# Monitoring status (monitor=true)
SNMPv2-SMI::enterprises.10876.2.1.1.1.1.10.4 = INTEGER: 1

So, if I have a monitoring/notification system (such as Nagios), I may call the reading "Fan4/CPU1 Fan Speed" with a warn limit of less than 712 (IE: if fan falls below 712RPMs, send warning alert) and critical alert at 0 (IE: if fan stops, blow the klaxons).

That is all.