DS18B20 / OneWire not detected on Arduino UNO Q — Zephyr timing / GPIO / RPC issue?

Hi everyone,

I’m running into what appears to be a compatibility issue between the Arduino UNO Q and the DS18B20 (OneWire) temperature sensor, and I’d like to confirm whether this is a known limitation or if there’s a supported workaround.

Summary

  • DS18B20 works perfectly on:
    • Arduino UNO R3
    • Arduino Nano
  • The same sensor, wiring, and libraries do NOT work on Arduino UNO Q
  • The sensor is never detected (DEVICE_DISCONNECTED_C, OneWire scan finds no devices)
  • This persists even when using Arduino_RouterBridge, Monitor, and MsgPack

Hardware

  • Board: Arduino UNO Q
  • Sensor: DS18B20 waterproof probe
  • Wiring:
    • VCC → 5V
    • GND → GND
    • DATA → D2 (also tested D3, D7, D8, A0)
    • 4.7kΩ pull-up resistor
  • Sensor verified working on another Arduino

Software

  • Arduino IDE 2.3.7
  • Arduino Zephyr core (UNO Q)
  • Libraries:
    • OneWire (Paul Stoffregen)
    • DallasTemperature
    • Arduino_RouterBridge
    • MsgPack (hideakitai, installed to satisfy UNO Q core dependencies)

Test Sketch (UNO Q adapted)

#include <Arduino_RouterBridge.h>
#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS A0

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

void setup() {
  Monitor.begin();
  sensors.begin();
  Monitor.println("READY");
}

void loop() {
  sensors.requestTemperatures();
  float c = sensors.getTempCByIndex(0);

  if (c == DEVICE_DISCONNECTED_C) {
    Monitor.println("ERR");
  } else {
    Monitor.println(c);
  }

  delay(2000);
}

Result
Always prints:
ERR

A OneWire bus scan also returns “No devices found” on every pin tested.

Additional Tests Performed
Verified sensor works on another Arduino using the same code

Tested multiple GPIO pins (D2, D3, D7, D8, A0)

Tested 3.3V and 5V supply

Verified pull-up resistor value

Confirmed serial output works using Monitor

Confirmed RouterBridge communication works

Attempted sending temperature data to Linux side using:

Bridge.notify(...)

MsgPack-based RPC calls

Even with MsgPack and Bridge functioning, sensor is never detected

Questions

Is DS18B20 / OneWire currently unsupported on UNO Q?

Are there plans to integrate Zephyr’s native 1-Wire driver into the Arduino core?

Is there an official workaround (specific pin, config, or library fork)?

Has anyone successfully used DS18B20 on UNO Q?

The UNO Q is a powerful and exciting board, but this limitation is significant for sensor-heavy projects. Any guidance from Arduino devs or early adopters would be greatly appreciated.

Thanks!

This is a really nasty one… I am facing the same problem as well here. Finally a board that works well with multiple AP wifi networks and now DS18B20’s won’t work when they work perfectly with my R4 wifi board…. absolute terror…..

Try DS18B20_RT/examples at master · RobTillaart/DS18B20_RT · GitHub

oneWireScanner.ino

oneWireSearch.ino

What do they produce?, pleas post (as text)

I wanted to fool the App Lab this way, but I have not been successful. I have loaded into the MCU of UNO Q the following sketch (Sketch) using IDE 2.3.7 and then switched over to App Lab with sketch section empty and the python section populated with the folloing script (Script).
Sketch:

//12-bit default resolution; external power supply
#include <Arduino_RouterBridge.h>
#include <OneWire.h>
OneWire ds(2);
byte addr1[8];  //to hold 64-bit ROM Codes of DS1
byte data[9];   //buffer to hold data coming from DS18B20
float celsius;

void setup() {

  Bridge.begin();
  Monitor.begin(9600);
  Bridge.provide("get", get);
  ds.reset();
  ds.search(addr1);  //collect 64-bit ROM code from sensor (DS1)
}

void loop() {
  probe1();
  delay(1000);  //sampling interval
  Monitor.print("Hello");
}

void probe1() {
  //----------------------------
  ds.reset();        //bring 1-Wire into idle state
  ds.select(addr1);  //slect with DS-1 with address addr1
  ds.write(0x44);    //conversion command
  delay(750);        //data ready withinh DS18B20-1 or poll status word
  //---------------------------

  ds.reset();
  ds.select(addr1);        //selectimg the desired DS18B20-1
  ds.write(0xBE);          //Function command to read Scratchpad Memory (9Byte)
  ds.read_bytes(data, 9);  //data comes from DS and are saved into buffer data[8]
                           //---------------------------------

  int16_t raw = (data[1] << 8) | data[0];  //---data[0] and data[1] contains temperature data : 12-bit resolution-----
  celsius = (float)raw / 16.0;             //12-bit resolution
  Monitor.print("Temp from Sensor-1: ");
  Monitor.println(celsius, 4);
}

float get() {
  return celsius;
}

Script:

import time

from arduino.app_utils import App
from arduino.app_utils import Bridge

def loop():
    print("loop")
    d=Bridge.call("get")
    print(d, 4)
    time.sleep(1)
    print(' ')

App.run(user_loop=loop)

