Title: LASER GUIDED MOUSE
1 LASER GUIDED MOUSE
- ECE 445 Senior Design
- Spring 2007
- Samir Desai
- Howard Luo
- James Lin
2Project Description
- Through the combination of a standard laser
pointer and a clicking device that we designed,
we have revolutionized the presentation industry
by introducing a new freedom of movement while
maintaining control of the computer wireless and
effortlessly
3Project Sub-units
- This project was divided into three main
sub-units - Device design and fabrication
- System integration and driver manipulation
- Image acquisition and analysis
4Device Circuit Design
- Goals of the Clicking Device
- Wireless
- Simple Logic
- Low Power Consumption
- Configurable size
- No lag time
- Very little noise
- Transmission speed that allows rapid double
clicking
5Design Basics
- Two capacitive push buttons send parallel signals
that represent the Left and Right mouse clicks - Parallel signals are encoded into a serial signal
using an 8 bit shift register. The shift register
provides a start and stop code that enclose the
LR signals 010LR010
6Design Basics Continued
- Shift Register outputs serial signal to a
Transmitter which then wireless sends the signal
to a Receiver on a different board. - Receiver takes the signal and sends it to a
Max232 which converts the voltages into values
the serial port will recognize and transfers them
via DB9 and RS232 cable to the com port.
7555 Timer
- Shift register needed a clock frequency that
would be recognized by comport and be fast enough
to allow a rapid double click. - We chose 2400 bits per second (Hz)
- LM 555 Timer allowed us to generate a clock very
near this frequency
8555 Timer continued
Using two resisters of value 1600 Ohms and 2000
Ohms and two capacitors of value .1uF and .01uF,
we generated a clock signal of 2576 Hz with a
duty cycle 64.3
9555 Generated Waveform
10Design issues and solutions
- After the basic design was completed, there were
some problematic issues that needed fixing - Too much noise
- Power source regulation
- Square wave generation
11Clicker Schematic
12Receiver Schematic
13Printed Circuit Boards
- Once final boards were built and successfully
tested, we designed PCBs - Helped with size configuration
- Provided more suitable casing options
14PCB issues
- The PCBs for the clicker and the receiver were
never successfully tested - 555 timer
- Max232
- Hardwiring
- Floating voltages
15PCB pictures Clicker
16PCB pictures Receiver
17Casing Pictures Clicker
18Casing Pictures Clicker continued
19Casing Pictures Receiver
20Casing Pictures Receiver continued
21Testing and Plots
22Testing and Plots continued
- Transmitter to Receiver 2400 Hz
23Testing and Plots continued
- Transmitter to DB9 input at 2400 Hz and 20 feet
24Future Improvements
- Drag and Drop feature
- Miniaturization
- USB implementation
25System Integration
- Serial data read into COM port and analyzed
- Relative location of laser pointer acquired from
image processing - Integration of these two factors followed by
mouse driver manipulation
26Block Diagram of Integration
27Serial Port Test HowTo
- Hardware Serial loop back
- Software Reads in data from the serial port and
interprets data as Left or Right click
28Serial port loopback
29RS232 Test Program
30RS232 Test Program
31RS232 Test Program
32RS232 Test Program
33Behind the GUI
- Serial Port Settings
- Baud Rate 2400
- Data Bits 7
- Stop Bit 1
- Parity Bit none
34Reading from the Receiver
35SerialPort Class in .Net Framework
- Close Closes the port connection and sets the
IsOpen property to false - Open Opens a new serial port connection
- ReadExisting Reads all immediately available
bytes, based on the encoding, in both the stream
and the input buffer of the SerialPort object. - Write Writes data to the serial port output
buffer
36Process for reading COM port
- Open COM port
- On data received, read in data from COM port
buffer - Interpret data
- Close COM port
37GUI of COM port tester
38Reading from Image Processor
- clickLocation detector.point
39Mouse control HowTo
- Use import method SendInput of the user32.dll
library - DllImport the User32.dll
- Remember to add the library
- using System.Runtime.InteropServices
40Testing Mouse Control
41Process for Mouse Control
- Set Text Left / Right
- Set the cursor to memorized location
- Set up the INPUT structure
- Fill it for mouse down and send the input
- Fill it for mouse up and send the input
42Image Processing
- Logitech QuickCam Fusion
- Microsoft DirectShow
- 320x240 BitMap
- 8-10 fps
- Applied a red filter to camera lens
43Image Processing
44Image Processing
- Every 5 pixels of BitMap is checked
- Finds brightest spot in picture
45GUI
46Calibration
- Software automatically determines the users
screen resolution - Define four corners using laser pointer and
buttons on GUI - Use corners to determine upper lower, left, and
right bounds - Calculate XFactor and YFactor
- Convert BitMap location to screen (x, y)
47Calibration Marks
48Calibration
49Calibration
- XFactor and YFactor 3.5 4.5
- Therefore approximately every 20 pixels on the
screen is clickable - point new Point(ScreenX, ScreenY)
50Calibration
51Future Improvements
- Faster scanning for more precision
- Automatic detection of background brightness
- Compensation for slanted projected screen
(Keystone)
52Ethical Considerations
- Dont point lasers in peoples eyes!
53Special Thanks to
- Ethan Miller ECE 445 Teaching Assistant
- Scott McDonald Machine shop supervisor
- Wally Smith ECE parts shop inventory staff
- Mark Smart ECE parts shop PCB fabrication
- Thank you all for your time and patience. We
could not have done it without you!
54Questions