0% found this document useful (0 votes)
94 views19 pages

Webcontrol Technical Manual: 1.3 Hardware Version: 2.0.2 Firmware Version: 2.3.1 Date Last Modified: 04/029/2009

WebCTRL

Uploaded by

Angga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views19 pages

Webcontrol Technical Manual: 1.3 Hardware Version: 2.0.2 Firmware Version: 2.3.1 Date Last Modified: 04/029/2009

WebCTRL

Uploaded by

Angga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

TM

WebControl
Technical Manual
Version: 1.3
Hardware Version: 2.0.2
Firmware Version: 2.3.1
Date last modified: 04/029/2009
TM
WebControl Technical Manual Version 1.3

Table of Contents
1 Introduction ........................................................................................................ 1
1.1 Scope.......................................................................................................... 1
1.2 References.................................................................................................. 1
1.3 Table of Definitions ..................................................................................... 1
2 WebControlTM I/O ............................................................................................... 3
2.1 Serial Data Ports ......................................................................................... 3
2.2 Power Supply Inputs ................................................................................... 3
2.3 TTL Output Port .......................................................................................... 4
2.4 AUX Input Port ............................................................................................ 4
2.5 DS1822 Temperature Sensor Input ............................................................. 4
2.6 Humidity Sensor Input ................................................................................. 4
3 Network Configuration ........................................................................................ 2
3.1 Connection Settings .................................................................................... 2
3.2 Access Settings .......................................................................................... 2
3.2.1 Web login ............................................................................................. 3
3.2.2 FTP ...................................................................................................... 3
3.3 Security Settings ......................................................................................... 3
3.4 Default Network Settings ............................................................................. 4
4 System Inputs .................................................................................................... 4
4.1 Digital Inputs ............................................................................................... 4
4.2 Analog Inputs .............................................................................................. 4
4.3 DS1822/DS1820 1 Wire Temperature Sensors ........................................... 4
4.4 Honeywell 4000 Series Relative Humidity Sensor ....................................... 5
4.5 Timers ......................................................................................................... 5
4.5.1 Examples of Timer Configuration ......................................................... 6
4.6 View the System Inputs and Outputs........................................................... 6
5 Controlling the TTL Output Port.......................................................................... 7
5.1 The Boolean Run Engine ............................................................................ 7
5.2 Boolean Expression Syntax ........................................................................ 7
5.2.1 Writing Rules........................................................................................ 7
5.2.2 Logical Operators ................................................................................. 8
5.2.3 Input Terms .......................................................................................... 8
5.2.4 Additional Operators ............................................................................ 9
5.2.5 Examples ............................................................................................. 9
5.3 Addition Features of the TTL output Port ..................................................... 9

Copyright(C) 2008,2009 CAI Networks, Inc. i


TM
WebControl Technical Manual Version 1.3

5.4 TTL Output Port Control Defaults .............................................................. 10


6 Automated Email Setup.................................................................................... 11
6.1 Email Settings ........................................................................................... 11
6.1.1 Requirements to Use Email................................................................ 11
7 Real Time Clock ............................................................................................... 12
7.1 Network Requirements to Use the NTP..................................................... 12

Copyright(C) 2008,2009 CAI Networks, Inc. ii


TM
WebControl Technical Manual Version 1.3

Table of Figures
Figure 1.0 WebControlTM PCB inputs and outputs diagram ....................................... 3
Figure 2.0 WebControlTM configurable connection settings........................................ 2
Figure 2.1 WebControlTM configurable access control settings .................................. 2
Figure 2.2 Mandatory pages required to use web login ............................................. 3
Figure 2.3 Network defaults....................................................................................... 4
Figure 3.0 String format for configuring timers ........................................................... 5
Figure 4.0 Logical operators of the Boolean expression syntax ................................. 8
Figure 4.1 Inputs terms supported by the Boolean expressions ................................ 8
Figure 4.2 TTL output port defaults ......................................................................... 10
Figure 5.0 Email configuration parameters .............................................................. 11

Copyright(C) 2008,2009 CAI Networks, Inc. iii


TM
WebControl Technical Manual Version 1.3

