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

Parents Reply
  • 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?

Children
  • 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.

  • The file serial_overlay.dtsi file is located under board in the github project

  • Mikal said:
    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?

    The way I read this is that ardiuino_serial.overlay is there to use with other boards which support this.

    However, we wanted to make the sensor sample specifically supported for the nRF52840, in which case boards/nrf52840dk_nrf52840.overlay is included automatically, and it includes boards/serial_overlay.dtsi.

    In other words: you do not need to add any of the files manually in your project.

    Other than that, I do not understand if you have any questions now. Does this work at your side now, or do you have any troubles still?

Related