Mouse Input USB vs. PS/2

I've read some posts on the playground about interfacing with mice, but they all talk about a PS/2 mouse.

Is there no chance of using a USB extension cable that I cut and exposed the bare wires on the other end (red/black/green/white) as the means of connecting it to the arduino to detect the x/y and button presses from the mouse? I don't really want to destroy the mouse if possible...

Thanks,

Mike

Is there no chance of using a USB extension cable that I cut and exposed the bare wires on the other end

Yes no chance.

That just gets you at the USB signals, what will you do with them?

OK...so based on that it's obvious there is quite a difference. I'm new to this so please be gentle :wink:

You asked what I would do with them...the USB signals...are the signals useless to the arduino or do you need a lib that doesn't exist or ???

Thanks,

Mike

The arduino is not capable of acting as a USB host.

It is possible to use another processor to act as a USB HID (Human Interface Device) to allow you to talk to a PC running USB. :-

http://www.create.ucsb.edu/~dano/CUI/#CUIv1/

However there is not the processing power or the memory in an arduino to act as a host. That is why you don't see any examples of how to do what you want because it can't be done.
I understand that some people are working on this but I have not seen any positive results from this.

OK, that helps...thanks!

One last question, would one of those little USB to PS/2 converter "plugs" (Banana Plugs | Flex Pin Connectors | Speaker Wire - Sewell — Sewell Direct) change anything?

They don't look like they have any smarts in them, but they must unless somehow the mouse has the smarts to detect if it is connected via usb or ps/2 and change it's output accordingly...does that sound right?

I found this:

and it appears to be doing just that...

They don't look like they have any smarts in them, but they must unless somehow the mouse has the smarts to detect if it is connected via usb or ps/2 and change it's output accordingly...does that sound right?

I don't know, but I've been wondering about those usb - ps/2 converters too. And your suggestion sounds sensible, I hadn't thought about it that way before.

i found this: USB to PS/2 mouse or keyboard adapter pinout diagram @ pinoutguide.com Also it says on the top of the page that it only works with devices which supports both interfaces (USB & PS/2). I assume it means it is the mouse or keyboard devices that must support both interfaces, like you say.

The arduino is not capable of acting as a USB host.

This doesn't seem to keep people from trying, though:

http://www.google.com/search?q=arduino+host+usb

Actually, there was a poster on these forums who managed to get a particular 3D "orb" controller, that was serial based, working to an extent converting it to USB in some manner, using a similar sheild (I think he homebrewed it); then again, that's not quite the same thing.

:slight_smile:

I believe that the mouse doesn't actually speak usb. The ps2 protocol must be at similar levels to usb and the driver in the pc sorts it out.

The little converter jobbies could show you how the wiring works i guess but you shouldn't really need one.

Yeah, I have an old AT platform PC with no USB, so I cannot use a USB mouse even with a USB-PS/2 adapter...

It's apparent that the original poster now has a better grasp of USB and PS/2 communication than most people in this thread.

They are not even remotely similar. USB mice do actually use USB, bill2009.

The little adapter plugs simply swap some connections around. The mouse detects if it's plugged into a USB or a PS/2 port, and behaves like a USB or a PS/2 mouse (as mhutter guessed).

The best solution is to find a PS2 only mouse and interface that.

A USB mouse can be interfaced to arduino using a USB Host Shield, but this is more expensive than the mouse (and the Arduino !), so you would need good reason to use it.

Because the mouse works low speed USB, there is software for the AVR which does a bit banged low speed USB. This however is significant load on processor and software architecture. It would not sit so well with other Arduino libraries if you want a general purpose solution.

I believe that the mouse doesn't actually speak usb.

Oh, it does: the mouse detects whether it's connected to USB or PS/2 during initialization. That's why the adapter won't adapt any old mouse: it only works with mice with the detection designed in. Which is gonna be changing from "few" to "none" as time goes by, just as you can only find dual-interface RS-232/PS2 rodents at garage sales today.

Quote:
The arduino is not capable of acting as a USB host.

This doesn't seem to keep people from trying, though:

No but it stops them succeeding.

check this out
http://www.circuitsathome.com/mcu/programming/ps3-and-wiimote-game-controllers-on-the-arduino-host-shield-part-1

From that site:-

The Circuits at Home USB host shield is based on the Maxim MAX3421E USB controller IC.

So I hardly think shoving a second processor to deal with the USB actually counts as getting USB working on the arduino.

You can get some very fancy image processing on an arduino if only you connect it to a PC. See not the same is it.

Boy, you live up to your name don't you! :slight_smile: I like it!

Can anyone tell me how you think this is working?

Is she just merely "steering" the USB signal to the digipot and not actually processing its input?

We tend to forget that Arduino is a religion not a solution for some members.
The MAX3421 is less of a second processor than many shields (Ethernet, bluetooth). All programming and USB stack is done on Arduino.

So I hardly think shoving a second processor to deal with the USB actually counts as getting USB working on the arduino.

From the Maxim FAQ app note:

Does the MAX3421E include a microcontroller?
No. Like the MAX3420E, the MAX3421E is designed to work with any controller, such as a microcontroller, DSP, or ASIC. It connects to an SPI master that can run up to 26MHz.

Can anyone tell me how you think this is working?

Life-Size Katamari Lives - Kellbot!

Is she just merely "steering" the USB signal to the digipot and not actually processing its input?

Except it's not a USB signal, is it? It's the mouse operating in ps2 mode. I haven't examined closesly, but she says she controls the controller via digital potentiometers. I would guess the faster you spin the ball, the more the potentiometer "turn" toward one the corresponding axis. So there is signal processing involved. (...or perhaps you were asking a rhetoric question? I guess the source code is available if you really want to find out.)

I read the entire thread from the first post and realized I somehow missed a couple of posts (macegr, i-bot, ran t) which shed a little more light on the Katamari project...(raron: I couldn't find the source code anywhere...were you able to find a link? I posted on her BLOG but have not received a response yet...)

Recap:
USB Mouse -> USB-PS/2 Adapter -> Arduino

This ONLY worked because the USB mouse was plugged into the USB to PS/2 adapter and the mouse was capeable of detecting the connection type and switching from USB to PS/2 mode/protocol.

Now...is it the adapter itself that triggers the switch to PS/2 protocol or is it something on the host that "tells" the mouse which language(USB or PS/2) to speak?

Does anyone know if the adapter does anything more than just change the USB connection into a PS/2 connection? Does it have any smarts?

If it's just a "pass through" then it wouldn't really be necessary as long as the mouse was one that was bi-lingual correct?

Thank you all for your input!