1 Introduction
This document provides an overview of the technical aspects of using WebControlTM.
It mainly describes the inputs and outputs offered by the current version of the
WebControlTM hardware and firmware. It is also indented to guide and provide key
information on writing web pages and using the CGI commands to control
WebControlTM.

1.1 Scope
The scope of this document is not to teach how to write HTML web pages nor is it
indented to teach any other technical aspect related to hardware or firmware. It is
purely intended to be a guide to using the features provided by WebControlTM. The
reader is expected to be technically competent in all the technical areas within this
document, and is strongly advised to use this document along side the other
reference material listed in the reference section.

1.2 References
The following references are referred to through out this document. It is expected that
the reader will use these along with this document in order to understand and use
WebControlTM.
Reference Description
Ref1 WebControlTM web server CGI code specification V1.0
Ref2 Demo and test web page source files for WebControlTM
Ref3 Pin out diagram of J12 the AUX input connector

1.3 Table of Definitions


The following table is a list of definitions used though out the document.
Definition Description
CGI Common gateway interface
HTTP Hypertext transfer protocol
DNS Domain name server
SMTP Simple mail transport protocol
SNTP Simple network time protocol
1-wire Special bidirectional serial data bus from Maxim
RH Relative humidity
FTP File transfer protocol
NetBios Human readable name used as an alternative to an IP address for
accessing the server on a network. E.g. http://WebControlTM
IP Internet protocol
DHCP Dynamic host configuration protocol
ROM Read only memory

Copyright(c) 2008, 2009 CAI Networks, Inc. 1


TM
WebControl Technical Manual Version 1.3

Copyright(c) 2008, 2009 CAI Networks, Inc. 2


TM
WebControl Technical Manual Version 1.3

2 WebControlTM I/O
The current hardware version of WebControlTM is equipped with a number of inputs
and outputs; these are shown in below in figure 1.0.

Figure 1.0 WebControlTM PCB inputs and outputs diagram

2.1 Serial Data Ports


Currently the RS232 and RS485/442 serial date ports provided by the hardware are
not used by the firmware.

2.2 Power Supply Inputs


The DC power supply input is the main DC supply to the board. The input voltage
range is 6.5 – 9V dc. Any voltage grater than 9V applied to this input may overheat
the board.

Copyright(c) 2008, 2009 CAI Networks, Inc. 3


TM
WebControl Technical Manual Version 1.3

2.3 TTL Output Port


The TTL logic level output port has 8 TTL outputs that can each be set or cleared
using CGI command codes, or by setting up a Boolean expression using the
available inputs so that the particular output is set when a particular input condition is
met. The maximum current that can be sourced or sinked by one of these outputs at
a time is 20mA or 100mA for the whole port.

2.4 AUX Input Port


The AUX input connector offers digital and analog inputs that can be configured to
set a TTL output upon a single input or a combination of inputs. 3 analog inputs are
offered that have an input range of 0 – 5Vdc. 8 digital inputs are offered that use TTL
input levels (0 and 5Vdc). The AUX input pin out diagram [ref3] shows the pin out of
this port in more detail.

2.5 DS1822 Temperature Sensor Input


The temperature sensor input allows up to eight Maxim DS1822/DS18B20 1 wire
temperature sensors to be connected. These sensors can then display the
temperature via the HTTP server or be used as inputs to the Boolean engine
controlling the TTL output port.

2.6 Humidity Sensor Input


The current WebControlTM hardware has been designed to use the Honeywell 4000
series relative humidity sensor devices. Using any other humidity sensor with out
careful consideration may result in malfunction of this feature. The RH sensor can be
used to display relative humidity via HTTP or be used to control the TTL outputs as
an input into the Boolean run engine.
When DS182x temp sensor located
not direct to the board, you may want
to connect temp sensor pin 3 to the
humidity sensor port #3 to use the 5V
power supply.
If the temperature reading is not
reliable, you may also use 5V supply
to power the DS182x sensors.

Copyright(c) 2008, 2009 CAI Networks, Inc. 4


TM
WebControl Technical Manual Version 1.3

3 Network Configuration
The network settings for WebControlTM are essentially split into three categories:
 Connection
 Access
 Restriction
