This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using HTS to make temperature sensor

Hello, I am trying to make a portable temperature sensor using nRF51822. I made a sensor that basically amplifies voltage level when the temperature increases, and I want to use nRF51822 to send obtained signal to smartphone so that I can monitor temperature using smartphone. Here are my questions.

  1. Can I use internal ADC of nRF51822 in this purpose? I can also work with external ADC, but I am curious. If it is possible, I found that internal ADC has Digital I/O inputs and reference input. To use internal ADC, should I connect some reference signal to its reference input, or is it okay to simply connect output of my temperature sensor to one of ADC input?

  2. I tried to run Hts code and I found that it is working nicely. However, I am not sure where I can assign the pin number that the output port of my temperature sensor will be connected to (mainly because I am bad at coding).

  3. I found that HTM, the monitor app in Nordic Toolbox, only displays the temperature level. Is it possible that I can put a plot of degree Celsius vs time? Also, it looks like the app does not update temperature level continuously. How can I modify it?

Thanks!

Chung

  • If you'd like a plot of degree C vs time, you can try HRM in Nordic Toolbox. It works fine for your purpose. Just modify the ble_app_hrs firmware and report temperature instead of heart rate.

  • Hi

    1. You can use the internal ADC to sense the voltage level from your sensor. There are two types of reference voltages that you can use for the ADC, internal 1.2V reference voltage and an external reference voltage in the range of 0.83V-1.3V. You can read about how the ADC works in the dedicated ADC chapter in the nRF51 reference manual. Data numbers for the ADC is found in the nRF51822 PS, and I also attach a preliminary white paper for the ADC that provides information about its capabilities and limitations. White paper content - nrf51 ADC.pdf

    2. You can find code examples for the ADC on the Nordic's Github site, to use with or without softdevice. There are 8 analog input pins available for input to the ADC, you can see the mapping of those in nRF51822 PS v2.0 table 2. When you initialize the ADC you set the input to one of those pins, as is done in the Github examples.

    3. Currently, the ble_app_hts example only sends data when enabling services and when you press button 0 on the nRF6310 motherboard. Instead, you could set up a timer to send tempterature data, e.g. once a second. The ADC examples on Github all have timers set up to make the ADC sample periodically, so each time you have sampled, you simply send the data over the BLE link. On the app side, you have the time scale in seconds since you receive data approximately once a second. To minimize delay on the BLE link, you can choose to have low connection interval on your BLE link but high slave latency to save power. More about BLE connection parameters on this thread. Perhaps you can examine the HRM part of the nRFToolbox in order to realize how to implement time/temperature graph, since he HRM includes time/heart-rate graph. All the apps are available here as open source.

Related