Temperatur sensor

HI!

We are planning to have a student project where student measure ocean temperature and uses the NRF9160DK to send data via MQTT to a broker.

I have completed the fundamental course and it seems like using a i2c sensor i possible.

Do you have any experience or suggestions of whitch sensor to use?

Do you have any experience using a oneWire sensor based on DS18B20?

Br

Mikal Lund

Krokeide Videregående Skole

  • Hi Mikal,

    Do you have any experience or suggestions of whitch sensor to use?

    We do Nordic specific support, so I can not help with this much. Also because I have not measured the sea before myself.
    However, I suggest that you google something like "Arduiono ocean measurement", as this will give the most popular sensor for the task. Especially for educational purposes, having good online resources "er gull verdt" as we say in Norwegian.

    Do you have any experience using a oneWire sensor based on DS18B20?

    There is a sample in Zephyr for the DS18B20 1-Wire Temperature Sensor, which is a good sign. This sample even has an overlay file for the nRF52840DK, so all you need to do is to add a similar overlay for the nRF9160, and I think it should work.

    Was this the info you are looking for?

    Mvh,

    Sigurd Hellesvik

  • Hi Sigurd

    We have tried to port the DS18B20 1-Wire Temperature Sensor to the nRF9160DK, but we do not receive any response from the sensor. Is it possible to have a meeting to discuss this? Br Mikal

  • Mikal said:
    Is it possible to have a meeting to discuss this?

    No, we generally do not provide meetings. If you are insistent on this, you can contact our sales departement, and they might be able to arrange something.

    Instead, we prefer to give debugging tips over this forum.

    Such as:

    Can you connect a oscilloscope or logic analyzer to the data line(s) and see if you see any communication on it?

    How did you wire your sensor?

  • I just copied the nrf52840dk overlay file to a nrf9160dk overlay file without changing anyting but the name.

    Can I just remove the nrf52840 and the nucleo files?

    Why are there both an serial_overlay.dtsi and a arduino_serial.overlay file when they look alike. Since I am using an external sensor is one of them obsolite?

    This is my overlay file:

    Does the code: NRF_PSEL(UART_RX, 1, 1) refer to UART1.

    Should I use UART0 to use pin P0.00 and P0.01?

    br Mikal

  • Mikal said:
    Does the code: NRF_PSEL(UART_RX, 1, 1) refer to UART1.

    Yep, only used if you build for boards with same name as overlay file.

    Mikal said:

    Does the code: NRF_PSEL(UART_RX, 1, 1) refer to UART1.

    Should I use UART0 to use pin P0.00 and P0.01?

    These overlay files are not included automatically. They are either included in your CMakeLists.txt or in your build configuration.

    I can not see serial_overlay.dtsi anywhere in https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/sensor/ds18b20, so this must be your custom one right?

    Mikal said:
    Does the code: NRF_PSEL(UART_RX, 1, 1) refer to UART1.

    You are setting RX pin to GPIO 1.1. This does not select any UART driver for you. The uart selected is another place in your DTS files, where you refer to the uart1_default pinctrl node.

    Mikal said:
    Should I use UART0 to use pin P0.00 and P0.01?

    The 9160 peripherals can allocate pins as you please, so you can use any UART instance with any pins. Just make sure that the pins match up with the pins you have connected the sensor to on the DK.

Related