Connection settings deal with the actual settings that enable WebControlTM to
connect and listen for connections on a network. The access settings deal with
providing log in services. The restriction settings provide configuration settings for
limiting the allowed IP addresses that WebControlTM will allow connections from.
All network settings are configured using CGI commands. See the CGI specification
[ref1] for details on specific commands.

3.1 Connection Settings


These are the basic settings that need to be configured in order for WebControlTM to
work successfully on a network. It may be necessary to connect the board directly to
a PC and access it using its default IP address before connecting directly to a live
network in order to configure it correctly. Figure 2.0 shows the connection settings
WebControlTM has.
Connection Parameter Comments
Host NetBIOS Name Human readable name to use for connection to
WebControlTM e.g. http://WebControl
Host IP address WebControlTM server IP address
Subnet Mask
Gateway IP address
Primary DNS server
Secondary DNS server
MAC address
DHCP This enables or disabled DCHP
Figure 2.0 WebControlTM configurable connection settings

3.2 Access Settings


These settings control the access from the user to the WebControlTM server. The
table in figure 2.1 shows the access settings WebControlTM provides.
Access Parameter Comments
Web Login This enables or disables web login requirement
Wipe GUI Firmware The enables or disables Overwrite GUI firmware
Username This is the username used for web or FTP login
Password The is the password used for web or FTP login
Figure 2.1 WebControlTM configurable access control settings

Copyright(c) 2008, 2009 CAI Networks, Inc. 2


TM
WebControl Technical Manual Version 1.3

3.2.1 Web login


When web login is enabled it provides a login screen when the user first tries to
connect to WebControlTM. The user is forced to provide a username and password to
be granted access. In order to use web login the WebControlTM HTTP server must be
provided with three mandatory web pages; these and detailed in figure 2.2.
Mandatory Web Page Usage
login.cgi Provides text boxes for the user to enter their
username and password. And a submit button for
these to be submitted to the WebControlTM server
logoff.cgi Provide a submit button for the user to logoff the
WebControlTM server
lginfail.cgi The page will be displayed it the login fails
Figure 2.2 Mandatory pages required to use web login

Once the user is logged in they have to use the logoff page to log off again. It the
WebControlTM server detects that there has been no activity from the user for 30
minutes of being logged in, then the user will automatically be logged off
WebControlTM.

When connect from another server or computer to WebControlTM, disable web login
maybe desirable. When web login disabled, you can use host ID to secure the
access and control of the WebControlTM through Security settings.

3.2.2 FTP
WebControlTM has an FTP server that is currently only used for uploading of new GUI
portion of the firmware to the board. It will destroy the existing GUI firmware. Such an
action is recorded and void warranty. There is no download feature implemented in
the firmware. In order to use FTP the user must know what the username and
password of the WebControlTM server is.

3.3 Security Settings


The security settings of WebControlTM allow the server to be configured so that it only
accepts connections from clients with predefined IP addresses/ranges. WebControlTM
allows up to eight IP addresses/ranges to be specified that it will only allow
connections from. 192.168.1.0 will be considered whole class C access range. Any
client trying to connect which has an IP address other than what is predefined will be
ignored. If all eight IP address fields are set to 0.0.0.0 then WebControlTM allows
connections from all clients. This is the default setting of this feature.

Copyright(c) 2008, 2009 CAI Networks, Inc. 3


TM
WebControl Technical Manual Version 1.3

3.4 Default Network Settings


When WebControlTM is connected to the network for the first time or after receiving a
reset defaults hardware input, the network defaults shown in figure 2.3 are used.
Network parameter Default Value
Host NetBIOS Name NetDev
Host IP address 192.168.1.15
Subnet Mask 255.255.255.0
Gateway IP address 192.168.1.1
Primary DNS server 192.168.1.1
Secondary DNS server 192.168.1.1
MAC address 00 04 A3 00 00 00
Web Login Enabled
Wipe Firmware through FTP Enabled
DHCP Enabled
Username admin
Password password
IP address allowed to connect All
Server Name NetDev1
Figure 2.3 Network defaults

4 System Inputs
The system inputs of WebControlTM are used as inputs to the Boolean run engine
(see section 5.1). This section describes the configuration of these.

4.1 Digital Inputs


