Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: DIY membrane switches?

  1. #1
    Member
    Join Date
    Feb 2014
    Location
    Southern Oregon
    Posts
    79

    DIY membrane switches?

    Not Teensy specific, but a lot of smart people here doing lots of different things, so thought I'd ask...

    Does anyone have some clean, relatively simple way, to make DIY panel or membrane switches?

    I need a few buttons, in conjunction with an encoder (or 2) and a touchscreen, for the user interface on my project. I just don't seem to be able to find any clean, clever way to add buttons to an enclosure.

    I ordered some of these 1x4 membrane switches (Digi-Key #360-2294-ND) to see how they line up size-wise with Paul's new 2.8" touchscreens (horiz. orientation, layout attached), to add 4 menu buttons along the bottom edge of the screen. But for $20+ I'd really like to find a better solution.

    Any suggestions, recommendations or other approaches?

    Thx,

    --Jon

    Click image for larger version. 

Name:	Touchscreen-Buttons.jpg 
Views:	79 
Size:	35.7 KB 
ID:	5284

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,485

    Cool

    For the Teensy 3.0/3.1/3.2/LC, consider using touchRead (with something like aluminum foil where you want the button, and be sure to ground yourself). Here are two older posts about using touchRead:
    Last edited by MichaelMeissner; 10-15-2015 at 04:04 AM.

  3. #3
    Member
    Join Date
    Feb 2014
    Location
    Southern Oregon
    Posts
    79
    You know, I keep seeing the "Touch" enabled pins, but really hadn't thought about that.

    If I made a pad, with a concentric ring just outside it, that was grounded, small enough that when you touch it you'd hit both with your finger, would that be reliable?

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,485
    I've only played with it when the Teensy 3.0 came out, but it should be simple to try out.

  5. #5
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    665
    The touchRead() functionality works very well. In my experience, the caveats expressed on this forum about touchRead() are overstated.

    I've made buttons by scoring copper clad fiberglass, by soldering thin wire to rivets, and by putting blobs of solder on perf board. I've had no trouble with hand held battery powered applications nor with usb powered applications.

    The only tricky aspects I've run into are the need for calibration and the need for smoothing. Not all touchRead() pins have the same capacitance on the board. Also, whatever you connect to the pins will have some capacitance. For applications that use the proportional nature of touch sensing, the readings are noisy and it is helpful to use median filter or similar to smooth them out.

    My latest project is a joystick made from a piece of copper clad board scored into quadrants. Turns out this feels more natural to use if the buttons are arranged in a diamond pattern so that the four buttons correspond to left, right, up and down. If the board is oriented so that the buttons correspond to diagonal movement, it's difficult to straddle two buttons to achieve precise horizontal or vertical movement.

    I'm curious how much better things would work if I followed all the advice for optimizing capacitive touch sensors. I'm hoping to experiment with this after I develop a little more fluency with designing PCBs.
    Last edited by pictographer; 10-15-2015 at 06:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •