This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51 Capacitive Sensing Output Value

What is the output for the capacitive sense driver example? ADC code? Voltage? Time?

For example, when the csense_handler function is called, the following line will print out the value to the terminal window but it's not clear to me what that value refers to.

NRF_LOG_INFO("PAD1: %d.\r\n", p_event_struct->read_value);


I've poured over the infocenter's documentation on the csense and csense_drv examples as well as the capacitor sensing library for SDK 12.3.0 and it seems like I'm just missing something obvious.

My ultimate goal is to back calculate the capacitance from the measurement but there isn't an equation for capacitance using the RC time constant method compared to the comparator method.

Parents
  • Hi 

    According to the documentation the output for the nRF51 version of the library is a voltage in millivolts, where "voltage corresponds to capacitance of the pad attached to analog channel and gets higher once it is touched"

    The voltages reported will change based on the sensor you are using, and how it is mounted, so you need to do some experimentation to figure out the right threshold values for your sensor. 

    I can check with the developers if there is any way to calculate the actual capacitance based on this value, but normally that is not a requirement since you only want to know if the sensor is touched or not. 

    Best regards
    Torbjørn

  • Hi again

    The developers didn't have any more info about this unfortunately. The voltage corresponds to the capacitance, but exactly how it scales with the capacitance is unknown. 

    Best regards
    Torbjørn

Reply Children
Related