the netcam
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/1.jpg)
The NetCamThe NetCam
MembersDarin Keever
Shannon McPhateDerek Leonard
Jeff Nadeau
Senior Design ProjectCPSC 483Group 2
![Page 2: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/2.jpg)
IntroductionIntroduction
The Net Cam is a system which allows The Net Cam is a system which allows a camera to be placed on an a camera to be placed on an ethernet network allowing a host ethernet network allowing a host computer to capture images.computer to capture images.
![Page 3: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/3.jpg)
Practical UsesPractical Uses
• Inexpensive security systemInexpensive security system
• Monitoring scientific experimentsMonitoring scientific experiments
• Sharing life over internet Sharing life over internet “PeepingMoe.com”“PeepingMoe.com”
• Spying on people at water coolerSpying on people at water cooler
• Real time image capture has endless usesReal time image capture has endless uses
![Page 4: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/4.jpg)
Individual TasksIndividual Tasks
• Darin - Darin - Implement QuickCam drivers to Implement QuickCam drivers to hardware hardware
• Shannon - Data to packet conversionShannon - Data to packet conversion
• Derek - Derek - software to convert receive software to convert receive packet and convert to GIFpacket and convert to GIF
• Jeff - Jeff - Initial driver development, data Initial driver development, data to packet debuggingto packet debugging
![Page 5: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/5.jpg)
Problems EncounteredProblems Encountered
• The DP8391 network interface chip would The DP8391 network interface chip would not transmit data, even when tested not transmit data, even when tested without Xylinx design. without Xylinx design.
• This caused a barricade between the This caused a barricade between the camera and computer.camera and computer.
• Exceptional pre-planning still allowed Exceptional pre-planning still allowed other stages of development to conclude.other stages of development to conclude.
![Page 6: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/6.jpg)
Modifications to Original Modifications to Original DesignDesign
• Coding for the camera drivers done Coding for the camera drivers done in Verilog instead of ABEL.in Verilog instead of ABEL.
• Camera functions were realized from Camera functions were realized from Linux drivers because we did not Linux drivers because we did not have much luck with the logic have much luck with the logic analyzer.analyzer.
• The network interface chip used has The network interface chip used has changed. It is essentially the same changed. It is essentially the same chip, only without DMA buffering and chip, only without DMA buffering and controlcontrol
• The memory design is now an 8x256 The memory design is now an 8x256 bit RAM. As a result, we now must bit RAM. As a result, we now must use a 16 bit counter to address it.use a 16 bit counter to address it.
• Added time-outs to driver design Added time-outs to driver design improving reliabilityimproving reliability
![Page 7: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/7.jpg)
The 4 Project PhasesThe 4 Project Phases
• Have camera send images at Have camera send images at predetermined time intervals.predetermined time intervals.
• Have camera send image when any type Have camera send image when any type of UDP packet is received by the boardof UDP packet is received by the board
• Have board receive “control packet” from Have board receive “control packet” from computer with the image size to capturecomputer with the image size to capture
• Implement camera control as GIF image Implement camera control as GIF image serverserver
![Page 8: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/8.jpg)
The Final StatusThe Final Status
• Camera controller interacts flawlessly Camera controller interacts flawlessly with QuickCamwith QuickCam
• Network interface chip problem Network interface chip problem prevented us from testing network prevented us from testing network abilitiesabilities
• Host computer software receives Host computer software receives packets and translates to GIF formatpackets and translates to GIF format
![Page 9: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/9.jpg)
RankingsRankings
• Level of difficulty faced in implementation:Level of difficulty faced in implementation:– The project has been a challenge and has been time The project has been a challenge and has been time
consuming, especially the paperwork. Network chip has consuming, especially the paperwork. Network chip has provided us with much frustrationprovided us with much frustration
• Coordination among team membersCoordination among team members– Has been a little tough scheduling computer time with Has been a little tough scheduling computer time with
each other, however we all work well together.each other, however we all work well together.
• Support from TA’s and instructorSupport from TA’s and instructor– ExcellentExcellent
![Page 10: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/10.jpg)
Components of ProjectComponents of Project
• Network InterfaceNetwork Interface
• Camera InterfaceCamera Interface
• External Network DevelopmentExternal Network Development
![Page 11: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/11.jpg)
Network InterfaceNetwork Interface
• BackgroundBackground
• Xilinx ControllerXilinx Controller
• SNI/AUI ChipsetSNI/AUI Chipset
• TestingTesting
![Page 12: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/12.jpg)
BackgroundBackground
• The function of the Xilinx-to-Ethernet The function of the Xilinx-to-Ethernet component of the hardware was to take component of the hardware was to take the pixel data from the camera, put it into the pixel data from the camera, put it into an Ethernet standard transmission an Ethernet standard transmission packet, and drive the packet onto the packet, and drive the packet onto the Ethernet.Ethernet.
• Components - Xilinx 4003 FPGA and Components - Xilinx 4003 FPGA and SNI/AUI ChipsetSNI/AUI Chipset
![Page 13: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/13.jpg)
Xilinx ControllerXilinx Controller
• FunctionFunction
• Interface to CameraInterface to Camera
• Interface to SNIInterface to SNI
• Design DescriptionDesign Description
![Page 14: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/14.jpg)
Xilinx ControllerXilinx Controller
![Page 15: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/15.jpg)
![Page 16: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/16.jpg)
SNI/AUI ChipsetSNI/AUI Chipset
• SNI DescriptionSNI Description
• AUI AUI
• CircuitryCircuitry
![Page 17: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/17.jpg)
![Page 18: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/18.jpg)
TestingTesting
• Logic DesignLogic Design
• Timing IssuesTiming Issues
• Hardware ProblemHardware Problem
![Page 19: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/19.jpg)
Xilinx Circuit TestingXilinx Circuit Testing
• Xilinx software simulationXilinx software simulation
• Logic analyzer Logic analyzer
• OscilloscopeOscilloscope
![Page 20: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/20.jpg)
SNI/AUI Circuit TestingSNI/AUI Circuit Testing
AAGHHHHH!AAGHHHHH!!!!!
![Page 21: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/21.jpg)
ProblemProblem
The SNI does not output a The SNI does not output a differential transmit pair to the differential transmit pair to the AUI.AUI.
![Page 22: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/22.jpg)
![Page 23: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/23.jpg)
Testing ConfigurationsTesting Configurations
• ClockClock
• Loopback ModeLoopback Mode
• Select InputSelect Input
• Reduce current flowReduce current flow
![Page 24: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/24.jpg)
ResultResult
The SNI is the essential link The SNI is the essential link between the Xilinx controller between the Xilinx controller and the AUI, and between the and the AUI, and between the camera and the Ethernet. camera and the Ethernet. Therefore, we do not have Therefore, we do not have communication between the communication between the camera and the computer camera and the computer software.software.
![Page 25: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/25.jpg)
Camera InterfaceCamera Interface
• Introduction to Parallel PortIntroduction to Parallel Port
• Introduction to CameraIntroduction to Camera
• Driving the CameraDriving the Camera
• Output from CameraOutput from Camera
![Page 26: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/26.jpg)
Introduction to Parallel Introduction to Parallel PortPort
• Data, Status, Control : Data, Status, Control : eight bit registerseight bit registers
• Each bit of register Each bit of register corresponds to pincorresponds to pin
– example: example:
status(7) = pin 11status(7) = pin 11
• When programming,When programming,
wait(5s);wait(5s);
control = h5c;control = h5c;
![Page 27: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/27.jpg)
Introduction to CameraIntroduction to Camera
• 80x60 pixel image80x60 pixel image
• 4 bit shades - Black and White4 bit shades - Black and White
• Reset and Command sequences Reset and Command sequences availableavailable
![Page 28: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/28.jpg)
Reset Sequence Reset Sequence
Xilinx to CameraXilinx to Cameracontrol = h20control = h20
data = h75data = h75
wait 255wait 255ss
control = h0bcontrol = h0b
wait 255wait 255ss
control = h0econtrol = h0e
![Page 29: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/29.jpg)
Command SequenceCommand Sequence
Xilinx to CameraXilinx to Cameradata = commanddata = commandwait(255wait(255s)s)control = h06control = h06for(count = 0;status == 1;count++)for(count = 0;status == 1;count++)
if(count > command_timeout)if(count > command_timeout)reset()reset()
control = h0econtrol = h0efor(count = 0;status == 0;count++)for(count = 0;status == 0;count++)
if(count > command_timeout)if(count > command_timeout)reset()reset()
Camera to XilinxCamera to Xilinx
status(3) = 1status(3) = 1status(4-7) = command(lowbyte)status(4-7) = command(lowbyte)
status(3) = 0status(3) = 0status(4-7) = command(highbyte)status(4-7) = command(highbyte)
![Page 30: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/30.jpg)
Camera OperationCamera Operation
ResetResetCommand(brightness)Command(brightness)Command(brightness_value)Command(brightness_value)Command(contrast)Command(contrast)Command(contrast_value)Command(contrast_value)Command(white_balance)Command(white_balance)Command(white_balance_valuCommand(white_balance_valu
e)e)Command(resolution)Command(resolution)Command(resolution_value)Command(resolution_value)Command(get_byte)Command(get_byte)
• Timeouts vary for each Timeouts vary for each commandcommand
• repeat get_byte for the repeat get_byte for the number of pixels specified number of pixels specified by resolutionby resolution
![Page 31: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/31.jpg)
Driving the CameraDriving the Camera
• Using VerilogUsing Verilog
• Asynchronous Design ProblemAsynchronous Design Problem
• State MachinesState Machines
• SubroutinesSubroutines
![Page 32: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/32.jpg)
VerilogVerilog
• BenefitsBenefits– AsynchronousAsynchronous
– C type languageC type language
• DrawbacksDrawbacks– AsynchronousAsynchronous
– Only modular logic (no while, until, or Only modular logic (no while, until, or for)for)
![Page 33: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/33.jpg)
Asynchronous Design SolutionAsynchronous Design Solution
• Input a clockInput a clock
• Create States - Large State MachineCreate States - Large State Machine
• Have Next State, Present StateHave Next State, Present State
• On clock edge, Present State = Next On clock edge, Present State = Next StateState
![Page 34: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/34.jpg)
State MachineState Machine
State1
State2
State3
State4
Drawbacks:Drawbacks:
•MANY statesMANY states
•repetitiverepetitive
![Page 35: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/35.jpg)
Eliminate Drawbacks with Eliminate Drawbacks with SubroutinesSubroutines
State1
State2
Sub1
Sub1
Sub1
Sub1
![Page 36: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/36.jpg)
Eliminate Drawbacks with Eliminate Drawbacks with SubroutinesSubroutines
Example StateExample State scan_state4:scan_state4: beginbegin
command = 103;command = 103;stack = scan_state5;stack = scan_state5;timeout = timeout = command_timeout;command_timeout;NS = command_state1;NS = command_state1;
endend
• Input CommandInput Command• Set Stack for next Set Stack for next
StateState• Set Timeout for Set Timeout for
Individual Individual CommandCommand
• Set Next State Set Next State (NS) for subroutine(NS) for subroutine
![Page 37: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/37.jpg)
OutputOutput DataData
• Only to test outputOnly to test output
• Xilinx outputs data to BS2 (Basic Xilinx outputs data to BS2 (Basic STAMP)STAMP)– Only on get_byte commandsOnly on get_byte commands
– Uses subroutine within command Uses subroutine within command sequencesequence
• BS2 accepts data and outputs to a BS2 accepts data and outputs to a TerminalTerminal
![Page 38: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/38.jpg)
![Page 39: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/39.jpg)
Output continuedOutput continued
• Output to the SNIOutput to the SNI– Xilinx must send faster than SNI Xilinx must send faster than SNI
receivesreceives
– No need for memory buffer if timing No need for memory buffer if timing issues are resolvedissues are resolved
![Page 40: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/40.jpg)
ServerServer
• UDP protocolUDP protocol
• Captures raw data, writing to fileCaptures raw data, writing to file
• HEX values inverted for proper HEX values inverted for proper displaydisplay
![Page 41: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/41.jpg)
GIF ConversionGIF Conversion
• Converts raw data (02A9FD…) to Converts raw data (02A9FD…) to viewable GIFviewable GIF
• Viewable from anywhere with Web Viewable from anywhere with Web browserbrowser
![Page 42: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/42.jpg)
Web OutputWeb Output
• Portable: viewable from any Portable: viewable from any browserbrowser
• Rapid development time: develop Rapid development time: develop Web page and image filesWeb page and image files
• Ease of use: familiar to almost Ease of use: familiar to almost everyoneeveryone
![Page 43: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/43.jpg)
Server PushServer Push
• NT Workstation as server not NT Workstation as server not allowedallowed
• FTP image to remote Web serverFTP image to remote Web server
• Allows user to specify destination of Allows user to specify destination of datadata
• Output from CameraOutput from Camera
![Page 44: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/44.jpg)
ProblemsProblems
• Inverting raw data to correct valuesInverting raw data to correct values
• Output from Camera different than Output from Camera different than expectedexpected
![Page 45: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/45.jpg)
ChangesChanges
• FTP to remote server instead of FTP to remote server instead of local NT serverlocal NT server
• Used test client program to send Used test client program to send sample captured datasample captured data
• GIF to JPEG & back to GIFGIF to JPEG & back to GIF
![Page 46: The NetCam](https://reader036.vdocuments.site/reader036/viewer/2022062309/56815a6a550346895dc7c0f5/html5/thumbnails/46.jpg)
ConclusionConclusion
• Offered hands-on experience with Offered hands-on experience with hardware design and debugginghardware design and debugging
• Provided excellent teamwork Provided excellent teamwork experienceexperience
• Skills integrationSkills integration
• Presentation and documentation Presentation and documentation experienceexperience