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.
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.
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.
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.
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!