Optical Mouse Scanner Project Design

Optical Mouse Scanner Project Design Optical Mouse Scanner Project Design

kahler.lilli52
from kahler.lilli52 More from this publisher
11.07.2015 Views

OverviewIn our project, “Optical Mouse Scanner,” we will be implementing a system in which a user can create lowresolution scans of a document using an ordinary optical mouse. The mouse is operated as per usual, withthe user running it over the portion of the document he/she is interested in scanning. The aggregated resultsof the current scan will be displayed on a computer monitor. By observing the aggregated scan on themonitor, the user will be able to note which areas of the scan are missing or erroneous, and rescan thedocument at those locations.The user will be able to use the left­click and right­click functionality of the mouse to begin the scan andreset the scan, respectively. The current image being read by the optical mouse will always be displayed ina small inset box on the monitor display, next to the larger image of the aggregate scan up to that point.The position of the mouse will also be indicated on the aggregate scan. The figure below depicts thedescribed visual output:Figure 1: GUI for mouse scanner project.A standard optical mouse transmits information about the location of the mouse in a serial, packetizedformat. This information can be acquired using the USB, PS/2, or direct connection to a serial pin on theprocessor—for the purposes of this project, the serial pin will be used. We will acquire image data from theoptical mouse via the ADNS­2051 optical processor, which is one of a series of common optical processorsdistributed by Agilent for use in optical mice. This processor includes an 16x16 pixel CCD; the image dataand XY positional data is acquired via a synchronous, half­duplex serial port on the processor. By solderingconnections to the optical processor’s clock, serial I/O, and power status pins, we can communicate withand exchange data with the optical processor. The ADNS­2051 data sheet outlines communication/requestprotocols that we must establish to access CCD and other information. All connections to the opticalprocessor will require soldering ribbon cables to the optical processor to establish custom GPIO (to connectto the Altera DE2).The following image is a high­level block diagram of all the hardware components and how they interact:2

Figure 2: System architecture and hardware interconnection.Interconnections within the DE2 block in Figure 2 indicate communication using the Avalon Bus (also knownas the Avalon Switch Fabric).Critical PathPotential timing failure might arise when communicating between the ADNS­2051 optical processor and theDE2 board. Specifically, a polling FSM is required to communicate on the serial data line of the ADNS­2051,which will control how registers on the ADNS­2051 are accessed. The timing of how information is collectedfrom these registers, how it is stored, and how it is used, is critical to this project design.Specifically, the grayscale values of each pixel in a complete 16x16 scanned image sample are sequentiallyaccessed and stored. When accessing registers that store the 6­bit grayscale values of each pixel in the16x16 CCD image matrix, it is necessary to store all 256 pixels of the image matrix to associate with agiven XY location. The given XY location itself must also be stored in a timely fashion, corresponding withthe image matrix. Both of these pieces of information are stored in SRAM and accessed by software. Theimage and location information, stored in SRAM, is accessed via software for sorting and aggregation. Thissorting and aggregation consists of displaying the current image (256 pixels) according to the currentlocation information on the VGA display.The exact critical path comes into play when associating the timing between polling the ADNS­2051registers, storing/updating that information in SRAM, and accessing that information to aggregate on theVGA display. Concern rises when considering how quickly information will be collected from the mouse andupdated in SRAM on the DE2, because that limits how quickly this information can be accessed and sent3

OverviewIn our project, “<strong>Optical</strong> <strong>Mouse</strong> <strong>Scanner</strong>,” we will be implementing a system in which a user can create lowresolution scans of a document using an ordinary optical mouse. The mouse is operated as per usual, withthe user running it over the portion of the document he/she is interested in scanning. The aggregated resultsof the current scan will be displayed on a computer monitor. By observing the aggregated scan on themonitor, the user will be able to note which areas of the scan are missing or erroneous, and rescan thedocument at those locations.The user will be able to use the left­click and right­click functionality of the mouse to begin the scan andreset the scan, respectively. The current image being read by the optical mouse will always be displayed ina small inset box on the monitor display, next to the larger image of the aggregate scan up to that point.The position of the mouse will also be indicated on the aggregate scan. The figure below depicts thedescribed visual output:Figure 1: GUI for mouse scanner project.A standard optical mouse transmits information about the location of the mouse in a serial, packetizedformat. This information can be acquired using the USB, PS/2, or direct connection to a serial pin on theprocessor—for the purposes of this project, the serial pin will be used. We will acquire image data from theoptical mouse via the ADNS­2051 optical processor, which is one of a series of common optical processorsdistributed by Agilent for use in optical mice. This processor includes an 16x16 pixel CCD; the image dataand XY positional data is acquired via a synchronous, half­duplex serial port on the processor. By solderingconnections to the optical processor’s clock, serial I/O, and power status pins, we can communicate withand exchange data with the optical processor. The ADNS­2051 data sheet outlines communication/requestprotocols that we must establish to access CCD and other information. All connections to the opticalprocessor will require soldering ribbon cables to the optical processor to establish custom GPIO (to connectto the Altera DE2).The following image is a high­level block diagram of all the hardware components and how they interact:2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!