Friday, December 4, 2009

Early Access: Swing GUI Back From The Dead

Subversion contains code for extremely ugly GUI that is able to do one thing: display current and setpoint temperature for all configured zones, and change color depending on whether DZ is configured for cooling and heating mode and whether the zone is calling.

Ugly or not, it sure beats using JMX to see the current temperature and setpoints.

Here's a configuration snippet that makes this happen:

<bean id="console" class="net.sf.dz3.view.swing.Console"
init-method="show">
<constructor-arg index="0" type="java.util.Set">
<set>
<ref bean="thermostat-6500000055FF1A26" />
<ref bean="thermostat-0500080021C9B810" />
</set>
</constructor-arg>
</bean>
Not just thermostats may be added, but any DZ objects - if they can't be displayed, they will be simply ignored with an error message in the log.

Next Step

Providing controls to change the setpoint, of course. Working on it.

Thursday, December 3, 2009

Note on Register Mechanical Design

Register controlled by Futaba S3003 servo
I've just been told by one of DZ users that his design uses about 90° of servo motion to move from totally open to totally closed position. My kneejerk reaction was -

Design your registers so 180° of servo travel is necessary to move the damper from fully closed to fully open position.
Primary reason for this is that the torque required from the servo is proportionally less, hence, less stress, longer usable life and quieter operation - servos are becoming to growl as the load goes up, and as their age goes up.

There are several things you need to keep in mind when you're designing products using servos.

Servo range of motion

All servos, being analog devices, are different. Normally, servos are supposed to work with PWM control signal being between 200μsec and 2000μsec, but there are instances that can go as low as 160μsec and as high as 2300μsec.

Servo controller signal range

Not all servo controllers are created equal, either. Some of them support advanced range limiting and calibration options, some of them are incapable of producing anything other than a predefined range of signals with no calibration options whatsoever - the only calibration option would be to design the device in such a way that the servo travel is artificially limited, and later use software controlled range limiting to make things work properly.

Hardware vs. Software

DZ3 will support both range limit and calibration within coming weeks (DZ2 supported it already, and it's just a matter of porting it over), so your hardware (both servos and controllers) is the only limitation for your design.

On the picture: existing register designed to utilize 180° of servo travel.

FAQ: Switch Between Heating & Cooling

Q: How do I switch DZ into heating or cooling mode?

A: For cooling, values of P and I for the PID controller associated with the thermostat have to be positive, for heating, negative.

IMPORTANT: Make sure that P and I values for all thermostats are on the same side, and that they are synchronized with the operation of the actual HVAC device, or you will have a runaway condition in zones that are on the wrong side. In other words, your HVAC will run forever.
Q: Why is it so complicated?

A: Because it makes things much, much simpler in the bigger picture, the time for which hasn't come yet - but I'm working on it.

Q:
Are you ever going to make it so normal people can use it?

A: Yes.

FAQ: Thermostat Sensitivity

Q: Default thermostat settings cause too much of a temperature swing, how do I make my thermostat more sensitive?

A: You increase the value of P for the PID controller associated with this thermostat. Default value of P (1.0) corresponds to a deadband from 1°C below the setpoint to 1°C above. Increasing P to 2 will cause that to change to a range from 0.5°C below the setpoint to 0.5°C above.

Likewise, if you want to dumb down your thermostat because the HVAC switches on and off too often, you need to decrease the value of P. However, be careful, for short cycling (the HVAC term for this phenomenon) may have different causes - but you'll be able to easily see the cause for them on charts DZ generates.

Q: Will there be a UI control for that?

A: Yes.

Wednesday, December 2, 2009

DZ 3.2.1 Maintenance Release

BUGFIXES

  • Race condition was preventing normal initialization of Parallax and possibly other serial servo controllers;
  • NaN damper position was being generated in BalancingDamperController, passed down to dampers and accepted by them under some circumstances.

IMPROVEMENTS

  • OwapiDeviceFactory now reports devices present on 1-Wire bus via JMX;
  • Damper controllers now support JMX insrumentation.