Introduction: PC Mouse Becomes a Robot (MouseBot)

A robotic pet mouse requires much less maintenance than a real one, and it is enjoyable to watch. It runs around, bumping briefly into obstacles, and searches for interesting places to visit.

The mousebot in this project uses only a few parts: 2 motors, 3 switches and 2 batteries.

When the mousebot is running and its whiskers touch an obstacle, the switch on that side turns “on” and this reverses the motor on the other side briefly. The mousebot turns slightly to avoid that obstacle and then continues forward.

Supplies

PARTS

  • 1 computer mouse. A large one is better than small.
  • 2 small DC motors, 1.5 to 3 volts. Motors with 2 flat sides fit better than round sides.
  • 2 SPDT (single-pole double-throw)microswitches with a straight lever
  • 1 SPST (single-pole single-throw) or SPDT slide switch. 
  • 2 AAA battery holders.
  • 2 AAA batteries.
  • 2 paper clips.
  • 2 connectors.
  • 2 Googly eyes.
  • Wire: red, black and some other color.
  • Heat-shrink tubing to fit the motor axles.
  • 6 Small bolts and nuts (#2).
  • Small pieces of corrugated cardboard.
  • Pin or needle.
  • 4 bristles from a cleaning brush.

TOOLS

  • Dremel tool or a collection of basic tools: hacksaw, small files, wire cutter, drill.
  • Glue gun or a glue that holds plastic, metal, cardboard.
  • Soldering iron and solder.
  • Wire stripper.
  • Scissors.
  • Small screwdrivers.
  • Needle-nose pliers.
  • Thin magic marker.
  • Clear tape or masking tape.

Step 1: Placement of the Parts

After taking off the top of the mouse case, remove the circuit board and all the parts inside. Save those for possible use in a future project. The circuit board in a ball-type mouse has 2 switches for the mouse-buttons, 2 IR emitters (usually clear?), 2 receivers (usually black?) and some other parts.

Cut the cord to about 4” (10 cm) for the tail.

Decide where to place the parts inside the bottom of the mouse case. The motors should be in the middle, where the mouse is tallest. The microswitches must be at the front, and the battery holders and on-off switch could be placed wherever they fit. The photo shows where the parts for my mouse are located. The on-off switch doubles as a support for the back of the mousebot. It is offset slightly from the middle so that it supports the middle when the switch is in the “on” position.

Step 2: Prepare the Case

Cut out any plastic obstructions that are in the way of the parts to be installed. Also, cut holes for the motors and switches. This may be done with a Dremel tool, or maybe by melting with a soldering iron, or by drilling and cutting with basic tools.

The photos show the before and after of the top and bottom of the mouse case. Some sections are still present, for attaching the motors.

Step 3: Motors

The motor axles need to be angled so that they support the mousebot and will move it when rotating. In my project, the motors had to be angled at about 45 degrees to fit inside the top and bottom of the mouse case. 

It is difficult to hold the motors in place for gluing, and so I made a support from corrugated cardboard, as shown in the photo. The pieces are cut from the corners of a larger piece of cardboard. The edges of the corners are at 90 degrees, which is perfect for holding the motors at 45 degrees each. The pin helps to hold the pieces in place while being glued.

After gluing the cardboard support inside the bottom case and allowing time for the glue to set completely, the motors may be glued to the support and to the case.

The motor axles are too smooth to move the mouse when they are rotating. This may be fixed by adding small pieces of heat-shrink tubing over the axles, after wiping the axles with alcohol to clean them. The ends of the shrunk tubing should stick out the same small distance on both motors, so that they provide the same amount of contact to the surface on which the mousebot will be running. In my project, the heat-shrink tubing didn’t stick well to the axles, and I had to add some glue at the top end of the tubing.

Step 4: Wiring

The first photo shows how the parts should be wired, and the second photo shows the wired mousebot.

The wires to the motors should be cut long enough to reach the farther terminal on each motor, in case some wires need to be switched if a motor is rotating in the wrong direction. The motor wires should not be soldered until you test that the motors are both rotating in the proper direction.

The various parts should be attached, wired and soldered as shown.

Step 5: Whiskers

The whiskers are made from paper clips and attached to the microswitch levers. Rather than soldering the paper clips to the switch levers, it is better to attach them with connectors so that they can be removed easily if they need to be adjusted or replaced. The steps are as follows:

  1. Straighten the paper clips.
  2. Cut them to about 2” (5 cm) in length.
  3. Cut a piece of the connectors out, as shown in the first photo. This is necessary to avoid the connectors bumping into each other when attached to the microswitches.
  4. Check that the paper clips do not have a plastic coating, or remove about ⅜ inch (1 cm) from one end if they do.
  5. Solder the paper clips to the connectors as shown in the first photo. The metal on the connectors is thin and narrow between the paper clips and the fatter end, and I found that it needs solder in that area to keep from being bent when the mousebot bumps into obstacles.
  6. Slide the connectors onto the microswitch levers as shown in the second photo.

Step 6: Test

Before attaching the top of the mouse case to the bottom, turn the mouse “on” and put it on the floor to ensure everything works properly. 

This is such a simple project, and yet, many little problems could (and did) occur, as described below.

If the mousebot simply spins, then the wire connection (unsoldered at this time) on one of the motors may not be making a proper contact, or one of the motors is turning in the wrong direction, or the heat-shrink tubing on one motor has fallen off. Check the wire connections first. Then, if the heat-shrink seems to be attached well, the wires should be switched on the motor that is on the inside of the spin.

If the mousebot is running forward in a circle, this is not important unless the circles are too small. There could be a few reasons: One motor may be turning faster than the other, or the motors are not at the exact same angle from the vertical, or the heat-shrink tubing on one motor is slipping slightly, or the tubing on one axle is shorter than on the other axle. 

Hold the mousebot with one hand, press one of the switches, and see if the motor on the other side begins to spin backward instead of forward. Then, try the other switch. In my project, this didn’t work. After checking with my multimeter, I found that one of the battery holders was not connecting the negative side of the battery. I don’t know if this was a flaw in the battery holder or if my soldering somehow caused it. This problem got solved when I put a bent piece of bare wire into the hole in the middle of the spring, pushed it around the end of the spring towards the outside of the holder, and twisted the two ends with needle-nose pliers. This made a proper connection between the spring inside the holder and and the terminal outside.

If the mousebot doesn’t turn slightly when it bumps an obstacle, the microswitch on that side is not being turned “on”. This could happen for a few reasons: If the mousebot hits the middle of a round obstacle or the corner of a square one, neither whisker may be pressed far enough for the switch to turn “on”. If the bottom of the obstacle is slightly curved up to its side, the whisker maybe did not touch the obstacle before the mousebot did. Or, it could be caused by the whisker being blocked by the other whisker. A whisker may be adjusted up or down slightly by moving the connector on the microswitch lever. The paper clip may need to be bent up if the whisker is too low.

A strange thing happens with my mousebot: If the on-off switch is “off” and I press one of the microswitches, both motors begin to rotate. This can be explained from the wiring diagram. With one of the switches pressed, the batteries are providing voltage to both motors in series. The current goes from one battery, thru one motor, then thru the other motor, to the other battery.

When the mousebot is running well, the wires for the motors should be soldered

Step 7: Googly Eyes & More Whiskers

Attach the top of the mouse case to the bottom.

Stick small Googly eyes to the top of the mousebot.

Glue 2 bristles from a cleaning brush to each connector, for additional whiskers as decoration. It is useful to have tape holding them in place for gluing, as shown in the photo.


The project is finished!