Download Latest Version bctl-1.7.tar.gz (437.4 kB)
Email in envelope

Get an email when there's a new version of bctl

Home
Name Modified Size InfoDownloads / Week
bctl-1.7.tar.gz 2015-03-27 437.4 kB
bctl-1.2.tar.gz 2014-07-11 432.9 kB
README 2014-07-05 4.5 kB
bctl-1.1.tar.gz 2013-11-01 140.9 kB
Totals: 4 Items   1.0 MB 0
Version 1.2 is a fully functional system for controling dual fuel (i.e. 
propane/wood) heating and DHW systems. Mode control inputs from PIO 
devices are used to set wood or fuel mode separately for heat and DHW. 

Multi zone heating is configurable for an arbitrary number of zones 
(minor code modifications needed to adjust) with call for heat inputs 
for each zone, and outputs for each zone valve. A single heat 
distribution circulator power output is also provided. In wood mode, 
heat distribution is disabled when the heat storage tank is cold.

DHW controls two circulators, one each for wood and fuel modes. Fuel 
mode is controled by a call for heat from an aquastat, while wood mode 
is controlled by boiler state.

Version 1.1 has added heat recovery states for capturing heat from the
boiler when the burn has died down.

Version 1.0 of bctl is a circulation loop controller for a wood fired
boiler with hot water thermal storage and indirect heating of domestic 
hot water. The first realease is functional for these elements. Future 
releases will include functional improvements for heat recovery 
from the boiler, heating loop circulation control, further optimizations,
and provision for additional 1-wire sensors.

Planned additions will include utilties for system configuration,
data logging, and remote access and monitoring (as time allows).

The design relies on the 1-wire library, owlib, which is part of the owfs
package: http://sourceforge.net/projects/owfs/?source=directory  

The Quantum Leaps QP framework and QM modeling tool are used for
all state-machine operations: http://sourceforge.net/projects/qpc/?source=directory

State machine templates were generated using the QM code generator and 
all design files are included in the source file, BoilerHsmController.qm. 
This would be a good place to begin familiarization with the code for 
those who are interested.

Implementation is running on a Pandaboard ES with Ubuntu Linux v12.04.
I'm using standard DS18S20 temperature sensors and a 1-wire I/O board 
available from Hobby Boards for motor control and switch sensing, 
though many other devices could be used for the purpose. I'm 
currently using an off-the-shelf thermocouple temperature controller 
to sense whether the stack is hot, though I expect to replace this 
with a 1-wire thermocouple sensor device in future versions.

The following is the installation procedure for prerequisite packages
as well as bctl.

Required packages for owfs:

    php5
    php5-dev
    python
    python-dev
    fuse
    libfuse2
    libfuse-dev
    libusb-dev

Build and install owfs according to package instructions. Create symbolic 
links to shell executables (sudo ln -s /opt/owfs/bin/* -t .) from a local
bin directory on your path if you wish to use these functions for testing.
This is not necessary for bctl execution.

For bctl build/install the following:
    g++
    libxml++2.6-dev
    qpcpp (build rel and spy libraries according to package instructions)
    libatomic-ops-dev
    libboost-all-dev
    screen (not required, but very useful to monitor stdout by attach)

Create serial UART rules file with symbolic links for 1-Wire bus. 
For hints on this see: http://blog.automated.it/2011/01/18/linkusbi-and-1-wire-setup/

My rules file contents:
----------------------------
# /etc/udev/rules.d/60-usb-serial.rules
# Determine 1wire USB ports

KERNEL=="ttyUSB*", \
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001" \
SYMLINK+="1wire"
----------------------------

Install bctl package:

Typical build procedure:
	make clean
	configure
	make all
	sudo make install

To enable SPY output use 'configure --enable-spy'
**NOTE: bctl must be run as root for access to 1-wire devices and for generation of configuration and log files.

Any other compile time definitions must be added to config.site 
(such as -DTESTVECTOR...)

Configure to run from boot (using the screen command in /etc/rc.local if desired)

Using screen to attach to existing process:

    sudo screen -ls lists existing screen
    sudo screen -d -R <PID.SessionID> attaches to process
    use Ctl-a Ctl-d to detach process from screen once again

File locations:

busConfig.xml: scanned bus xml file
/usr/local/var/bctl/busConfig.xml

bCtl.log: execution log file
/usr/local/var/bctl/bCtl.log

devConfig.xml: device configuration file for device assignment
/usr/local/share/bctl/devConfig.xml

testDataInputs.csv: Test mode data file
/usr/local/share/bctl/testDataInputs.csv
Source: README, updated 2014-07-05