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

Thread: Teensy capacitive touch sensing as stud finder

  1. #1
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    700

    Teensy capacitive touch sensing as stud finder

    Some stud finders use capacitance to locate wooden studs behind drywall, based on the difference between the dielectric constant of air and wood.

    I'm wondering if a Teensy could be made into a stud finder by adding an antenna and a small piezoelectric speaker to play a tone with pitch proportional to touchRead().

    It's possible to purchase a commercial stud finder for less than the price of a Teensy LC, so this would be more of a learning project than a practical one, but I've got the parts on hands, so I'm wondering if anyone else has ideas or references.

  2. #2
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    700

    Cool

    Tried an experiment with a bare teensy LC that shows some promise.

    Using touchRead() you can tell the difference between the following
    • Teensy held its USB cable plugged into the PC
    • Teensy held against its reference card
    • Teensy held against its reference card with a metal ruler on the opposite side of the card


    The difference between the latter two is about 10 counts. This tells me that by tuning the touch sensing parameters, it might be possible to make a stud finder.

    Here's the sketch I used
    Code:
    void setup() {
      Serial.begin(115200);
      while (!Serial) ;
    }
    
    void loop() {
      int tp[] = { 0, 1, 3, 4, 15, 16, 17, 18, 19, 22, 23 };
      int tp_count = sizeof tp / sizeof tp[0];
      for (auto i = 0; i < tp_count; ++i) {
        Serial.printf("% 3d: % 3d: % 6d\n", i, tp[i], touchRead(tp[i]));
      }
      Serial.println();
      delay(1000);
    }

Posting Permissions

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