Shop OBEX P1 Docs P2 Docs Learn Events
possition detection. — Parallax Forums

possition detection.

jasonpeinkojasonpeinko Posts: 20
edited 2007-02-01 18:50 in BASIC Stamp
I want to have a board that will detect the possition of the users finger. like so:

___________________________
|..............................................|
|..............................................|
|..............................................| x
|..............................................|
| _________________________ |
........................x
x are the sensors

what sensors would i use to detect the position of a finger?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-29 23:52
    This sounds a lot like a touch screen…They use resistive elements to detect the X/Y position. I would do a little research on touch screens or touch pads. Is this for a BASIC Stamp Project?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-30 00:26
    yeah
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-30 01:20
    I have do clue how i would build this though. I have somewhat of an idea how to program it but know idea how to build.
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-30 04:53
    http://www.spacedaily.com/news/materials-04zf.html
    i was reading that article. It talks about using sound waves for a touch sensor.
    Would it be possible to make something like that with the boebot chip?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-30 16:30
    Some of the OWI robots use a microphone on the front to detect when the unit has run into something, or to detect a clap to tell it to change direction. This could be used on a BOE-Bot as well. In the completed projects it seems someone has already done something similar.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-30 22:59
    hmmm. I dont know, the code would have to be complicated.
    What about this idea:
    could i make something like what is inside keyboards? where the two sheets of plastic with conductors on them touch for a key stroke.

    But how would i get that to work with only 16 pins?

    also my teacher is wondering how much memory the boebots have on them.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-31 00:19
    The standard BOE-BOT (with the Stamp 2) has 2K (2048) bytes of memory for the program and 26 bytes for variables of which several are used for I/O. You can store some data in the memory used for the program (with the READ/WRITE statements), but the program memory locations can only be changed a certain number of times before they "wear out" and can't be changed any more. This is somewhere between 100,000 and 1,000,000 times. This seems like a lot, but storing data repeatedly in the same location with a program that has "gone wrong" could wear out a location in a few hours.

    You could make your own membrane keyboard-like device. The trick is to use metal that conducts well and doesn't corrode easily, that's flexible and thin so it moves easily, and can be connected to. Often a thin film of silver is used for this. You might experiment with aluminum foil. Springy phosphor-bronze or brass is sometimes used.

    Here are some application notes for other processors that describe the keyboard scanning process. The same idea applies to the Stamp:
    www.atmel-grenoble.com/dyn/resources/prod_documents/doc2532.pdf
    www.atmel.com/dyn/resources/prod_documents/doc2669.pdf
    books.google.com/books?id=4JqlQJd2kvYC&pg=RA1-PA288&lpg=RA1-PA288&dq=keyboard+scanning&source=web&ots=GmvkJ7qw4P&sig=dJ1pshdito6CXr-6yE6M0QwvzjI#PRA1-PA289,M1
  • PARPAR Posts: 285
    edited 2007-01-31 00:27
    jasonpeinko said...
    I want to have a board that will detect the possition of the users finger. like so:

    ___________________________
    |..............................................|
    |..............................................|
    |..............................................| x
    |..............................................|
    | _________________________ |
    ........................x
    x are the sensors

    what sensors would i use to detect the position of a finger?
    You don't say how large/small the board may be. Nor what the resolution of the sensed positioning must be (e.g., on the board or not on the board; or exactly in which half-inch vertically and horizontally on the board), whether you are limited to two sensors (like your illustration) or to many sensors (like your keyboard/keystroke example).·You don't say what you are requiring to do with the data collected (e.g., which might suggest·what the memory·and other processing issues·would be). ·Etc.

    Features, needs, wants,·or constraints like those would help you to focus in on the kind of technology you should readily have at your disposal to construct the device.

    PAR

    ·
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-31 00:31
    I can use as many sensors as i want. What I was going to try and make was a touch sensitive keyboard. For that i would need around 2000px X 800px board.

    i would need it to sense where a point is and then compare it to defined variables for keys.

    I was reading that keyboard pdfs. I get what they are saying. Would i need to buy a chip to get it to work?
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-31 00:51
    also if i went with the regular keyboard idea how would i take apart an old keyboard and get all the right cables?
  • John R.John R. Posts: 1,376
    edited 2007-01-31 04:26
    Well, a 2000 x 800 array would be 2800 inputs using the "normal" keyboard scanning techniques, and yes, you'd need some external chips to help with that. You'd also have to have a way to map the 1.6 million different points you might get back. If you are trying to build a "keyless keyboard", you probably don't need that many points. You should be able to get buy with only a couple (or 4 at most) points per key.

    In terms of taking a "regular" keyboard apart, I don't think you'll find may cables inside. Most modern keyboards are a "sandwich" of plastic film with conductive traces silkscreened on. Some have a "belville waster" or other type of spring either molded into the plastic or glued on to help with the "feel" of the keyboard. All of these traces are routed to a processing chip that takes care of reading the key presses, and passing keycodes to the computer/terminal/etc. via some type of serial connection. Your best bet might be to use the keyboard "as is" and build an interface to read the keycodes. There are probably some hints on this in the Propeller object library, as the Prop demo board has a PS2 port for a keyboard (and mouse).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • Robert KubichekRobert Kubichek Posts: 343
    edited 2007-01-31 04:45
    jasonpeinko said...
    also if i went with the regular keyboard idea how would i take apart an old keyboard and get all the right cables?

    Have you seen this site???
    www.virtual-laser-keyboard.com
    It might be what your looking for... yeah.gif

    Bob scool.gif
  • jasonpeinkojasonpeinko Posts: 20
    edited 2007-01-31 04:49
    it would be nice but where to start making one?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-31 07:15
    Jason -

    Are you trying to re-invent the no-touch ceyboard, or what is it that you're trying to accomplish exactly?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • PARPAR Posts: 285
    edited 2007-01-31 07:59
    jasonpeinko said...
    I want to have a board that will detect the possition of the users finger. like so:

    ___________________________
    |..............................................|
    |..............................................|
    |..............................................| x
    |..............................................|
    | _________________________ |
    ........................x
    x are the sensors

    what sensors would i use to detect the position of a finger?
    Jason, Based on your replies to questions and comments thus far, one more time...

    Chris asked whether you have a Basic2 Stamp (or other Parallax) programmable microcontroller (that is, is this a Basic Stamp-based project?). Was your "yeah" the answer to that question?

    Several others asked what exact problem you are seeking a solution to.

    Do you know how to program the Stamp (assuming you have one)?

    Here's a project for you (assuming you have a Stamp and will be able to program it).

    Make a board big enough to accomodate one switch, which will allow a user's finger to be positioned on it, to press it, and to make switch contact by that action. (Notice that I didn't specify how big the board or switch should be (we know more or less how big a finger tip is), nor did I specify how much pressure to apply before being able to detect the finger tip's presence, nor did I specify why I might even expect a person to want to press the key/switch, nor what reward/result the person would expect to receive. Nor did I specify a lot of other goal, design, costs, deadlines, etc. In this sense, my project specification is similar to yours. But, I think mine is a bit simpler and so it may lend itself to some low-investment effort on your part to build it.

    Connect your switch to your Stamp, and write a program for the Stamp which will detect that the user's finger is positioned on (and pressing) the switch (or not). If the user's finger is positioned on the switch (and is making it close the contacts), then light up a red led. Otherwise, keep the led off. One sensor, one position, two outcomes.

    For the next project, build a larger board with two switches on it, and write a program to determine whether one switch is closed, the other switch is closed, both switches·are closed·(two fingers involved), or neither switch is closed. Turn on/off the appropriate leds. Two sensors, two positions, four outcomes.

    For the next project, do project two but use only one Stamp pin for detecting which switch(es) are pressed.

    Then, move on from there to even more complex problems requiring alternative methods, components, programming features·for efficiency or even the feasibility of creating a solution.

    PAR

    ·
  • metron9metron9 Posts: 1,100
    edited 2007-02-01 18:50
    I have toyed with the idea of a touch screen buit using 1/4 inch clear acrylic LEDS (of course) and a camera.

    If you shine an LED through the edge of a flat piece of acrylic and touch the surface with your finger your finger will light up on the spot where it is pressed. A camera focused on the back of the plastic could be used to locate the bright spot and calculate its position on a 1" x 1" grid so a 10 x 10 could have 100 buttons. Scoring the surface would create a 1" x 1" grid and allow the data from the camera to process the square that has the finger light up. Positioning the camera at a 45 degree angle to the back surface would eliminate stray light from the camera lens so that it can only see the grid and finger. Reading the surface on a timed basis to compare frames would automatically adjust the sensitivity.

    Now Bean has a board that the SX chip used on it could be modified in such a way to count the lines vertical and horizontal on the back of such a piece of plastic so that any grid could be designed with any number of buttons within reason. Even circles and odd shapes could be processed to make it a universal interface for this type of system.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
Sign In or Register to comment.