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

Capacitive Sensing

Getting the example programs to work from the NRF52 SDK can be a very daunting task. The big problem is that there is virtually no documentation included in the samples themselves and when searching for specific information about how to configure and run them for the environment you are in these is a lot of vague or irrelevant information to sift through to find the true answers. The example projects are board specific requiring you to select the exact development environment you are working in but have nothing to tell you how to set up and run the example for that hardware.

After spending a couple of hours messing around with the PCA10056 nRF52840DK and the csense-drv example I decided to throw this simple PDF together to help those who come after me. Please conside adding this, and maybe similar documents, tot he SDK examples in future so that people who are starting out with the SDK don't waste so many hours trying to get things to work that should be really easy given just a very simple bit of instruction.

4544.PCA10056-capsense-drv.pdf

Parents Reply Children
  • It specifically adds 150k resistors from P0.26  to each sensor. Without these it will not work and this does not appear to be in the instructions. Please correct me if I missed it;-)

  • Yes, that is where I found it too. All I am saying is that for people new to this stuff or people who only use it occasionally, who are likely to want to try out some of the examples, you just need to make it easy by putting all the information needed to build and run the example in one, easy to find, place. Adding simple instructions specific to the project and the board for which it is designed, right there in the example is all you need to get going. You should not have to waste a lot of time and get frustrated by having it not work then having to troll through all the possible documentation locations to find out why.

    It is almost like we are trying to create an exclusive club with a membership exam to pass to get in. If you can't work this stuff out on your own you don't deserve to be in here.

    I am trying to develop a couple of solutions in my spare time. I get a few hours a week to devote to it and cannot afford to spend hours trolling through reams of documentation to get a simple demo example working. It is simply not worth it. If it takes too long I might just as well buy an off the shelf solution.

  • but I think the only thing missing was the resistors ?

  • The only thing to get it working, in this case, was the resistors, yes. There are other things too however. I have no idea how to get into the calibration functions. I am also pretty sure that the project was not set up to use the Segger debug output although I don't really remember now. I had a tough time working out that GPIO 26 was in fact P0.26. Seems simple now I know but I did not find anywhere that this was spelled out.

    This is not an isolated case. I have tried a couple of other examples and been met with other problems along the way. Why would you limit the Zigbee channel you are trying to connect to to a single arbitrary channel in an example project and then NOT call that out in the project documentation, just bury it in the source code. It is very simple, when you understand the problem, to make it scan all available channels and then it would just work with any hub. I am talking about the Zigbee Light Bulb demo here. It is little things like this, that seem simple and obvious when you know the answers, that create an unnecessarily steep learning curve.

Related