![]() |
![]() |
![]() THE MAGAZINE FOR COMPUTER APPLICATIONS Circuit CellarOnline offers articles illustrating creative solutions and unique applications through complete projects, practical tutorials, and useful design techniques. |
|||||||||
![]() |
|||||||||
![]() MAKING THE CONNECTION It’s always interesting to see what people are doing with PICs these days and the Internet PIC2000 contest provided plenty of fine examples. Among the winners you’ll find several practical applications that demonstrate just how powerful a PIC can be in the hands of a skilled designer. Of course, the good design ideas and practical applications weren’t limited to just the winners. Every entry to a Circuit Cellar design contest is worthy of mention because it takes more than just an idea to enter the contest—you have to mold and perfect your idea into an actual project. Each project that arrives is the direct result of the designer’s time, effort, and money. And, just because a project doesn’t make it on the winners list, doesn’t mean that all of the designer’s time, effort, and money has been wasted. Read Steve’s editorial in the July issue of the print magazine and you’ll find out that the real motivation behind Circuit Cellar’s involvement in design contests is to find a new batch of Circuit Cellar authors. Whether you won the grand prize, didn’t make the prize list, or ran into overwhelming setbacks that prevented you from submitting the project on time, you’re always welcome to write an article about what it took to design your project. (Send your proposals to editor@circuitcellar.com.) In the past, we’ve had design contests with a prize tier that contained 20 to 30 prizes. This year, the judges had their work cut out for them as there were only seven prizes to award. And to make things even more challenging, among the top entries was a group of projects that all had one thing in common—Edward Cheung. You’ll find his name on the Grand Prize-winning project as well as on the First Prizes in both the Internet Application and Internet Connectivity categories. My hat’s off to anyone who spends the time and effort to complete a project for a design contest, but anyone who goes through it all five times (as Edward did) is certainly worth mentioning! Congratulations to all of
the contest
winners and all of those who participated in the Internet PIC2000
contest.
And, if you don’t think you have the time to enter one of the upcoming
Circuit
Cellar design contests, just ask Edward Cheung if he thinks his
time
and effort was amply rewarded!
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: • 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.
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.
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. |
Copyright
©1999 ChipCenter
|