WebControlTM has eight digital inputs, each of which can be configured to be inverted
upon input to the system. The Boolean run engine will then look for a true of false
case of the input. Additionally when using the inputs with the Boolean run engine an
input delay can be specified for each input so the reaction to the input is delayed.
The value of this delay can be 0 to 255 seconds.

4.2 Analog Inputs


WebControlTM has three analog inputs each having an input voltage range of 0 to
+10V. Each digital input can be configured to have and upper and lower threshold
which can then be used in the Boolean expressions. These upper and lower
thresholds use the full scale range of 0 – 1023. This is new in this version firmware.

4.3 DS1822/DS18B20 1 Wire Temperature Sensors


WebControlTM supports up to eight Maxim DS1822 /DS18B20 12bit 1 wire
temperature sensors. Each temperature sensor can be configured to provide an

Copyright(c) 2008, 2009 CAI Networks, Inc. 4


TM
WebControl Technical Manual Version 1.3

upper and lower temperature threshold to be used by in the Boolean expressions.


Because all temperature sensors connect to the system on the 1 wire data bus it is
necessary to tell WebControlTM which thresholds apply to which sensor. This is
achieved by assigning a sensor ROM code to a sensor in the internal temperature
sensor list WebControlTM keeps. CGI command codes are provided to do this.
WebControlTM will enumerate the ROM codes of all connected DS1822’s on start-up
and will provide a list of available ROM codes that can be assigned to the internal
temperature sensor list.

4.4 Honeywell 4000 Series Relative Humidity Sensor


The WebControlTM hardware is designed to support the Honeywell 4000 series
relative humidity sensors. These sensors output an ‘almost’ linear voltage between 0
- +5V dc proportional to the relative humidity. This output is fed into one of the A/D
converter channels on the microcontroller. CGI command codes are available to
setup an upper and lower threshold for the humidity sensor that can then be used in
the Boolean expressions.

4.5 Timers
WebControlTM provides up to 20 timers that can be configured to provide periodic or
once only alarms that can then be used as inputs to the Boolean run engine via the
Boolean expressions. CGI commands are available to configure all timers.
The CGI commands use text strings that the user inputs via the browser. These text
strings use the format shown in figure 3.0.

<DD><Space><MMDD><Space><HH><:><MM>
Figure 3.0 String format for configuring timers
Where:
 DD is a weekday identifier where 01 to 07 is Sunday to Saturday and 00
means that this field is not used
 MMDD is a date identifier where MM is the month 01 to 12 and DD is the day
of the month. If the date identifier is not used then it should be set to 0000
 HH is the hour in 24hr format
 MM is the minute
 The spaces and colon in the string are required

Copyright(c) 2008, 2009 CAI Networks, Inc. 5


TM
WebControl Technical Manual Version 1.3

4.5.1 Examples of Timer Configuration


To configure a timer to alarm at 17:00 every Thursday the configuration string would
be:
06 0000 17:00

To configure a timer to alarm at 09:30 every Monday and on the 22nd November the
configuration string would be:
02 1122 09:30

To configure a timer to alarm at 15:39 every the 15th February the configuration string
would be:
00 0215 15:32

To configure a timer to alarm daily at 12:00 the configuration string would be:
00 0000 12:00

4.6 View the System Inputs and Outputs


To integrate with other servers, directly query I/O status maybe desirable. Using wget
command from other servers or computers, user can directly query each input and
output status. The following HTTP commands are directly return the I/O values:

“geta1.cgi, geta2.cgi, geta3.cgi” – to query analog input values


“geth1.cgi” – to query the humidity sensor readings
“geti1.cgi, geti2.cgi,..geti8.cgi” – to query each digital input values
“geto1.cgi, geto2.cgi,...geto8.cgi” – to query each TTL output status
“gett1.cgi, gett2.cgi,...gett8.cgi” – to query each temperature sensor value

Copyright(c) 2008, 2009 CAI Networks, Inc. 6


TM
WebControl Technical Manual Version 1.3

5 Controlling the TTL Output Port


