I slightly misunderstood the root cause. Given that my probe is made out of 2 pads, one for D11, the other one for GND, putting it into water doesn't increase the capacitance but instead lower the impedance. I suspect that the latter is low enough to prevent the capSense timer to reach the compare threshold, thus generating a timeout on the function nrf_utils_cap_sense().
Now I will try 2 things:
removing the GND pin and see if the water detection is reliable,
trying to measure the DC voltage on CAPSENSE_RXpin (CAPSENSE_TX put to logic HIGH), given the water impedance could be equal to or lower than the 1Meg resistor of the capSense feature.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I slightly misunderstood the root cause. Given that my probe is made out of 2 pads, one for
D11
, the other one forGND
, putting it into water doesn't increase the capacitance but instead lower the impedance. I suspect that the latter is low enough to prevent the capSense timer to reach the compare threshold, thus generating a timeout on the functionnrf_utils_cap_sense()
.Now I will try 2 things:
GND
pin and see if the water detection is reliable,CAPSENSE_RX
pin (CAPSENSE_TX
put to logic HIGH), given the water impedance could be equal to or lower than the 1Meg resistor of the capSense feature.