USB mouse for Prop
Mightor
Posts: 338
Hey there,
I have an optical mouse (a Logitech) I'd like to use for positioning my robot. However, the mouse is a USB one so I am not sure if I could use the guts of it the same way you'd use a PS2 one. The small PCB in the mouse has a 5-way connector to which the USB cable attaches. Basically I'd like to attach it to the bottom of the robot. Is it possible to just remove the USB cable and hook it up to the board the same I would with a PS2 mouse?
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
I have an optical mouse (a Logitech) I'd like to use for positioning my robot. However, the mouse is a USB one so I am not sure if I could use the guts of it the same way you'd use a PS2 one. The small PCB in the mouse has a 5-way connector to which the USB cable attaches. Basically I'd like to attach it to the bottom of the robot. Is it possible to just remove the USB cable and hook it up to the board the same I would with a PS2 mouse?
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
Comments
Graham
p.s. mice sound nice for positioning until you turn on the spot, you need 2, well one and a half really. Or do you mean for you to operate in order to position your robot?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
(1) PS/2 mice with a small adapter plug enabling a connection into the USB port.
(2) USB mice with a similar small adapter plug to allow a connection into a miniDIN PS/2 port
There must be millions of those adapters laying around unused....
However, I'd like to hook it up to my prototype board without the actual USB->PS2 adapter and a PS2 socket. I intended to make my own leads for it since I don't really want about a meter of cable inside the bot (I doubt it would even fit).
I think I can solve the movement detection problem when I spin around the axle. If the mouse sensor is placed off center I don't have that problem. I will need to do some extra calculations but it should be pretty trivial to determine its true center and the offset of the sensor.
I was wondering what the guts of one of those little adapters was. I thought that maybe some voodoo-magic happened to the signals as they passed through to make them PS2 compatible. If this is not the case and it merely rewires the signals then I should be fine, in theory [noparse]:)[/noparse]
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
No, that won't do it, the mouse "assumes" that it is being moved perfectly without being rotated, for human user interface this is fine but for tracking robot movement it is not, not unless it points in the same direction all the time.
As you may have guessed from my first comment, they are just adapters, no smarts. You know it works so just be sure to get the pin-outs right.
Graham
Or am I mistaken?
Gr,
Mightor
PS: Phear my 133+ MS Paint skillz.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
http://forums.parallax.com/showthread.php?p=661158
Notice that he mentions "The only really critical part is holding the bottom of the lense exactly .09 in off the surface being tracked." of course, his robot is intended for a sumo surface.... I wonder if you plan to use your robot on smooth surfaces only... if not... it might pose a reliability reading issue of the sensor...
you also have the optomechanical mouse option, please look at the bottom of the following discussion:
http://forums.parallax.com/showthread.php?p=660556
I hope this helps... happy roboting!..
As for optomechanical sensors, I do have the Parallax wheel encoder kit but I'd like to try something I haven't played with before.
Right now I am just playing around with different ideas, the mouse sensor was just one of them. In the end it might not even be necessary to be able to tell the position so precisely, if nothing else it'll be fun to play with a sensor like that [noparse]:)[/noparse]
I am still at the "how to make the servos and using the Ping))) sensor" stage, so the actual mini-sumo is still a ways off for now.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
I hadn't realized you were doing a two wheeled bot, I should have thought, it limits the motion to back/forth and rotate so you have enough encoders for your degrees of freedom.
It is possible to calculate the change in position but it is not that trivial as will never just do true rotations and translations, instead you will have mixtures however you can recalculate the position on every encoder pulse much as I did with my dual wheel odometry:
www.youtube.com/watch?v=VhNhFyN0oHw
Nice little video. The animated sprite looks kinda cool [noparse]:)[/noparse] You had no way of knowing about the two wheels until I mentioned it in post #7 or so. As for calculating my position, I thought I would limit my robot's turns to just ones about its axle, therefore limiting the amount of special calculations I need to do to get my position. The encoders from Parallax are only really limited by the wheel that causes them to pulse. The Boe-Bot wheels only have the ability to generate 16 pulses, that seriously limits their usefulness for accurate positioning.
As you can see, I still have a lot of figuring out to do but it's a fun process along the way.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| Any sufficiently advanced technology is indistinguishable from magic.
I just used the optical mouse from parallax since it is cheap ($4.95), ps2, and pretty much known to work. If you are going to use it, BE CAREFUL. The letters on the PCB (you will see it after you take the cover off) are very misleading. The "C" wire is actually the Data line and the "D" wire is actually the Clock line. Also, ground is the orange wire and +5v is the blue one. Also, I needed the sensor to fit in a small enclosure so I had to cut off the top part of the PCB that contains the 3 switches and scroll wheel, but doing so disconnects the power to one pin (it loops around the edge of the PCB). If you cut the board you will need to add a jumper for power.
From my experience, there is actually a small range of heights that the lense can be for the sensor to work. I haven't used it for precision position tracking though, just for detecting direction and speed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Optical mouse have acceleration built in (or it is a function of the technique) so may be tricky to use accurately.
Graham