|
INTERNET
CONNECTIVITY CATEGORY WINNERS
To meet the requirements
of the Internet Connectivity category, contestants had to invent a
new way for TCP/IP connectivity implementation other than the Microchip
AN724 (or other previously published in Circuit Cellar) and incorporate
additional protocols such as HTP, UDP, FTP or TFTP, IRC, and/or SMTP.
The project could connect directly or via modem.
First
Prize ı Second Prize ı Third
Prize
FIRST
PRIZE WINNER
PIC X10
WEB SERVER
by Edward
Cheung
Edward Cheung
Mitchellville, MD
echeung@hst.nasa.gov
The home automation industry is dominated
by a standard known as X10[1]. Devices that are compatible with this
product line are sold by outlets such as Radio Shack and Sears making
them widely available to the general public. These units communicate
over the existing power line wiring to control all sorts of loads
such as lamps and appliances. A simple powerline modem is also obtainable
that will allow a computer to send and receive these commands. The
PIC X10 Web Server combines a web server and an X10 controller. With
this project, any user can control and monitor over the web the status
of their home or office environment that has been equipped with X10
units.
 |
| Photo 1ıThe green board is
the Ethernet card that plugs into the ISA connector on the custom
PIC processor card and the powerline modem is in the background. |
A significant difference from previous
PIC based Web Servers [2] is the Ethernet interface, making this the
first direct Internet connected PIC known to the author. This project
is similar to the PicoWeb Server [3] except for several differences:
ı A PIC16F877 instead of an ATMEL microcontroller
is used.
ı The maximum file size is not limited
to one Ethernet packet (1400 bytes). This complicates software considerably
as more of the TCP/IP stack needs to be implemented.
ı The need for the 16 KB of external
RAM is eliminated as all code fits in the PICıs onboard resources.
One of the personal goals achieved in
this project was to see if a web server could be written from scratch
using only electronic documents from the web. The completed project
is not only a fully functional Ethernet web server, but also handles
the timing critical tasks of the X10 interface making it useful for
home automation and control.
The PIC obtains its Ethernet interface
via a standard NE2000-compatible Ethernet card. It is plugged into
an ISA connector on the printed circuit board that holds the PIC.
The PIC emulates a PC ISA interface to communicate with the Ethernet
card.
After the X10 Web Server is connected
to the local LAN, any user can communicate with the server by using
the URL http://IP_ADDRESS, where "IP_ADDRESS" is the preselected
IP Address of the web server. Photo 2 shows an example of the resultant
display on the browser.
 |
| Photo 2ıThis page automatically
reloads itself every 5 s to provide an up-to-date view of the
status of the units. The user can click on commands to change
the status of the units. The first column is the name of the
unit, the second the address, the third the current state, and
subsequent columns hold hyperlinks that cause that command to
be sent. |
The user can check the status of the
units and can also click on the hyperlinks to send commands to control
the loads (which will update their status). If any other controller
sends a command to the load, its status is also automatically updated
in the home control panel.
The control panel can be reconfigured
if the user clicks on the "Config" button at the bottom
of the main control panel. The resultant display is shown in Photo
3.
 |
| Photo 3ıThe configuration panel
allows the user to add or delete units with these two forms.
Up to 16 load controllers can be accommodated on the home control
panel. |
To add a unit, the user simply enters
the X10 address (in this example "A1") and its name ("Room")
and then clicks "Add." The user is then returned to the
main auto-loading home control panel with the new unit added (its
status will be displayed as "?"). Similarly, clicking on
"Delete" after entering a unit number causes that unit to
be deleted from the control panel. The names and the status of up
to 16 units are preserved in the PICıs nonvolatile EEPROM.
This powerful and compact web server
should be a useful addition to any environment requiring the capability
to send and receive X10 commands without needing the installation
of any unusual hardware or software.
REFERENCES
[1] The X10 company, http://www.x10.com
[2] Serial-line PIC web server, http://www-ccs.cs.umass.edu/~shri/iPic.html
[3] PicoWeb Server, http://www.picoweb.net
Grand
Prize Winner
Internet
Application Category Winners
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ıCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |