Shop OBEX P1 Docs P2 Docs Learn Events
Mousebot? — Parallax Forums

Mousebot?

JohnGayJohnGay Posts: 57
edited 2012-05-07 08:35 in Robotics
I know I've been chatting a lot more than doing, but I was running this idea through my head.

If I used an old mouse instead of the ball caster, I can use it to keep track of where my robot is heading.
If I'm using the mouse to track my robot, then I don't need the wheel encoders.
Why not just slap a pair of cheap Radio Shack hobby motors to the back of a mouse, build a simple H-Bridge circuit and connect THAT to my QuickStart board. I could even hack the mouse buttons into front bumper switches. I'm sure 1 cog could read the USB input from the mouse, then another can run the motors, and then give it some autonomous capability.

That's something I can probably start by this weekend or so.

Cheers,

John Gay

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-01 14:00
    I'm not so sure if the Prop would read a USB mouse. I think you'd be better off with a PS/2 mouse.

    Parallax sells an optical mouse sensor. You could try that for your odometry needs. I've heard the mouse approach isn't as accurate as normal encoders though. It would still be fun to try.
  • W9GFOW9GFO Posts: 4,010
    edited 2012-05-01 14:25
    I knew I had seen a mouse bot before... this isn't it but it is an example of one;

    http://www.instructables.com/id/Mousebot-Revisited/

    Another one;

    http://letsmakerobots.com/node/26463
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-01 16:09
    John Gay, I used the Parallax mouse sensor in a odometry proof of concept a few months back. It worked well for tracking straight or right turns. I did notice that errors accumulated quickly so some means of zeroing out errors would be helpful. I used a Boe-bot for my POC and had four points of ground contact which caused problems on uneven surfaces. If I use it in a more mature design I will use the mouse as the tail sensor.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-01 17:13
    Just found a thread in the prop forum where someone was bit-banging a USB host device to access a Bluetooth single. Took 3 cogs and a 6Mhz xtal. Don't know if a mouse could be done simpler. Otherwise, PS2 might be an easier option.

    My main goal is start cheap and simple. 2 hobby motors, a handfull of transistors and diodes for a H-bridge, and slap it onto a mouse for tracking. Then practice making drive reliably. First doing straight lines. Boxes. The inevitable figure 8 (-=

    Then giving it some simulated free will. Chasing the dogs and cat around for fun.
  • ercoerco Posts: 20,256
    edited 2012-05-02 07:25
    I hate to suggest Arduino, but I know they can read a USB mouse without any fuss. Nonetheless, I haven't heard of any mouse-based robots that excel at odometry. They'll never be as accurate as wheel encoders IMHO.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-02 09:45
    Except I've already got a Propeller QuickStart board for my starting point.

    Wheel encoders tell how far a wheel has turned, but can't know if the wheel has slipped. The mouse input, either ball or optical can tell how much the 'bot has traveled regardless of the wheels moving. Either way is open to errors. I'll be adding whiskers to the buttons for wall detection. Resolving the differences between how far the 'bot THINKS it's traveled and when it hits a wall is an exercise to solve in software.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-02 09:56
    JohnGay wrote: »
    Except I've already got a Propeller QuickStart board for my starting point.

    Wheel encoders tell how far a wheel has turned, but can't know if the wheel has slipped. The mouse input, either ball or optical can tell how much the 'bot has traveled regardless of the wheels moving. Either way is open to errors.

    Computer mice don't need to be as accurate as a normal wheel encoder becuase us humans keep adding the subtle corrections automatically (I think I just quoted one of erco's posts). I'd be very surprised if odometry using a mouse sensor is as accurate as using enocoders on wheels.

    Not that I think you shouldn't try mouse odometry. I even hope you prove me wrong.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-05 13:12
    http://www.tamiyausa.com/product/item.php?product-id=70068

    Just got this for $17.99

    Not much, but it's a start. First get it running, then put my prop in it and start coding.
  • ercoerco Posts: 20,256
    edited 2012-05-05 19:14
    Oh yeah? Well I just got 3 vintage PS/2 mice with a ball & optical encoders to hack up. Plan A is to read the encoders.


    Plan B is under development. :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-05 19:23
    JohnGay wrote: »
    http://www.tamiyausa.com/product/item.php?product-id=70068

    Just got this for $17.99

    Not much, but it's a start. First get it running, then put my prop in it and start coding.

    I thought the idea was to use the encoders of a mouse for odometry?

    Are you going to transplant guts from a PS/2 mouse into the clear mouse?

    As I previously mentioned, Parallax sells a mouse sensor. It might be easier to install the sensor from Parallax than trying to transplant mouse guts.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-06 04:58
    Mice I've got. I didn't have motors, gears and wheels. Unfortunately, one of the motors has a loose connection in it. These motors have no markings, but it runs on a single 1.5V battery. Can I use a normal H-bridge setup with such low voltage motors? Or should I get higher voltage ones? I'm wondering if I can build one cheaper than the 1A driver from sparkfun.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-06 06:46
    Turns out I has just tightened the motor frame down too hard. Both motors run now.
  • JohnGayJohnGay Posts: 57
    edited 2012-05-07 08:35
    O.K., I found the specs for the motors in my mousebot:
    SPECS: Voltage range: 1.5-3V
    Nominal voltage: 1.5V
    Normal load: .091 oz-in 6.5 g-cm
    RPM at no load: 7600
    RPM at nominal: load 5200
    Current mA (no load): 270mA

    So, nominal voltage is 1.5V and max is 3V. So I should be find with a single OR dual battery pack for the motors. But, the motor driver is a little more troublesome?

    As I understand the circuit for a basic PNP-type H-Bridge, the motor supply voltage at the collector should be higher than the switching voltage on the base.
    Will using MOSFET's fix this? I studied this stuff over 30 years ago and only remember the basics now.

    Otherwise, I'll just look for higher voltage motors that fit the worm gear and motor mount.

    Cheers,

    John Gay
Sign In or Register to comment.