The current WebControlTM firmware can be configured to set or clear outputs on the
TTL output port in two ways:
1. By enabling browser control. This will then allow a TTL output pin to be set
and cleared using CGI commands.
2. By enabling the Boolean run engine for the particular output and supplying a
Boolean expression that uses a ‘AND’ ‘OR’ combinational logic by using the
available inputs to automatically decide when to set or clear an output.
The above methods all use HTTP CGI commands.
When you use the CGI commands to configure the port you have to provide
configuration for each individual output. The entire configuration for this should be
provided through the HTTP server CGI web pages.

5.1 The Boolean Run Engine


The Boolean run engine allows a ‘AND’ ‘OR’ combinational logic expression to be
continuously run to control the true or false state of each TTL output pin.
Any combination of the system inputs can be used in either a combinational ‘AND’ or
combinational ‘OR’ expression. The Boolean engine can be supplied with an
expression to set the output true or an expression to set the output false or it can be
supplied with both true and false expressions.
The three main steps required to configure the Boolean run engine for a TTL output
are as follows:
1. Enable the Boolean run engine for the TTL output in question
2. Configure the system inputs that will be used in the expressions
3. Input the Boolean expressions to set the output true and false respectively

5.2 Boolean Expression Syntax


This section describes the syntax that is used to enter the Boolean expressions used
by the Boolean run engine in order to control a TTL output.

5.2.1 Writing Rules


The syntax to specify each input term in the expression is:
<Logical operator><optional NOT operator><input term>

Copyright(c) 2008, 2009 CAI Networks, Inc. 7


TM
WebControl Technical Manual Version 1.3

Each Boolean expression is made up of terms, which are a combination of the


system inputs. Each term must have a logical operator associated with it.
Each Boolean expression can be a total of no more that 48 characters this includes
spaces. And no more than 16 individual terms can be contained in an expression.

5.2.2 Logical Operators


The supported logical operators are shown in the table in figure 4.0.
Logical Operator Description
! The NOT operator can be used to invert the input of the term.
E.g. !C2 will mean when timer 2 is not true
& The AND operator is used to and terms together
| The OR operator is used to OR terms together
Figure 4.0 Logical operators of the Boolean expression syntax

A single expression can contain OR and AND terms but they cannot be mixed E.g.
&C2 &I1 |T3 |O4 &A2 not compliant will function
incorrectly
&C2 &I1 &A2 |T3 |O4 compliant

Even if the expression only contains one term, that term must still have a logical
operator attached to it. E.g.
C3 not compliant will fail
&C3 compliant

5.2.3 Input Terms


The table in figure 4.1 shows the input terms the Boolean expressions support and
the strings that are used to specify them.
String Input Term Description
“C1” C2”…”C20” Programmable system timers 1 to 20
“I1” “I2”… “I8” Digital inputs 1 to 8
“A1U” “A2U” “A3U” Analog inputs 1 to 3 upper thresholds
“A1L” “A2L” “A3L” Analog inputs 1 to 3 lower thresholds
“T1U” “T2U”…”T8U” Temperature sensors 1 to 8 upper thresholds
“T1L” “T2L”…”T8L” Temperature sensors 1 to 8 lower thresholds
“H1U” Humidity sensor upper threshold
“H1L” Humidity sensor lower threshold
“O1” “O1”…”O8” Digital outputs 1 to 8 state
[x]..[xxx] Delay from 0 to 255 seconds
Figure 4.1 Inputs terms supported by the Boolean expressions

Copyright(c) 2008, 2009 CAI Networks, Inc. 8


TM
WebControl Technical Manual Version 1.3

5.2.4 Additional Operators


The optional “[ ]” operator is used to specify an input delay for a digital input, or a
digital output. The value placed between the square brackets is a value of 0 to 255
seconds that specifies the delay to the reaction of the input once triggered. It is
appended to the input identifier as follows:

&I2[5] - this will cause the input 2 to be delayed by 5 seconds


This operator is optional, if omitted then the reaction to the digital input is treated as
instantaneous.

Or,
O3[10] -this will cause the input signal of output 3 to be delay by 10
seconds.

5.2.5 Examples
Set output true when input 2 is true and temperature sensor 1 has reached its upper
threshold:
&I2 &T1U
Set output true when analog input 2 has reached its lower threshold or humidity
sensor 1 has reached its upper threshold:
&A2L |H1U

