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

Reading Force sensing resistors values via ADC of nrf52DK

Hi,

I need to make two FSRS to read and display the output simultaneously. So, initially I had to get the ADC values from two analog pins at the same time. After struggling a bit, I was able to get it. Now, I need to get the force readings from FSRS. The vDD was taken as 5V since I connnected both the FSRs to the same 5V pin in the nrf52 dk. R_DIV was taken as 2500 ohms. However, the readings I obtained were not accurate. This is because, the ADC values show values fluctuating between 0,1,-1,2. It’s very confusing for me.

Can anyone help me with this?

Thanks!

  • It is erroneous to say you are taking a reading on two inputs simultaneously. nRF52 has but a single ADC that is muxed on multiple pins. The two pin samples are always separated by one sample interval.

    You should probably post a schematic of what you are doing and your code.

    In addition, care should be taken if you are using 5vdc as your divider reference. You cannot take a gpio pin above nRF_Vdd.

    Also you should read up on how an SAADC works. The input forms an RC network during acquisition which can give bad data depending on the equivalent source resistance and capacitance.

  • I should have been more specific. I’m getting the output separated by sample time interval. And my reference voltage is 5V. I’ll try adding capacitor and test the output. Thanks!

  • Just make sure the divider with the FSRS in its relaxed state still won't allow for the pin voltage to exceed nRF_Vdd.
    For the cap there is some guidance in one of the tutorials but a ballpark approach would be figure out what your sample interval is and then choose a cap where the RC constant (ie, maximum thevenin equivalent source resistance ) is one tenth of that period. This cap is of course placed across AIN on the nRF.

    Another ballpark is just to make sure the source cap is at least 10 times greater than the SAADC cap. Both are sloppy approaches but either will do in a pinch.

    The SAADC and your source just do coulomb sharing during acquisition so it's pretty easy to calculate what percent of actual the sample voltage will be, based on your source capacitor.

  • Thank you so much for your Help. I will try that at once and see how the output is and update you about it.

  • I will be closing this case by my answer. I found the solution to it which was rather simple. All I did was calibrate the SAADC pins as discussed here. This gave me a much smoother and better output. Also, I have not added capacitor as it did not influence the readings in any way.

    Thanks!

Related