• Trill
  • Issues with Bela Trill Square and Teensy 4.0

Hi everyone,
Has anyone here got experience using the Trill Square with a Teensy?

I'm testing a Trill Square that I just got with my Teensy 4.0 by running the example project that's included with the Trill library. Problem I'm having is that the trill keeps on registering phantom touches when the sensor isn't being touched.

This is an example of the output from the program. It seems to register a touch being there for a tiny fraction of a second. This is a teensy running the square-print example from the trill library for Arduino (found here).

It's also wired up as expected for the Teensy 4.0, with power and ground run to GND and 3.3v. I have tried adding pull-ups to pins 18 & 19 to see if that was an issue but this didn't seem to help.

At a bit of a loss whether my code, wiring or trill unit is the issue here. I've tested on an Arduino and with a separate trill square Bela sent me as a replacement to no avail.

Let me know if you have any input - cheers Dankey.

    dankeykang At a bit of a loss whether my code, wiring or trill unit is the issue here. I've tested on an Arduino and with a separate trill square Bela sent me as a replacement to no avail.

    What is the behaviour when running it on Arduino instead of Teensy?

    As we tested the sensor we sent you with Bela before shipping it to you, I suspect this may be due to a difference in the Arduino library vs the Trill library. Try adding these lines at the end of setup() in the example code:

      trillSensor.setNoiseThreshold(80)
      delay(10);

    and see if that improves things.

      giuliomoro That seems to have done the job. I feel very silly now, but makes sense entirely that the noise threshold would differ between environments.

      Thanks Giuliomoro!

      that's great news, could you try with a value of 40 instead of 80 and see if it still works or it breaks?

        giuliomoro Seems I spoke too soon, it's gone back to falsely activating even with noise threshold at 40,80 or 255

        try calling

        trillSensor.setPrescaler(2);
        delay(10);
        trillSensor.updateBaseline();
        delay(10);

        and try again

          giuliomoro
          Hi Giuliomoro,
          Apologies for the late reply. I had little success with the code provided here.

          What has been most successful for me is using:

          trillSensor.setNoiseThreshold(255);
          
          trillSensor.setPrescaler(3);

          Hope this is helpful

          Another way of removing ghost touches induced by noise is to use the setMinimumTouchSize() method. This is the minimum size below which a touch is ignored. That should allow to keep an overall smaller noise threshold, which in turns allows for more accurate position tracking.

          I have used trill crafts on teensy lc extensively, and a trill ring on a teensy 4.1, the ring never had any ghost touch issues. I had some funny readings when my sensors were on a floor with a floor heater (I suspect the long metal pipes changed the capacitance or something like that). Maybe you can also try changing your surroundings 🙂 I know this sounds a bit esoteric...