| Attention
Creative Design Engineers: Getting Connected To The Internet Can Earn You Cash. |
|
|
Internet Connectivity Category Winners First Prize • Second Prize • Third Prize Internet Application Category Winners First Prize • Second Prize • Third Prize
|
INTERNET PIC 2000 CONTEST WINNERS MAKING THE CONNECTION GRAND
PRIZE WINNER Edward Cheung There are several web servers on the Internet offering "live" images [1]. They typically involve video cameras feeding image capture boards that are contained in large desktop machines with Ethernet boards. The PIC Web Cam project accomplishes this with a PIC microcontroller and some off-the-shelf hardware. The images are obtained from an Olympus D-220L digital camera via its RS-232 interface. They are then served up by the integral web server via a standard NE2000 Network Interface Card. The image seen on the browser is refreshed automatically, leading to a live image.
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. This functionality was needed to accommodate JPG images from the camera, which can be several tens of kbytes in size. • The need for the 16 kbytes of external RAM is eliminated as all code fits in the PIC’s on-board resources. • One of the web pages on the server can be updated in non-volatile storage via any web browser without using additional software tools. The completed project is a fully functional Ethernet web server that also responds to ping (ICMP) requests.
After the PIC Web Cam is connected to the local Ethernet network, the user can communicate with it by using ping or by requesting the default home page with the URL: http://IP_ADDRESS, where "IP_ADDRESS" is the PIC’s preselected IP address. The resultant display on the web browser is shown in Photo 2. Clicking on "Small Image" will result in the small image (160 x 120), which is refreshed automatically every 10 s, and clicking on the "Large Image" yields the large image (320 x 240) which is automatically reloaded every 30 s. Lastly, clicking on "Custom" brings up the page that is customizable by the user via the "Config Custom" link. A form is then brought up where the existing HTML code of the custom page is shown. The user can then edit and store the code in nonvolatile memory. Data from the camera to the PIC is sent at 57,600 bps in 2-KB chunks. This is split into two parts since this is larger than one TCP/IP packet. Multiple groups of 2-KB data are transferred from the camera to the browser until the entire image is complete. It takes about 3 s to transfer a small image, and about 6 s for a large image. The PIC web server has been tested with as many as three simultaneous web clients.
On the custom page, parameters such as text, background color, image size, and refresh interval can be adjusted to the users liking. Because the file is stored in the PIC’s EEPROM, a maximum of 256 bytes can be stored.
This project illustrates what is capable of a tiny PIC processor, doing the work of a much larger desktop computer and serving up digital images from a still camera. It should be a valuable addition to any system requiring an inexpensive yet effective way of transmitting live images over the web. REFERENCES [1] Conventional web camera, http://www.ksc.nasa.gov/countdown/shuttle/camera60.html. [2] Serial-line PIC web server, http://www-ccs.cs.umass.edu/~shri/iPic.html. [3] Pico Web server, http://www.picoweb.net. |
|
![]() |