bctl is a wood fired boiler circulation loop controller, written in C++, for a system with hot water thermal storage and indirect heating of domestic hot water. The first realease (v1.0) is functional for these elements. Future releases are expected to include functional improvements for waste heat recovery from the boiler, heating loop circulation control, further optimizations, and provision for additional 1-wire sensors to implement differential temperature control loops. Planned enhancements will include utilties for system configuration, data logging, and remote access and monitoring (as time allows).
Any comments or requests should be directed to the administrator (me). This wiki will be updated based on user demand and available time.
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 packagesas 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 localbin 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 (QP Framework, 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 (this) bctl package:
Typical build procedure:
After moving to a new build system I've found some compatibility issues
with automake utilities. Running the following command sequence resolved
these issues:
libtoolize --force
(modify configure.ac according to prompts if necessary then rerun)
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
configure
make clean
configure
make all
sudo make install
To enable the QP Framework 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:
/usr/local/var/bctl/busConfig.xml (scanned bus xml file)
/usr/local/var/bctl/bCtl.log (execution log file)
/usr/local/share/bctl/devConfig.xml (configuration file for device assignment)
/usr/local/share/bctl/testDataInputs.csv (test mode data file)
To add a new page simply reference it within brackets, e.g.: [SamplePage].