PID-regulator Software for Velleman K8061 I/O-board
===================================================


Package version: 1.03 for Windows 98/2000/XP

First version: 2009-08-26
Latest update: 2009-08-29 

Author: Stefan Spaennare, Lund, Sweden

E-mail: stefan@spaennare.se

Home page:     http://www.spaennare.se/index.html
Project page:  http://www.spaennare.se/dcpend1.html
Software page: http://www.spaennare.se/dcpend1.html


Contents
========

1. Introduction
2. Warning
3. Disclaimer
4. How to run the programs
5. How to compile the programs
6. Delay calibration
7. Package history
8. References and programming tools


1. Introduction
===============

This package contains PID-regulator ("dcpend1") software to use together 
with the simple "inverted pendulum" described on the project web-page 
above, a computer (PC) and the Velleman K8061 digital USB I/O-board.

See the header of the program C-code for more information and reasonable
parameter values. 


2. Warning
==========

Do absolutely NOT use the USB devises, software and circuits described here
for professional and continuous use. USB devises can quite easily hang and
the setup should be carefully monitored in use.


3. Disclaimer
=============

For all the C-programs in this package the following statement is valid:

I make no warranties that this program is (1) free of errors, (2)  consistent
with any standard merchantability, or (3) meeting the  requirements of a
particular application.  This software shall not,  partly or as a whole,
participate in a process, whose outcome can  result in injury to a person
or loss of property. It is solely  designed for analytical work. Permission
to use, copy, and distribute  is hereby granted without fee, providing that
the header above  including this notice appears in all copies.


4. How to run the programs
==========================

The program is run in a DOS window under Windows 98 and a CMD (command
line interpreter window) under Windows 2000/XP.

It is recommended to have the Velleman K8061 I/O-board USB 2.0 connected 
for fastest performance. A PC computer >= 1.0 GHz is recommended.

The K8061 board is optically isolated from the computer, which is very good.


5. How to compile the programs
==============================

Precompiled executable comes with the package. To recompile the program
use Borland C/C++ 5.5.1 compiler, which can be downloaded for free (see
the references). The files "k8061.h", k8061.dll" and "k8061.lib" must be 
present in the same directories as the executables. To compile type:

>compdcpend1.bat


6. Delay calibration
====================

To see the intrinsic delay of the K8061 board you can run "dcpend1"
with "h-iti" set to zero (0). Do NOT start the motor with this setting! 
Then adjust "h-iti" to fit "h0-msr",


7. Package history
==================

2009-08-29, 1.03: Minor improvements to main in the C-program dcpend1.cpp.

2009-08-28, 1.02: Minor additions and changes to the text header of the
                  C-program dcpend1.cpp. The function "ref_adjust" has
                  been added to make the main C-code somewhat "prettier".
                  It is now also possible to get the pendulum back to the
                  "ref0" position by pressing "space" on the computer 
                  keyboard.

2009-08-27, 1.01: Minor additions and changes to the text header of the
                  C-program dcpend1.cpp.

2009-08-26, 1.00: First version of the package. 


8. References and programming tools
====================================

1. Velleman Components homepage and a description of the K8061
digital USB I/O-board and software download for the devices:

http://www.velleman.be

2. A place to download Borland C/C++ 5.5.1 compiler:

http://www.borland.com/downloads/download_cbuilder.html

3. PID-regulator on Wikipedia.org:

http://www.wikipedia.org/wiki/PID_controller

4. PID Without a PhD by Tim Wescott:

http://www.embedded.com/2000/0010/0010feat3.htm


-----------------------------------------------------------
End of readme.txt file.
