Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make a computer mouse using analog circuit?

Status
Not open for further replies.

nikhildascl

Full Member level 3
Joined
Apr 15, 2012
Messages
150
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,318
Location
Kerala, India
Activity points
2,115
How to make a computer mouse using analog circuit? How a mouse works?
 

That's very difficult but not impossible.

A mouse works in one of two ways:
1. a camera takes pictures of the surface beneath it, when a picture is displaced from the previous image, it works out in which direction and assumes the mouse went the opposite way.
2. two light beams are interrupted by slotted wheels mounted at 90 degrees to each other, driven by a rolling ball. The beams land on quadrature encoders which sense the direction and amount of motion.

In both cases, the motion is sent as serial data to the host computer so doing it with an analog circuit would be difficult.

Brian.
 

What about the usb mouses? Is usb mouse also works on serial communication? I need to know which type of data is sending through serial communication. I mean, the value in hex or ASCII. Thank you.
 

What about the usb mouses? Is usb mouse also works on serial communication? I need to know which type of data is sending through serial communication. I mean, the value in hex or ASCII. Thank you.

USB is much more complex than simply sending digital values (an old PS/2 mouse would act more like what you describe). Since USB is a bus (i.e., Universal Serial Bus), it can have several devices connected to a single USB controller inside your PC. This means that the USB hardware is controlled by software which includes activities like device identification, handshaking, setup, and then data transfer. There is a good bit of overhead that you'd have to intercept and decode in order to strip out the raw "mouse movement" data.
 

OK ie. all these operations are handled by the mouse driver right? So, we can make a mouse like device only by using a software that installed on the PC. Right?
 

You'll need to build and install a device driver (software) for your operating system that allows the device to be recognized as an HID (Human Interface Device), which is what Microsoft calls devices like mice, trackballs, etc. OS drivers are typically written in a language like C++, C#, etc. I haven't done it myself, but I'm sure there are forums and websites with example code on the web, if you do some digging.

Read up on Wikipedia for some interesting background on HID and USB-HID devices.
https://en.wikipedia.org/wiki/Human_interface_device

The driver does the translation from the device's data output to the PC's standardized input functions/methods. It basically operates as a bi-directional translator for your device and the OS it's trying to send information to.
 

Check this material :

http://www.fpga4fun.com/PongGame.html

http://www.mcmanis.com/chuck/robotics/projects/lab-x3/quadratrak.html

http://www.fpga4fun.com/QuadratureDecoder.html

PongDiagram.gif


PongGame.jpg



Also see this like designers ideas :

http://www.toxel.com/tech/2009/06/04/14-unusual-computer-mouse-designs/

---------- Post added at 02:18 ---------- Previous post was at 02:04 ----------

PC mouse information

**broken link removed**


Mouse Input

http://wiki.osdev.org/Mouse_Input


PS2 Mouse interface

http://www.computer-engineering.org/ps2mouse/


Microchip PS/2® to USB Mouse Translator

http://ww1.microchip.com/downloads/en/AppNotes/91055C.pdf
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top