Set output true when input 6 goes low and timer 18 has reached its time and analog
input 3 has reached its lower threshold. OR temperature sensor 3 has reached its
lower threshold:
&!I6 &C18 &A3L | T3L

Set the output true when digital input 3 is high but only after 10 seconds:
&I3[10]

5.3 Addition Features of the TTL output Port


A TTL output can also be configured in the following ways:
 Output can be inverted
 When the output changes state an email can be automatically generated
and sent

Copyright(c) 2008, 2009 CAI Networks, Inc. 9


TM
WebControl Technical Manual Version 1.3

 The browser control and Boolean run engine can both be disabled
 The output can be used as a momentary output by specifying a momentary
value in seconds using a CGI configuration parameter. The resolution of
the momentary output timer is 0.1 seconds. The momentary output will be
set ON once triggered by the browser control and after the specified period
of time (0 to 6553 seconds) the output will return to its false state again.
Specifying a value of 0.0 seconds disables the momentary output and it is
treated as a normal output. Using momentary feature with Boolean Run
Engine has unpredictable result (output may be repeatedly ON and OFF).

5.4 TTL Output Port Control Defaults


When WebControlTM is first powered on from new or after receiving a reset defaults
hardware input the TTL output port configuration is defaulted to the settings shown in
shown in figure 4.2.
Parameter Default
Browser Control Enabled
Boolean Run Engine Enabled
TRUE Boolean expression None
FALSE Boolean expression None
Invert output Not inverted
Automated email on state change Disabled
Momentary output Disabled (Value of 0.0 seconds)
Figure 4.2 TTL output port defaults

Copyright(c) 2008, 2009 CAI Networks, Inc. 10


TM
WebControl Technical Manual Version 1.3

6 Automated Email Setup


WebControlTM can be configured to send an automated email when a TTL output
changes state. Only when using the Boolean run engine to control the output. There
is one set of SMTP email settings that need to be configured before email will
function. Each TTL output that has email enabled has its own configuration for the
message body of the email message. The email “to address” and other settings are
the same for all outputs. The generated email message body it made up of the
configured body message set up by the user for each TTL output and a snap shot of
all system inputs generated dynamically at the time the email is sent.

6.1 Email Settings


The following table in figure 5.0 shows the settings that the user needs to configure in
order for the SMTP email to work correctly. When the board is defaulted these
settings are cleared.
Parameter Description
SMTP Host The IP address of the ISP SMTP server to use. E.g.
66.77.88.99 (resolve from smtp.myISP.com)
SMTP Port The SMTP port number, default is 25
SMTP username For SMTP servers that require authentication this is the
user's username. If no username is required then leave
this field blank
SMTP password For SMTP servers that require authentication this is the
user's password. If no password is required then leave
this field blank
From email address The email address the message is sent from this is the
address of the SMTP email account. E.g.
[email protected]
To email address The email address messages will be sent to
Subject A subject line all messages will have
Figure 5.0 Email configuration parameters

6.1.1 Requirements to Use Email


 If WebControlTM is to be configured to generate and automated email then it must
be connected to a network that has access to a DNS server. The primary and
secondary DNS server addresses of WebControlTM are required to be configured
correctly.
 A valid SMTP email account must be used for the sending of emails.

Copyright(c) 2008, 2009 CAI Networks, Inc. 11


TM
WebControl Technical Manual Version 1.3

7 Real Time Clock


WebControlTM has a build in real time clock that is kept accurate by using an atomic
clock via the simple network timer protocol (SNTP). Configuration is required to set
the correct time zone of the clock. CGI commands are provided to do this. When
NTP is not available, WebControlTM will use its own crystal to maintain the clock
accurate. If NTP is available, only need to set the timezone in the clock page. If NTP
is not available, please set your local clock in the clock page also. Without NTP, its
internal clock may not as accurate.

7.1 Network Requirements to Use the NTP


WebControlTM must be connected to a network that has access to a DNS server. The
primary and secondary DNS server addresses of WebControlTM are required to be
configured correctly. WebControlTM will use DNS to resolve the name of the
timeserver.

Copyright(c) 2008, 2009 CAI Networks, Inc. 12

You might also like