touchAttachInterrupt not working on S3 running on battery

Very nice and thank you. I’m having about the same solution only with 2 touch sensors and the build in LED. And my solution works perfectly if I run it on 5V! and I need to run it on battery. This video is about the PIC16F627A microcontroller and I am using the Xiao ESP32-S3!
If you are saying, switch to the PIC16F627A microcontroller than the use Xiao S3 product from Seeedstudio does not make any sence and I need further functionality of the S3

Hi there,
So he probably means just the Wires part , to help get a better touch system for test.
What does the circuit look like you are using, Is the battery attached to the bottom pads?
Should NOT make a difference what VCC you use, The Xiao is a 3.8 volt minimum MCU.
Have you measured the battery? how many mAH is it ?
If it works on 5 volts then the code is probably OK, if the battery is LOW, 2 things can occur , one the Thresholds for touch inputs will be off from the code settings, two if not enough EMF from battery, it will maybe work only the first time you energize it. Is that the case here? I.e. if you disconnect the supply wait a few minutes. Then connect everything up and turn it on . Does it work only the first time you touch an input?
HTH
GL :slight_smile: PJ
:v:
You have picture of this setup?

The wiring is not the problem, I have my concept workin on 5V.

Well, it’s about the same as in the Video. As you can see in the code the sensors are connected to the pins T7&T8. The only other pins I used are the GND and 3V3, also tried the bottom pads.

And yes, constantly measured and charged the battery as well as used others over4V. so should be no problem there. The main battery I’m testing with is a Panasonic NCR18650B 3400mAh Li-Ion Battery.

This is an interesting remark I’m playing with sice I’m working on in this project.
The code IS ok, I took it of the sample code and only adusted it a bit. As I pointed out before, for me it’s very strange (as you can see in my code) I tested this Threshold and came up with a value of ~ 50.000. I changed already in the meantime my int threshold (from the sample code) to an uint32_t because in the esp32-hal-toutch.h the touch_value_t is defined as #typedef uint32_t.

I can find the needed value from a Serial.print(touchRead(T7)); in the Serial Monitor.
Running on battery, I dont have the Serial Monitor, thats why I added an OLED for output and I found roughly the same Threshold values. The value of around 50.000 in comperisson to the 1500 from the sample code makes me think. But again, it works on 5V, not on 4.xx V (on the GND and 3V3 pins).

Once more, on battery if I touch both sensors simultaneously, I get one event fired. On 5v I see the events on every single sensor touch as in the video.

It has been disconnected for night(s)

I do hope it’s a bit clear but I need to stop with the XIAO because this doesnt seem to work for the Touch what I need it for.

Regards

Bart

PS,

I really appreciate your help in this matter

Hi there,

is it this one?

If so It’s not up to the spec required, says on it 3.7v FYI?
“about the same as the video” ok? Why no picture then?, probably why he suggested the long wires too? just trying to help you be sure to get good touch inputs.

Also if you have connected anything but 3.8Volts to the bottom pads , You may have diminished or damaged the part. You need to measure with a proper voltmeter what you have where.
Also wouldn’t hurt for you to read the technical reference guide not just the data sheet, on the chip and how those inputs are treated under battery power. Also the interrupts section.

FYI… The demo is just that a demo of it using the USB. not anything else, outside of that requires more thought and knowledge of the parts internal functions when using those touch inputs.

The Interrupt mask also is required to do what you are intending. It works if done properly.
I still think the battery can be your issue, how you connect it and it’s ability to maintain the terminal voltage and not lower, ( you shouldn’t be surprised about the thresholds being different based on a different VCC internally.)
HTH
GL :slight_smile: PJ :v:

dude… what da? … I dont mind people who are dumb… I dont mind people who are arrogant… I dont mind people who bash Seeed (when they deserve it) …

But I CANT STAND PEOPLE WHO ARE ALL THREE WRAPPED UP INTO A BURRITO SANDWITCH!

what da? looking in a mirror?

Hi @PJ_Glasso,

Replying to you because I have absolutely no idea what this other guy is up to. I also see this topic is removed from the list, maybe because of this idiot.

Just to let you know, it was because of your remark:

FYI… The demo is just that a demo of it using the USB. not anything else, outside of that requires more thought and knowledge of the parts internal functions when using those touch inputs.

This kept me thinking and now I solved my problem. It’s woking! On USB as well as on battery.

Thanx

Bart

Hi there,
I have no clue, what they are up to on it :face_with_peeking_eye:. I was just pointing out , kinda captain obvious saying that to do anything special (outside that demo’s basic function) there are more options available through the Peripheral Interface registers is all, You are on the right track and I would expect you are considering those other sources too.
Also the S3 is still new so more info is coming from users about some of the features every week,
not to mention the whole touch thing needs a good mechanical , surface or TouchPoint to work even close to the expectations for me.
YMMV :v:
GL :slight_smile: PJ