Hello Jordy_k and Welcome.
According to the wiki info an the spec sheets there in. https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/#power-pins
A whopping 700ma. is available from the on board regulator when powered with proper size battery…
The Battery is always the gating factor.
Y not a Flip of the script. You power the whole setup with a 9v or a 12v ( LiCB A23 23A 12V Alkaline Battery) Let the Sensor Power the Xiao with it’s 3.3v 200ma. output.?
The code is very simple. It basically just keeps track of whether the input to pin #8 is HIGH or LOW.
Use it as a wakeup interrupt, for the Xiao from deep sleep(20-30ua.)
You can experiment with the step up thing and it Might work but I’m a skeptic it will EAT the Battery.
HTH
GL PJ
HaHa, LOL Jordy_k
Ok well It’s either gonna work or not , You know pretty quickly. I would try it though.
I think it will work but will see what battery usage is & how efficient the converter is.
HTH
GL PJ