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

csense_pca10059 documentation/integration

I've integrated the "csense_pca10059" (SDK_16.0.0) into my application. I have only added the button (not the slider), and am getting some functionality from the cap sense routine, however:

- sometimes it does not detect a button press.

- sometimes it detects a button press when there is not one.

I expect to see these results as my physical set-up is probably slightly different from others. I would like to fine-tune the parameters so that my button works reliably. Here are my questions:

1. Is there any documenation for the csense_pca10059 library? If there is not, can you give a basic explanation of how it works (looks like A/D and oscillator may be involved).

2. Is there a way to directly log the A/D conversion values so that I can see the sensor values in real-time (I do have serial log running)?

Thanks for your assistance.

  • Hi, 

    How did you integrate the csense_pca10059 into your application? Which example are you using?

    Could you kindly check with the Adapt a simple example (without SoftDevice) section in this tutorial?

    -Amanda H.

  • Hi Amanda,

    I have no issue programming the dongle and the code has already been integrated into my application. I'm looking for details on how the example (csense_pca10059) functions. It is possible to use the example (csense_pca10059) on it's own, so you could address it from the perspective of looking at this example on it's own.

    Thanks.

  • Hi Amanda,

    I'd like to simplify this question. Let's just put it in the context that I'm using the csense_pca10059 example code, and I wire up a button (wire with metal pad attached).

    1. How to I determine the THRESHOLD_BUTTON value that I should use?

    2. How to I deter the RANGE value?

    3. How do I determine APP_TIMER_TICKS() value?

    4. Is there a way to add logging in real-time to the csense_pca10059 example, so that I can see what values are generated when button is pressed and not pressed?

    Thank you.

  • Hi, 

    crengineer393 said:
    1. How to I determine the THRESHOLD_BUTTON value that I should use?

    If no information is printed out on UART or the values from the slider are meaningless, try changing the THRESHOLD_PAD_1, THRESHOLD_PAD_2, THRESHOLD_PAD_3, THRESHOLD_PAD_4 or THRESHOLD_BUTTON value in the main example file.

     

    crengineer393 said:
    2. How to I deter the RANGE value?

    The RANGE is the input variable of NRF_CSENSE_SLIDER_4_DEF for the Number of relative pads. It means that the slider in its handler will give values (1, steps_no).

    crengineer393 said:
    3. How do I determine APP_TIMER_TICKS() value?

     It depends on the number of timer ticks you want. Please see APP_TIMER_TICKS

     

    crengineer393 said:
    4. Is there a way to add logging in real-time to the csense_pca10059 example, so that I can see what values are generated when button is pressed and not pressed?

     In the Cense example, NRF_LOG_BACKEND_UART_ENABLED is enabled. You could use the terminal tool like Putty to see the log. 

    -Amanda H.

  • I am seeing the UART messages when the button is pressed. What I would like to add to the log is the raw data, as this will help me calibrate the button. Can you suggest a way to do this?

Related