Rat Plotter

Last year Jeri Ellsworth did a neat radar demo where she attached a radar sensor to a mouse and then scanned what was under a cloth by moving around the mouse and recording the radar response as she measured different positions with the mouse.

I wondered if you could turn that idea around and attach a pen-plotting mechanism to a mouse and reproduce an image from the screen.  I call that work in progress the “Rat Plotter.”

The basic principle behind the Rat Plotter project is to attach a pen to a mouse.  If the mouse cursor on the screen is over a dark pixel in an image the pen is lowered and if the mouse cursor on the screen is over a light pixel in an image the pen is raised.  In this way dragging the cursor over an image on the screen will reproduce that image on a piece of paper underneath the mouse.  I implemented the project in three parts: the software GUI which runs on my laptop, the Arduino software which controls the servo, and the physical pen raising mechanism attached to the mouse.

The software GUI is written in Processing.  The interface allows a simple 16-square image to be generated on the screen and then monitors the cursor position to determine whether the pen should be raised or lowered.  The pen position is then displayed on the screen and communicated to the Arduino over the serial connection using Firmata.

Rat Plotter software interface showing the two bar test image demonstrated in the video. The pen status is currently up.

The Arduino software is relatively simple.  Firmata monitors for pen position changes transmitted from the GUI software over serial.  The Arduino servo library then controls the servo arm position to raise or lower the pen.

The mechanical section of this project was more ambitious than I have attempted in the past.  I had recently bought a jar of Instamorph brand prototyping plastic that can be molded like clay when heated in boiling water but cools hard.  It’s relatively cheap and can be re-heated as many times as you want.  I built a small mechanical mount to attach the servo to the mouse and then a flexible pen holder that attached to the servo mount.  The long arm mounted to the servo can then displace the pen-holder.

Rat plotter mechanical close-up.

I was basically trying to reproduce the beautiful laser-cut mechanism from the Eggbot using boiling-hot playdough.  It worked out ok.  See the following video to see how well.

These are some images of the resulting prints. They are not great. I think the pen holding mechanism bends badly under torque from the mouse moving. Also, the mouse sensor readings “slip” where the mouse moved but the computer did not record the movement.  Furthermore rotational movements are not accounted for so the mouse had to be held with a uniform orientation to minimize distortion.

Test plots one, two and three.

My first three test prints. These were produced from the test image shown in the GUI screenshot and would ideally show two vertically aligned sets of identically long blue marks. They do not.  Alignment issues and problems with the mechanical plotting setup are revealed.  The green pen marks are notes.

Test plots four and five.

In conclusion, I used a super-crappy mouse that I found laying around under my desk. I’m going to try replacing it with my 2800 dpi Evoluent Vertical Mouse 3 and see if the distortion due to the mouse can be reduced.  I will also firm up the mechanical mechanism a bit.

Wish me luck!

This entry was posted in Projects, Toys. Bookmark the permalink.

Leave a Reply