I am working on project that requires me to detect the position of a pen on a piece of normal paper.

My first thought was to use 4 IR LEDs on a receiving unit set at the top of the page, and to put a camera on the pen to triangulate the position.

However I have come across some problems with this. The first being that I do not know of any sensor that is an "infrared camera" that I could buy commercially. The second problem I have run into is that the pen can be oriented in any direction, and no camera would be able to detect the IR in every direction.

I was wondering if anyone had any solutions to the first 2 problems, or if anyone knew of another technique to detect the position of one object relative to another.

  • \$\begingroup\$ Please clarify "the pen can be oriented in any direction". The words "any direction" are not geometrically clear to me. \$\endgroup\$ – boardbite Aug 26 '12 at 3:19
  • \$\begingroup\$ If you mark a point on a pen, and then you rotate the pen along its major axis, that point can be facing any direction along a 2 dimensional plain. For instance on a clock the "hand" can point in any direction along the plane that the clock is mounted on. \$\endgroup\$ – Reid Aug 26 '12 at 3:24
  • \$\begingroup\$ Just swap the roles of the camera and the IR LED \$\endgroup\$ – boardbite Aug 26 '12 at 3:32
  • \$\begingroup\$ Good point, but I still don't have a camera. \$\endgroup\$ – Reid Aug 26 '12 at 3:34
  • \$\begingroup\$ Read answer below \$\endgroup\$ – boardbite Aug 26 '12 at 3:35


You can try swapping your present idea: So, make the IR camera be the stationary detector, and the pen be the moving IR source (i.e., put one or more LEDs on it at geometrically opposite points, if you are worried about occlusion).

(Also, by doing this, you can allow the setup to expand to two IR cameras in the future and triangulate for 3D position tracking.)


For further reference and ideas, see Johnny Lee's popular projects using the infrared camera on the Wii Remote, for an inexpensive and accurate possible implementation: This video covers something similar to what I believe you are attempting. You can also see this page for more textual detail.

Sources for the IR camera itself

  • Wiimote camera: To my knowledge, everyone who has played with the Wiimote hack has either got the separately sold camera from Ebay, or broke open their Wii Remote to pull the camera out. The manufacturer of the camera is Pixart (Taiwan). It's unlikely Pixart/distributors will ever officially sell this camera by itself, but if you find such a source, do let the world know!

  • OptiTrack V120:SLIM: $279, 640X480, 120 FPS.

  • CMUCam 4 or earlier version: This is an open-source hardware and processing implementation from a Carnegie Mellon team but using a visible-light camera. You can easily adapt it for infrared tracking by adding an IR filter such as this one.

|improve this answer|||||
  • \$\begingroup\$ The Wii Remote camera is not a commercially available component, although it is similar to what I am looking for. Do you know of one I can buy commercially (i.e. on digikey)? \$\endgroup\$ – Reid Aug 26 '12 at 3:19
  • \$\begingroup\$ Added info to answer for completeness \$\endgroup\$ – boardbite Aug 26 '12 at 3:24

I realize this question is old, but I thought I'd comment on an interesting solution, built by some students from the Universidad de la República in Uruguay. An overview of their tablet can be found here.

Basically, they solved the problem by attaching both an infrared and ultrasound emitter to the tip of the pen. The receiver is best described as having two ultrasound sensors, one in each corner, and one infrared sensor in the middle. It is shown at the bottom right of the specifications.

In the students' own words (translated from the specifications in Spanish):

The detection method used is based on the simultaneous emission of infrared and ultrasound waves from the tip of the pencil. Since infrared propagates much faster than ultrasound, its reception could be considered instantaneous. And since ultrasound propagates at an approximately constant speed, the position of the pen can be computed by counting the time it takes the signal to reach each ultrasound sensor.

So they had two sensors and three receivers triangulating the pen's position.

EDIT: I later found that this same system is actually used by Mimio Touch Boards. Here is a .pdf document with their technical specifications, in English this time.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.