460 likes | 606 Views
The NetCam. Members Darin Keever Shannon McPhate Derek Leonard Jeff Nadeau. Senior Design Project CPSC 483 Group 2. Introduction. The Net Cam is a system which allows a camera to be placed on an ethernet network allowing a host computer to capture images. Practical Uses.
E N D
The NetCam Members Darin Keever Shannon McPhate Derek Leonard Jeff Nadeau Senior Design Project CPSC 483 Group 2
Introduction The Net Cam is a system which allows a camera to be placed on an ethernet network allowing a host computer to capture images.
Practical Uses • Inexpensive security system • Monitoring scientific experiments • Sharing life over internet “PeepingMoe.com” • Spying on people at water cooler • Real time image capture has endless uses
Individual Tasks • Darin - Implement QuickCam drivers to hardware • Shannon - Data to packet conversion • Derek - software to convert receive packet and convert to GIF • Jeff - Initial driver development, data to packet debugging
Problems Encountered • The DP8391 network interface chip would not transmit data, even when tested without Xylinx design. • This caused a barricade between the camera and computer. • Exceptional pre-planning still allowed other stages of development to conclude.
Modifications to Original Design • Coding for the camera drivers done in Verilog instead of ABEL. • Camera functions were realized from Linux drivers because we did not have much luck with the logic analyzer. • The network interface chip used has changed. It is essentially the same chip, only without DMA buffering and control • The memory design is now an 8x256 bit RAM. As a result, we now must use a 16 bit counter to address it. • Added time-outs to driver design improving reliability
The 4 Project Phases • Have camera send images at predetermined time intervals. • Have camera send image when any type of UDP packet is received by the board • Have board receive “control packet” from computer with the image size to capture • Implement camera control as GIF image server
The Final Status • Camera controller interacts flawlessly with QuickCam • Network interface chip problem prevented us from testing network abilities • Host computer software receives packets and translates to GIF format
Rankings • Level of difficulty faced in implementation: • The project has been a challenge and has been time consuming, especially the paperwork. Network chip has provided us with much frustration • Coordination among team members • Has been a little tough scheduling computer time with each other, however we all work well together. • Support from TA’s and instructor • Excellent
Components of Project • Network Interface • Camera Interface • External Network Development
Network Interface • Background • Xilinx Controller • SNI/AUI Chipset • Testing
Background • The function of the Xilinx-to-Ethernet component of the hardware was to take the pixel data from the camera, put it into an Ethernet standard transmission packet, and drive the packet onto the Ethernet. • Components - Xilinx 4003 FPGA and SNI/AUI Chipset
Xilinx Controller • Function • Interface to Camera • Interface to SNI • Design Description
SNI/AUI Chipset • SNI Description • AUI • Circuitry
Testing • Logic Design • Timing Issues • Hardware Problem
Xilinx Circuit Testing • Xilinx software simulation • Logic analyzer • Oscilloscope
SNI/AUI Circuit Testing AAGHHHHH!!!
Problem The SNI does not output a differential transmit pair to the AUI.
Testing Configurations • Clock • Loopback Mode • Select Input • Reduce current flow
Result The SNI is the essential link between the Xilinx controller and the AUI, and between the camera and the Ethernet. Therefore, we do not have communication between the camera and the computer software.
Camera Interface • Introduction to Parallel Port • Introduction to Camera • Driving the Camera • Output from Camera
Introduction to Parallel Port • Data, Status, Control : eight bit registers • Each bit of register corresponds to pin • example: status(7) = pin 11 • When programming, wait(5s); control = h5c;
Introduction to Camera • 80x60 pixel image • 4 bit shades - Black and White • Reset and Command sequences available
Xilinx to Camera control = h20 data = h75 wait 255s control = h0b wait 255s control = h0e Reset Sequence
Xilinx to Camera data = command wait(255s) control = h06 for(count = 0;status == 1;count++) if(count > command_timeout) reset() control = h0e for(count = 0;status == 0;count++) if(count > command_timeout) reset() Command Sequence Camera to Xilinx status(3) = 1 status(4-7) = command(lowbyte) status(3) = 0 status(4-7) = command(highbyte)
Camera Operation Reset Command(brightness) Command(brightness_value) Command(contrast) Command(contrast_value) Command(white_balance) Command(white_balance_value) Command(resolution) Command(resolution_value) Command(get_byte) • Timeouts vary for each command • repeat get_byte for the number of pixels specified by resolution
Driving the Camera • Using Verilog • Asynchronous Design Problem • State Machines • Subroutines
Verilog • Benefits • Asynchronous • C type language • Drawbacks • Asynchronous • Only modular logic (no while, until, or for)
Asynchronous Design Solution • Input a clock • Create States - Large State Machine • Have Next State, Present State • On clock edge, Present State = Next State
State Machine Drawbacks: • MANY states • repetitive
Example State scan_state4: begin command = 103; stack = scan_state5; timeout = command_timeout; NS = command_state1; end Input Command Set Stack for next State Set Timeout for Individual Command Set Next State (NS) for subroutine Eliminate Drawbacks with Subroutines
OutputData • Only to test output • Xilinx outputs data to BS2 (Basic STAMP) • Only on get_byte commands • Uses subroutine within command sequence • BS2 accepts data and outputs to a Terminal
Output continued • Output to the SNI • Xilinx must send faster than SNI receives • No need for memory buffer if timing issues are resolved
Server • UDP protocol • Captures raw data, writing to file • HEX values inverted for proper display
GIF Conversion • Converts raw data (02A9FD…) to viewable GIF • Viewable from anywhere with Web browser
Web Output • Portable: viewable from any browser • Rapid development time: develop Web page and image files • Ease of use: familiar to almost everyone
Server Push • NT Workstation as server not allowed • FTP image to remote Web server • Allows user to specify destination of data • Output from Camera
Problems • Inverting raw data to correct values • Output from Camera different than expected
Changes • FTP to remote server instead of local NT server • Used test client program to send sample captured data • GIF to JPEG & back to GIF
Conclusion • Offered hands-on experience with hardware design and debugging • Provided excellent teamwork experience • Skills integration • Presentation and documentation experience