I am using nrf51822 chips and UART to communicate with my cellphone. I want to know if there are any ways to improve the sampling rate (reading and transmission) of measurement. I am doing the EEG stuff, so more date transitted is favorable. Thanks!
I am using nrf51822 chips and UART to communicate with my cellphone. I want to know if there are any ways to improve the sampling rate (reading and transmission) of measurement. I am doing the EEG stuff, so more date transitted is favorable. Thanks!
What "sampling rate" ?
Whether anything can be improved depends on where it's currently at - and we have no idea about that!
The nRF51822 Product Specification will tell you the capabilities of the chip.
Hi, Sampling rate relates to how many data collected in one second. More data collected in one second is preferred in my application.
I know what it means - but which particular "sampling rate" are you referring to?
the sampling of what and by what ?
The analog signal was input to nrf51822 ADC and then transmitted through Bluetooth. A cellphone was used as the terminal to receive data. I am wondering the maximal data the cellphone can receive per second. Thanks!
The analog signal was input to nrf51822 ADC and then transmitted through Bluetooth. A cellphone was used as the terminal to receive data. I am wondering the maximal data the cellphone can receive per second. Thanks!
The maximum sample rate of the ADC in nRF51 series is 50 kHz, but this is heavily limited by the BLE activity if a softdevice is enabled. See this post for more details.
Thanks for this useful information. I am using the softdevice and I think 2KHz is enough for my applications. I am using an APP called "Bluefruit" to receive data but found the data is far coarse than expected (less than 2KHz). What is the issue? Any other Apps to recommend?
I am using an APP called "Bluefruit"
You mean this: https://learn.adafruit.com/bluefruit-le-connect/ios-setup ?
It's always helpful to give a link, rather than expect people to just know or have to google for you.
Especially as there may be many hits; eg, https://www.bluefruit.co.uk/
What is the issue?
You really need to ask Adafruit about that; it's their app - nothing to do with Nordic!
But do note that phones often limit the available BLE throughput ...
Any other Apps to recommend
Have you looked at nRF Connect?
www.nordicsemi.com/.../nRF-Connect-for-desktop
https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-mobile
The question is whether it is the sample rate of the ADC that is the limitation, or if it is the BLE throughput. You will not be able to send 2k packets each second, you will have to buffer up multiple samples and send these at a lower interval. Remember that the minimum connection interval in BLE is 7.5 ms, and the phone may limit this even further. With bandwidth configuration of the connection set to HIGH (6 packets per connection interval), you could send up to 800 packets each second (given that the other side of the link support this).
Hi Jorgen,
Thanks for the good point. I guess you mean 1000/7.5*6=800. Could you provide some suggestions on how to modify the code? Appreciate it!