4
\$\begingroup\$

Yes, a similar question was asked before, but mine is different. Let me explain what I am thinking of.

Suppose I have an invisible 3 x 3 grid on my desk, is there any way I can detect which square I place my finger on? To clarify, when I say invisible, I mean I cannot see it, but the computer knows it is there, and I have a general idea where the 9 squares should be.

If it makes it any easier, imagine the grid is drawn on a piece of paper, and I need to detect which square I place my finger on without attaching anything to the individual squares.

The way I thought I could accomplish this task is to use one of those distance sensors, one for each row (or column). So I have three distance sensors, and depending on how far away my finger is from the sensor corresponding to row which my finger is on, it gives me a reading to indicate the exact square. This method seems simple, but the drawbacks for me are that the device will be too bulky if I use the commonly known HC-SR04 sensor (is there a smaller one?), and would be a nuisance to extrapolate to, say, a 20 x 20 grid (not to mention expensive).

Is there a cheap method I can apply to measure distance or position somehow on an invisible grid?

\$\endgroup\$
2
  • \$\begingroup\$ Isn't a capacitive grid an option? \$\endgroup\$ Sep 5, 2012 at 23:00
  • \$\begingroup\$ @BrunoFerreira Hi, that sounds interesting. Can you tell me some more, and give me a link to more information? Thanks. \$\endgroup\$
    – capcom
    Sep 5, 2012 at 23:58

3 Answers 3

4
\$\begingroup\$

This would be an ideal situation to try a variant of the method pioneered by Johnny Lee using an IR led and a IR (infrared) camera, e.g., found inside a Wiimote or bought off ebay for $25-30.

Any IR camera can be used, but the one from the Wiimote is superb for this because it's tiny and yet has a high resolution (1024 X 768) and a 100 Hertz update rate, better than even most standard (visible-spectrum) webcams.

The camera tracks X-Y coordinates of a basic infrared LED in its view region, so you can get creative on where you place the camera. As far as the infrared LED/marker, you can wear it your moving finger/hand.

Alternatively, if you don't want to wear an LED on your finger, you can have an array of several infrared LEDs sitting in a fixed position, emitting radiation which is detectably reflected by your finger if you put a piece of reflective tape around your finger (works rather effectively). Lots of flexibility.

You can watch Johnny Lee's video demo 1 and video demo 2 of something similar to this; the demo is rather impressive given the minimalistic setup.

Also, take a look at his original writeup.

For this method, three pieces of software that might come in handy:

\$\endgroup\$
10
  • \$\begingroup\$ I think you meant to link to this video \$\endgroup\$
    – Ben Voigt
    Sep 6, 2012 at 22:49
  • \$\begingroup\$ Oh wow, this is amazing. You guys have all given me amazing ideas, thank you. I especially like this one, and Dave's. \$\endgroup\$
    – capcom
    Sep 7, 2012 at 0:50
  • \$\begingroup\$ @BenVoigt: updated \$\endgroup\$
    – boardbite
    Sep 7, 2012 at 2:56
  • \$\begingroup\$ I'm curious though, because IR does not fall in the visible spectrum, can this method pose any hazard to my eyes as I won't know how bright the array would be? And (in case you know), what kind of software would I use to process the images from the IR camera? Would something like OpenCV (mentioned in Dave's answer) be appropriate for this too? Thanks. \$\endgroup\$
    – capcom
    Sep 7, 2012 at 11:32
  • \$\begingroup\$ If you use the IR camera from the Wiimote, it directly outputs the X-Y coordinates of the four brightest IR points it locates and their intensities, @100Hz data rate, so your work is done. For other IR cameras, you can use OpenCV, yes. IR camera is not very different than visual camera; it just filters specifically IR-frequency light. And no hazard. Your TV remote uses IR. \$\endgroup\$
    – boardbite
    Sep 7, 2012 at 13:14
6
\$\begingroup\$

Use a webcam, and some software (such as OpenCV) to define the "touch areas".

Entire "virtual keyboards" have been built using this technology.

\$\endgroup\$
3
  • \$\begingroup\$ Hey that keyboard is cool, I've seen it before. Do you know how they project that keyboard onto the surface like that? Is that something a hobbyist could achieve? Thanks. \$\endgroup\$
    – capcom
    Sep 5, 2012 at 23:59
  • \$\begingroup\$ Also, thanks so much for that link to OpenCV. You have no idea how excited I am now, I have so many projects in mind which could use this technology. \$\endgroup\$
    – capcom
    Sep 6, 2012 at 0:01
  • \$\begingroup\$ As far as I know, the keyboard image is generated by a laser diode and a hologram. \$\endgroup\$
    – Dave Tweed
    Sep 6, 2012 at 2:02
5
\$\begingroup\$

You can use a PCB with copper squares, or rectangles to sense capacitance. This would require minimal hardware and very simple software.

I already tried it and it works quite well.

You will need to connect each capacitive pad to a I/O pin on the µC, then you would follow these steps:

  1. Set the pin as an output.
  2. Output a high level for enough time for any eventual capacitive load (that could be your finger) to charge.
  3. Set the pin as an input.
  4. Wait just enough time in order to allow all the pads that are not touched to discharge.
  5. Read all the pins. (The pins read a high are the ones that are being touched.)

You can even (and should) add an insulation to the pads like a soldermask or adhesive film.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks for your answer, but wait a second, this won't create an invisible grid though? Right? \$\endgroup\$
    – capcom
    Sep 6, 2012 at 1:49
  • \$\begingroup\$ @capcom You can create invisible grids with this technique. This is now capacitive touch-screens and mouse pads work. Search the Microchip website for "capacitive sensing technology" for excellent application notes on how to implement this. \$\endgroup\$
    – ARF
    Sep 6, 2012 at 5:42
  • \$\begingroup\$ @capcom As Arik referred, you can make the grid invisible since it cam be covered by other surface such as a plastic, glass paper, etc. \$\endgroup\$ Sep 6, 2012 at 8:30
  • \$\begingroup\$ Oh I know how capacitive touch sensing technology works, but it wont be portable. I won't be able to carry this around wherever I want. Do you know what I mean? The surface covering the sensors will always be a part of the grid. It's a great solution if everything stays in the same spot. \$\endgroup\$
    – capcom
    Sep 7, 2012 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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