Reading Force sensing resistors values via ADC of nrf52DK

vam510411 gravatar image

asked 2018-01-13 21:57:21 +0100

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!

edit retag flag offensive close delete report spam

Comments

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.

AmbystomaLabs ( 2018-01-14 17:32:18 +0100 )editconvert to answer

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!

vam5104 ( 2018-01-14 18:46:29 +0100 )editconvert to answer

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.

AmbystomaLabs ( 2018-01-14 19:12:07 +0100 )editconvert to answer

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

vam5104 ( 2018-01-14 19:24:42 +0100 )editconvert to answer