This is the error during compilation with App Lab which did not appear with IDE: The sketc was uploaded in UN Q under IDE but the temperature was reporting negative (Temp from Sensor-1: -0.0625).

/home/arduino/ArduinoApps/ds18b20/sketch/sketch.ino:4:9: fatal error: OneWire.h: No such file or directory
4 | #include<OneWire.h>
|         ^~~~~~~~~~~
compilation terminated.
exit status 1

Is there any way we can add the OneWire.h Library with Add Lab interface?

Hi @GolamMostafa.

Yes:

  1. Open your App in Arduino App Lab.
    Unlike Arduino IDE which installs libraries globally for availability from any sketch project, Arduino App Lab installs libraries on a per-App basis, so this process will only make the library available for use in the specific App you have open at the time you perform it.
  2. Click the button that looks like an open book with a + sign that is located to the right of the "Sketch Libraries" section heading in the left hand panel of the Arduino App Lab window.
    The "Add sketch library" dialog will open.
  3. Type OneWire into the "Search library" field of the dialog.
  4. Scroll down through the search results until you find the entry for the "OneWire" library.
  5. Select the version of the library you want your App's sketch to use from the drop-down menu in the "OneWire" library entry.
  6. Click the "Install" button.
    You will see a "___ installed" tag appear on the entry.
  7. Click the X icon at the top right corner of the "Add sketch library" dialog.
    The dialog will close.

Now start the App. The first time you start it after performing the above procedure, you will see a process of downloading and installing the library in the "App launch" console view:

Task Downloading library OneWire@2.3.8: 0.00%
Download started: https://downloads.arduino.cc/libraries/github.com/PaulStoffregen/OneWire-2.3.8.zip
Download progress: downloaded:23091  total_size:23091
Download completed: success:true
Task : completed
Task Installing library OneWire@2.3.8: 0.00%
Task : completed

The App should start successfully without any errors related to the OneWire.h header.

1. I have launched App Lab 0.3.2 from the Start con of Windows.
2. A dashboard has appeared with built-in Examples.
3. At the left, I see the following icons
Myapps,
Examples,
Brics,
Learn,
>_

I don't see anything like a+ !

Please, give me some visual hints with images.

Thank you.

You skipped step 1:

You are right!

The OneWire library is installed without error. Now, I am struggling to make the sensor working.

I have not been able to get the DS18B20 / OneWire working on the UNO Q, neither with nor without the library. AI suggested not trying this sensor anymore, but changing to others, for example with an I2C link.

(No offence to you)
Not having an UNO Q to test my libraries however this reply from the AI sounds like the AI is giving up quite fast. I assume the AI cannot find a human reporting it as solved.

Progress is often made by choosing the hard way, a teacher at school long ago told, everything not forbidden by natures laws is possible in theory. The question is are we willing to go the steep path of learning, fail often to make baby steps to get something working in practice. And he smiled that our current level of tech took thousands of years to develop so we must be prepared to spend more time than planned….

1.

Please, give the link to your library for DS18B20 sensor. wish to test it o my UNO Q.

2.

Do the laws of nature imply the existence of an omnipotent authority, or can they be understood without invoking one? (In the interest of linking it with the concept of Confucius.)

First what we call laws of nature are in fact theories that describe and predict what we observe pretty well (most of the time).

Imho we mere humans are not capable of imagine an omnipotent authority.

Imho the laws of nature do not imply an omnipotent entity but does not rule it out either. If it is omnipotent it should be able to alter what we call laws of nature to whatever and hide this from us humans observing this. This means your question cannot be answered.

I have inluded the librray in IDE 2.3.7 and uploaded into UNO Q. The output is -127. Prior to connecting te sensor with UNO Q, I have checked it working with UNO R3.

Temp: 26.25
Temp: 26.25
Temp: 26.50
Temp: 26.50
Temp: 26.50
Temp: 26.75

I am very happy to see that you have elegantly answered to my query. Thank you very much.

Thanks for testing, -127 indicates no connection.

You could try onewireNG (something) to replace onewire. It might be just different enough. My library is simple enough to patch.

The connection that I had with UNO R3 is just transfeered to UNO Q; so, there is physically no connection reak. I guess that the UNO Q is not finding the sensor.

My library has a call isConnected() which can do a number of retries.

If it cannot find the address of the DS18B20 the cause is reduced to only three core oneWire functions.
You could add printing of the address found to see if bytes come in.
(a deviceAddress is an array of 8 bytes, so do a hexdump)


bool DS18B20::isConnected(uint8_t retries)
{
_addressFound = false;
for (uint8_t rtr = retries; (rtr > 0) && (_addressFound == false); rtr--)
{
_oneWire->reset();
_oneWire->reset_search();
_deviceAddress[0] = 0x00;
_oneWire->search(_deviceAddress);
//  added address dump
for (int i = 0; i < 8)
{
 Serial.print(_deviceAddress[i], HEX);
  Serial.print("\t");
}
Serial.println();

_addressFound = (_deviceAddress[0] != 0x00) &&
(_oneWire->crc8(_deviceAddress, 7) == _deviceAddress[7]);
}
return _addressFound;
}

might be easier to install

it has an example for the DS18B20