MakerGram Logo

    MakerGram

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups

    ESP32 with a capacitive sensor

    ESP32
    2
    5
    437
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      FlorianB last edited by

      Hi! I am trying to add an capacitive sensor to the ESP32, that will work through glass with 3mm thickness and an distance of 8 to 2 cm. I have bought sensors which only work on touch, i have looked into the touchRead() function but cant get a steady value increase/decrease with distance and only a real touch gets me enough difference to count it as a "touch". I have checked Arduino examples with foil where a resistor can set the sensitivity but nothing worked on my ESP32. i have spent hours looking for an example, can somebody point me to one please?

      salmanfaris 1 Reply Last reply Reply Quote 0
      • salmanfaris
        salmanfaris @FlorianB last edited by

        @FlorianB Can you share the code, output window/error and details of the sensor module?

        F 2 Replies Last reply Reply Quote 0
        • F
          FlorianB @salmanfaris last edited by

          @salmanfaris I haven't found a good sensor module for this at all. I used a thing which was calles touch sensor and it returns only 1/0. Tried to use touchRead() but it is not sensitive apparently, only 40 and 1 more or less.

          #define touch_pin_numer 33

          const int VALUE_THRESHOLD = 30;
          int TOUCH_SENSOR_VALUE;
          void setup()
          {
          Serial.begin(115200);
          delay(1000);

          }
          void loop(){
          TOUCH_SENSOR_VALUE = touchRead(touch_pin_numer);
          Serial.println(TOUCH_SENSOR_VALUE);
          if(TOUCH_SENSOR_VALUE < VALUE_THRESHOLD)
          {
          Serial.println ("Touch ON");
          }
          else{
          Serial.println ("Touch OFF");
          }
          }

          should show something between 40 (current max) and 1 (current min) the closer the finger gets but it shows 40/41/39 and 1 - nothing inbetween. got this code from the web

          salmanfaris 1 Reply Last reply Reply Quote 0
          • F
            FlorianB @salmanfaris last edited by

            @salmanfaris best if you could point me to an example that works as described: getting different values depending on hoe close the finger is without really touching. nothing i tried did work yet

            1 Reply Last reply Reply Quote 0
            • salmanfaris
              salmanfaris @FlorianB last edited by salmanfaris

              @FlorianB said in ESP32 with a capacitive sensor:

              I haven't found a good sensor module for this at al

              One of my friend used TP223 Touch button module from Ali express, and it's worked fine also @Akhil also used on of module.

              another option is that you can build capacitive sensor your own with resistors.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Recent Posts

              • @jacob_jipson Glad to hear that. 🙌

                • read more
              • J

                @salmanfaris The problem was resolved. Thankyou so much.

                • read more
              • @jacob_jipson said in Need Help: Error compiling for board AI Thinker ESP32-CAM.:

                ESP-NN

                Did you replace the NN folder in the lib as we do for XIAO esp32? and for the AI Thinker ESP32-CAM, you don't need to do that.

                now, try to delete the library and re-add a new one and compile.

                • read more
              • J

                @salmanfaris
                Error log

                C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S: Assembler messages: C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:35: Error: unknown opcode or format name 'ee.vldbc.8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:39: Error: unknown opcode or format name 'ee.zero.q' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:42: Error: unknown opcode or format name 'ee.vld.128.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:43: Error: unknown opcode or format name 'ee.vmax.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:44: Error: unknown opcode or format name 'ee.vmin.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:45: Error: unknown opcode or format name 'ee.vst.128.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:58: Error: unknown opcode or format name 'ee.vld.l.64.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:59: Error: unknown opcode or format name 'ee.vmax.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:60: Error: unknown opcode or format name 'ee.vmin.s8' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:61: Error: unknown opcode or format name 'ee.vst.l.64.ip' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:98: Error: unknown opcode or format name 'ee.zero.q' C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:40: Error: invalid empty loop C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:56: Error: invalid empty loop C:\Users\jacob\Documents\Arduino\libraries\jacobjipson-project-1_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\src\activation_functions\esp_nn_relu_s8_esp32s3.S:40: Internal error in istack_push_space at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/binutils/gas/config/tc-xtensa.c:12515. Please report this bug. exit status 1 Error compiling for board AI Thinker ESP32-CAM.

                Tool section
                Screenshot 2023-09-11 122407.png

                • read more
              • @jacob_jipson said in Need Help: Error compiling for board AI Thinker ESP32-CAM.:

                exit status 1
                Error compiling for board AI Thinker ESP32-CAM.

                can you please share the full error log here and pleas share the screenshot of the Arduino IDE tools section.

                • read more
              By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
              Copyright © 2023 MakerGram, All rights reserved.
              Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct